Automatic Featured Hot Topic

Register an Account
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old 12-08-2009, 03:36 PM
chuckroast's Avatar
Pligg Developer/Coder/Designer
Pligg Version: SVN
Pligg Template: Social Pro Kit
 
Join Date: Jun 2006
Posts: 5,448
Automatic Featured Hot Topic


Automated featured news is a way to spotlight a popular submission. A featured story may stay up for a maximum of 168 hours. If a newer story out-performs within that time period, it will automatically become the new featured story. The Noise Ratio score is determined by all activity in the story history.

Features:
Automatically selects the Hot Topic based on story popularity and performance.
Automatically grabs the domain thumbnail using webshots.
Automatically displays votes and buries in a pie chart using google charts API.
Automatically calculates the story Noise Ratio.
No configuration necessary, just upload and activate.

Requires:
Pligg 1.0 or higher

Download It Here

Attached Thumbnails
Automatic Featured Hot Topic-featured-screenshot.png  
Reply With Quote
  #2 (permalink)  
Old 01-01-2010, 09:23 PM
naftalina's Avatar
Casual Pligger
Pligg Version: 1.0
Pligg Template: ExpandedList
 
Join Date: May 2009
Location: Italia
Posts: 52
the module in my site from error does not work
Reply With Quote
  #3 (permalink)  
Old 01-01-2010, 10:27 PM
chuckroast's Avatar
Pligg Developer/Coder/Designer
Pligg Version: SVN
Pligg Template: Social Pro Kit
 
Join Date: Jun 2006
Posts: 5,448
Quote:
Originally Posted by naftalina View Post
the module in my site from error does not work
Try creating a file called function.math.php

Put it in yoursite/plugins/

Code:
<?php

/*
 * Template Lite plugin
 * -------------------------------------------------------------
 * Type:     function
 * Name:     math
 * Purpose:  handle math computations in template
 * Taken from the original Smarty
 * http://smarty.php.net
 * -------------------------------------------------------------
 */
function tpl_function_math($params, &$template_object)
{
    // be sure equation parameter is present
    if (empty($params['equation']))
    {
        $template_object->trigger_error("math: missing equation parameter");
        return;
    }

    $equation = $params['equation'];

    // make sure parenthesis are balanced
    if (substr_count($equation,"(") != substr_count($equation,")"))
    {
        $template_object->trigger_error("math: unbalanced parenthesis");
        return;
    }

    // match all vars in equation, make sure all are passed
    preg_match_all("![a-zA-Z][a-zA-Z0-9_]*!",$equation, $match);
    $allowed_funcs = array('int','abs','ceil','cos','exp','floor','log','log10',
                           'max','min','pi','pow','rand','round','sin','sqrt','srand','tan');

    foreach($match[0] as $curr_var)
    {
        if (!in_array($curr_var,array_keys($params)) && !in_array($curr_var, $allowed_funcs))
        {
            $template_object->trigger_error("math: parameter $curr_var not passed as argument");
            return;
        }
    }

    foreach($params as $key => $val)
    {
        if ($key != "equation" && $key != "format" && $key != "assign")
        {
            // make sure value is not empty
            if (strlen($val)==0)
            {
                $template_object->trigger_error("math: parameter $key is empty");
                return;
            }
            if (!is_numeric($val))
            {
                $template_object->trigger_error("math: parameter $key: is not numeric");
                return;
            }
            $equation = preg_replace("/\b$key\b/",$val, $equation);
        }
    }

    eval("\$template_object_math_result = ".$equation.";");

    if (empty($params['format']))
    {
        if (empty($params['assign']))
        {
            return $template_object_math_result;
        }
        else
        {
            $template_object->assign($params['assign'],$template_object_math_result);
        }
    }
    else
    {
        if (empty($params['assign']))
        {
            printf($params['format'],$template_object_math_result);
        }
        else
        {
            $template_object->assign($params['assign'],sprintf($params['format'],$template_object_math_result));
        }
    }
}

?>
In the future please use the Pligg Pro Helpdesk as instructed in your sales confirmation email.

Thanks
Reply With Quote
  #4 (permalink)  
Old 01-11-2010, 08:49 PM
naftalina's Avatar
Casual Pligger
Pligg Version: 1.0
Pligg Template: ExpandedList
 
Join Date: May 2009
Location: Italia
Posts: 52
Perfetto molto grazie adesso funziona molto bene
Reply With Quote
  #5 (permalink)  
Old 01-11-2010, 08:55 PM
chuckroast's Avatar
Pligg Developer/Coder/Designer
Pligg Version: SVN
Pligg Template: Social Pro Kit
 
Join Date: Jun 2006
Posts: 5,448
Quote:
Originally Posted by naftalina View Post
Perfetto molto grazie adesso funziona molto bene
Translates to

"Perfect thanks a lot now works very well"
Reply With Quote
  #6 (permalink)  
Old 01-13-2010, 06:15 PM
Donor
Pligg Version: 1.1.3
Pligg Template: wistie
 
Join Date: May 2009
Posts: 55
I had the same problem and tried your fix...

"Perfect thanks a lot now works very well"!
Reply With Quote
  #7 (permalink)  
Old 01-13-2010, 08:01 PM
naftalina's Avatar
Casual Pligger
Pligg Version: 1.0
Pligg Template: ExpandedList
 
Join Date: May 2009
Location: Italia
Posts: 52
a good job thanks thousands
Reply With Quote
  #8 (permalink)  
Old 01-20-2010, 03:53 PM
picturetom's Avatar
Donor
Pligg Version: 10.3
Pligg Template: wistie
 
Join Date: Sep 2007
Location: Cologne, Germany
Posts: 21
Send a message via Skype™ to picturetom
Is it possible to combine both modues -Facebook Sharer and ReTweet- in on template?
We run ReTweet at the moment on photonews.picturetom.com.

Best Thomas
Reply With Quote
  #9 (permalink)  
Old 01-21-2010, 12:17 AM
chuckroast's Avatar
Pligg Developer/Coder/Designer
Pligg Version: SVN
Pligg Template: Social Pro Kit
 
Join Date: Jun 2006
Posts: 5,448
Quote:
Originally Posted by picturetom View Post
Is it possible to combine both modues -Facebook Sharer and ReTweet- in on template?
We run ReTweet at the moment on photonews.picturetom.com.

Best Thomas
Hi Thomas

Yes both the Facebook Sharer module and the Ultimate Retweet module should be able to be run simultaneously.
Reply With Quote
  #10 (permalink)  
Old 03-04-2010, 01:12 AM
Casual Pligger
 
Join Date: Apr 2009
Posts: 49
Hi i have a category on my pligg website called "top links" i would like each of submitted stories in this category to be displayed in as "featured hot topic". The submitted stories are only admin-God submitted stories.

Is it possible for all the god submitted stories in ONLY this one category to be displayed such as the featured hot topic example??? (just this category NOT the others)

please let me know if this is possible and how and what i should do? I will purchase the module of this is possible asap.

thank you so much!
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Featured News Module Yankidank Free Modules 96 10-14-2011 04:39 AM
Removing adsense from Featured Module? submitlink Questions and Comments 1 08-16-2008 12:11 PM
How to Change Headline of FEATURED MODULE weismangroup Questions and Comments 2 06-13-2008 11:21 PM
how to pass variable from releated story to featured story? jackyu Questions and Comments 1 03-01-2008 07:20 AM
Featured article mod doesn't display time posted correctly AshMCairo Questions and Comments 0 10-05-2007 09:13 AM


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