News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Rate That Topic

Started by slinouille, August 20, 2008, 02:57:44 PM

Previous topic - Next topic

slinouille

okay guys I think I found the problem!
I think it's a problem in the installdatabase, I've put a "primary" key on field "id_topic" which is wrong.

FOr those who experiment the problem, please:
- open phpmyadmin
- in your database, open structure of table "smf_log_rt"
- you should see in the table called "Index", a PRIMARY key on "id_topic"
- delete this primary key



That's it !

I'll update the package tonight.

SliN
Visit VAG-Technique.fr
Take a look to my mods

Tanks

#281
Works perfect - thanks for the fix ;)

Now on to the next issue:

When you try to sort topics after rating on other pages than page 1 you will get this error:


Unknown column 'mf.rate' in 'order clause'
File: \Sources\MessageIndex.php
Line: 360


This happens on page 2 3 4 5 6 7 ... 111 112 123 etc etc.... but not on page 1

slinouille

Thanks :)

Version 2.1.9 have been uploaded. It is only a package integrating this correction.
Visit VAG-Technique.fr
Take a look to my mods

Tanks

Look up - i wrote about another bug :)

Same thing will happen if you sort after rating and then click on page 2, 3 or 4... you get the picture

bicchet

Quote from: slinouille on April 23, 2009, 12:57:53 PM
okay guys I think I found the problem!
I think it's a problem in the installdatabase, I've put a "primary" key on field "id_topic" which is wrong.

It  worked for me too, many thanks!

Sudhakar Arjunan

Good Update slinouille.
Working on New Mods & Themes for SMF... Will update soon... My Blog page
My Smf forum : Discuss ITAcumens :: My SMF Forum

slinouille

Concerning the second bug found by Tanks, here is the new package correcting it
Can someone use it, it seems ok on my own forum.

Thanks Tanks for your debugging session  ;D

Visit VAG-Technique.fr
Take a look to my mods

Tanks

Ouch - Do i really have to uninstall.. for some reason it tells me that uninstall fails on /Sources/ManageSettings.php

So is there a manual fix to this issue so i don't have to uninstall ?

Cheers

slinouille

Yes there is :

File : $sourcedir/MessageIndex.php
Replace
'rating' => 'mf.rate',
By
'rate' => 'mf.rate',

File : $themedir/MessageIndex.template.php
Replace
<th class="catbg3 headerpadding" width="80px" align="center"><a href="', $scripturl, '?board=', $context['current_board'], '.', $context['start'], ';sort=rating', $context['sort_by'] == 'rating' && $context['sort_direction'] == 'up' ? ';desc' : '', '">', $txt['rating'], $context['sort_by'] == 'rating' ? ' <img src="' . $settings['images_url'] . '/sort_' . $context['sort_direction'] . '.gif" alt="" />' : '', '</a></th>';
By
<th class="catbg3 headerpadding" width="80px" align="center"><a href="', $scripturl, '?board=', $context['current_board'], '.', $context['start'], ';sort=rate', $context['sort_by'] == 'rate' && $context['sort_direction'] == 'up' ? ';desc' : '', '">', $txt['rating'], $context['sort_by'] == 'rate' ? ' <img src="' . $settings['images_url'] . '/sort_' . $context['sort_direction'] . '.gif" alt="" />' : '', '</a></th>';

My variable name was not the good one.

SliN
Visit VAG-Technique.fr
Take a look to my mods

Tanks

#289
OK you have the cool support that all good mod's deserve, thanks. :)

I found out that i was unable to uninstall because of another mod that had changed the /Sources/ManageSettings.php

Fix that and uninstalled fine.. then download your new version.. try to install and get an error


Database Error: Can't DROP 'PRIMARY'; check that column/key exists
Apply Filter: Only show the errors from this file
File: Packages/temp/installDatabase.php
Line: 66


This must be because i deleted that primary thing earlier LOL :D

So now i installed the 2.1.8 version and I'm going to do the edits manual :)

Edit: Did the manual changes but still getting the same error when trying to sort:


Unknown column 'mf.rate' in 'order clause'
File: \Sources\MessageIndex.php
Line: 360

slinouille

QuoteFix that and uninstalled fine.. then download your new version.. try to install and get an error
Yep I've notice that, I've updated my test in the install script

QuoteEdit: Did the manual changes but still getting the same error when trying to sort:
okay finaly found it  :-X

Manually edit :

File : $sourcedir/MessageIndex.php
Replace
                INNER JOIN {db_prefix}messages AS ml ON (ml.id_msg = t.id_last_msg)' : (in_array($context['sort_by'], array('starter', 'subject')) ? '
by
                INNER JOIN {db_prefix}messages AS ml ON (ml.id_msg = t.id_last_msg)' : (in_array($context['sort_by'], array('starter', 'subject', 'rating')) ? '
Note: if you have version 2.1.9, then change 'rating' by 'rate'

I'll do a fresh and clean package tomorrow morning ... I'm tired ;)

SliN
Visit VAG-Technique.fr
Take a look to my mods

Tanks

It works :) Thanks, you are a great coder ! ;)

I always get the creeps when i have to edit inside php files :)

Filipina

Quote from: Filipina on February 27, 2009, 04:59:45 PM
Hello I have seen this  "Unable to load the 'rateadmin' template." error mentioned on this first page of the topic.  I also saw it mentioned on another post but was is the solution? I have tried both  'RateAdmin' and 'rateadmin' and i get the same error either way.

Anyone can offer me advice? :)

Hello me and Lady Ambrosia posted about this a while back but I think it was missed. Thanks for any assistance.

Babyloniia

is the packages also fixed for the 1.1.8? or no body fix the issue for that version

willerby

Latest version 2.1.10 installed on RC1 and before enabling mod the following errors appeared in admin error log..

2e6254f93f32ddebac45da9b4ad6844a
URL http://www.xxx/forum/index.php?action=admin;area=packages;sa=install2;package=RateThatTopic.2.1.10.zip;pid=0
8: Undefined variable: altered_mem_table_3
File: /home2/xxx/public_html/forum/Packages/temp/installDatabase.php
Line: 120
   
2e6254f93f32ddebac45da9b4ad6844a
URL http://www.xxx.com/forum/index.php?action=admin;area=packages;sa=install2;package=RateThatTopic.2.1.10.zip;pid=0
2: in_array() [<a href='function.in-array'>function.in-array</a>]: Wrong datatype for second argument
File: /home2/xxx/public_html/forum/Packages/temp/installDatabase.php
Line: 69
   
2e6254f93f32ddebac45da9b4ad6844a
URL http://www.xxx.com/forum/index.php?action=admin;area=packages;sa=install2;package=RateThatTopic.2.1.10.zip;pid=0
8: Undefined variable: boards_columns
File: /home2/xxx/public_html/forum/Packages/temp/installDatabase.php
Line: 69

???
What type of washing machine is September?

An autumnatic. :)

Angelotus

Quote from: Angelotus on April 21, 2009, 06:37:19 AM
Hi, nice mod. Trying to install it on my 2.0 boards, but keep getting this error:


Table 'weeklyfun_nl.boards' doesn't exist
File: /customers/weeklyfun.nl/weeklyfun.nl/httpd.www/forum/Packages/temp/installDatabase.php
Line: 74


Got this error captured in the new version as well?

I need some help please!

slinouille

@willerby: ok I'll do a clean install ... but those errors are safe, you can delete them. It's the installDatabase script that generates them during installation ... I was quite tired yesterday evening and I've forgotten some "good ciding practices" ;)

@Angelotus: I've answered you with some questions some time ago. Can you do those check? I'll take also a look to thise 74 line.

@Filipina & Lady Ambrosia: what is the SMF version you are using?

@Babyloniia: no I'm only working on SMF2.X version now. I've not really understood your problem, can you please be more precise, is it the same problem as Filipina?

Visit VAG-Technique.fr
Take a look to my mods

willerby

What type of washing machine is September?

An autumnatic. :)

Babyloniia

Quote from: slinouille on April 24, 2009, 02:41:05 AM


@Babyloniia: no I'm only working on SMF2.X version now. I've not really understood your problem, can you please be more precise, is it the same problem as Filipina?

No, I Have the Extreme 6 Theme
I Installed Rate that topic mode with emu because its not for the 1.1.8
In My Control Panel i get a new choise "RateAdmin"
In There I have tryied to enable for all my board by defualt / by local / and for each board (3 different tryes)

After that in my board there is nothing appear where i can rate a topic? it dosent shows anything new,

I think ppl other than me had this problem and fixed it by reading this topic, but im not sure how?

my forum www.babyloniia.dk/forum

I have it installed now you can log in with those user and check that is  no rating choise to be seen
User : Tine
Pass : Ishtar08I

User: 9nette83
Pass : Ishtar08I

Babyloniia

Maybe More details, the stars bar where to put the rating dont show up any where,


Sorry for my bad english :-)

Advertisement: