Archive for the ‘phpLB Mods’ Category

phpLinkBid mod - Add articles to your bidding directory

This post is to present the new article mod that I have created for phplinkbid version 1.2

Click here to download the mod.

The ZIP file must be extracted. Read readme.txt very carefully.

Contact me if you encounter any problems.

If you enjoyed this post, make sure you subscribe to my RSS feed!

7605 Comments


phplb mod - making sure a long description does not mess up the design

This is a quick tutorial on how to mod your phpLB directory to prevent long descriptions for listed sites messing your design.

This is only releavant to those people using this mod to improve the descriptions. When someone writes a long description for their submission, it can affect the design when shown on the homepage and category page. Just look how I messed up a directory this morning.

As you can see, the long description made the nice vertically aligned listings look outof place.

To fix this, we can add a [read more…] style feature to those sites whose descriptions are too long.

This is the fix that has been applied on Zorg Links for the past few weeks.

To do this to your own bidding directory, do the following :

In FTP/File Manager mode, go to file inc/bootstrap.php

Find :


$kytoo_version = file_get_contents(PATH_BASE . 'version.txt');
$cfg->setVar('kytoo_version', $kytoo_version);

$cfg->setVar('regexp_urlsafe', 'A-Za-z0-9');

after it add :


function wordCut($text, $limit, $msg){
    if (strlen($text) > $limit){
        $txt1 = wordwrap($text, $limit, '[cut]');
        $txt2 = explode('[cut]', $txt1);
        $ourTxt = $txt2[0];
        $finalTxt = $ourTxt.$msg;
    }else{
        $finalTxt = $text;
    }
    return $finalTxt;
}

Save and upload the file.

Edit header.php

Find :


$bid_url = DIR_BASE . $bid_url;

after it add :


$rs->fields['link_description'] = wordCut($rs->fields['link_description'], 150, 
'<a href='.$bid_url.'>... read more</a>');

Save and upload the file.

Edit index.php

Find :


$tpl->assign_array_d('link_row', $rs->fields, 1);

remove it.

Find :


$bid_url = DIR_BASE . $bid_url;

after it add


$rs->fields['link_description'] = wordCut($rs->fields['link_description'], 150, 
'<a href='.$bid_url.'>... read more</a>');
$tpl->assign_array_d('link_row', $rs->fields, 1);

Thats it. All we did was add a function in a config file, and use it to snip descriptions that are too long and replace them with a …readmore feature. This has been tested and seems to work fine on Zorg Links. However as always make sure you make a backup of the files we edit before you change them, incase this mod doesn’t work out for you.

~Mike

If you enjoyed this post, make sure you subscribe to my RSS feed!

12 Comments


phpLB Mod :: How to enable longer category descriptions

In another post i will show you how writing category descriptions can increase your traffic and submissions. Everyone should be writing unique descriptions for their category pages in phpLB, but there is a small problem that prevents people from doing so. The descriptions can only be 255 characters long. This is a problem as you need to write more for an effective description. To enable longer descriptions, do the following:


Open up phpmyadmin for the database used on your directory.Go to the SQL page.

In the box, type :

ALTER TABLE `tbl_categories` CHANGE `cat_description` `cat_description` TEXT

Click Go.


This will change the description field to variable length, rather than fixed length. It will allow you to write nice long descriptions without a limit being placed on them.

Hope you found this useful.

~Mike

If you enjoyed this post, make sure you subscribe to my RSS feed!

2 Comments


How to add thumbnails to your phpLB bidding directory

This post is being written due to several requests. It seems to be a popular thing for bidding directory owners to want to show an image of the site listed. I guess it helps emphasise the look and brand of a listed site. It helps viewers to remember where they had seen that sight before.

We will be using the permanent thumbnails provided by MSN. These will be static, unlike some thumbnails which only show when you hover your mouse near them.

This mod will show a small image of the listed website. It will be shown on the home page and the category pages.


In your file manager or FTP program, navigate to your template name
Edit links.tplFind

<div class="link-place"><a href="{bid_url}">Place Bid</a></div></td>

After it add

<td><img src="http://msnsearch.srv.girafa.com/srv/i?s=MSNSEARCH&r={link_url}"></td>

Well guys thats it. It will show a thumbnail of the listed site. With basic HTML knowledge, you can move the image around for better placement, add WIDTH and HEIGHT properties to the <img> tag to re-size it.If you like the post leave me a comment. You can see the thumnail in action here - the link leader has a nice image of their site displayed.~Mike

If you enjoyed this post, make sure you subscribe to my RSS feed!

749 Comments