Summaries

Pliggs - All thing PLIGG
Btn_view_blog
You can subscribe to this blog via RSS Icon_rss
671 Words : Posted 11.09.09

In this tutorial I will show you how to start integrating your Wordpress blog into your Pligg install by displaying your recent blog posts in your Pligg sidebar.



One way to add to your Pligg install is to add a Wordpress blog. The blog can be used for promoting certain site features, posting top 10 lists or posting site news. A blog is a great way to increase your site’s traffic and exposure.



 

I added a Wordpress blog to FAQPAL a couple of months ago and it has certainly helped.


One way to integrate the blog is to display your recent blog posts in the Pligg sidebar, this will again add to your blog traffic and ultimately your Pligg install traffic.


In order to do this, you will need to download the latest version of Simplepie, once downloaded, unzip it, and upload it to your 3rdparty folder. It will take approximately 5 minutes to upload, as it is a huge folder.



Now in order to make this work, you must choose a .php file to add the following code, I have used sidebar_stories_u.php (using v9.9.5) and added it to the bottom.


In Wistie open libs/sidebarstories.php, add to the bottom:


< ?php
$feed_url = ‘http://www.YOURSITE.com/blog/feed/’;
$max_items = 5;
 
//Load SimplePie
include ‘http://www.YOURSITE.com/3rdparty/simplepie/includes/simplepie.inc’;
 
//Fetch the RSS feed
$feed = new SimplePie($feed_url);
 
//Check for errors
if ($feed->error())
        echo ‘Error : ‘,$feed->error();
 
//Output up to $max_items posts
foreach ($feed->get_items(0, $max_items) as $item): ?>
        <div class="item">
                <h3 class="title"><a href="<?php echo $item->get_permalink(); ?>">< ?php echo $item->get_title(); ?></a></h3>
                < ?php echo $item->get_description(); ?>
                <p><small>
                Posted  < ?php if ($author = $item->get_author()){ echo ‘ by ‘.$author->get_name(); }?>
                on < ?php echo $item->get_date(’j F Y | g:i a’); ?>
                </small></p>
        </div>
< ?php
endforeach;
?>

In the above code, make sure you change the domain to match yours, as well make sure the path to your blog is correct.


The code above will display “5″ of your recent entries, which you can change by altering:


$max_items = 5;


it will also display the excerpt for the each blog post, author name and date. I chose to only display the title, so you can remove the following:


                < ?php echo $item->get_description(); ?>
                <p><small>
                Posted  < ?php if ($author = $item->get_author()){ echo ‘ by ‘.$author->get_name(); }?>
                on < ?php echo $item->get_date(’j F Y | g:i a’); ?>
                </small></p>

That’s it. This module will work on both v9.9.5 and the latest Pligg build. You will need to do whatever styling you want in order to blend it in with the rest of your site.


You can see a working example on FAQPAL, check out the blog as well.


As always, any issues leave me a comment below.


Will you be using this on your Pligg install?


335 Words : Posted 11.08.09

In this tutorial I will show you how easy it is to add a screenshot to each submission just like Digg.




There are only 2 files to edit for this hack, link_summary.tpl and style.css.


Open link_summary.tpl and find:

        <div class="storycontent">
        {checkActionsTpl location="tpl_link_summary_pre_story_content"}
        {if $pagename eq "story"}{checkActionsTpl location="tpl_pligg_story_body_start_full"}{else}{checkActionsTpl location="tpl_pligg_story_body_start"}{/if}


        {if $viewtype neq "short"}
                <span class="news-body-text">
                <span id="ls_contents-{$link_shakebox_index}">
</span></span></div>

change it to:

        <div class="storycontent">
        {checkActionsTpl location="tpl_link_summary_pre_story_content"}
        {if $pagename eq "story"}{checkActionsTpl location="tpl_pligg_story_body_start_full"}{else}{checkActionsTpl location="tpl_pligg_story_body_start"}{/if}


        {if $viewtype neq "short"}
                <span class="news-body-text">



                                <img src="http://images.websnapr.com/?url={$url_short}&size=T" class="storythumb"/>



                        <span id="ls_contents-{$link_shakebox_index}">
</span></span></div>

Save.


Open style.css and add anywhere:



.storythumb {
float:right;
border: 1px solid #b7cce0;
padding: 3px;
}


That’s it, I have websnapr as default screenshot supplier, though I always recommend using Shrink the Web.


You can see a demo over at Web Link Depot.


As always, post your thoughts and questions below.


You can also follow me on Twitter, where I will always help one on one.


389 Words : Posted 11.01.09

In this tutorial I will show you how to have your stories sent to the published page automatically Tweeted to Twitter using whatever Twitter account you want.



I have already shown you how to use Twitterfeed and Bit.ly to auto publish your published submissions, now lets cut out the middleman, Twitterfeed.


The following code was sent to us by Jorge from the good folks at Bierzeame.


Open your libs/link.php file and find:
function publish() {
if(!$this->read) $this->read_basic();
$this->published_date = time();


totals_adjust_count($this->status, -1);
totals_adjust_count('published', 1);


$this->status = 'published';
$this->store_basic();
}
change it to:
function publish() {
if(!$this->read) $this->read_basic();
$this->published_date = time();


totals_adjust_count($this->status, -1);
totals_adjust_count('published', 1);


$this->status = 'published';
$this->twitter();
$this->store_basic();
}
find:

function username() {
just before it add:
function twitter(){
global $db;


$id = $this->id;
if(!is_numeric($id)){return false;}
if(($link = $db->get_row("SELECT link_title FROM " . table_links . " WHERE link_id = $id"))) {


$message = $link->link_title;
$toshort = getmyFullurl("storyURL", $this->category_name(), urlencode($link->link_title_url), $id);


$bitly = "http://api.bit.ly/shorten?version=2.0.1&longUrl=".urlencode($toshort)."&login=BITLYUSERNAME&apiKey=YOURBITLYAPICODE&history=1";


$bitlyresponse = file_get_contents($bitly);


$jsonresponse = @json_decode($bitlyresponse,true);


$urlshort = $jsonresponse['results'][$toshort]['shortUrl'];


$messagelen = strlen($message);
$urllen = strlen($urlshort);
$totallen = $messagelen+$urllen+1;


if ($totallen>140){
$urllen = $urllen+4;
$message = substr($message,0,139-$urllen);
$message = $message."...";
}


$message = $message." ".$urlshort;


$args= 'status='.urlencode($message);


$twit = curl_init();
curl_setopt($twit, CURLOPT_URL, 'http://twitter.com/statuses/update.xml');
curl_setopt($twit, CURLOPT_VERBOSE, 0);
curl_setopt($twit, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($twit, CURLOPT_VERBOSE, 0); // no imprimir nada
curl_setopt($twit, CURLOPT_USERPWD, "TWITTERUSERNAME:TWITTERPASSWORD");
curl_setopt($twit, CURLOPT_POSTFIELDS, $args);
curl_setopt($twit, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1);
curl_setopt($twit, CURLOPT_POST, 1);


$result = curl_exec($twit);
$http_status = curl_getinfo($twit, CURLINFO_HTTP_CODE);


curl_close($twit);


if( $http_status != "200" ) {
return false;
}


return true;
}
}
Save.


That’s it. Now every story that is sent to the published page will auto Tweet, giving your members another reason to submit.


Make sure you edit your Twitter login details and your Bit.ly details.


It will shorten the submission URL using Bit.ly and send the user when clicked on Twitter to your story page. This will also track how many clicks each one gets which you can check when you login to Bit.ly.



1964 Words : Posted 10.29.09

In this tutorial I will show you how to add the popular Wordpress plugin SexyBookmarks to your Pligg install, adding that extra something to your story pages.




Sexy Bookmarks which I first saw used on a Wordpress blog is one of the best methods to ask your users to share something on social networking sites. It uses the power of jQuery for that added flair.


My good friend Brian over at Blog Engage managed to get his site added to Sexy Bookmarks and I will soon be attempting to have one of my own sites added, so I thought I would try to use it on a test Pligg.


Luckily, I came across a post by Naeem Noor over at CSS Reflex where he had successfully added it to Blogger using 3 chunks of code.


For this tutorial I simply took what Naeem used and adapted it to work in Pligg.


Open pligg.tpl:


add the following just before the closing head tag:

{literal}<script src=’http://code.jquery.com/jquery-latest.js’ type=’text/javascript’/><script type=’text/javascript’>jQuery(document).ready(function() {// xhtml 1.0 strict way of using target _blankjQuery(’.sexy-bookmarks a.external’).attr("target", "_blank");// this block sets the auto vertical expand when there are more than// one row of bookmarks.var sexyBaseHeight=jQuery(’.sexy-bookmarks’).height();var sexyFullHeight=jQuery(’.sexy-bookmarks ul.socials’).height();if (sexyFullHeight>sexyBaseHeight) {jQuery(’.sexy-bookmarks-expand’).hover(function() {jQuery(this).animate({height: sexyFullHeight+’px’}, {duration: 400, queue: false});},function() {jQuery(this).animate({height: sexyBaseHeight+’px’}, {duration: 400, queue: false});});}// autocenteringif (jQuery(’.sexy-bookmarks-center’)) {var sexyFullWidth=jQuery(’.sexy-bookmarks’).width();var sexyBookmarkWidth=jQuery(’.sexy-bookmarks:first ul.socials li’).width();var sexyBookmarkCount=jQuery(’.sexy-bookmarks:first ul.socials li’).length;var numPerRow=Math.floor(sexyFullWidth/sexyBookmarkWidth);var sexyRowWidth=Math.min(numPerRow, sexyBookmarkCount)*sexyBookmarkWidth;var sexyLeftMargin=(sexyFullWidth-sexyRowWidth)/2;jQuery(’.sexy-bookmarks-center’).css(’margin-left’, sexyLeftMargin+’px’);}});</script>


<style type="text/css">div.sexy-bookmarks{margin:20px 0 0 0; border: 0;outline: none;clear:both !important}div.sexy-bookmarks-expand{height:29px; overflow:hidden}.sexy-bookmarks-bg-sexy, .sexy-bookmarks-bg-love{background-image:url(’http://www.YOURPLIGGSITE.com/templates/wistie/images/sexytrans.png’) !important; background-repeat:no-repeat}div.sexy-bookmarks-bg-love{padding:26px 0 0 10px; background-position:left -1148px !important}div.sexy-bookmarks ul.socials{width:100% !important; margin:0  !important; padding:0 !important; float:left}div.sexy-bookmarks ul.socials li{display:inline !important; float:left !important; list-style-type:none !important; margin:0 !important; height:29px !important; width:60px !important; cursor:pointer !important; padding:0 !important}div.sexy-bookmarks ul.socials li:before, div.sexy-bookmarks ul.socials li:after, div.sexy-bookmarks ul.socials li a:before, div.sexy-bookmarks ul.socials li a:after{content:none !important}div.sexy-bookmarks ul.socials a{display:block !important; width:60px !important; height:29px !important; text-indent:-9999px !important; background-color:transparent !important}div.sexy-bookmarks ul.socials a:hover{background-color:transparent !important}.sexy-digg, .sexy-digg:hover, .sexy-reddit, .sexy-reddit:hover, .sexy-stumbleupon, .sexy-stumbleupon:hover, .sexy-delicious, .sexy-delicious:hover, .sexy-yahoobuzz, .sexy-yahoobuzz:hover, .sexy-blinklist, .sexy-blinklist:hover, .sexy-technorati, .sexy-technorati:hover, .sexy-facebook, .sexy-facebook:hover, .sexy-twitter, .sexy-twitter:hover, .sexy-myspace, .sexy-myspace:hover, .sexy-mixx, .sexy-mixx:hover, .sexy-scriptstyle, .sexy-scriptstyle:hover, .sexy-designfloat, .sexy-designfloat:hover, .sexy-comfeed, .sexy-comfeed:hover, .sexy-newsvine, .sexy-newsvine:hover, .sexy-linkedin, .sexy-linkedin:hover, .sexy-google, .sexy-google:hover, .sexy-friendfeed, .sexy-friendfeed:hover{background:url(’http://www.YOURPLIGGSITE.com/templates/wistie/images/sexy-sprite.png’) no-repeat !important;border: 0;outline: none;margin-top:20px;}.sexy-digg{background-position:-980px bottom !important}.sexy-digg:hover{background-position:-980px top !important}.sexy-reddit{background-position:-700px bottom !important}.sexy-reddit:hover{background-position:-700px top !important}.sexy-stumbleupon{background-position:-630px bottom !important}.sexy-stumbleupon:hover{background-position:-630px top !important}.sexy-delicious{background-position:-1190px bottom !important}.sexy-delicious:hover{background-position:-1190px top !important}.sexy-yahoobuzz{background-position:-1120px bottom !important}.sexy-yahoobuzz:hover{background-position:-1120px top !important}.sexy-blinklist{background-position:-1260px bottom !important}.sexy-blinklist:hover{background-position:-1260px top !important}.sexy-technorati{background-position:-560px bottom !important}.sexy-technorati:hover{background-position:-560px top !important}.sexy-myspace{background-position:-770px bottom !important}.sexy-myspace:hover{background-position:-770px top !important}.sexy-twitter{background-position:-490px bottom !important}.sexy-twitter:hover{background-position:-490px top !important}.sexy-facebook{background-position:-1330px bottom !important}.sexy-facebook:hover{background-position:-1330px top !important}.sexy-mixx{background-position:-840px bottom !important}.sexy-mixx:hover{background-position:-840px top !important}.sexy-scriptstyle{background-position:-280px bottom !important}.sexy-scriptstyle:hover{background-position:-280px top !important}.sexy-designfloat{background-position:-1050px bottom !important}.sexy-designfloat:hover{background-position:-1050px top !important}.sexy-newsvine{background-position:left bottom !important}.sexy-newsvine:hover{background-position:left top !important}.sexy-google{background-position:-210px bottom !important}.sexy-google:hover{background-position:-210px top !important}.sexy-comfeed{background-position:-420px bottom !important}.sexy-comfeed:hover{background-position:-420px top !important}.sexy-linkedin{background-position:-70px bottom !important}.sexy-linkedin:hover{background-position:-70px top !important}.sexy-friendfeed{background-position:-1750px bottom !important}.sexy-friendfeed:hover{background-position:-1750px top !important}.sexy-link{ margin-left:25px; float:left}.sexy-link A{padding:10px 0; width:470px; text-align:right; border:0; outline:none}</style>{/literal}


 


Save.


Open link_summary.tpl


add the following anywhere you want the buttons to appear:

{if $pagename eq "story"}
<div class=’sexy-bookmarks sexy-bookmarks-expand sexy-bookmarks-bg-love’ style=’margin:20px 0 0 0 !important; padding:25px 0 0 10px !important; height:60px;/*the height of the icons (29px)*/ display:block !important; clear:both !important;’>


<ul class=’socials’>


<li class=’sexy-delicious’><a class=’external’ href=’http://del.icio.us/post?url={$url}&amp;title={$title_short}’ rel=’nofollow’ title=’Share this on del.icio.us’>Share this on del.icio.us</a></li>


<li class=’sexy-digg’><a class=’external’ href=’http://digg.com/submit?phase=2&amp;url={$url}&amp;title= {$title_short}’ rel=’nofollow’ title=’Digg this!’>Digg this!</a></li>


<li class=’sexy-stumbleupon’><a class=’external’ href=’http://www.stumbleupon.com/submit?url={$url}&amp;title={$title_short}’ rel=’nofollow’ title=’Stumble upon something good? Share it on StumbleUpon’>Stumble upon something good? Share it on StumbleUpon</a></li>


<li class=’sexy-reddit’><a class=’external’ href=’http://reddit.com/submit?url={$url}&amp;title={$title_short}’ rel=’nofollow’ title=’Share this on Reddit’>Share this on Reddit</a></li>


<li class=’sexy-google’><a class=’external’ href=’http://www.google.com/bookmarks/mark?op=add&amp;bkmk={$url}&amp;title={$title_short}’ rel=’nofollow’ title=’Add this to Google Bookmarks’>Add this to Google Bookmarks</a></li>


<li class=’sexy-twitter’><a class=’external’ href=’http://twitter.com/home?status=Reading: {$title_short} –  {$url}  (@NAME)’ rel=’nofollow’ title=’Tweet This!’>Tweet This!</a></li>


<li class=’sexy-facebook’><a class=’external’ href=’http://www.facebook.com/sharer.php?u={$url}&amp;title={$title_short}’ rel=’nofollow’ title=’Share this on Facebook’>Share this on Facebook</a></li>


<li class=’sexy-mixx’><a class=’external’ href=’http://www.mixx.com/submit?page_url={$url}’ rel=’nofollow’ title=’Share this on Mixx’>Share this on Mixx</a></li>


<li class=’sexy-yahoobuzz’><a class=’external’ href=’http://buzz.yahoo.com/submit/?submitUrl={$url}’ rel=’nofollow’ title=’Buzz up!’>Buzz up!</a></li>


<li class=’sexy-linkedin’><a class=’external’ href=’http://www.linkedin.com/shareArticle?mini=true&amp;url={$url}&amp;title={$title_short}’ rel=’nofollow’ title=’Share this on Linkedin’>Share this on Linkedin</a></li>


<li class=’sexy-designfloat’><a class=’external’ href=’http://www.designfloat.com/submit.php?url={$url}&amp;title={$title_short}’ rel=’nofollow’ title=’Submit this to DesignFloat’>Submit this to DesignFloat</a></li>


<li class=’sexy-technorati’><a class=’external’ href=’http://technorati.com/faves?add={$url}&amp;title={$title_short}’ rel=’nofollow’ title=’Share this on Technorati’>Share this on Technorati</a></li>


<li class=’sexy-scriptstyle’><a class=’external’ href=’http://scriptandstyle.com/submit?url={$url}&amp;title={$title_short}’ rel=’nofollow’ title=’Submit this to Script &amp; Style’>Submit this to Script &amp; Style</a></li>


<li class=’sexy-blinklist’><a class=’external’ href=’http://www.blinklist.com/index.php?Action=Blink/addblink.php&amp;Url={$url}&amp;title={$title_short}’ rel=’nofollow’ title=’Share this on Blinklist’>Share this on Blinklist</a></li>


<li class=’sexy-friendfeed’><a class=’external’ href=’http://friendfeed.com/?url={$url}&amp;title={$title_short}’ rel=’nofollow’ title=’Share this on FriendFeed’>Share this on FriendFeed</a></li>


<li class=’sexy-newsvine’><a class=’external’ href=’http://www.newsvine.com/_tools/seed&amp;save?u={$url}&amp;title={$title_short}’ rel=’nofollow’ title=’Seed this on Newsvine’>Seed this on Newsvine</a></li>


</ul>


<div style=’clear:both;’/></div><div class=’sexy-link’> Widget by <a href=’http://www.cssreflex.com/’ title=’Web Design Blog, Blogger Hacks and Blogger templates’>Css Reflex </a>|<a href=’http://www.tutzone.org/’ title=’Tutorials, Rare Downloads, Link Heaven, Tips Tricks, Hacks, Make How, Blogger Tricks And Tutorials, Internet, News, And Many More’> TutZone</a>|<a href=’http://www.pliggs.org/’ title=’All things Pligg’> Pliggs</a></div>{/if}



<div style="clear:both;margin-bottom:20px;"> </div>
 

Save.


I added them just before:

        <div class="storyfooter">
</div>

in the wistie template for the latest build of Pligg.


There are 2 images for this work as well, download them and upload to your images directory.


Note: There is a file embedded within this post, please visit this post to download the file.
Note: There is a file embedded within this post, please visit this post to download the file.

In the chunk of code you added to link_summary.tpl, the images are called, you will need to edit those 2 lines for the location of the images for your site.


I have them working on test Pligg site at Weblink Depot


Again, a big thanks to Josh at Sexy Bookmarks for creating it in the first place, and to Naeem Noor for giving me a starting place.


And finally, big congrats to Brian at Blog Engage on this milestone, make sure you check out his site.


230 Words : Posted 10.24.09

In this post, we look at a simple tool to help monitor all of your backlinks, which is especially good for links you have purchased, and it also lets you make sure those links stay.



There a few things that all websites need in order to succeed, one of those things are backlinks. Backlinks create a source of traffic and can also help with increasing your Google Pagerank.


You can acquire backlinks naturally, or by purchasing them. In order to acquire natural backlinks, you will need to write some killer content or by using linkbait, and then just wait until people link to that content. The other way is by purchasing banner spots or text link ads, this way typically will show results a lot quicker, but it can get costly.


One issue with backlinks is keeping track of them and ensuring they stay active. While there are tools out there that can help you find backlinks to your site, there is only one that monitor backlinks for you, and did I mention it is FREE.


Backlink Monitor


One of the other advantages of this tool, is it helps you determine which keywords you are getting links for, this as you know is key for search engine placement.


Since this service is FREE, they require a link to them on your site.


Give it a try, it’s FREE.


447 Words : Posted 10.20.09

Back in May I showed you how to display a thumbshot of the story submitted using a jQuery hover, now, let’s make it better by only using CSS.


Why not use jQuery? By itself, there is no reason.  However, removing the need for it will cut down on load time.


Another issue with Pligg and jQuery is they do not always get along.  There are too many conflicts with the scriptaculous effects and prototype, which does not like jQuery.


The following is so simple, there is no reason not to use it.


Open, link_summary.tpl and find:

<div id="ls_thetitle-{$link_shakebox_index}" class="toptitle">
                        {if $use_title_as_link eq true}
                                {if $url_short neq "http://" &amp;&amp; $url_short neq "://"}
                                        <a rel="nofollow" href="{$url}" target="_blank">{$title_short}</a></div>

change to:

<div id="ls_thetitle-{$link_shakebox_index}" class="toptitle">
                        {if $use_title_as_link eq true}
                                {if $url_short neq "http://" &amp;&amp; $url_short neq "://"}
                                        <a class="tooltip" rel="nofollow" href="{$url}" target="_blank">{$title_short}<span><img src="http://images.websnapr.com/?url={$url_short}&amp;size=T" alt="{$title_short}" /></span></a></div>

Save.


Open your main CSS file and add:


a.tooltip span {display:none; padding:2px 3px; margin-left:8px; width:200px;}


a.tooltip:hover span{display:inline; position:absolute; background:#ffffff; border:1px solid #80b62a; color:#6c6c6c;z-index:1;}


Save.


You can change the image provider to whatever you like, I personally use Shrink the Web, as they seem to be the quickest.


This method will show the thumbshot immediately upon hover of the story title, the previous method, had a time delay.


Would love your opinion, leave me a comment below. You can also follow me on Twitter, where I will always help one on one.


You can see it in action at FAQPAL.



167 Words : Posted 10.11.09

We rarely feature templates here at Pliggs.com, but when we do, it’s usually because we have come across a template that is simply FANTASTIC!



We introduce:



Mystique is another fantastic design from the folks at Digital Nature, it is built for the latest build of Pligg and is one of the best layouts we have seen thusfar.


Below are some screenshots:



Story page:



Msytique is fully Ajaxed and performs well.


In the saidebar there is a tabbed box that features:



  • categories

  • most popular

  • tags

  • recent comments


The categories tab features an Ajaxed RSS feed icon.


Each post comes with an Ajaxed share function, once you hover over the “Share” button:



We highly recommend this template and thank the good folks at Digital Nature for taking the time to put this template together.


You can view the demo here


You can download the template Note: There is a file embedded within this post, please visit this post to download the file.…


332 Words : Posted 08.25.09

So I have been on this Twitter kick lately, sorry. But, let’s face it, Twitter is where the action is. So let’s looks at how to have the built-in RSS feature work for you.


In this post, I will show you how to have your RSS feed automatically post to Twitter at a time interval you set.


For this to happen, you will need to visit and sign-up at TwitterFeed.  Let’s begin.



Step 1:


Add a feed to your Twitter account:



Allow TwitterFeed to access your Twitter account:




Enter a feed name and RSS feed address:



Click “Test RSS Feed”, you should get this:



Now, click on Advanced:



In here you will want the following settings:



  • Update Frequency – make this want you want, don’t Tweet too often though

  • Post Content – make this title only

  • Check “Post Link” and determine your URL shortener service

  • Post Sorting – change to GUID and uncheck “Feed is sorted”

  • For the remaining settings, this is up to you, I have these blank.



Your feed is now setup:



Depending on the URL shortening service you provided, you will be asked for API login details, for example Bit.ly will provide you with this.  When you select this service you will be presented with 2 fields asking for this info which is used for analytics only.


Here’s how Bit.ly shows yours analytics:



This will simply take posts from your published RSS so you will not be posting spam.  The address that the clicker will be sent to will be the story page.  For this reason, you will want to be careful how many you post and you will also want to post general Tweets in between to not be labeled a SPAMMER or get your “Followers” upset with you.


Will you use this method?


For a live example follow @FAQPAL


Leave your opinion below.


430 Words : Posted 08.11.09

Like most of you, I have had more than enough SPAM on my sites. One of the biggest sources is in the comments section. Let’s put an end to them now.



I have already shown you how to prevent spam bots from submitting stories by using the fabulous tool, reCaptcha, now let’s add it to the comment form as well.


To add it to your comment form, just do the following steps:


Download the latest reCaptcha library from here and upload to your “root”.


You will also need reCaptcha keys for your site, you will need to register and add your site to reCaptcha. Register for reCaptcha keys here.


Open comment_form.tpl, find:


{if $Spell_Checker eq 1}
<input class="log2" onclick="openSpellChecker(’comment’);" name="spelling" type="button" value="{#PLIGG_Visual_Check_Spelling#}" />{/if}

After, add:


{php}


require_once(’recaptchalib.php’);
$publickey = "ENTER PUBLIC KEY HERE";
$privatekey = "ENTER PRIVATE KEY HERE";


# the response from reCAPTCHA
$resp = null;
# the error code from reCAPTCHA, if any
$error = null;


# are we submitting the page?
if ($_POST["submit"]) {
  $resp = recaptcha_check_answer ($privatekey,
                                  $_SERVER["REMOTE_ADDR"],
                                  $_POST["recaptcha_challenge_field"],
                                  $_POST["recaptcha_response_field"]);


  if ($resp->is_valid) {
    echo "You got it!";
    # in a real application, you should send an email, create an account, etc
  } else {
    # set the error code so that we can display it. You could also use
    # die ("reCAPTCHA failed"), but using the error message is
    # more user friendly
    $error = $resp->error;
  }
}
echo recaptcha_get_html($publickey, $error);
{/php}

save. Thats it.


Here is the updated comment_form.tpl file with the reCaptcha code added. – Note: There is a file embedded within this post, please visit this post to download the file.


This will eliminate all comments being left by spam bots and will also make human spamming less atractive as well.


If you use this module, leave me a comment below or perhaps think of linking back to http://www.pliggs.com


Be sure to follow me on Twitter as well for one on one help and news.


220 Words : Posted 07.18.09

The biggest social media site right now, is probably Twitter, and the best plugin for it has to be Tweetmeme.



So, let’s put the both of them to work for you.  Most Wordpress blogs, including this one, use the plugin Tweetmeme.  It simply allows people to Tweet your posts and it shows a count of how many times the post has been Tweeted.


Let’s put this to work on Pligg and hopefully add to your traffic and exposure.  It’s actually quite simple.


Open, link_summary.tpl, add where you want the button to appear:


{literal}
<script type="text/javascript"><!–mce:0–></script>
<script src="http://tweetmeme.com/i/scripts/button.js" type="text/javascript"><!–mce:1–></script>
{/literal}

That’s it.


In the example above it will appear like this:


Tweetmeme for Pligg


If you want the full size button, remove this line:


tweetmeme_style = ‘compact’;

which will give you this:


Tweetmeme and Pligg Fullsize


You can see a working example at FAQPAL.


Hopefully you found this tutorial helpful.   If you are not following us yet, you can follow us at @Pliggs.


Will you be using this?