Topics

User Functions

Events

There are no upcoming events

What's New

Stories

No new stories

Comments last 2 weeks

No new comments

Trackbacks last 2 weeks

No new trackback comments

Links last 2 weeks

No recent new links

NEW FILES last 14 days

No new files

Welcome to Geeklog Wednesday, May 22 2013 @ 05:22 AM EDT

File Management

Main : Add-ons : Plugins : 
Category: Add-ons Plugins Submitted by: Laugh
  Rating Plugin    Popular
This is a beta release of the Rating plugin 2.2. Please read the readme.txt file and review the config.php file before installing.

This plugin will allow you to add a rating, review and/or digg rating option to any item on the site.

There was a number of bugs dealing with user permissions introduced with the last release. These have been fixed, but you should review the included readme.txt for more information.

Note: Do to security concerns, The rating autotag does not automatically create a rating anymore. You must create the rating first in the admin interface before displaying it with an autotag.
  Ver:  2.2Beta  Date: Mar.21.07   Rating: 0.00   183     86.67 KB  
6 comments |  Download |  File Link |  Rate this File |  Report Broken File  | 

The following comments are owned by whomever posted them. This site is not responsible for what they say.

  • were do i have to put the code in lib.story.php ??
  • Authored by:Reverend Zed on Thursday, March 22 2007 @ 08:36 AM EDT

I had a bit of confusion here as well when I initially installed the 2.1 beta. Here's what works: find lib-story.php in the system folder of your site, open it up in your favorite text editor (I use first page 2000 from evrsoft.com) scan down to about line 454 and insert the code listed in the rating plugin's readme.txt file. Here's a snippet from my lib-story.php including some context to help you situate the code in the right spot:


$editicon = $_CONF['layout_url'] . '/images/edit.' . $_IMAGE_TYPE;
        $article->set_var( 'edit_icon', '<a href="' . $_CONF['site_admin_url']
                . '/story.php?mode=edit&amp;sid=' . $A['sid'] . '"><img src="'
                . $editicon . '" alt="' . $LANG01[4] . '" title="' . $LANG01[4]
                . '" border="0"></a>' );
        $article->set_var( 'edit_image',  '<img src="' . $editicon . '" alt="'
                . $LANG01[4] . '" title="' . $LANG01[4] . '" border="0">' );
    }
// start rating code //
    if (function_exists('RATING_display_rating'))
    {
        $article->set_var( 'rating',  RATING_display_rating($A['sid'], 'story', $A['sid'], 1, 5, CONST_FLAG_DEFAULT_RATING ) );
    }

// end rating code //
    if (empty ($A['expire'])) { // e.g. in a preview
        $archiveDateTime = time ();
    } else {
        // Need to convert text date/time to a timestamp
        $t = explode( ' ', $A['expire'] );
        $archiveDateTime = COM_convertDate2Timestamp( $t[0], $t[1] );
    }
    if( $A['featured'] == 1 )

That should do the job.

  • were do i have to put the code in lib.story.php ??
  • Authored by:Cobro on Thursday, March 22 2007 @ 03:45 PM EDT
THX very much :) you are the best it works Great!! thx