[ABD] (Topic &) Post Rating System (with Karma module)

Any abandoned MODs will be moved to this forum.

WARNING: MODs in this forum are not currently being supported or maintained by the original MOD author. Proceed at your own risk.
Forum rules
IMPORTANT: MOD Development Forum rules

WARNING: MODs in this forum are not currently being supported nor updated by the original MOD author. Proceed at your own risk.
User avatar
Libor
Registered User
Posts: 33
Joined: Tue Jul 03, 2007 8:12 pm

Re: [DEV]Post Rating System

Post by Libor »

I have it exactly as you and you can look for example her:
http://mujprehravac.cz/forum2/sandisk-s ... 45f29e5561
PHP Version: 4.3.10-22
Server API: Apache 2.0 Handler
My czech forum about mp3 players: http://www.mujprehravac.cz/forum/
I use many of items here in forum. Thanks all for help and mods.
User avatar
Alfatrion
Registered User
Posts: 166
Joined: Sat Feb 17, 2007 3:06 am

Re: [DEV]Post Rating System

Post by Alfatrion »

This indicates that the topic_list is empty when it reaches my code. Otherwise you would see some of the Topic strings. It looks like another mod does something that troubles with my mod. We need to find out why this happens.

Code: Select all

print "<br />store_reverse='";
print ($store_reverse) ? "1'" : "0'";
print "<br />announcement_list='$announcement_list' ".sizeof($announcement_list);
foreach ($announcement_list as $x)
print " announcement='$x'";
print "<br />topic_list='$topic_list' ".sizeof($topic_list);
foreach ($topic_list as $x)
print " topic_list='$x'";

$topic_list = ($store_reverse) ? array_merge($announcement_list, array_reverse($topic_list)) : array_merge($announcement_list, $topic_list);
$topic_tracking_info = $tracking_topics = array();
Expect this
store_reverse='number'
announcement_list='Array' 5 announcement='number' announcement='number'.....
topic_list='Array' 21 topic_list='number' topic_list='number'....

It be helpful to know if you have any announcements for the forum you view.
My abandoned (for own reference). mod: Post Rating System (website | screenshots | demo | support)
User avatar
Alfatrion
Registered User
Posts: 166
Joined: Sat Feb 17, 2007 3:06 am

Re: [DEV]Post Rating System

Post by Alfatrion »

These peaces of code help you view what going on in a little more detail. Keep in mind that tabs and spaces may be wrong when searching for them.

Code: Select all

print "SQL ANNOUCEMENTS: $sql<br />";
        while ($row = $db->sql_fetchrow($result))
        {
                $rowset[$row['topic_id']] = $row;
                $announcement_list[] = $row['topic_id'];

                 print 'ANNOUNCEMENT ADDED '.$row['topic_id'].'<br />';

Code: Select all

print "SQL TOPICS: $sql <br />";
while ($row = $db->sql_fetchrow($result))
{   
        if ($row['topic_status'] == ITEM_MOVED)
        {
                $shadow_topic_list[$row['topic_moved_id']] = $row['topic_id'];  
                print 'SHADOW ADDED '.$row['topic_id'].'<br />';
        }

        $rowset[$row['topic_id']] = $row;
        $topic_list[] = $row['topic_id'];

         print 'TOPIC ADDED '.$row['topic_id'].'<br />';
}
$db->sql_freeresult($result);

Code: Select all

                // If the shadow topic is already listed within the rowset (happ
ens for active topics for example), then do not include it...
                if (isset($rowset[$row['topic_id']]))
                {
                        // We need to remove any trace regarding this topic. :)
                        unset($rowset[$orig_topic_id]);
                        unset($topic_list[array_search($orig_topic_id, $topic_li
st)]);
                        print 'ACTIVE TOPIC DELETE '.$array_search($orig_topic_id, $topic_list).'<br /';
                        $topics_count--;

                        continue;
                }

Code: Select all

                // Do not include those topics the user has no permission to acc
ess
                if (!$auth->acl_get('f_read', $row['forum_id']))
                {
                        // We need to remove any trace regarding this topic. :)
                        unset($rowset[$orig_topic_id]);
                        unset($topic_list[array_search($orig_topic_id, $topic_li
st)]);
                        print 'UNAUTH TOPIC DELETE '.array_search($orig_topic_id
, $topic_list).'<br />';
                        $topics_count--;
 
                        continue;
                }
Last edited by Alfatrion on Sun Feb 03, 2008 10:33 am, edited 1 time in total.
My abandoned (for own reference). mod: Post Rating System (website | screenshots | demo | support)
User avatar
Libor
Registered User
Posts: 33
Joined: Tue Jul 03, 2007 8:12 pm

Re: [DEV]Post Rating System

Post by Libor »

Ok, I think this is wrong:

Code: Select all

store_reverse='0'
announcement_list='Array' 0
topic_list='Array' 0
Topic_list='Array'
My czech forum about mp3 players: http://www.mujprehravac.cz/forum/
I use many of items here in forum. Thanks all for help and mods.
User avatar
Alfatrion
Registered User
Posts: 166
Joined: Sat Feb 17, 2007 3:06 am

Re: [DEV]Post Rating System

Post by Alfatrion »

Did you include the line with ANNOUNCEMENT ADDED, SHADOW ADDED, TOPIC ADDED, ect? They don't seem to get filled. I changed the the first two to include the SQL commands. Please run these command with a sql client.
My abandoned (for own reference). mod: Post Rating System (website | screenshots | demo | support)
User avatar
Libor
Registered User
Posts: 33
Joined: Tue Jul 03, 2007 8:12 pm

Re: [DEV]Post Rating System

Post by Libor »

Ok, I do what you say and now:

Code: Select all

SQL ANNOUCEMENTS: SELECT t.*, tp.topic_posted, tt.mark_time FROM (phpbb_topics t) LEFT JOIN phpbb_topics_posted tp ON (tp.topic_id = t.topic_id AND tp.user_id = 54) LEFT JOIN phpbb_topics_track tt ON (tt.topic_id = t.topic_id AND tt.user_id = 54) WHERE t.forum_id IN (2, 0) AND t.topic_type IN (2, 3) ORDER BY t.topic_time DESC
SQL TOPICS: SELECT t.*, tp.topic_posted, tt.mark_time FROM (phpbb_topics t) LEFT JOIN phpbb_topics_posted tp ON (tp.topic_id = t.topic_id AND tp.user_id = 54) LEFT JOIN phpbb_topics_track tt ON (tt.topic_id = t.topic_id AND tt.user_id = 54) WHERE t.forum_id = 2 AND t.topic_type IN (0, 1) ORDER BY t.topic_type DESC, t.topic_last_post_time DESC
My czech forum about mp3 players: http://www.mujprehravac.cz/forum/
I use many of items here in forum. Thanks all for help and mods.
I M lost
Registered User
Posts: 23
Joined: Mon Feb 04, 2008 1:49 pm

Re: [DEV]Post Rating System

Post by I M lost »

Not sure if it is my board, or the mod.

I have followed the instructions, double checked my work, and nothing happened.
I went though and verified the mod 3 times, and everything is correct according to the instructions.

I get no error codes anywhere. SQL went without errors, no errors on the board, all is perfect... except...

Nothing happened.

There is no stars in any posts, new or old. There is no addition to my .Mod page in ACP. There is nothing nowhere. It is as if I installed it on someone else's board.

I edit the files on the server, not locally. So its not that I forgot to upload them. I purged the cache, and still nothing.

MySQL: 5.0.16
PHP: 5.2.3
phpMyAdmin: 2.11.2.1
phpbb: 3.0.0

Any suggestions?
phpDummie
Registered User
Posts: 292
Joined: Thu Feb 16, 2006 12:09 am
Location: USA

Re: [DEV]Post Rating System

Post by phpDummie »

I M lost wrote:...
There is no stars in any posts, new or old. There is no addition to my .Mod page in ACP. There is nothing nowhere. ...
You have to activate the MOD before you can use it. Don't forget to trash the cash too.
I M lost
Registered User
Posts: 23
Joined: Mon Feb 04, 2008 1:49 pm

Re: [DEV]Post Rating System

Post by I M lost »

And how would I go about doing the activation?
phpDummie
Registered User
Posts: 292
Joined: Thu Feb 16, 2006 12:09 am
Location: USA

Re: [DEV]Post Rating System

Post by phpDummie »

I M lost wrote:And how would I go about doing the activation?
Start from reading about it.
User avatar
Alfatrion
Registered User
Posts: 166
Joined: Sat Feb 17, 2007 3:06 am

Re: [DEV]Post Rating System

Post by Alfatrion »

You can enable the mod after you have added the ACP modules. I will add DIY instructions the install.xml before any RC versions.
Libor wrote:Ok, I do what you say and now:

Code: Select all

SQL ANNOUCEMENTS: SELECT t.*, tp.topic_posted, tt.mark_time FROM (phpbb_topics t) LEFT JOIN phpbb_topics_posted tp ON (tp.topic_id = t.topic_id AND tp.user_id = 54) LEFT JOIN phpbb_topics_track tt ON (tt.topic_id = t.topic_id AND tt.user_id = 54) WHERE t.forum_id IN (2, 0) AND t.topic_type IN (2, 3) ORDER BY t.topic_time DESC
SQL TOPICS: SELECT t.*, tp.topic_posted, tt.mark_time FROM (phpbb_topics t) LEFT JOIN phpbb_topics_posted tp ON (tp.topic_id = t.topic_id AND tp.user_id = 54) LEFT JOIN phpbb_topics_track tt ON (tt.topic_id = t.topic_id AND tt.user_id = 54) WHERE t.forum_id = 2 AND t.topic_type IN (0, 1) ORDER BY t.topic_type DESC, t.topic_last_post_time DESC
What did you see when you run these SQL commands with a sql client?
My abandoned (for own reference). mod: Post Rating System (website | screenshots | demo | support)
rafee
Registered User
Posts: 33
Joined: Thu Jan 10, 2008 10:18 pm

Re: [DEV]Post Rating System

Post by rafee »

Code: Select all

Błąd parsowania XML: nieprawidłowo sformowany
Obszar: file:///D:/xxxx/xxxxxxxxxxx/xxxxxxxxxxxxx/Post_Rating_System/templates/prosilver.xml
Numer linii 113, kolumna 8:			<!-- IF S_POSTS_RATINGS_ENABLED -->
----------------------------^
Please Help :(

Open You mods :(

Code: Select all

<?xml version="1.0" encoding="utf-8" standalone="yes"?>
		<?xml-stylesheet type="text/xsl" href="../modx.prosilver.en.xsl"?>
		<!--For security purposes, please check: http://www.phpbb.com/mods/ for the latest version of this MOD. Although MODs are checked before being allowed in the MODs Database there is no guarantee that there are no security problems within the MOD. No support will be given for MODs not found within the MODs Database which can be found at http://www.phpbb.com/mods/-->
		<mod xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.phpbb.com/mods/xml/modx-1.0.1.xsd">
			<header>
				<license>http://opensource.org/licenses/gpl-license.php GNU General Public License v2</license>
				<title lang="en">Post Rating System </title>
				<description lang="en">The Posts Ratings System allows your user to rate post.

Features include:
- Posting ratings (Afther a number of days the average rating is calculated and voting is no longer possible)
- Shadow ratings (System determine what users would have voted).
- Karma calculation (User stats)
- Penalty system
- Modpoints for users (For each post user gets points that they need to vote)

</description>
				<author-notes lang="en"><![CDATA[no info]]></author-notes>
				<author-group>
					<author>
						<realname>Alex de Kruijff</realname>
						<email>[email protected]</email>
						<username>Alfatrion</username>
						
						<contributions />
					</author>
				</author-group>
				<mod-version>
					<major>0</major>
					<minor>1</minor>
					<revision>0</revision>
					<release></release>
				</mod-version>
				<installation>
					<level>easy</level>
					<time>600</time>
					<target-version>
						<target-primary>3.0.RC1</target-primary>
						<target-major allow="exact">3</target-major>
						<target-minor allow="exact">0</target-minor>
					</target-version>
				</installation>
				<history>
				</history>
				<meta name="modx file generator" content="Geoffreak's Easy phpBB3 MODX Script Generator @ http://www.geoffreak.org" />
			</header>
			<action-group>
				<open src="styles/prosilver/theme/stylesheet.css">
					<edit>
						<find><![CDATA[@import url("common.css");
@import url("links.css");
@import url("content.css");
@import url("buttons.css");
@import url("cp.css");
@import url("forms.css");
@import url("tweaks.css");
@import url("colours.css");
]]></find>
						<action type="after-add"><![CDATA[@import url("posts_ratings.css");
]]></action>
					</edit>
				</open>
				<open src="styles/prosilver/template/viewtopic_body.html">
					<edit>
						<find><![CDATA[<!-- IF PAGINATION or TOTAL_POSTS]]></find>
						<inline-edit>
							<inline-find><![CDATA[<!-- IF PAGINATION or TOTAL_POSTS]]></inline-find>
							<inline-action type="after-add"><![CDATA[ or S_POSTS_RATINGS_ENABLED]]></inline-action>
						</inline-edit>

						<find><![CDATA[<div class="pagination">]]></find>
						<action type="after-add"><![CDATA[[
			<!-- IF S_POSTS_RATINGS_ENABLED -->
				{POSTS_RATINGS_EXTRA_TOPICS_RATINGS}:  {POSTS_RATINGS_STARS}

				<!-- IF PAGINATION or TOTAL_POSTS -->
					&bull;
				<!-- ENDIF -->
			<!-- ENDIF -->
]]></action>
						<find><![CDATA[<!-- IF postrow.U_QUOTE or postrow.U_INFO or postrow.U_DELETE or postrow.U_EDIT]]></find>
						<action type="after-add"> or postrow.S_POSTS_RATINGS_ENABLED</action>
						<find><![CDATA[
					<!-- IF postrow.U_EDIT --><li class="edit-icon"><a href="{postrow.U_EDIT}" title="{L_EDIT_POST}"><span>{L_EDIT_POST}</span></a></li><!-- ENDIF -->
					<!-- IF postrow.U_DELETE --><li class="delete-icon"><a href="{postrow.U_DELETE}" title="{L_DELETE_POST}"><span>{L_DELETE_POST}</span></a></li><!-- ENDIF -->
]]></find>
						<action type="after-add"><![CDATA[<!-- IF postrow.S_POSTS_RATINGS_ENABLED -->
<li class="{postrow.POSTS_RATINGS_STAR1}"><!-- IF postrow.S_POSTS_RATINGS_VOTABLE --><a href="{postrow.U_POSTS_RATINGS_STAR1}" title="{L_POSTS_RATINGS_STAR1_EXPLAIN}"><!-- ELSE --><a title="{postrow.POSTS_RATINGS_VOTEROUND_CLOSED_SCORE}"><!-- ENDIF --><span>{L_POSTS_RATINGS_STAR1}</span></a></li>
<li class="{postrow.POSTS_RATINGS_STAR2}"><!-- IF postrow.S_POSTS_RATINGS_VOTABLE --><a href="{postrow.U_POSTS_RATINGS_STAR2}" title="{L_POSTS_RATINGS_STAR2_EXPLAIN}"><!-- ELSE --><a title="{postrow.POSTS_RATINGS_VOTEROUND_CLOSED_SCORE}"><!-- ENDIF --><span>{L_POSTS_RATINGS_STAR2}</span></a></li>
<li class="{postrow.POSTS_RATINGS_STAR3}"><!-- IF postrow.S_POSTS_RATINGS_VOTABLE --><a href="{postrow.U_POSTS_RATINGS_STAR3}" title="{L_POSTS_RATINGS_STAR3_EXPLAIN}"><!-- ELSE --><a title="{postrow.POSTS_RATINGS_VOTEROUND_CLOSED_SCORE}"><!-- ENDIF --><span>{L_POSTS_RATINGS_STAR3}</span></a></li>
<li class="{postrow.POSTS_RATINGS_STAR4}"><!-- IF postrow.S_POSTS_RATINGS_VOTABLE --><a href="{postrow.U_POSTS_RATINGS_STAR4}" title="{L_POSTS_RATINGS_STAR4_EXPLAIN}"><!-- ELSE --><a title="{postrow.POSTS_RATINGS_VOTEROUND_CLOSED_SCORE}"><!-- ENDIF --><span>{L_POSTS_RATINGS_STAR4}</span></a></li>
<li class="{postrow.POSTS_RATINGS_STAR5}"><!-- IF postrow.S_POSTS_RATINGS_VOTABLE --><a href="{postrow.U_POSTS_RATINGS_STAR5}" title="{L_POSTS_RATINGS_STAR5_EXPLAIN}"><!-- ELSE --><a title="{postrow.POSTS_RATINGS_VOTEROUND_CLOSED_SCORE}"><!-- ENDIF --><span>{L_POSTS_RATINGS_STAR5}</span></a></li>
<!-- ENDIF -->
]]></action>
						<find><![CDATA[<!-- IF postrow.POSTER_POSTS != '' --><dd><strong>{L_POSTS}:</strong> {postrow.POSTER_POSTS}</dd><!-- ENDIF -->
]]></find>
						<action type="after-add"><![CDATA[<!-- IF S_POSTS_RATINGS_KARMA_ENABLED --><dd><strong>{L_KARMA}:</strong> {postrow.POSTS_RATINGS_KARMA_SCORE}<!-- IF U_MCP --> ~ <!-- IF postrow.POSTS_RATINGS_KARMA_O -->{postrow.POSTS_RATINGS_KARMA_O}<!-- ELSE -->0<!--ENDIF --><!-- ENDIF --></dd><!-- ENDIF -->
<!-- IF U_MCP -->
<!-- IF S_POSTS_RATINGS_PENALTY_ENABLED --><dd><strong>{L_PENALTY}:</strong> <!-- IF postrow.POSTS_RATINGS_PENALTY_OVERALL -->{postrow.POSTS_RATINGS_PENALTY_OVERALL}<!-- ELSE -->0<!-- ENDIF -->%</dd><!-- ENDIF -->
<!-- IF S_POSTS_RATINGS_MODPOINTS_ENABLED --><dd><strong>{L_MODPOINTS}:</strong> <!-- IF postrow.POSTS_RATINGS_MODPOINTS -->{postrow.POSTS_RATINGS_MODPOINTS}<!-- ELSE -->0<!-- ENDIF --></dd><!-- ENDIF -->
<!-- ENDIF -->
]]></action>
						<find><![CDATA[<!-- IF PAGINATION or TOTAL_POSTS]]></find>
						<inline-edit>
							<inline-find><!-- IF PAGINATION or TOTAL_POSTS</inline-find>
							<inline-action type="after-add"> or S_POSTS_RATINGS_ENABLED</inline-action>
						</inline-edit>

						<find><![CDATA[
		<div class="pagination">
]]></find>
						<action type="after-add"><![CDATA[
			<!-- IF S_POSTS_RATINGS_ENABLED -->
				{POSTS_RATINGS_EXTRA_TOPICS_RATINGS}:  {POSTS_RATINGS_STARS}
				<!-- IF PAGINATION or TOTAL_POSTS -->
					&bull;
				<!-- ENDIF -->
			<!-- ENDIF -->
]]></action>
					</edit>
				</open>
				<open src="styles/prosilver/template/memberlist_view.html">
					<edit>
						<find><![CDATA[
			<dt>{L_JOINED}:</dt> <dd>{JOINED}</dd>
			<dt>{L_VISITED}:</dt> <dd>{VISITED}</dd>
]]></find>
						<action type="after-add"><![CDATA[<!-- IF S_POSTS_RATINGS_KARMA_ENABLED -->
<dt>{L_KARMA}:</dt> <dd>{POSTS_RATINGS_KARMA_SCORE}<!-- IF U_USER_ADMIN --> ~ {POSTS_RATINGS_KARMA_O}<!-- ENDIF --></dd>
<!-- ENDIF -->
<!-- IF U_USER_ADMIN && S_POSTS_RATINGS_PENALTY_ENABLED -->
<dt>{L_PENALTY}:</dt> <dd>{POSTS_RATINGS_PENALTY_OVERALL}</dt>
<!-- ENDIF -->
]]></action>
					</edit>
				</open>
				<open src="styles/prosilver/template/viewforum_body.html">
					<edit>
						<find><![CDATA[{L_POST_BY_AUTHOR}]]></find>
						<action type="before-add"><![CDATA[<!-- IF S_POSTS_RATINGS_ENABLED -->{topicrow.POSTS_RATINGS_STARS} <!-- ENDIF -->]]></action>
					</edit>
				</open>
				<open src="styles/prosilver/template/search_results.html">
					<edit>
						<find><![CDATA[{L_POST_BY_AUTHOR}]]></find>
						<action type="before-add"><![CDATA[<!-- IF S_POSTS_RATINGS_ENABLED -->{searchresults.POSTS_RATINGS_STARS} <!-- ENDIF -->]]></action>
						<find><![CDATA[<h3><a href="{searchresults.U_VIEW_POST}">{searchresults.POST_SUBJECT}</a></h3>]]></find>
						<action type="before-add"><![CDATA[<!-- IF S_POSTS_RATINGS_ENABLED -->
<ul class="profile-icons">
	<li class="{searchresults.POSTS_RATINGS_STAR1}"><a href="{searchresults.U_VIEW_POST}" title="{L_POSTS_RATINGS_STAR1_EXPLAIN}"><span>{L_POSTS_RATINGS_STAR1}</span></a></li>
	<li class="{searchresults.POSTS_RATINGS_STAR2}"><a href="{searchresults.U_VIEW_POST}" title="{L_POSTS_RATINGS_STAR2_EXPLAIN}"><span>{L_POSTS_RATINGS_STAR2}</span></a></li>
	<li class="{searchresults.POSTS_RATINGS_STAR3}"><a href="{searchresults.U_VIEW_POST}" title="{L_POSTS_RATINGS_STAR3_EXPLAIN}"><span>{L_POSTS_RATINGS_STAR3}</span></a></li>
	<li class="{searchresults.POSTS_RATINGS_STAR4}"><a href="{searchresults.U_VIEW_POST}" title="{L_POSTS_RATINGS_STAR4_EXPLAIN}"><span>{L_POSTS_RATINGS_STAR4}</span></a></li>
	<li class="{searchresults.POSTS_RATINGS_STAR5}"><a href="{searchresults.U_VIEW_POST}" title="{L_POSTS_RATINGS_STAR5_EXPLAIN}"><span>{L_POSTS_RATINGS_STAR5}</span></a></li>
</ul>
<!-- ENDIF -->
]]></action>^M

					</edit>
				</open>
				<open src="styles/prosilver/template/ucp_main_front.html">
					<edit>
						<find><![CDATA[
		<dt>{L_JOINED}:</dt> <dd>{JOINED}</dd>
		<dt>{L_VISITED}:</dt> <dd>{LAST_VISIT_YOU}</dd>
]]></find>
						<action type="after-add"><![CDATA[<!-- IF S_POSTS_RATINGS_KARMA_ENABLED -->
<dt>{L_KARMA}:</dt> <dd>{POSTS_RATINGS_KARMA_SCORE}</dd>
<!-- ENDIF --><!-- IF S_POSTS_RATINGS_MODPOINTS_ENABLED -->
<dt>{L_MODPOINTS}:</dt> <dd>{POSTS_RATINGS_ODPOINTS}</dd>
<!-- ENDIF -->
]]></action>
					</edit>
				</open>
				<open src="styles/prosilver/template/mcp_forum.html">
					<edit>
						<find><![CDATA[{L_POST_BY_AUTHOR}]]></find>
						<action type="before-add"><![CDATA[<!-- IF S_POSTS_RATINGS_ENABLED -->{topicrow.POSTS_RATINGS_STARS} <!-- ENDIF -->]]></action>
						<find><![CDATA[
		<!-- IF S_CAN_MAKE_ANNOUNCE -->
			<option value="make_announce">{L_MAKE_ANNOUNCE}</option>
			<option value="make_global">{L_MAKE_GLOBAL}</option>
		<!-- ENDIF -->
]]></find>
						<action type="after-add"><![CDATA[<!-- IF S_POSTS_RATINGS_CAN_LOCK_VOTES -->
                        <option value="posts_ratings_votes_unlock">{L_POSTS_RATI
NGS_VOTES_UNLOCK}</option
                        <option value="posts_ratings_votes_lock">{L_POSTS_RATING
S_VOTES_LOCK}</option>
                        <!-- IF S_POSTS_RATINGS_CAN_SET_VOTE -->
                                <option value="posts_ratings_vote_reset">{L_POST
S_RATINGS_VOTE_RESET}</option>
                                <option value="posts_ratings_vote_score_1">{L_PO
STS_RATINGS_VOTE_SCORE_1}</option>
                                <option value="posts_ratings_vote_score_2">{L_PO
STS_RATINGS_VOTE_SCORE_2}</option>
                                <option value="posts_ratings_vote_score_3">{L_PO
STS_RATINGS_VOTE_SCORE_3}</option>
                                <option value="posts_ratings_vote_score_4">{L_PO
STS_RATINGS_VOTE_SCORE_4}</option>
                                <option value="posts_ratings_vote_score_5">{L_PO
STS_RATINGS_VOTE_SCORE_5}</option>
                        <!-- ENDIF -->]]></action>
					</edit>
				</open>
				<open src="styles/prosilver/template/mcp_topic.html">
					<edit>
						<find><![CDATA[<h3><a href="{postrow.U_POST_DETAILS}">{postrow.POST_SUBJECT}</a></h3>
]]></find>
						<action type="before-add"><![CDATA[<!-- IF S_POSTS_RATINGS_ENABLED -->
<ul class="profile-icons">
	<li class="{postrow.POSTS_RATINGS_STAR1}"><a href="{searchresults.U_POST_DETAILS}" title="{L_POSTS_RATINGS_STAR1_EXPLAIN}"><span>{L_POSTS_RATINGS_STAR1}</span></a></li>
	<li class="{postrow.POSTS_RATINGS_STAR2}"><a href="{searchresults.U_POST_DETAILS}" title="{L_POSTS_RATINGS_STAR2_EXPLAIN}"><span>{L_POSTS_RATINGS_STAR2}</span></a></li>
	<li class="{postrow.POSTS_RATINGS_STAR3}"><a href="{searchresults.U_POST_DETAILS}" title="{L_POSTS_RATINGS_STAR3_EXPLAIN}"><span>{L_POSTS_RATINGS_STAR3}</span></a></li>
	<li class="{postrow.POSTS_RATINGS_STAR4}"><a href="{searchresults.U_POST_DETAILS}" title="{L_POSTS_RATINGS_STAR4_EXPLAIN}"><span>{L_POSTS_RATINGS_STAR4}</span></a></li>
	<li class="{postrow.POSTS_RATINGS_STAR5}"><a href="{searchresults.U_POST_DETAILS}" title="{L_POSTS_RATINGS_STAR5_EXPLAIN}"><span>{L_POSTS_RATINGS_STAR5}</span></a></li>
</ul>
<!-- ENDIF -->
]]></action>^M
						<find><![CDATA[
		<!-- IF S_CAN_DELETE_POST --><option value="delete_post">{L_DELETE_POSTS}</option><!-- ENDIF -->
]]></find>
						<action type="after-add"><![CDATA[<!-- IF S_POSTS_RATINGS_CAN_LOCK_VOTE -->
			<option value="posts_ratings_vote_unlock">{L_POSTS_RATINGS_VOTES_UNLOCK}</option
			<option value="posts_ratings_vote_lock">{L_POSTS_RATINGS_VOTES_LOCK}</option>
			<!-- IF S_POSTS_RATINGS_CAN_SET_VOTE -->
				<option value="posts_ratings_vote_reset">{L_POSTS_RATINGS_VOTE_RESET}</option>
				<option value="posts_ratings_vote_score_1">{L_POSTS_RATINGS_VOTE_SCORE_1}</option>
				<option value="posts_ratings_vote_score_2">{L_POSTS_RATINGS_VOTE_SCORE_2}</option>
				<option value="posts_ratings_vote_score_3">{L_POSTS_RATINGS_VOTE_SCORE_3}</option>
				<option value="posts_ratings_vote_score_4">{L_POSTS_RATINGS_VOTE_SCORE_4}</option>
				<option value="posts_ratings_vote_score_5">{L_POSTS_RATINGS_VOTE_SCORE_5}</option>
			<!-- ENDIF -->
		<!-- ENDIF -->
]]></action>
					</edit>
				</open>
				<open src="styles/prosilver/template/mcp_post.html">
					<edit>
						<find><![CDATA[
		<!-- IF U_EDIT -->
		<ul class="profile-icons">
			<li class="edit-icon"><a href="{U_EDIT}" title="{L_EDIT_POST}"><span>{L_EDIT_POST}</span></a></li>
		</ul>
		<!-- ENDIF -->
]]></find>
						<action type="before-add"><![CDATA[<!-- IF S_POSTS_RATINGS_ENABLED -->
		<ul class="profile-icons">
			<li class="{POSTS_RATINGS_STAR1}"><a href="{U_POST_DETAILS}" title="{L_POSTS_RATINGS_STAR1_EXPLAIN}"><span>{L_POSTS_RATINGS_STAR1}</span></a></li>
			<li class="{POSTS_RATINGS_STAR2}"><a href="{U_POST_DETAILS}" title="{L_POSTS_RATINGS_STAR2_EXPLAIN}"><span>{L_POSTS_RATINGS_STAR2}</span></a></li>
			<li class="{POSTS_RATINGS_STAR3}"><a href="{U_POST_DETAILS}" title="{L_POSTS_RATINGS_STAR3_EXPLAIN}"><span>{L_POSTS_RATINGS_STAR3}</span></a></li>
			<li class="{POSTS_RATINGS_STAR4}"><a href="{U_POST_DETAILS}" title="{L_POSTS_RATINGS_STAR4_EXPLAIN}"><span>{L_POSTS_RATINGS_STAR4}</span></a></li>
			<li class="{POSTS_RATINGS_STAR5}"><a href="{U_POST_DETAILS}" title="{L_POSTS_RATINGS_STAR5_EXPLAIN}"><span>{L_POSTS_RATINGS_STAR5}</span></a></li>
		</ul>
                <!-- ENDIF -->]]></action>
<find><![CDATA[<!-- IF S_CAN_DELETE_POST --><option value="delete_post">{L_DELETE_POST}</option><!-- ENDIF -->]]></find>
<action type="after-add"><![CDATA[<!-- IF S_POSTS_RATINGS_CAN_LOCK_VOTES -->
						<!-- IF S_POSTS_RATINGS_VOTEROUND_CLOSED -->
							<option value="posts_ratings_vote_unlock">{L_POSTS_RATINGS_VOTES_UNLOCK}</option>
						<!-- IF S_POSTS_RATINGS_CAN_SET_VOTE -->
							<option value="posts_ratings_vote_reset">{L_POSTS_RATINGS_VOTE_RESET}</option>
						<!-- ENDIF -->
					<!-- ELSE -->
						<option value="posts_ratings_vote_lock">{L_POSTS_RATINGS_VOTES_LOCK}</option>
					<!-- ENDIF -->
					<!-- IF S_POSTS_RATINGS_CAN_SET_VOTE -->
						<option value="posts_ratings_vote_score_1">{L_POSTS_RATINGS_VOTE_SCORE_1}</option>
						<option value="posts_ratings_vote_score_2">{L_POSTS_RATINGS_VOTE_SCORE_2}</option>
						<option value="posts_ratings_vote_score_3">{L_POSTS_RATINGS_VOTE_SCORE_3}</option>
						<option value="posts_ratings_vote_score_4">{L_POSTS_RATINGS_VOTE_SCORE_4}</option>
						<option value="posts_ratings_vote_score_5">{L_POSTS_RATINGS_VOTE_SCORE_5}</option>
					<!-- ENDIF -->
				<!-- ENDIF -->]]></action>
					</edit>
				</open>
			</action-group>
		</mod>
I M lost
Registered User
Posts: 23
Joined: Mon Feb 04, 2008 1:49 pm

Re: [DEV]Post Rating System

Post by I M lost »

Wow, phpbb is pretty complex.

After reading that page, I was able to enable the modules on the ACP.

I switched on the rating system and still nothing.

I purged the cache, as well as the templates cache. I was told not to purge the imagesets cache, so I did not.

And I still have nothing on the forum, but I have controls in the ACP.

Any suggestions?
I M lost
Registered User
Posts: 23
Joined: Mon Feb 04, 2008 1:49 pm

Re: [DEV]Post Rating System

Post by I M lost »

Found a bug in Build 0.3.8. I think...



I have a top level category with a sub category, with 5 forums in it. There are no (0) posts in the forums. If I tic ACP>Forums>Manage Forums>"Top Level Category Name">"Sub Level Category Name" = Edit (green gear)>General forum settings>Enable active topics (yes)

I get this error:

Code: Select all

General Error
SQL ERROR [ mysql4 ]

[0]

SQL

No values specified for SQL IN comparison

BACKTRACE

FILE: includes/db/dbal.php
LINE: 376
CALL: dbal->sql_error()

FILE: includes/functions_posts_ratings.php
LINE: 1339
CALL: dbal->sql_in_set()

FILE: viewforum.php
LINE: 513
CALL: posts_ratings_fetch_votes_topics()
But as soon as I tic "NO" the error goes away.

Just thought you might want to know.

BTW, I still have not got this thing to function yet. The error above (and the ACP>.Mod) is the only indication that this mod is installed. Any advise?
phpDummie
Registered User
Posts: 292
Joined: Thu Feb 16, 2006 12:09 am
Location: USA

Re: [DEV]Post Rating System

Post by phpDummie »

I M lost wrote:...
Any suggestions?
Did you copy all the star graphic files?
Did you edit the templates?

Return to “[3.0.x] Abandoned MODs”