Formulas

Register an Account
 
 
Article Tools Display Modes
  #1 (permalink)  
Old 08-13-2008, 03:02 AM
Yankidank's Avatar
Pligg Founder/Coder/Designer
Pligg Version: SVN
Pligg Template: Wistie
 
Join Date: Dec 2005
Location: Ocala, FL
Posts: 4,934
Send a message via AIM to Yankidank
Modify formulas currently only supports formulas for burying stories, not publishing. It lets you configure time since post, votes and bury variables. So for example you can enter:
Code:

$reports > $votes * 3
Which means if the number of reports (bury) is greater than the number of votes * 3 it will bury a story.
In this example if reports= 10 and votes= 4 it would plug in like:
10 > 4*3
And because 10 isn't greater than 12 the story would not be removed. Three more reports and then it will be automatically removed.

A more advanced usage that includes time since submission would be:
Code:

$reports > ($votes * 2)+($hours_since_submit)
The number of reportsis greater than (the number of votes * 2) + (how many hours its been since the story was submitted)
In this example if reports=10 , votes=4 and hours = 2 it would plug in like:
10 > (4*2)+2
Since 10 is not greater than 10, the story will not be removed. 11 bury reports or higher would remove it in this case.
Attached Thumbnails
Formulas-formula.png  

The Twitter Module for Pligg CMS!
Register, Login, and Submit Stories with Twitter. An absolute MUST HAVE for all Pligg sites!

Last edited by Yankidank; 08-13-2008 at 03:23 AM.
Reply With Quote
  #2  

Formulas

Pligg Formulas is a module designed to allow a site admin to configure how Pligg should calculate when to bury a story. To access the Modify Formulas Admin Panel you must first install it from the Module Management page in the Pligg Admin Panel. After you install it, a link to Modify Formulas will appear on the main admin page.

The Pligg Formula module currently supports 3 variables. The first is $votes, for how many votes an article has. The second is $reports for how many times users have clicked on bury. The third is $hours_since_submit, which is the number of hours that have passed since the story has been submitted rounded down an hour. Using a mixture of these three variables and common math expressions you can create formulas for calculating when a story should be buried.


Contributors: Yankidank
Created by Yankidank, 08-13-2008 at 03:02 AM
Last edited by Yankidank, 08-13-2008 at 03:07 AM
1 Comments , 2942 Views
 

Article Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Admin Formulas Module hookator Questions and Comments 0 04-13-2009 11:17 AM
Help with formulas sbanerjee Questions and Comments 4 08-13-2008 02:55 AM
formulas help idragon Questions and Comments 4 06-21-2008 04:12 AM
[MOD] Modify Formulas Andreiii Questions and Comments 1 10-17-2007 10:45 PM
Admin Formulas Geoserv Questions and Comments 4 04-17-2007 10:23 PM


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