Les archives de FluxBB.fr
Vous n'êtes pas identifié(e).
Pages : 1
J'essaie d'utiliser "Rate Topic" 1.0 mais il semble que 2 ou 3 modifications soient nécessaires
avec ce Flux 1.2.22
http://www.punres.org/desc.php?pid=299
##
##
## Mod title: Rate Topic
##
## Mod version: 1.00
## Works on PunBB: 1.2.* (meaning only small modifications of version 1.2 eg. 1.2.1)
## Release date: 2006-09-09
## Author: Eric Subach A.K.A. Kha0sK1d (kha0s@comcast.net)
##
## Description: This mod allows non-guest users who run MySQL or MySQLi to rate any topic on a scale of 1 - 5 with 5
## being the best. Users may also view who voted for a particular topic and what they rating they gave.
##
## Difference with
## previous version: N/A
##
## Affected files: viewforum.php, viewtopic.php
##
## Affects DB: Yes
## Adds the table 'Ratings':
## +----------+------------------+------+-----+---------+-------+
## | Field | Type | Null | Key | Default | Extra |
## +----------+------------------+------+-----+---------+-------+
## | rate | tinyint(2) | | | 0 | |
## | user_id | int(10) unsigned | | | 0 | |
## | topic_id | int(10) unsigned | | | 0 | |
## +----------+------------------+------+-----+---------+-------+
## Adds the following options to the table 'config':
## - o_rt_enabled
## - o_rt_use_stars
## - o_rt_cur_version
## - o_rt_cur_stars
## - o_rt_default_lang
##
## Notes: - Only MySQL and MySQLi are currently supported.
## - Purging or altering your database will cause Rate
## Topic to work improperly and may cause errors.
## - Ratings by banned members will not count so long as
## their ban is in effect.
## - Administrators have the following options:
## - Enable or disable Rate Topic
## - Use star images or numbers
## - Default language
## - Image packages
## - Having no star image packages will cause Rate Topic
## to default to using numbers.
## - Having corrupt star image packages will not cause
## PunBB to error, may yield images that do not display.
## - Guests may not vote or see who voted for a topic, but
## they may see the rating for a topic.
## - If a Rate Topic language file is not found, some pages
## will display an error, and others will justdefault to
## disabling Rate Topic.
## - If you decide to uninstall Rate Topic, run the
## install_mod.php file and click the restore button. You
## may choose to either remove the code that was added
## into viewforum.php and viewtopic.php, but it is not
## necessary for PunBB to continue working properly.
## - If you want to remove all ratings, uninstall Rate
## Topic and then install it again.
##
## DISCLAIMER: Please note that "mods" are not officially supported by
## PunBB. Installation of this modification is done at your
## own risk. Backup your forum database and any and all
## applicable files before proceeding.
##
##
#
#---------[ 1. UPLOAD ]-------------------------------------------------------
#
install_mod.php to ./ (your root directory)
rate.php to ./
plugins/AP_Rate_Topic.php to ./plugins
lang/LANGUAGE/rate_topic.php to ./lang/LANGUAGE (Replace 'LANGUAGE' with your
language. This .zip file
only contains English.)
entire rate_stars folder (located in img/ in this .zip file) to ./img
(Any addition image star packages must be uploaded to './img/rate_stars',
the names of the pictures must follow the pattern of the 'default_stars'
folder included in this .zip file, and must be in .gif format.)
#
#---------[ 2. ADD CODE ]-----------------------------------------------------
#
Find in viewforum.php where the following lines are:
...
define('PUN_ALLOW_INDEX', 1);
require PUN_ROOT.'header.php';
INSERT CODE HERE
?>
...
Replace 'INSERT CODE HERE' with the code from the file insert_forum_top.txt
#
#---------[ 3. ADD CODE ]-----------------------------------------------------
#
Find in viewforum.php where the following lines are:
...
// Should we show the "New posts" and/or the multipage links?
if (!empty($subject_new_posts) || !empty($subject_multipage))
{
$subject .= ' '.(!empty($subject_new_posts) ? $subject_new_po...
$subject .= !empty($subject_multipage) ? ' '.$subject_multipage : '';
}
INSERT CODE HERE
?>
...
Replace 'INSERT CODE HERE' with the code from the file insert_forum_bottom.txt
#
#---------[ 4. ADD CODE ]-----------------------------------------------------
#
Find in viewtopic.php where the following lines are:
...
// Sort out who the moderators are and if we are currently a moderator (or ...
$mods_array = ($cur_topic['moderators'] != '') ? unserialize($cur_topic['mo...
$is_admmod = ($pun_user['g_id'] == PUN_ADMIN || ($pun_user['g_id'] == PUN_M...
INSERT CODE HERE
// Can we or can we not post replies?
if ($cur_topic['closed'] == '0')
{
...
Replace 'INSERT CODE HERE' with the code from the file insert_topic_top.txt
#
#---------[ 5. ADD CODE ]-----------------------------------------------------
#
Find in viewtopic.php where the following lines are:
...
$post_link = $lang_topic['Topic closed'];
if ($is_admmod)
$post_link .= ' / <a href="post.php?tid='.$id.'">'.$lang_to...
}
INSERT CODE HERE
// Determine the post offset (based on $_GET['p'])
$num_pages = ceil(($cur_topic['num_replies'] + 1) / $pun_user['disp_posts']);
$p = (!isset($_GET['p']) || $_GET['p'] <= 1 || $_GET['p'] > $num_pages) ? 1...
...
Replace 'INSERT CODE HERE' with the code from the file insert_topic_bottom.txt
#
#---------[ 6. RUN ]----------------------------------------------------------
#
install_mod.php and click install
#
#---------[ 7. DELETE ]-------------------------------------------------------
#
install_mod.php (If you ever want to uninstall Rate Topic you must upload it
again and click restore, but make sure you delete it now and
every time you use it so nobody else can run the file.)
#
#---------[ 8. FINISHED ]-----------------------------------------------------
#Le soucis c'est que le lien pour noter un sujet n'apparait pas dans la liste des sujets d'un forum
[c]http://exemple.com/forum/rate.php?r_id=23[/c]
Par contre, une fois que quelqu'un a voté alors un lien (avec les étoiles ou chiffres) apparait mais celui-là est juste pour voir les votes !
[c]http://exemple.com/forum/rate.php?v_id=23[/c]
J'ai regardé le code en question et tenté quelques tests mais sans succès
je tourne en rond!
à l'aide
Merci d'avance pour toute "piste"
NB: à ne pas confondre avec "Topic Rating" 1.2
http://www.punres.org/desc.php?pid=315
Hors ligne
aaarch! Encore une fois c'est après avoir posté un message ici
et cherché des heures dans les forums anglais, que je "percute", c'est à droite qu'il y a "Rate topic"
Resterait à voir comment sont calculées les moyennes
par rapport à ce "Evaluate Topic" français
Hors ligne
Pages : 1