'something', ), $atts ) ); // get button details from DB $sql = "select * from $tbl_tweetandgetit_buttons where button_name='$name'"; $row = $wpdb->get_results($wpdb->prepare($sql)); // add check for id exist if($wpdb->num_rows == 0) { return ''; } // if local file, generate Full URL if(strpos($row[0]->file_path,"TWEEGE_FILE:") == 1) { $row[0]->file_path = str_replace(":TWEEGE_FILE:",'',$row[0]->file_path); $row[0]->file_path = TWEEGI_UPLOAD_URL."/".$row[0]->file_path; } // encrypt, encode sent data $data=array("tweet"=>$row[0]->tweet, "file"=>$row[0]->file_path, "blogger"=>$row[0]->twitter_name, "domain"=>$_SERVER['HTTP_HOST'], "btnname"=>$row[0]->button_name); $encoded=urlencode(base64_encode(serialize($data))); $tweet = urlencode(base64_encode($row[0]->tweet)); $file = urlencode(base64_encode($row[0]->file_path)); $blogger= urlencode(base64_encode($row[0]->twitter_name)); $domain= urlencode(base64_encode($_SERVER['HTTP_HOST'])); $btnname= urlencode(base64_encode($row[0]->button_name)); $url = "http://tweetandgetit.com/process.php?tweet=$tweet&file=$file&blogger=$blogger&domain=$domain&btnname=$btnname"; $url = "http://tweetandgetit.com/process.php?data=$encoded"; $content.= '

Tweet&getit is powered by Viuu

'; return $content; } function tweegi_btnslist($page,$link) { // show button list for specific page global $wpdb,$tbl_tweetandgetit_buttons; $count_per_page = 10; if( !isset($page) || empty($page) || $page <= 0) $page = 1; $lim1 = ($page-1)*$count_per_page; $lim2 = $count_per_page; $result = $wpdb->get_row(" SELECT count( * ) as count_all FROM ".$tbl_tweetandgetit_buttons); $count_all = $result->count_all; $last_page = ceil($count_all/$count_per_page); $rows = $wpdb->get_results(" SELECT * FROM ".$tbl_tweetandgetit_buttons." Limit $lim1,$lim2;"); $previous_page = $page - 1; if($previous_page < 1) $previous_page = 1; $next_page = $page + 1; if($next_page > $last_page) $next_page = $last_page; // loop $i = $page - 3; if( $i < 1) $i = 1; $loop_count = 1; if($i >1) { $previous_page = $i-1; } else { $previous_page = 1; } echo '
'; $count = $wpdb->num_rows; foreach ($rows as $row) { if(strpos($row->file_path,":TWEEGE_FILE:") == 0) { $row->file_path = str_replace(":TWEEGE_FILE:",'',$row->file_path); } echo ' '; // } $loop_count = 1; $i = $page -2; if($i < 1) $i = 1; echo '
Button Name Short Code File
'.$row->button_name.' '.$row->shortcode.' '.$row->file_path.' Delete
'; } function tweegi_delete_buttons() { if ( isset($_POST['bids'])) { $url = $_POST['url']; $page = $_POST['page']; $bids = trim($_POST['bids'],","); global $wpdb,$tbl_tweetandgetit_buttons; $sql = "delete from ".$tbl_tweetandgetit_buttons." where id in (".$bids.")"; if($wpdb->query($sql)) { // show button list again tweegi_btnslist($page,$url); } } die(); } function tweegi_buttons_list_callback($p='',$l='') { // callback function for showing buttons list if(isset($_POST['page'])) $page = $_POST['page']; else $page = $p; if(isset($_POST['link'])) $link = $_POST['link']; else $link = $l; tweegi_btnslist($page,$link); die(); } function tweegi_action_callback() { global $wpdb,$tbl_tweetandgetit_buttons; // this is how you get access to the database $tweet = $_POST['t']; $btn = $_POST['bname']; $tname= $_POST['tname']; $file=$_POST['f']; $location=$_POST['l']; // add check for file existance //preparing local file link if ($location == "local") { $file = ":TWEEGE_FILE:".basename($file); } $shortcode = '[tweegi-button name="'.$btn.'"]'; //here we would insert all fields into db, get inserted_id $sql_insert = "insert into ".$tbl_tweetandgetit_buttons." values('','$tname','$btn','$tweet','$file','$shortcode')"; $out=$wpdb->query($sql_insert); if($out) { echo '

Your Button is ready !
copy / past this code in your posts, pages and Widgets !

'; } else { echo "
Failed to add button, change button name and try again!
"; } die(); // this is required to return a proper result } ?> Wordpress Plugin - Tweet and Get it | Viuu Blog

Download the Tweet & Get it ! WordPress Plugin

on Mar 22 in Twitter Tips, Wordpress Plugin by Viuu

Tweet & Get it ! WordPress plugin Demo

Grab our new and handy FREE Tweet & Get it! WordPress plugin to get relevant Twitter followers.



So, how does all this work then!

Well, first you’ll need to know that you can either be a User or a Publisher.

>>You are a Publisher IF you want to use this plugin on your WordPress blog , so that your visitors can download your files!

>>You are a User IF you want to download a file from a WordPress blog using the Tweet & Get it! Button!



How does Tweet & Get it work for Publishers ?

Share a file & get some relevant Twitter followers!

The plugin allows you to create a Tweet & Get it! Button, which will hold the file you want to make available for download.

In exchange for the file the user will have to:

1. send a promotional tweet (priorly defined by you)
2. follow your Twitter account


Make your button: Step by Step guide

Step 1: Install the WordPress plugin by uploading it via your plugin panel or directly into your themes wp-content/plugins folder

After the installation you’ll see the Tweet & Get it! panel appearing in your WordPress Admin Panel


Step 2: Start making your buttons by clicking on the “Make your button” subpanel.

You’ll find some instructions below each field!

You’ll need to fill out the following fields:

* Twitter username (without the @)

* your promotional tweet

* the file you want to upload >> directly from your hard drive or via a URL

* name of your button (no spaces, dashes, dots, hyphens, etc >> only letters and numbers)




Step 3: Click “Create Your Button” and grab the shortcode

>> it will look something like this [buttonname]

Now you can easily insert the shortcode into any posts, widgets or pages you like.


Manage your buttons

To see your buttons, go to the “Manage your buttons” subpanel.

That’s where you can see all the buttons you made. You’ll see your button’s name, its WordPress shortcode and the file attached to the button.



How does Tweet & Get it work for Users ?

Tweet & Get it ! – What’s that?

If you see a Tweet & Get it! Button on a WordPress blog, it means that you can download a file for FREE, made available to you by its owner.

In exchange for the file, the owner only asks you to:

1. send a tweet to your followers (a tweet defined by the owner)
2. follow the owner’s Twitter account


File download: Step by Step Guide

Step 1: Click on the button when you see it on a WordPress blog

Step 2: The button will ask you to connect with your Twitter account (only if you aren’t already logged in) >>> Click on “Allow”

Step 3: You’ll see:

1. the tweet you’ll have to send (set up by the WordPress blog owner)

2. the Twitter account you’ll have to follow

The tweet and the follow will happen automatically once you click OK !!!


Step 4: Click OK & download your file!


In case you want to use this button on your WordPress blog  just read the publisher’s guide above.

Note that you’ll have to have a self-hosted WordPress blog (wordpress.org) to install plugins!

Download the Tweet & Get it ! WordPress Plugin by clicking the Tweet & Get it! button below!

[tweegi-button name="tweetandgetitWordpressPlugin"]




Leave a Comment