Component Name: Simple Tweeter Version: 1.0 Author: David Leonard / d4v1d Author url: www.davidleonard.co.za =================================================== CONTENTS =================================================== 1. Introduction 2. Files 3. Install 4. Customization 5. Thanks =================================================== 1. Introduction =================================================== Thank you for purchasing Simple Tweeter. Simple Tweeter allows you to list multiple twitter accounts on a single page on your site. This is beneficial for listing employees or people you find the most helpful on twitter.com. Simple Tweeter also allows you to group accounts under tabs. All of this is done really easily from the Admin Panel, so no coding knowledge is required at all! =================================================== 2. Files =================================================== Simple Tweeter contains the following file structure: - css -- 960.css -- main.css -- reset.css - img -- arrow.gif -- loader.gif - install -- index.php - js -- jquery-1.3.2.min.js -- simpletweeter.js admin.php config.php index.php mysqli.class.php help.txt All the styling is kept in css/main.css and the main application is in index.php =================================================== 3. Install =================================================== The installation process is very simple, follw these steps and you shouldn't have a problem. 1. To set up your twitter page, you have two options. Simple Tweeter can be used as a standalone application from the index.php file, or it can be added to your own page. To use it as a standalone page, simply open index.php in a text editor of your choice, and edit the header found in the st_header div to include your heading and tag phrase. To use Simple Tweeter in your own page, make sure you include the following code: At the very start of the page, before any other code, include the following: execute_multi ("SELECT * FROM thegroup", true); if ($database->aff_rows != 0) { foreach ($database->multirow as $data_row) { extract ($data_row); $theGroups .= '
  • ' . $twitgroup . '
  • '; $twitgroupid[] = $id; $theUl .= ''; } } $database->execute_multi ("SELECT * FROM twitter", true); if ($database->aff_rows != 0) { foreach ($database->multirow as $countkey => $data_row) { extract ($data_row); foreach($twitgroupid as $key => $val) { if($val == $groupid) { $theTab = $key + 1; } } $lastTweet = 'false'; if($countkey == (count($database->multirow) - 1)) { $lastTweet = 'true'; } $theTwit .= 'getTweets("' . $account . '", tabArray = [0, ' . $theTab . '], ' . $lastTweet . ');'; $url = "http://twitter.com/status/user_timeline/" . $account . ".xml?count=1&callback=?"; //Your request URL from step 3 $dom = new DOMDocument(); $dom->load($url); $statuses = $dom->getElementsByTagName('status'); foreach($statuses as $status) { $created_at_time = $status->getElementsByTagName('created_at')->item(0)->nodeValue; $created_at_time = explode(" ", $created_at_time); $created_at = $created_at_time[0] . " " . $created_at_time[1] . " " . $created_at_time[2] . " " . $created_at_time[5]; $created_by = $status->getElementsByTagName('screen_name')->item(0)->nodeValue; $created_name = $status->getElementsByTagName('name')->item(0)->nodeValue; $profile_img_url = $status->getElementsByTagName('profile_image_url')->item(0)->nodeValue; $text = $status->getElementsByTagName('text')->item(0)->nodeValue; $theTweeps .= '
  • ' . $created_by . '

    @' . $created_by . ' - ' . $created_name . '

    ' . $text . '

    ' . $created_at . '

  • '; } } } ?> Then make sure you link to the following in your head section. Note that the path may differ depending on where your page is situated on your server: Then in your body area, where you want the Simple Tweeter component to show, include the following code, making sure to edit the header as above:

    @RockingThemes on twitter

    Keep track of what we're doing, all from one page. It's that simple! Easy to set up, great administration backend, and easy to implement! Buy it now!

    Loading
    It is important to keep the files in the same directory as your page, to ensure everything is linked properly. 2. The next step is to open up config.php in your text editor of choice and edit your mySQL details as follows: $dbuser = 'username'; // Your Database Username $dbpass = 'password'; // Your Database Password $dbname = 'database'; // Your Database Name $dbhost = 'localhost'; // Your Database Host. Ususally localhost Replace the information between the inverted commas with your relavant information. Then set the username and password you would like for the admin panel:\ $user = 'user'; // Your prefered username for the Admin Panel $pass = 'pass'; // Your prefered password for the Admin Panel 3. After you have eidted the config file, upload the files to your server. Point your browser to the install directory. IF your mySQL details are all correct, the database will be setup for Simple Tweeter. Once done, please delete the install directory from your server for safety purposes. 4. Now point your browser to admin.php and enter your login details as set by you in the config.php file. You will then be taken to the admin panel. The Admin Panel is very straight forward to use. Add your Groups, and then add your twitter accounts with the group you would like them under. You can also edit and delete groups and twitter accounts. 5. You are all done. If you point your browser to your page, you should see Simple Tweeter! =================================================== 4. Customization =================================================== You can easily customize the colours and layout of Simple Tweeter from css/main.css. The style is divided into - General - Header - Navigation - Tweets - Admin All text colours and sizes can be changed from General. If you would like to change the width of the tweet section, you will need to edit '#st_tweets li' and '#st_tweets .st_tweet_single'. '#st_tweets .st_tweet_single' should be at least 120px shorter in width than '#st_tweets li' to compensate for margins and padding in your css. =================================================== 5. Thanks =================================================== Once again, thank you for purchasing Simple Tweeter. If you have any suggestions or issues you can reach me directly at the following email: david.m.leonard@gmail.com