Example #1
0
 /**
  * Constructor
  *
  * @global string $CONFIG['FEATURE']
  * @param string $module
  */
 function __construct($module)
 {
     parent::__construct($module);
     // Call parent
     $this->rss = new suxRSS();
     $this->bool['bayes'] = $GLOBALS['CONFIG']['FEATURE']['bayes_feeds'];
 }
Example #2
0
 /**
  * Constructor
  *
  * @global string $CONFIG['FEATURE']
  * @param string $module
  */
 function __construct($module)
 {
     parent::__construct($module);
     // Call parent
     $this->user = new suxUser();
     $this->bool['bayes'] = $GLOBALS['CONFIG']['FEATURE']['bayes_bookmarks'];
 }
Example #3
0
 /**
  * Constructor
  *
  * @global string $CONFIG['FEATURE']
  * @param string $module
  */
 function __construct($module)
 {
     parent::__construct($module);
     // Call parent
     $this->user = new suxUser();
     $this->msg = new suxThreadedMessages();
     $this->bool['bayes'] = $GLOBALS['CONFIG']['FEATURE']['bayes_blog'];
 }
Example #4
0
 /**
  * Constructor
  *
  * @param string $module
  */
 function __construct($module)
 {
     parent::__construct($module);
     // Call parent
 }
Example #5
0
/**
* Render bayesFilterScript
*
* @return string javascript
*/
function insert_bayesFilterScript()
{
    if ($GLOBALS['CONFIG']['FEATURE']['bayes'] == false) {
        return null;
    }
    // Feature is turned off
    if (!isset($_SESSION['users_id'])) {
        return null;
    }
    // Anonymous user, skip
    $r = new suxBayesRenderer('bayes');
    // Renderer
    if (!$r->getUserCategories()) {
        return null;
    }
    // No categories, skip
    $threshold = 0;
    if (isset($_GET['threshold']) && $_GET['threshold'] !== false) {
        $threshold = $_GET['threshold'];
    }
    $script = "\n    <script type='text/javascript' language='javascript'>\n    // <![CDATA[\n    // Script has to come after slider otherwise it doesn't work\n    // It also has to be placed outside of a table or it doesn't work on IE6\n    // TODO: Do we care?\n\n    // initial slider value\n    \$('#nbfThreshold').val({$threshold});\n    \$('#nbfPercentage').html(({$threshold} * 100).toFixed() + '%');\n\n    // horizontal slider control\n\n    \$(function() {\n        \$('#nbfSlider').slider({\n            value: {$threshold} * 100,\n            range: 'min',\n            slide: function( event, ui ) {\n                \$('#nbfPercentage').html(ui.value  + '%');\n                \$('#nbfThreshold').val(ui.value * .01);\n            }\n        });\n    });\n\n    // ]]>\n    </script>\n    ";
    return $script;
}