• Home
  • Archives
  • Contact Us
Tech Yard

Create Your Own PopURLs Within Wordpress »

tag Categories :  Tips,Tricks and Hacks, Tutorials, WordPress
time Posted on Wednesday, September 10, 2008 by Avinash | * Comments(5)

Popurls is a ultimate source for the latest web buzz and news, with news from sites like DIGG, Technorati, Delicious and many more.You can create something similar with recent posts from your favorite blogs.own-popurls

To implement this you need,

  1. A plugin called phptoexec to execute php code in post/pageInstallation
    1. Download phpexec.txt
    2. Rename phpexec.txt tophpexec.php
    3. Upload to /wp-content/plugins/ directory
    4. Activate the plug-in from Wordpress administration menu

    Usage

    Anywhere in your post/pages where you want to execute a PHP Codes, insert <phpcode> before your php codes and </phpcode> your php codes.
    –Via Hongkiat

  2. Another plugin called SimplePie, along with SimplePie Core
    NOTE : Activate both plugins before your proceed.

  3. Create a new page in wordpress, switch to HTML mode editing and paste the following code,

<div class=”pop-entry”>
<div class=”popurlblock”>

<h2><a href=http://www.digg.com>DIGG <img src=http://www.google.com/s2/favicons?domain=www.digg.com/></a></h2>
<ul>
<phpcode>
<?php
echo SimplePieWP(’http://digg.com/rss/index.xml‘, array(
‘items’ => 10,
));
?>
</phpcode> </ul>
</div>

<div class=”popurlblock”>

<h2><a href=”http://delicious.com”>Delicious  <img src=”http://www.google.com/s2/favicons?domain=www.delicious.com”/></a></h2>
<ul>
<phpcode>
<?php
echo SimplePieWP(’http://feeds.delicious.com/v2/rss/’, array(
‘items’ => 10,
));
?></phpcode>
</ul>
</div>

<div class=”popurlblock”>
<h2><a href=”http://stumbleupon.com”>StumbleUpon</a></h2>
<ul><phpcode>
<?php
echo SimplePieWP(’http://rss.stumbleupon.com/buzz/’, array(
‘items’ => 10,
));
?></phpcode>
</ul>
</div>
<div class=”popurlblock”>
<h2><a href=”http://lifehacker.com”>Lifehacker</a></h2>
<ul><phpcode>
<?php
echo SimplePieWP(’http://feeds.gawker.com/lifehacker/full’, array(
‘items’ => 10,
));
?></phpcode>
</ul>
</div>
<div style=”clear:both”></div>
<div class=”popurlblock”>
<h2><a href=”http://www.boingboing.net”>Boing Boing</a></h2>
<ul><phpcode>
<?php
echo SimplePieWP(’http://feeds.boingboing.net/boingboing/iBag’, array(
‘items’ => 10,
));
?></phpcode>
</ul>
</div>

<div class=”popurlblock”>
<h2><a href=”http://www.digg.com”>Digg</a><img src=”http://www.google.com/s2/favicons?domain=www.digg.com”/></h2>
<ul><phpcode>
<?php
echo SimplePieWP(’http://digg.com/rss/index.xml’, array(
‘items’ => 10,
));
?></phpcode>
</ul>
</div>

</div>

Replace the text inside the SimplePieWP function to the URL of the feed of your choice to create a list of posts from links of your choice.

For Ex.

<h2><a href=http://www.digg.com>DIGG <img src=http://www.google.com/s2/favicons?domain=www.digg.com/></a></h2>
<ul>
<phpcode>
<?php
echo SimplePieWP(’http://digg.com/rss/index.xml‘, array(
‘items’ => 10,
));
?>

To change the bolded text as per the new site/blog links.The feed can also be feedburner feeds.
items => 10, number of posts to be fetched.

Here’ the CSS part

/*  Tutorial By Venkat — www.TechYard.net */

/* http://www.techyard.net/create-your-own-popurls-in-wordpress */

.popurlblock {
width:250px; float:left; padding:0; margin:0 0 40px 0;
}

.pop-entry h2 {
font-size: 1.5em;
margin: 0;
padding: 0 0 15px 0;
height: 15px;
}

.pop-entry h2 a, .pop-entry h2 a:active, .pop-entry h2 a:link, .pop-entry h2 a:visited {
color: #3f3f3f;
}

.pop-entry h2 a:hover {
color: #000;
}

.pop-entry a, .pop-entry a:active, .pop-entry a:link, .pop-entry a:visited {
color: #333333;  //326ea1
text-decoration: none;
font-size:12px;
}

.pop-entry ul{
list-style-type: none;
padding: 0;
margin: 0;
font-size: 0.9em;
width: 350px;
}

.pop-entry li  {
border-top: 1px solid #dcdcdc;
line-height: 16px;
margin: 5px 0 5px 0;
}

.pop-entry li a:hover {
color: #333;
text-decoration: none;
background-color: #fafafa;
display:inline-block;
}

.pop-entry img{
background-color: #fafafa;
}

.clearer { clear: both; height: 30px; }

Change the CSS as per your sites requirements.

If you're new here, you may want to subscribe to my RSS feed. Thanks for visiting!

TEST
tag Digg This! tag Stumble it! tag Add to Del.icio.us tag Netscape it! tag Google Bookmark It!

Make Available You Blog In Different Languages »

tag Categories :  Online Services, Plugins, Tips,Tricks and Hacks, Tutorials, WordPress
time Posted on Wednesday, July 16, 2008 by Avinash | * Comments(1)

If your blog is accessible in different languages, even reader of different countries can access your blog in their languages which can improve your pageviews and revenue scope.

Here’s a javascript code compiled by Amit of Labnol, which uses javascript to translate your website/blog from English to 9 languages,ie., French, German, Italian,Portugese, Spanish, Japanese, Korean, Simplified Chinese, and Arabic.

<form action="http://www.google.com/translate" >
<script language="JavaScript">
<!--
document.write ("<input name=u value="+location.href+" type=hidden>")
// -->
</script>
<input name="hl" value="en" type="hidden">
<input name="ie" value="UTF8" type="hidden">
<input name="langpair" value="" type="hidden">
<input name="langpair" value="en|fr" title="French" src= "http://photos1.blogger.com/img/43/1633/320/13539949_e76af75976.jpg" onclick="this.form.langpair.value=this.value" height="20" type="image" width="30">
<input name="langpair" value="en|de" title="German" src= "http://photos1.blogger.com/img/43/1633/320/13539933_041ca1eda2.jpg" onclick="this.form.langpair.value=this.value" height="20" type="image" width="30">
<input name="langpair" value="en|it" title="Italian" src= "http://photos1.blogger.com/img/43/1633/320/13539953_0384ccecf9.jpg" onclick="this.form.langpair.value=this.value" height="20" type="image" width="30">
<input name="langpair" value="en|pt" title="Portuguese" src= "http://photos1.blogger.com/img/43/1633/320/13539966_0d09b410b5.jpg" onclick="this.form.langpair.value=this.value" height="20" type="image" width="30">
<input name="langpair" value="en|es" title="Spanish" src= "http://photos1.blogger.com/img/43/1633/320/13539946_2fabed0dbf.jpg" onclick="this.form.langpair.value=this.value" height="20" type="image" width="30">
<input name="langpair" value="en|ja" title="Japanese" src= "http://photos1.blogger.com/img/43/1633/320/13539955_925e6683c8.jpg" onclick="this.form.langpair.value=this.value" height="20" type="image" width="30">
<input name="langpair" value="en|ko" title="Korean" src= "http://photos1.blogger.com/img/43/1633/320/13539958_3c3b482c95.jpg" onclick="this.form.langpair.value=this.value" height="20" type="image" width="30">
<input name="langpair" value="en|zh-CN" title="Chinese Simplified" src= "http://photos1.blogger.com/img/43/1633/320/14324441_5ca5ce3423.jpg" onclick="this.form.langpair.value=this.value" height="20" type="image" width="30">
<input name="langpair2" value="en|ar" title="Arabic" src= "http://photos1.blogger.com/blogger/3709/485/1600/arabic-flag.gif" onclick="this.form.langpair.value=this.value" height="20" type="image" width="30" />
</form>

Note:If you copy-paste the code, and you get any errors try to retype the quotes in the JavaScript Code.Also if you want to use the try uploading the flags to your server.

If you are Wordpress you can try out the Global Translator plugin which can automatically translate your blog in the following different languages: English, French, Italian, German, Portuguese, Spanish, Japanese, Korean, Chinese, Arabic, Russian, Greek, Dutch, Norwegian, Bulgarian, Czech, Croat, Danish, Finnish, Hindi, Polish, Rumanian and Swedish.global-translator

Features :

  1. Four different Translation Engines to choose from : Google Translation Engine, Babel Fish, Promt, FreeTranslations.com
  2. Search Engine Optimized: Uses this prmalink structure www.domain.com/en/mycategory/mypost
  3. Built-in cache to reduce the online connections to the translation engines.
  4. Easily customizable.

And is also compatible upto WP 2.5.*

Global Translator : HomePage | Download v 0.9 Release Date May 10 2008

TEST
tag Digg This! tag Stumble it! tag Add to Del.icio.us tag Netscape it! tag Google Bookmark It!

How To : Add Adsense In Wordpress Blogs »

tag Categories :  Tips,Tricks and Hacks, Tutorials, WordPress, wordpress tips
time Posted on Tuesday, July 15, 2008 by Avinash | * Comments(3)

Adsense is the most preferred CPC advertising system, If you started out with Wordpress adding adsense code into wordpress can be a bit confusing.Follow these steps to implement adsense in your wordpress blogs.

  • Obtain your Adsense code from your Adsense Account.
  • Log into your wordpress blog, 
    Click Design Tab,
    Then Click the Theme Editor,
    Click  Single Post (single.php) on the right hand side from the Theme Files
  • If you want the ad below the title of the post,
    Find  this code <div class="postContent"> and place the adsense code right above it. google-adsense-implementation
  • If you want the Adsense ad after the post you have to place the adsense code after the first </div> of the <div class="postContent">

    google-adsense-implementation2

Wrapping Adsense Around Text

You can also wrap adsense around the text in the single-post pages.To wrap adsense around the text follow these steps

To wrap the text to right of the ad, add your adsense code in between these lines 

          <div style="display:block;float:left;margin: 0px 10px 0px 0px;">

         Your Adsense add script

</div>

  • To wrap the text to the left of the ad, add your adsense code in between these lines.

  <div style="display:block;float:right;margin: 0px 10px 0px 0px;’>

   Your Adsense add script 

   </div>

TEST
tag Digg This! tag Stumble it! tag Add to Del.icio.us tag Netscape it! tag Google Bookmark It!

Wordpress Hack : Span Category Listing Over 2 Columns »

tag Categories :  Tips,Tricks and Hacks, Tutorials, WordPress, wordpress tips
time Posted on Monday, July 14, 2008 by Avinash | * Comments(0)

In some Wordpress Blogs the in the sidebar the category listing are long and take up lot of sibebar space.Here’s a trick that can be used to span the category listing into 2 columns saving more sidebar space.

category-listing category-listing-spaning

1.Old Style 2. New Spanning Style

To get your category listing like that of (2), follow these steps

  1. Open your themes style sheet and add these lines

    .widget { padding:0 0 10px 0;}
    .widget p { padding:2px; }
    .widget h4 { margin:0 0 10px 0; text-transform:uppercase; color:#D90202; font-weight:bold; font-size:10px; border-bottom:1px solid #4cb6fc; border-top:1px solid #4cb6fc; background:#cdeafa; padding:8px 15px; }

    .widget ul { list-style-type:none; padding:0 0 0 10px;}
    .widget li { font-size:12px; padding:6px 0 6px 12px; no-repeat; background-position:0px 12px;}

    .widget li a { font-size:12px; color:#333333; }
    .widget li a:hover {color:#0070b2; }

    .widget.tags { text-align:justify; width:226px; overflow:hidden;}
    .widget.tags a {color:#808080; }

    ul.right {float:right; width:132px;}
    ul.left {float:left; width:120px;}

    .c {clear:both;}

  2. Open your sidebar.php and add for the following lines

    <div class=”widget”>
    <h4>Categories</h4>
    <?php
    $cats = explode(”<br />”,wp_list_categories(’title_li=&echo=0&depth=1&style=none’));
    $cat_n = count($cats) - 1;
    for ($i=0;$i<$cat_n;$i++):
    if ($i<$cat_n/2):
    $cat_left = $cat_left.’<li>’.$cats[$i].’</li>’;
    elseif ($i>=$cat_n/2):
    $cat_right = $cat_right.’<li>’.$cats[$i].’</li>’;
    endif;
    endfor;
    ?>
    <ul class=”left”>
    <?php echo $cat_left;?>
    </ul>
    <ul class=”right”>
    <?php echo $cat_right;?>
    </ul>
    <div class=”c”></div>
    </div>

  3. You can use 4 variations of depth by changing the value of depth in the 4th line of Step 2 to 0,-1,1,2

    0
    - All Categories and child Categories (Default).
    1 - All Categories displayed in flat (no indent) form (overrides hierarchical).
    1 - Show only top level Categories
    n - Value of n (some number) specifies the depth (or level) to descend in displaying Categories
TEST
tag Digg This! tag Stumble it! tag Add to Del.icio.us tag Netscape it! tag Google Bookmark It!


Translate TechYard Into Your Language

العربية Български 中文(简体) 中文(繁體)
Hrvatski Česky Dansk Suomi
Français Deutsch Ελληνική हिन्दी
Italiano 日本語 한국어 Norsk
Polski Português Română Русский
Español Svenska    
Subscribe to Tech Yard by Email
Google Reader or Homepage Add to My Yahoo! Subscribe with Bloglines Add to Technorati Favorites! Add to netvibes

Recent Posts

  • Bechmark Your Blog Loading Time
  • Convert Your Photos Into Sketches
  • Change Default Folder Where Windows Installs Softwares
  • US Dollar Bill Aptly Suiting The Present US Economy
  • Customize Your iPod With Themes Using iPW
  • Translate WebPages From Within FireFox
  • Check Whether Your System Can Play The Game Or Not
  • Access Google Analytics On iPhone
  • Twitter Revamp In The Making
  • Create Ripple Effect Of Your Desktop Wallpaper
  • Recent Comments

    • Avinash on Bechmark Your Blog Loading Time
    • zuborg on Bechmark Your Blog Loading Time
    • firefox tricks on Chrome Tweaks : Wordpress Theme
    • tricks on US Dollar Bill Aptly Suiting The Present US Economy
    • Tech News on Display Thumbnails For Excerpts On Homepage In Wordpress Without Using Custom Fields.
  • TECH YARD Copyright © 2008 | Disclaimer & Privacy Policy | Slick Blue Theme by Kyle Eslick