Перейти к контенту

[2.1.x]Simple Reputation System


Dan1

Рекомендуемые сообщения

  • Ответы 285
  • Создана
  • Последний ответ

Лучшие авторы в этой теме

Лучшие авторы в этой теме

Не работает. При попытке повысить или понизить репутацию в окне выдаёт вот что:

 

http://lik.lfs.pp.ru/other/Untitled.jpg

Ссылка на комментарий
Поделиться на других сайтах

**************************************************************************
				 Зайти в Admin CP 
**************************************************************************

Далее зайти в LOOK & FEEL, выбрать изменяемый шаблон - нажать Edit Template HTML

Далее Topic View -> RenderRow

----Найти----
			{$author['warn_text']} {$author['warn_minus']}{$author['warn_img']}{$author['warn_add']}
----Добавить ПОСЛЕ----
<if="author['reputation_allow'] == "true"">
		<script type="text/javascript" src='jscripts/reputation.js'></script>
		<br/> <br/>{$author['reputation_text']}{$author['reputation_minus']}  <b>{$author['reputation_scores']}</b>  {$author['reputation_add']}
</if>





**************************************************************************

Далее зайти в LOOK & FEEL, выбрать изменяемый шаблон - нажать Edit Template HTML

 

Далее Topic View -> RenderRow

 

Тут написано как то коряво...я так понял : Администрация - ВНЕШНИЙ ВИД - Стиль какой нужен - Изменить HTML фрагменты - skin_topic (Просмотр темы) -RenderRow

 

я правельно понял?? или нет ?? я все вроде поставил ...но не видно этого мода..не отображаеться на форумах нигде

Ссылка на комментарий
Поделиться на других сайтах

Адмистация

 

:D

 

Админцентр -> Внешний вид -> * -> Изменить HTML-фрагменты. Какие нужно шаблоны выбираете и делаете как надо)

Ссылка на комментарий
Поделиться на других сайтах

При попытке выполнить SQL-запрос

 

ALTER TABLE `ibf_members` ADD `reputation` INT NOT NULL ;

 

CREATE TABLE `ibf_reputation` (

`id` int(11) NOT NULL auto_increment,

`from_user` int(11) NOT NULL default '0',

`to_user` int(11) NOT NULL default '0',

`forum` int(11) NOT NULL default '0',

`topic` int(11) NOT NULL default '0',

`post` int(11) NOT NULL default '0',

`created` int(11) NOT NULL default '0',

`message` text NOT NULL,

`rating` int(11) NOT NULL default '0',

PRIMARY KEY (`id`)

) ;

 

возникает ошибка:

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '; CREATE TABLE `ibf_reputation` ( `id` int(11) NOT NULL auto_increment, ' at line 1

 

Как это исправить?

Ссылка на комментарий
Поделиться на других сайтах

  • 2 недели спустя...

Капец! Псоле установки вылезает

 

Parse error: syntax error, unexpected ';', expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /home/icqzz/public_html/forum/sources/action_public/topics.php on line 2695

 

Вот код страницы:

 

<?php

 

/*

+--------------------------------------------------------------------------

| Invision Power Board 2.1.7

| =============================================

| by Matthew Mecham

| (c) 2001 - 2005 Invision Power Services, Inc.

| http://www.invisionpower.com

| =============================================

| Web: http://www.invisionboard.com

| http://www.ibresource.ru/products/invisionpowerboard/

| Time: Tuesday 18th of July 2006 05:56:00 PM

| Release: 52f408a29988b02f45b5e6f4ba5af0ae

| Licence Info: http://www.invisionboard.com/?license

| http://www.ibresource.ru/license

+---------------------------------------------------------------------------

| INVISION POWER BOARD IS NOT FREE / OPEN SOURCE!

+---------------------------------------------------------------------------

| INVISION POWER BOARD НЕ ЯВЛЯЕТСЯ БЕСПЛАТНЫМ ПРОГРАММНЫМ ОБЕСПЕЧЕНИЕМ!

| Права на ПО принадлежат Invision Power Services

| Права на перевод IBResource (http://www.ibresource.ru)

+---------------------------------------------------------------------------

| > $Date: 2006-01-05 11:02:13 +0000 (Thu, 05 Jan 2006) $

| > $Revision: 114 $

| > $Author: matt $

+---------------------------------------------------------------------------

|

| > Topic display module

| > Module written by Matt Mecham

| > Date started: 18th February 2002

|

| > Module Version Number: 1.1.0

| > DBA Checked: Thu 20 May 2004

| > Quality Checked: Wed 15 Sept. 2004

+--------------------------------------------------------------------------

*/

 

 

if ( ! defined( 'IN_IPB' ) )

{

print "<h1>Некорректный адрес</h1>Вы не имеете доступа к этому файлу напрямую. Если вы недавно обновляли форум, вы должны обновить все соответствующие файлы.";

exit();

}

 

class topics

{

# Global

var $ipsclass;

 

var $output = "";

var $base_url = "";

var $html = "";

var $moderator = array();

var $forum = array();

var $topic = array();

var $mem_titles = array();

var $mod_action = array();

var $poll_html = "";

var $parser = "";

var $mimetypes = "";

var $nav_extra = "";

var $read_array = array();

var $mod_panel_html = "";

var $warn_range = 0;

var $warn_done = 0;

 

var $md5_check = "";

var $post_count = 0;

var $cached_members = array();

var $first_printed = 0;

var $pids = array();

var $attach_pids = array();

var $first = "";

var $qpids = "";

var $custom_fields = "";

var $last_read_tid = "";

var $c_pid = 0;

 

# Permissions

var $can_vote = 0;

var $can_rate = 0;

 

/*-------------------------------------------------------------------------*/

//

// Our constructor, load words, load skin, print the topic listing

//

/*-------------------------------------------------------------------------*/

 

function auto_run()

{

//-----------------------------------------

// Build all permissions

//-----------------------------------------

 

$this->build_permissions();

 

//-----------------------------------------

// Are we just adding a poll vote?

//-----------------------------------------

 

if ( $this->ipsclass->input['addpoll'] )

{

$this->topic_add_vote_to_poll();

}

 

//-----------------------------------------

// INIT module

//-----------------------------------------

 

$this->init();

 

//-----------------------------------------

// Are we just adding a rating vote?

//-----------------------------------------

 

if ( $this->ipsclass->input['addrating'] )

{

$this->topic_add_vote_to_rating();

}

 

//-----------------------------------------

// Process the topic

//-----------------------------------------

 

$this->topic_set_up();

 

//-----------------------------------------

// Which view are we using?

//-----------------------------------------

 

if ( $this->ipsclass->input['mode'] )

{

$this->topic_view_mode = $this->ipsclass->input['mode'];

$this->ipsclass->my_setcookie( 'topicmode', $this->ipsclass->input['mode'], 1 );

}

else

{

$this->topic_view_mode = $this->ipsclass->my_getcookie('topicmode');

}

 

if ( ! $this->topic_view_mode )

{

//-----------------------------------------

// No cookie and no URL

//-----------------------------------------

 

$this->topic_view_mode = $this->ipsclass->vars['topicmode_default'] ? $this->ipsclass->vars['topicmode_default'] : 'linear';

}

 

//-----------------------------------------

// VIEWS

//-----------------------------------------

 

if ( isset($this->ipsclass->input['view']) )

{

if ($this->ipsclass->input['view'] == 'new')

{

//-----------------------------------------

// Newer

//-----------------------------------------

 

$this->ipsclass->DB->simple_construct( array( 'select' => 'tid',

'from' => 'topics',

'where' => "forum_id=".$this->forum['id']." AND approved=1 AND state <> 'link' AND last_post > ".$this->topic['last_post'],

'order' => 'last_post',

'limit' => array( 0,1 )

) );

 

$this->ipsclass->DB->simple_exec();

 

if ( $this->ipsclass->DB->get_num_rows() )

{

$this->topic = $this->ipsclass->DB->fetch_row();

 

$this->ipsclass->boink_it($this->ipsclass->base_url."showtopic=".$this->topic['tid']);

}

else

{

$this->ipsclass->Error( array( LEVEL => 1, MSG => 'no_newer') );

}

}

else if ($this->ipsclass->input['view'] == 'old')

{

//-----------------------------------------

// Older

//-----------------------------------------

 

$this->ipsclass->DB->simple_construct( array( 'select' => 'tid',

'from' => 'topics',

'where' => "forum_id=".$this->forum['id']." AND approved=1 AND state <> 'link' AND last_post < ".$this->topic['last_post'],

'order' => 'last_post DESC',

'limit' => array( 0,1 )

) );

 

$this->ipsclass->DB->simple_exec();

 

if ( $this->ipsclass->DB->get_num_rows() )

{

$this->topic = $this->ipsclass->DB->fetch_row();

 

$this->ipsclass->boink_it($this->ipsclass->base_url."showtopic=".$this->topic['tid']);

}

else

{

$this->ipsclass->Error( array( LEVEL => 1, MSG => 'no_older') );

}

}

else if ($this->ipsclass->input['view'] == 'getlastpost')

{

//-----------------------------------------

// Last post

//-----------------------------------------

 

$this->return_last_post();

}

else if ($this->ipsclass->input['view'] == 'getnewpost')

{

//-----------------------------------------

// Newest post

//-----------------------------------------

 

$st = 0;

$pid = "";

 

if ( $this->ipsclass->vars['db_topic_read_cutoff'] and $this->ipsclass->member['id'] )

{

$last_time = intval( $this->my_topics_read[ $this->topic['tid'] ] ) ? intval( $this->my_topics_read[ $this->topic['tid'] ] ) : intval( $this->db_row['marker_last_cleared'] );

}

 

$last_time = $last_time ? $last_time : $this->ipsclass->input['last_visit'];

 

$this->ipsclass->DB->simple_construct( array( 'select' => 'MIN(pid) as pid',

'from' => 'posts',

'where' => "queued=0 AND topic_id=".$this->topic['tid']." AND post_date > ".intval($last_time),

'limit' => array( 0,1 )

) );

 

$this->ipsclass->DB->simple_exec();

 

$post = $this->ipsclass->DB->fetch_row();

 

if ( $post['pid'] )

{

$pid = "entry".$post['pid'];

 

$this->ipsclass->DB->simple_construct( array( 'select' => 'COUNT(*) as posts',

'from' => 'posts',

'where' => "topic_id=".$this->topic['tid']." AND pid <= ".$post['pid'],

) );

 

$this->ipsclass->DB->simple_exec();

 

$cposts = $this->ipsclass->DB->fetch_row();

 

if ( (($cposts['posts']) % $this->ipsclass->vars['display_max_posts']) == 0 )

{

$pages = ($cposts['posts']) / $this->ipsclass->vars['display_max_posts'];

}

else

{

$number = ( ($cposts['posts']) / $this->ipsclass->vars['display_max_posts'] );

$pages = ceil( $number);

}

 

$st = ($pages - 1) * $this->ipsclass->vars['display_max_posts'];

 

$this->ipsclass->boink_it($this->ipsclass->base_url."showtopic=".$this->topic['tid']."&st=$st".$pid);

}

else

{

$this->return_last_post();

}

}

else if ($this->ipsclass->input['view'] == 'findpost')

{

//-----------------------------------------

// Find a post

//-----------------------------------------

 

$pid = intval($this->ipsclass->input['p']);

 

if ( $pid > 0 )

{

$this->ipsclass->DB->simple_construct( array( 'select' => 'COUNT(*) as posts',

'from' => 'posts',

'where' => "topic_id=".$this->topic['tid']." AND pid <= ".$pid,

) );

 

$this->ipsclass->DB->simple_exec();

 

$cposts = $this->ipsclass->DB->fetch_row();

 

if ( (($cposts['posts']) % $this->ipsclass->vars['display_max_posts']) == 0 )

{

$pages = ($cposts['posts']) / $this->ipsclass->vars['display_max_posts'];

}

else

{

$number = ( ($cposts['posts']) / $this->ipsclass->vars['display_max_posts'] );

$pages = ceil( $number);

}

 

$st = ($pages - 1) * $this->ipsclass->vars['display_max_posts'];

 

$this->ipsclass->boink_it($this->ipsclass->base_url."showtopic=".$this->topic['tid']."&st=$st&p=$pid"."entry".$pid);

}

else

{

$this->return_last_post();

}

}

}

 

//-----------------------------------------

// UPDATE TOPIC?

//-----------------------------------------

 

if ( ! $this->ipsclass->input['b'] )

{

if ( $this->topic['topic_firstpost'] < 1 )

{

//--------------------------------------

// No first topic set - old topic, update

//--------------------------------------

 

$this->ipsclass->DB->simple_construct( array (

'select' => 'pid',

'from' => 'posts',

'where' => 'topic_id='.$this->topic['tid'].' AND new_topic=1'

) );

 

$this->ipsclass->DB->simple_exec();

 

$post = $this->ipsclass->DB->fetch_row();

 

if ( ! $post['pid'] )

{

//-----------------------------------------

// Get first post info

//-----------------------------------------

 

$this->ipsclass->DB->simple_construct( array( 'select' => 'pid',

'from' => 'posts',

'where' => "topic_id={$this->topic['tid']}",

'order' => 'pid ASC',

'limit' => array(0,1) ) );

$this->ipsclass->DB->simple_exec();

 

$first_post = $this->ipsclass->DB->fetch_row();

$post['pid'] = $first_post['pid'];

}

 

if ( $post['pid'] )

{

$this->ipsclass->DB->simple_construct( array (

'update' => 'topics',

'set' => 'topic_firstpost='.$post['pid'],

'where' => 'tid='.$this->topic['tid']

) );

 

$this->ipsclass->DB->simple_exec();

}

 

//--------------------------------------

// Reload "fixed" topic

//--------------------------------------

 

$this->ipsclass->boink_it($this->ipsclass->base_url."showtopic=".$this->topic['tid']."&b=1&st={$this->ipsclass->input['st']}&p={$this->ipsclass->input['p']}"."entry".$this->ipsclass->input['p']);

}

}

 

$find_pid = $this->ipsclass->input['pid'] == "" ? $this->ipsclass->input['p'] : $this->ipsclass->input['pid'];

 

if ( $find_pid )

{

$threaded_pid = '&pid='.$find_pid;

$linear_pid = '&view=findpost&p='.$find_pid;

}

 

if ( $this->topic_view_mode == 'threaded' )

{

$require = 'topic_threaded.php';

 

$this->topic['to_button_threaded'] = $this->ipsclass->compiled_templates['skin_topic']->toutline_mode_choice_on( "{$this->ipsclass->base_url}showtopic={$this->topic['tid']}&mode=threaded".$threaded_pid, $this->ipsclass->lang['tom_outline'] );

$this->topic['to_button_standard'] = $this->ipsclass->compiled_templates['skin_topic']->toutline_mode_choice_off( "{$this->ipsclass->base_url}showtopic={$this->topic['tid']}&mode=linear".$linear_pid, $this->ipsclass->lang['tom_standard'] );

$this->topic['to_button_linearpl'] = $this->ipsclass->compiled_templates['skin_topic']->toutline_mode_choice_off( "{$this->ipsclass->base_url}showtopic={$this->topic['tid']}&mode=linearplus".$linear_pid, $this->ipsclass->lang['tom_linear'] );

 

}

else

{

$require = 'topic_linear.php';

 

$this->topic['to_button_threaded'] = $this->ipsclass->compiled_templates['skin_topic']->toutline_mode_choice_off( "{$this->ipsclass->base_url}showtopic={$this->topic['tid']}&mode=threaded".$threaded_pid, $this->ipsclass->lang['tom_outline'] );

 

if ( $this->topic_view_mode == 'linearplus' )

{

$this->topic['to_button_standard'] = $this->ipsclass->compiled_templates['skin_topic']->toutline_mode_choice_off( "{$this->ipsclass->base_url}showtopic={$this->topic['tid']}&mode=linear".$linear_pid, $this->ipsclass->lang['tom_standard'] );

$this->topic['to_button_linearpl'] = $this->ipsclass->compiled_templates['skin_topic']->toutline_mode_choice_on( "{$this->ipsclass->base_url}showtopic={$this->topic['tid']}&mode=linearplus".$linear_pid, $this->ipsclass->lang['tom_linear'] );

}

else

{

$this->topic['to_button_standard'] = $this->ipsclass->compiled_templates['skin_topic']->toutline_mode_choice_on( "{$this->ipsclass->base_url}showtopic={$this->topic['tid']}&mode=linear".$linear_pid, $this->ipsclass->lang['tom_standard'] );

$this->topic['to_button_linearpl'] = $this->ipsclass->compiled_templates['skin_topic']->toutline_mode_choice_off( "{$this->ipsclass->base_url}showtopic={$this->topic['tid']}&mode=linearplus".$linear_pid, $this->ipsclass->lang['tom_linear'] );

}

}

 

//-----------------------------------------

// Remove potential [attachmentid= tag in title

//-----------------------------------------

 

$this->topic['title'] = str_replace( '[attachmentid=', '[attachmentid=', $this->topic['title'] );

 

//-----------------------------------------

// Load and run lib

//-----------------------------------------

 

$this->func = $this->ipsclass->load_class( ROOT_PATH . 'sources/lib/func_'.$require, 'topic_display' );

 

$this->func->register_class( $this );

$this->func->display_topic();

 

$this->output .= $this->func->output;

 

//-----------------------------------------

// Do we have a poll?

//-----------------------------------------

 

if ( $this->topic['poll_state'] )

{

$this->output = str_replace( "<!--{IBF.POLL}-->", $this->parse_poll(), $this->output );

}

else

{

// Can we start a poll? Is this our topic and is it still open?

 

if ( $this->topic['state'] != "closed" AND $this->ipsclass->member['id'] AND $this->ipsclass->member['g_post_polls'] AND $this->forum['allow_poll'] )

{

if (

( ($this->topic['starter_id'] == $this->ipsclass->member['id']) AND ($this->ipsclass->vars['startpoll_cutoff'] > 0) AND ( $this->topic['start_date'] + ($this->ipsclass->vars['startpoll_cutoff'] * 3600) > time() ) )

OR ( $this->ipsclass->member['g_is_supmod'] == 1 )

)

{

$this->output = str_replace( "<!--{IBF.START_NEW_POLL}-->", $this->ipsclass->compiled_templates['skin_topic']->start_poll_link($this->forum['id'], $this->topic['tid']), $this->output );

}

}

}

 

&

Ссылка на комментарий
Поделиться на других сайтах

  • 3 недели спустя...
  • 4 недели спустя...

Люди, помогите пожалуйста! Мод установил, но после ошибки выдает следующее:

 

Ошибка с базой данных.

Вы можете попробовать обновить эту страницу, нажав сюда.

 

Возвращаемая ошибка

mySQL query error: SELECT p.*,
			m.id,m.name,m.mgroup,m.email,m.joined,m.posts, m.last_visit, m.last_activity,m.login_anonymous,m.title,m.hide_email, m.warn_level, m.warn_lastwarn,
			me.msnname,me.aim_name,me.icq_number,me.signature, me.website,me.yahoo,me.location, me.avatar_location, me.avatar_type, me.avatar_size, m.members_display_name,m.reputation
			pc.*
			FROM ibf_posts p
			  LEFT JOIN ibf_members m ON (p.author_id=m.id)
			  LEFT JOIN ibf_member_extra me ON (me.id=m.id)
			  LEFT JOIN ibf_pfields_content pc ON (pc.member_id=p.author_id)
			WHERE p.pid IN(1053) ORDER BY pid asc

SQL error: You have an error in your SQL syntax.  Check the manual that corresponds to your MySQL server version for the right syntax to use near '.*
			FROM ibf_posts p
			  LEFT JOIN ibf_members m ON (p.aut
SQL error code: 
Date: 16.3.2007, 20:52

Ссылка на комментарий
Поделиться на других сайтах

Тему читали? Есть в ней ответ) Ошибка синтаксиса, запятую не поставили в одной из первых строк...
Ссылка на комментарий
Поделиться на других сайтах

Тему читали? Есть в ней ответ) Ошибка синтаксиса, запятую не поставили в одной из первых строк...

поставил запятую, сейчас вот че выходит

http://gameland.telecet.ru/forum/index.php?act=idx

Ссылка на комментарий
Поделиться на других сайтах

Все файлы, папки залил в корн форума. Импортировал xml, в админке появилася в настройках, кое что там поменял под вкус, ну а на форуме ничерта не отображается,что сделать?почему?
Ссылка на комментарий
Поделиться на других сайтах

  • 1 месяц спустя...

на IPB 2.1.7 англ выдал следующее:

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '; CREATE TABLE `ibf_reputation` ( `id` int(11) NOT NULL auto_increment, ' at line 1

 

Поможите?

Ссылка на комментарий
Поделиться на других сайтах

Этот лучше чем ХТ репутацион систем?Ато тот поставить не выходит,но после того нельзя сделать запрос в базу,так как запрос с таким же названием уже есть.А где и как удалить я не знаю...(((
Ссылка на комментарий
Поделиться на других сайтах

Замечен серьезный баг!!!

 

Если нажать на ссылку

 

_http://site.ru/forum/index.php?act=rep&type=add&mid=000&message=сообщение

 

000 - id юзера

 

то у юзера, с тем id который в ссылке, изменяется репа... как это исправить? Юзеры начали этим багом издеваться над всеми...

Ссылка на комментарий
Поделиться на других сайтах

Кто-нибудь, пробывал ставить данный мод на IP.Board 2.2.1 (последняя версия, лиценз) при сохранении шаблона пишет:

 

These template bits could not be saved because they cause an error when parsed. Please check the data including any HTML logic used and any input data variables.

 

как сделать чтобы сохранилось?

 

p.s. все по-инструкции =)

 

Надо после if поставить пробел.

Ссылка на комментарий
Поделиться на других сайтах

А мона сделать так чтобы можно было ставить только плюсики, тобишь повышать репутацию, а минус вообще отключить??

 

Заранее спасибо.

Ссылка на комментарий
Поделиться на других сайтах

А мона сделать так чтобы можно было ставить только плюсики, тобишь повышать репутацию, а минус вообще отключить??

 

Заранее спасибо.

 

Усе....сам разобрался....пасибо за внимание.

Ссылка на комментарий
Поделиться на других сайтах

Мод: Simple Reputation System

Категория: Моды

Совместимость: 2.1.x

Описание:

Простая система репутации.

 

Установка - 5 минут. Изменяемые файлы - 3 шт.

 

Добавляет под предпреждение текущий уровень репутации и кнопки для её изменения участниками. Так же возможен просмотр истории репутации пользователя.

Вшитые ограничения:

 

не более 5 изменений репутации одним пользователем в 24 часа;

пользователь с репутацией меньше -20 не имеет права изменять репутацию другим.

 

Это самая первая версия мода, далее, надеюсь, будут идти апдейты :-)

 

Проверял на 2.1.2, однако думаю что и на 2.0 будет работать, но не уверен.

 

Update 1: исправил инструкцию по установке, изначально забыл дописать туда 2 строчки O:-)

 

Update 2: замечен неприятный глюк с кэшированием - исправил инстукцию по установке

 

Подробнее...

Скачать

 

Возможно повторяюсь, но всё же спрошу:

У меня глюк со шрифтом - свои (то что я кому-то ставил) прочитать могу, а то что мне кто-то ставил - не могу, какие-то каракули "РҐРѕСЂРѕС?РёР№ админ" У пользователей всё точно так же - в чём проблема???

Ссылка на комментарий
Поделиться на других сайтах

  • 4 недели спустя...

×
×
  • Создать...

Важная информация

Находясь на нашем сайте, вы соглашаетесь на использование файлов cookie, а также с нашим положением о конфиденциальности Политика конфиденциальности и пользовательским соглашением Условия использования.