free hit counter

Add Custom Javascript or PHP Codes in Pligg CMS

0

Pligg is a Social Bookmarking CMS like Digg that lets users register and bookmark their favorite links across the internet. Pligg is basically an Open Source project but many of its useful plugins are paid ones and gets a bit expensive if you feel like getting them all.

But many a times a user might feel a need to insert his or her own Javascript or PHP codes on Pligg pages to customize the looks or to add some extra features.

There is no direct method of inserting the code and many a times it can get your template messy.

You can add the code or edit the Pligg files by login to your Admin account and clicking on Template tab. There you need to select which page you want to edit from a combobox and it will display you the source code from that file. It’s that simple.

Insert Javascript in Pligg Pages

If you want to add Javascript code in Pligg pages, then you will need to place the codes in between {literal} …… {/literal} tags. These are custom tags for Pligg that lets the Pligg CMS know that there is a Javascript to be processed.

Insert PHP Code in Pligg Pages

Inserting PHP code can be a bit tricky. You can insert PHP code in a similar fashion as that of adding Javascript. Simply place your PHP code inside {php} …… {/php} tags and your PHP code will be processed on the live website.

But the important thing to note here is that if your PHP code contains <?php …… ?> delimiter, then you need to remove that. {php} ….. {/php} tags works as an replacement for the default PHP delimiter and if you use both, it will not work.

They both have same functions, so it is necessary to remove the default PHP delimiters because it is not recognized by the Pligg CMS.

Many link exchange services out there requires you to put their Javascript of PHP codes on your website, including all the Advertising networks. And if you happen to have a website based on Pligg CMS then you will need to use the above tags to add the respective codes.

Random Posts

Leave a Reply

CommentLuv badge

This site uses KeywordLuv. Enter YourName@YourKeywords in the Name field to take advantage.

 
© 2012 ing-Base. All rights reserved.