Go Back   Pligg CMS Forum > Pligg Help > Wiki Articles

 
 
LinkBack Article Tools Display Modes
  #1 (permalink)  
Old 08-13-2008, 02:02 AM
Yankidank's Avatar
Coder/Designer
Pligg Version: SVN
Pligg Template: Wistie
 
Join Date: Dec 2005
Location: Ocala, FL
Posts: 1,823
Thanks: 110
Thanked 182 Times in 128 Posts
Send a message via AIM to Yankidank Send a message via Skype™ to Yankidank
Formulas

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  
__________________
Need a Pligg Host?
Get 3 free months
when you buy a year of hosting.
Use the coupon PLIGG at either...
MidPhase hosting starting at $7.95/month.
ANhosting hosting starting as low as $4.95/month.

Last edited by Yankidank; 08-13-2008 at 02: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:
Created by Yankidank, 08-13-2008 at 02:02 AM
Last edited by Yankidank, 08-13-2008 at 02:07 AM
1 Comments , 464 Views
 

Article Tools
Display Modes
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are On
Similar Threads
Thread Thread Starter Forum Replies Last Post
Help with formulas sbanerjee General Help 4 08-13-2008 01:55 AM
formulas help idragon General Help 4 06-21-2008 03:12 AM
[MOD] Modify Formulas Andreiii Modification Tutorials 1 10-17-2007 09:45 PM
Admin Formulas Geoserv General Help 4 04-17-2007 09:23 PM


Search Engine Friendly URLs by vBSEO 3.2.0