Pligg CMS Blog

August 24, 2010 by Eric Heikkinen | 1 Comment »

Support Us with Pligg.com and Cuteaholic.com Banner Ads

We currently have 2 Pligg.com banner advertisement spots available for purchase. If you would like to display an ad across all of Pligg.com, with around 1,000,000 ad impressions each month, you can reserve an ad slot from BuySellAds.com today. We are interested in working with companies who operate in the technology field and are interested in marketing to tech professionals. If you have a product or service that you would like to advertise, don’t hesitate and buy an ad before the slots are filled!

For those of you interested in appealing to a female audience, Cuteaholic.com (the cutest website in the whole wide world) is now offering banner ad spots. You can purchase an ad slot on Cuteaholic for a ridiculously low introductory price of $15 for 30 days. This rate will only be available to the first few advertisers, so act quickly before the price goes up!


August 17, 2010 by Eric Heikkinen | 3 Comments »

2010 Open Source CMS Awards Nominations

Packt publishing, who I am currently developing a Pligg CMS book for, has recently announced a call for nominations for this year’s Open Source CMS Awards. This is your second opportunity this week to WIN AN AMAZON KINDLE! By nominating or voting for your favorite Open Source project (a.k.a. Pligg CMS), you will be entered in a drawing to win an Amazon Kindle! What better way to read the upcoming Pligg CMS book?

Last year Pligg CMS received the runner up prize for the “Most Promising Open Source CMS” category. This year we hope to earn the top place as the Most Promising Open Source Project. In order for us to achieve that goal we need everyone to nominate Pligg CMS. That means you, your friends, your grandma, that creepy guy who walks his small dog past your house way too often….. everyone! If they have an internet connection, we want their vote! So spread the word by posting an alert on Twitter and Facebook.

RT: @pligg Enter to win a Kindle by nominating Pligg CMS for the Open Source Awards! #packt – http://bit.ly/VotePligg

Please take a few seconds to nominate Pligg CMS as the Most Promising Open Source Project. If you are feeling extra-generous we would also appreciate your nomination as your Favorite Open Source CMS. Nominations close September 17, so cast your vote soon!


August 16, 2010 by Eric Heikkinen | 4 Comments »

Pligg Widget Contest – Win an Amazon Kindle!

Owning an Amazon Kindle just got a lot easier! We at Pligg CMS are proud to announce that we are holding another contest for developers. This time around we are asking developers to create free Pligg widgets to share with the community. What’s even better is that widgets are REALLY EASY to develop!

How to Enter:

Submit your widget to the Free Widgets forum. All new submissions are moderated, so your post will not appear immediately after being submitted. Your widget should appear within a few hours of submission, once a forum moderator has approved it. We reserve the right to deny widgets that do not offer any features that we consider to be useful. If your widget offers some type of meaningful functionality it will be approved, we just don’t want to see some mindless “Hello World” type widgets.


* Adult female human hand not included.

At the time of this contest announcement, there is no set deadline for submitting your widget. We will alert everyone when we are nearing the end of the contest deadline and give developers a week long grace period to submit their work before starting the poll that determines the winners.

How Winners are Chosen:

Once the competition period ends, we will host a poll where users can vote on their favorite widget. The widget that receives the most votes by the time the poll closes will be announced as the winner.

Prizes:

The following prizes will be given out to the top 5 widget authors:


* Black electronics are wicked awesome

The Fine Print:

  1. The developer must be the original author of the code. When using third party open source code as the basis of your work, you must properly credit that code and consider it for your own widget license.
  2. The widget must use un-compiled, open source code.
  3. Widget authors may choose from a number of open source licenses when submitting their widget to the forums, including:
    • Apache License, 2.0
    • Simplified BSD license
    • GNU General Public License (GPL)
    • GNU Library or “Lesser” General Public License (LGPL)
    • MIT license
    • Creative Commons License
  4. Contest winners located outside of the continental United States must provide shipping costs, unless a local supplier is able to provide the same prize at equal or lesser value.
  5. Authors are limited to only receiving 1 prize, given for the highest rated widget based on poll results. If you develop the #1 and #3 widgets, you will only be given the #1 prize. The #4 widget author would then receive the 3rd place prize.

August 11, 2010 by Eric Heikkinen | 5 Comments »

Pligg CMS 1.1.1 Release

This release addresses a security issue discovered by Secunia Research. We thank Secunia for alerting us of the problem. At the same time we apologize to Pligg users who might have to make a second upgrade after the recent 1.1.0 release. The good news is that the upgrade process from 1.1.0 to 1.1.1 is very simple.

The 1.1.1 version fixes a couple issues that were discovered in the previous 1.1.0 release, in particular a fix for RSS feeds, and a bug that caused sites to show blank pages after a successful installation.

One modification recently made is that the “Top Users” page will now sort users by karma score in descending order. Previously this page displayed all users and sorted them by username in ascending order. The page will now hide any users with a karma score of 0 or below (negative karma), punishing inactive users. In order for your site to benefit from this change you must run the /libs/karma.php file using a cron job, or your web browser, regularly.

Upgrading

The upgrade process from the previous 1.1.0 release is very simple. Just copy the new 1.1.1 files over the previous 1.1.0 files, overwriting the older files. When that completes run the upgrade script from /install/upgrade.php to update your Pligg CMS version number and complete the upgrade process.

With the exception of the template_details.php file version number updates, there have been no changes to the template files between 1.1.0 and 1.1.1.


August 4, 2010 by Eric Heikkinen | 4 Comments »

Pligg CMS 1.1.0 Release

The 1.1.0 release introduces a new Widget system to Pligg’s Admin Panel Dashboard. This release also includes a few security fixes, which means that it is essential that all Pligg users make the upgrade to the latest version.

Download Pligg CMS 1.1.0

Pligg Widgets

Pligg widgets can be installed, removed, and organized very easily. Widgets have their own management page where you install and uninstall them, similar to the Module Management page. Once you have installed a widget, you will see it appear on the top left area of your Admin Panel homepage. By left-clicking and holding on the widget title bar, you can drag-and-drop a widget box from one spot to another. This allows you to organize the widgets in an order that makes sense to you.

You can download Free Widgets from the Pligg Forums. So far we have a Twitter and Local Weather widgets, which are good examples of what widgets can do.

Pligg Pro Deals & Coupons

With this release we are offering 2 special limited time deals. First is a coupon code that will get you $15.00 off the Status Wall Module. That brings the price down to $50 for a limited time, just use the coupon code 15OFFWALL to receive your discount during checkout.

Our second deal will get you 20% off of the recently popular Auto Content Scraper MOdule. You can now order the module for $15.60 after entering the coupon code SCRAPER20 at checkout. Both of these coupons will expire August 21, so act soon!


July 21, 2010 by Eric Heikkinen | 3 Comments »

Pligg 1.1.0 Beta Testing

Starting today we are ready to begin the beta testing process for Pligg CMS 1.1.0. The new version of Pligg features an improved Admin Panel, a security fix, bug fixes, and many miscellaneous improvements. The 1.1.0 version of Pligg introduces Widgets to the Admin Panel Dashboard. If you don’t know what Widgets are, now is a good time to read the Widget blog article.

We are anxious to release this next version to address a security issue that was recently patched, but we would like to take a few days to beta test. This will allow beta users to discover bugs that we have not yet come across, and will let us test out Pligg on multiple web hosts. We would appreciate any input that you might have concerning this new beta version. Whether you would like to submit a recommendation, or if you just want to compliment any new features, we would appreciate your thoughts.

If you have an existing Pligg CMS website and you would like to volunteer to make the upgrade to 1.1.0, we welcome your feedback. We are also seeking users who want to try out a fresh install. Whether you are upgrading or starting from scratch, please make sure that you carefully test out Pligg and report back with any bugs that you might discover. Please post any bugs that you find to the Pligg Bug Report area. If you would like to just share a general thought, please leave a comment on this blog article.

You can download the current test build of Pligg by using this Sourceforge link, which will grab the absolute latest SVN version. Alternatively you can use one of the SVN builds from the semi-official Pligg Downloads page. We post SVN builds to this page whenever we feel that the code is relatively stable.

As always, we highly recommend that you test out “beta” versions on a non-production server. We are quite confident that the current build is stable, but it is always best to wait for a final release version. Beta testers should also make sure that they generate backups of the files and databases being used by Pligg before upgrading.


July 15, 2010 by Eric Heikkinen | Comments Off

4 Quick Pligg Tips and Tricks

I have been working with Pligg for over four years now, and during that time I have collected several useful snippets of code that I found found to be quite useful when designing a Pligg template. This article includes some of those snippets, as well as some general tips for using Pligg CMS.

1. Smarty Modifiers and Functions

Here is another great feature that has been improved with the 1.0.2 release. We have recently added new Smarty modifiers and functions that allow you to alter variable output values. Many, but not all, of these modifiers have been documented by Smarty and Template Lite. Below are some examples of how you could use these Smarty modifiers to alter story content in link_summary.tpl.

Replace one word with another

The replace modifier is perhaps my favorite Smarty modifier because it can do a lot of fun things. Keep in mind that it does literal searches when finding terms to replace, so any difference in capitalization will be ignored.

{$story_content|replace:’hello’:'howdy’}
Input:I just wanted to say hello.
Output:I just wanted to say howdy.

Next is an example of using 2 replace modifiers on the same variable. This example should be enough for you to figure out how to combine 2 or more modifiers to effect a single variable.

{$story_content|replace:’hello’:'howdy’|replace:’just wanted’:'love’}
Input:I just wanted to say hello.
Output:I love to say howdy.

Count the number of characters used

This will tally the number of characters used in a variable, including whitespace.

{$story_content|count_characters:true}

Truncate the story after 30 characters

This snippet will round the content to the nearest full word, making the output equal to or less than 30 characters every time. There are a variety of ways to use the truncate modifier, demonstrated on Smarty.net.

{$story_content|truncate:30}

Capitalize each word

This will capitalize the first letter of every word.

{$story_content|capitalize}

Uppercase each word

Does exactly what you think it would, capitalizes every letter of every word.

{$story_content|upper}

Do some math

Not something that I have used in the past, but someone might find this useful.

{math equation=”(( x + y ) / z )” x=2 y=10 z=2 }

2. Check if a Module is Enabled

This next code snippet is an example of how you can check if a module is enabled or not from your template. If you design template that depends on a module, you can display an error message letting them know that they need to enable that module.

{if check_for_enabled_module(‘auto_update’,1)}      <!– Auto Update Module is enabled –> {else}      You need to enable the Auto Update module! {/if}

3. Module Language Translations

Lets say for example that you have a Russian Pligg site, where under Admin > Configure > Misc > Language you have set your site’s language to “russian”. This will not only change the main Pligg language file to Russian (/languages/lang_russian.conf), but it will also check for modules that have a Russian language file.

Many modules come with a lang.conf file, located in the module’s directory. This file defines the language variables used in the module, making it simple to change all of the words used by the module since they are contained in just 1 file. Modules will scan for a localized version of this language file before defaulting to a lang.conf file. For example if you have set your site language as “russian”, modules will try to load a lang_russian.conf file from the module directory before trying to use lang.conf.

4. Month, Day, Year, and Time Timestamps

Previous to 1.0.2, there was no simple method to print the submission time and date without using a two-line snippet of PHP in a template. The default setting would display X number of days ago that the story was submitted. The 1.0.2 release makes it much easier to insert a more standard timestamp on the story by letting you replace:

{$link_submit_timeago} {#PLIGG_Visual_Comment_Ago#}

With this:

{$link_submit_date}

This new variable will generate a date like “November, 12 2009 12:34 PM”. Similarly, you can display a more useful comment date by inserting the code {$comment_date} in the comment_show.tpl template file.


July 7, 2010 by Eric Heikkinen | 9 Comments »

Pligg Widgets

The upcoming release 1.1.0 will introduce a new “widget” system for Pligg. This new feature has been added to make managing your Pligg site from the Pligg Admin Panel an easier process. The Admin Panel homepage will be replaced with a new widget interface, which will allow you to customize the information that appears when you log into the Admin Panel. Pligg widgets can be installed, removed, and organized very easily. Widgets will have their own management page where you install and uninstall them, similar to the existing Module Management page. Once you have installed a widget, you will see it appear on the top left area of your Admin Panel homepage. By left-clicking and holding on the widget title bar, you can drag-and-drop a widget box from one spot to another. This allows you to organize the widgets in an order that makes sense to you. Widgets can be minimized by clicking on the a minimize icon located in the widget title bar, although not all widgets will allow this. Widgets differ from Pligg modules, because they are designed to only display data to administrators through the Admin Panel homepage. Widgets can be used in combination with a module to accomplish more advanced features. One example of this is the Akismet module and widget. The Akismet module adds an extra level of spam protection to your site by checking new stories and comments for bad content. The Akismet widget acts as an Admin Panel notice where you will receive an alert when Akismet has marked a story or comment as spam.
Widgets Preview
For developers, the new widget feature adds a lot of possibilities. Widgets offer a very simple way to add tools to your Admin Panel interface. You can write a module with as little as two files (init.php and widget.tpl) totaling only 10 lines. Widgets are based on two template files, stored in the widget’s template directory, and an init.php file that stores common widget settings and any PHP code that your widget may require. The first widget template file is settings.tpl, which is responsible for any settings that your widget might have. Users access the settings.tpl file when they click on the wrench icon located in the widget title bar. Example uses for this file might be to have a user enter an API key or login details for a third party site. We recognize that not all widgets will need to be configured in this way, which is why the settings.tpl file is entirely optional. If your widget does not require the settings.tpl file you can disable the settings feature from the widget’s init.php file. The second widget template file is widget.tpl. This controls the main widget content that appears when you are on the Admin Panel homepage. Pligg automatically places the content for both this template and the settings template inside of a widget box. This means that developers don’t have to think about the widget design, keeping the layout and style separate from the code. The last file that you should learn about is the init.php file. This file is used by all widgets, and is similar to the MODULE_init.php files already being used by Pligg modules. The init.php file is stores common configuration values for widgets such as the widget name, description, version number, and other options. Below is an example of a widget init.php file.
<?php
$widget['widget_title'] = "Example Widget";
$widget['widget_has_settings'] = 0;
$widget['widget_shrink_icon'] = 1;
$widget['widget_uninstall_icon'] = 1;
$widget['name'] = 'Example';
$widget['desc'] = 'Here is a widget description.';
$widget['version'] = 1.0;
?>

Register a Pligg.com Account




Pligg Modules and Pligg Templates from Pligg Pro Find support on the Pligg CMS Forum - 24 hours a day!