'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
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 !

'.$shortcode.'
'; } else { echo "
Failed to add button, change button name and try again!
"; } die(); // this is required to return a proper result } ?> Browsing the Category Tweets of the week  | Viuu Blog

Archive of Tweets of the week  | Viuu Blog

Tweets of the Week: 16th May 2011

on May 23rd, 2011 in Tweets of the week by Viuu | 1 Comment

Let our tweets of the week inspire you for whatever work you’re doing. Discover some gorgeous photography, creative designs and beautiful art! Artist Twitter Backgrounds – Chagall | Viuu Blog http://ow.ly/4WmMK #twitterbackground #design #art 30 Best Examples of Bollywood Movie Posters | inspirationfeed.com http://ow.ly/4WzGc #posters (via @Inspirationf) The Entertainment Lobby: Inspirational Cool…

Continue reading...

Tweets of the Week: 2nd Mai 2011

on May 9th, 2011 in Tweets of the week by Viuu | No Comments

In this week’s Tweets of the Week you’re going to find some great photography, design, packaging and typography inspiration. Enjoy! Japan Twitter Backgrounds | Viuu Blog http://ow.ly/4L7gg #twitterbackground #design #japan 45 Creative Poster Designs http://ow.ly/4L7eH #graphicdesign #posters #vintage #retro (via @bluefaqs) Stunning creative portraits by Alexey Kurbatov – Blog of Francesco Mugnai…

Continue reading...

Tweets of the Week: 18th April 2011

on April 26th, 2011 in Tweets of the week by Viuu | No Comments

Take a look at some inspirational stuff to get your creative juices flowing with our Tweets of the Week! Enjoy and be inspired! Artist Twitter Backgrounds – Jawlenski | Viuu Blog http://ow.ly/4CoIR #twitterbackground #design #art Stunning Collection of Abstract Art Paintings (via @webdesigncore) http://ow.ly/4Cm1t #Typography inspiration | #237 (via @from_up_north) Design inspiration…

Continue reading...

Tweets of the Week: 11th April 2011

on April 19th, 2011 in Tweets of the week by Viuu | No Comments

Take a look at what inspiring designs, photography and illustrations we have in store for your this week. Enjoy! . New free wordpress plugin @Tweetandgetit ! Share you files in exchange of a tweet and a Twitter follow http://ow.ly/4xqTi The amazing style of Dan Matutina http://ow.ly/4wQCv Artist Twitter Backgrounds –…

Continue reading...

Tweets of the Week: 4th April 2011

on April 12th, 2011 in Tweets of the week by Viuu | 1 Comment

In today’s Tweets of the Week we have some original artwork, beautiful photography, creative packaging, amazing drawing, great design, and some sweet illustration. Enjoy and be inspired for the week! Migy – illustration – lettering – patterns – editorial & childrens books http://ow.ly/4usnv #artwork Ryan Hyde – Photography Twitter Backgrounds…

Continue reading...

Tweets of the Week: 28th March 2011

on April 4th, 2011 in Tweets of the week by Viuu | No Comments

Draw some inspiration from our Tweets of the Week. Take a look at some gorgeous photography, amazing design, creative advertising, beautiful art and funny videos. Enjoy! Typography inspiration | #226 (via @from_up_north) http://ow.ly/4nxLX Artist Twitter Backgrounds – Kees Van Dongen | Viuu Blog http://ow.ly/4oDw5 #twitterbackground #artwork #art #design Logo Design…

Continue reading...