Pligg CMS Blog

August 30, 2010 | 4 Comments »

Karma and User Ranks

Karma, the most mysterious feature built-in to Pligg, is finally getting some much needed attention from the Pligg developers. For years we have been talking about how we could improve karma, but it wasn’t until this week that we finally did something about it. Coming soon, to a Pligg version near you, is the Pligg Karma module. This module will allow you to finally keep your user Karma scores up to date without you having to set up a cron job. “What’s all this Karma jibber jabber?” some of you may be asking yourselves. Well read on and find out!

Karma is a score assigned to each user account on a Pligg site. The score is supposed to be a representation of how active the user is on your Pligg website. A user who is frequently participating on your site would have a high Karma score, while a user who is either new to the site or inactive will have a low score.

Previously the Karma feature required users to manually set up a cron job, which many users either didn’t have access to or they just weren’t informed that they needed to set one up. Another disadvantage to the old method is that the Karma scores would only be updated when that cron job was executed rather than in real time. Now that we have designed a new “Karma module”, there is no need for users to deal with setting up a cron job. When using the Karma module, Karma scores will be updated instantaneously as users vote, comment, or submit stories.

The Karma module has a settings page where you can configure how many points users earn (or lose) for a variety of actions. At the bottom of the page you are even able to artificially manipulate a user’s Karma score. This allows you to give some users an instant boost to their Karma. You can even punish bad users by giving them negative points in this field.

Sidenote: If you are currently using the /libs/karma.php script on a cron job you will need to disable the cron after upgrading to the next release if you want to use the new Karma module. You will also need to un-comment out that file at the top and bottom to enable it for use.

A new feature that we will introduce in the next version of Pligg will be a “User Rank” system. While Karma gives you a number that tallies user activity, User Rankings will show you what place a user has on the website. The most active user, who has the highest total Karma score, will be ranked in first place (#1). The second most active would be ranked as #2, and so on. The easiest way to see how rankings work is to look at the current Top Users page on the Pligg Demo.

User Ranks can appear on the top users, profile, and story pages. On story pages, you can display a user rank for the story author and also for every comment author. The “Wistie” template now displays User Ranks next to each of these areas as well as in the User Profile page.

In the past we had considered using these Karma scores to give users with high scores more weight to their votes. This would mean that very active users would have more influence over which stories would be moves from the upcoming section to the ‘published’ homepage. Digg.com uses a more complicated algorithm to give the top users incentive for submitting and voting on articles. At the time of writing this article we are still thinking about whether this type of feature is worth developing. If you would like to see this type of feature added to Pligg we would love to hear your thoughts, so leave a comment below.


August 24, 2010 | No Comments »

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 | 1 Comment »

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 | 3 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 | 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 | 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 | 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 | No Comments »

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.


Register a Pligg.com Account




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