News:

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

Main Menu

Post Ratings

Started by SoLoGHoST, October 27, 2009, 11:54:09 AM

Previous topic - Next topic

Jade Elizabeth

Would it be possible to have this enable topic ratings? I want topic only ratings in some boards and post ratings in others, and nothing in others lol.

Have I confused you yet? :P
Once proud Documentation Writer and Help Squad Leader | Check out my new adult coloring career: Color With Jade/Patreon.

NanoSector

Quote from: Jade Elizabeth on November 14, 2010, 09:25:42 AM
Would it be possible to have this enable topic ratings? I want topic only ratings in some boards and post ratings in others, and nothing in others lol.

Have I confused you yet? :P
Not me. You want post ratings in some boards and topic ratings in the others :P

I am gonna liekz this.
My Mods / Mod Builder - A tool to easily create mods / Blog
"I've heard from a reliable source that the Answer is 42. But, still no word on what the question is."

SoLoGHoST

Quote from: Jade Elizabeth on November 14, 2010, 09:25:42 AM
Would it be possible to have this enable topic ratings? I want topic only ratings in some boards and post ratings in others, and nothing in others lol.

Have I confused you yet? :P

I understand you quite fine.  This has been requested already and is something to be added in Post Ratings Pro, if I ever get around to it.  But I have to ask, in the topic ratings, will you be wanting ONLY the first post in the topic to be rated and members would rate that topic within the topic itself, and than the average of those ratings will be calculated and shown for the topic when viewing the topics list of a Category?  Or would you prefer that the topic get rated from viewing the list of topics when clicking on a Category?

I believe that the 1st one would be best, but just wondering on what everyone else thinks.

Cheers :)

Jade Elizabeth

Quote from: SoLoGHoST on November 14, 2010, 04:51:40 PM
Quote from: Jade Elizabeth on November 14, 2010, 09:25:42 AM
Would it be possible to have this enable topic ratings? I want topic only ratings in some boards and post ratings in others, and nothing in others lol.

Have I confused you yet? :P

I understand you quite fine.  This has been requested already and is something to be added in Post Ratings Pro, if I ever get around to it.  But I have to ask, in the topic ratings, will you be wanting ONLY the first post in the topic to be rated and members would rate that topic within the topic itself, and than the average of those ratings will be calculated and shown for the topic when viewing the topics list of a Category?  Or would you prefer that the topic get rated from viewing the list of topics when clicking on a Category?

I believe that the 1st one would be best, but just wondering on what everyone else thinks.

Cheers :)


I want the first post to be rated for topics :). Maybe have an overall topic rating allowed in boards that rate posts :).
Once proud Documentation Writer and Help Squad Leader | Check out my new adult coloring career: Color With Jade/Patreon.

fox0r

I am trying to install 1.5, and I got an error about my database already having the tables.  This was after I manually uninstalled 1.4 from all of my forum files.  I attempted to uninstall 1.4 through the admin panel and it's giving me this error:

This package cannot be uninstalled, because there is no uninstaller!

Please contact the mod author for more information.


This is the error it gives when I try to install 1.5:

Duplicate key name 'id_last_rating_id_msg'
File: E:\Webserver\websites\forums.hellestar.com\Packages\temp\postratingsInstallRC23.php
Line: 170

SoLoGHoST

Quote from: fox0r on December 06, 2010, 04:05:47 PM
I am trying to install 1.5, and I got an error about my database already having the tables.  This was after I manually uninstalled 1.4 from all of my forum files.  I attempted to uninstall 1.4 through the admin panel and it's giving me this error:

This package cannot be uninstalled, because there is no uninstaller!

Please contact the mod author for more information.


This is the error it gives when I try to install 1.5:

Duplicate key name 'id_last_rating_id_msg'
File: E:\Webserver\websites\forums.hellestar.com\Packages\temp\postratingsInstallRC23.php
Line: 170

The reason you are unable to install Post Ratings is because when you uninstalled 1.4, you forgot to place a checkmark in "Remove all data associated with this modification. [Details]"  And since you are installing to a new version, and there is no UPDATE data for this new version, you can do either of 2 things:

1. This option should keep all of your rated posts in their respective topics as well as all of your settings for PR, which topics are enabled/disabled, etc.:

Open up package-info.xml found within the PR package .zip/.tar.gz file and remove the following line from within the <install for="2.0 RC4"> tag or for whatever version of SMF you are installing PR on:  <database>postratingsInstallRC23.php</database>
Save it and repackage all of the files back up and upload and install it.

OR (if you don't mind losing your PR ratings within topics, settings, etc., or want to start fresh)

2.  Unpack PR package, and upload the following file to your SMF root directory:  postratingsUninstallRC23.php, run this file from within your browser:  yourforumURL/postratingsUninstallRC23.php (this will remove your PR database tables only).  Than upload the PR package and install it.

Either one of these options will do the trick.

Cheers :)

fox0r

I just went ahead and deleted the line/section in the installer where it was giving me problems.  It installed fine after that.  But now I am getting problems when I try to make new posts.  It is telling me:

An Error Has Occurred!
The database value you're trying to insert does not exist: id_board

From the error log, it points me to Sub-Post, and this is the code around that line:

$smcFunc['db_insert']('',
'{db_prefix}messages',
array(
'id_board' => 'int', 'id_topic' => 'int', 'id_member' => 'int', 'subject' => 'string-255', 'body' => (!empty($modSettings['max_messageLength']) && $modSettings['max_messageLength'] > 65534 ? 'string-' . $modSettings['max_messageLength'] : 'string-65534'),
'poster_name' => 'string-255', 'poster_email' => 'string-255', 'poster_time' => 'int', 'poster_ip' => 'string-255',
'smileys_enabled' => 'int', 'ratings_enabled' => 'int', 'modified_name' => 'string', 'icon' => 'string-16', 'approved' => 'int',
),
array(
$topicOptions['board'], $topicOptions['id'], $posterOptions['id'], $msgOptions['subject'], $msgOptions['body'],
$posterOptions['name'], $posterOptions['email'], time(), $posterOptions['ip'],
$msgOptions['smileys_enabled'] ? 1 : 0, $msgOptions['ratings_enabled'] ? 1 : 0, $msgOptions['icon'], $msgOptions['approved'],
),
array('id_msg')
);
$msgOptions['id'] = $smcFunc['db_insert_id']('{db_prefix}messages', 'id_msg');

SoLoGHoST

REPLACE THAT BIT OF CODE with this instead:

$smcFunc['db_insert']('',
'{db_prefix}messages',
array(
'id_board' => 'int', 'id_topic' => 'int', 'id_member' => 'int', 'subject' => 'string-255', 'body' => (!empty($modSettings['max_messageLength']) && $modSettings['max_messageLength'] > 65534 ? 'string-' . $modSettings['max_messageLength'] : 'string-65534'),
'poster_name' => 'string-255', 'poster_email' => 'string-255', 'poster_time' => 'int', 'poster_ip' => 'string-255',
'smileys_enabled' => 'int', 'ratings_enabled' => 'int', 'modified_name' => 'string', 'icon' => 'string-16', 'approved' => 'int',
),
array(
$topicOptions['board'], $topicOptions['id'], $posterOptions['id'], $msgOptions['subject'], $msgOptions['body'],
$posterOptions['name'], $posterOptions['email'], time(), $posterOptions['ip'],
$msgOptions['smileys_enabled'] ? 1 : 0, $msgOptions['ratings_enabled'] ? 1 : 0, '', $msgOptions['icon'], $msgOptions['approved'],
),
array('id_msg')
);
$msgOptions['id'] = $smcFunc['db_insert_id']('{db_prefix}messages', 'id_msg');


Save it and upload via FTP.  You are missing a required array value ('') before $msgOptions['icon'] in the 2nd array.

Cheers :)

fox0r


SoLoGHoST

You're welcome, glad I could be of some help.

Cheers :)

neo67

Hi SoLoGHoST,

I install this mod in RC 4, in a modified SilentWave Theme.
The Install wents finde, it's activated, the rights are active, cache is deleted. But nothing appears.
Below the post I see the button "Enable Ratings". I can press him 1000 times, the page load, and the button is still "Enable Ratings".
I have looked into the error log, nothing that belongs to "Ratings".
The database entry at this message has the following entries (Image)

I have test this with the admin account

Any idea?

Thanks & Greatz
Juergen
aka neo67



SoLoGHoST

Can you show me a pic of the button in which you speak of...  There are several ways to enable ratings, button, checkbox, topic button, and more...  I need specific button image to be sure which one it is.

QuoteBut nothing appears.
Below the post I see the button "Enable Ratings". I can press him 1000 times, the page load, and the button is still "Enable Ratings".

neo67

Hi SoLoGHoST,

yes, here they are.
Screenshot 1 shows the button, which has no function.
And screenshot 2 shows the configuration. I get no idea, whats wrong...

you?
:-)

Greetz & Thanks
neo67




SoLoGHoST

Ok, so that button, Enable Ratings at the bottom of each topic should set the topic to be able to be rated.  BUT if all posts within that topic are set to DISABLED for ratings, than this will be disabled.  It would seem that something else might be conflicting with that button when clicked on.  It is supposed to change to Disable Posts when it is clicked on, so not sure where it went wrong, because I have tested on a fresh install of SMF RC4 and it works fine for me.

SrMorte

#354
Hello

I have a question.
It is possible to rate only the first message on topics ?

Regards


PS-How i can add the portuguese_pt language to the Post Ratings ?

NanoSector

Quote from: SrMorte on February 05, 2011, 09:09:08 AM


PS-How i can add the portuguese_pt language to the Post Ratings ?
1. Download the package (seems logical if you want it's language files)
2. Extract it.
3. go into the folder where it has extracted.
4. look for ***.portuguese_pt.php and copy them to Themes/default/languages on your server.

Or see

Manual Installation of Mods
My Mods / Mod Builder - A tool to easily create mods / Blog
"I've heard from a reliable source that the Answer is 42. But, still no word on what the question is."

SrMorte

Quote from: Simple Series team on February 05, 2011, 10:17:44 AM
Quote from: SrMorte on February 05, 2011, 09:09:08 AM


PS-How i can add the portuguese_pt language to the Post Ratings ?
1. Download the package (seems logical if you want it's language files)
2. Extract it.
3. go into the folder where it has extracted.
4. look for ***.portuguese_pt.php and copy them to Themes/default/languages on your server.

Or see

Manual Installation of Mods


Sorry about the mistake.
The language i was talking about is  for the "Post Ratings", not the language of the SMF.
How can i translate the files of Post Ratings ?

Regards

NanoSector

Quote from: SrMorte on February 05, 2011, 06:11:22 PM
Quote from: Simple Series team on February 05, 2011, 10:17:44 AM
Quote from: SrMorte on February 05, 2011, 09:09:08 AM


PS-How i can add the portuguese_pt language to the Post Ratings ?
1. Download the package (seems logical if you want it's language files)
2. Extract it.
3. go into the folder where it has extracted.
4. look for ***.portuguese_pt.php and copy them to Themes/default/languages on your server.

Or see

Manual Installation of Mods


Sorry about the mistake.
The language i was talking about is  for the "Post Ratings", not the language of the SMF.
How can i translate the files of Post Ratings ?

Regards
Oh! Like that!

Well,

1. Download & unpack the modification.
2. Search for the language files inside.
3. Open them up.
4. Start translating!!
My Mods / Mod Builder - A tool to easily create mods / Blog
"I've heard from a reliable source that the Answer is 42. But, still no word on what the question is."

City Builder

I'm trying to reinstall this mod, but I get an error message as such


Duplicate key name 'id_last_rating_id_msg'
File: /home/account1/my.com/Packages/temp/postratingsInstallRC23.php
Line: 170


Yes I did have it installed before but then uninstalled it and now I'd like to reinstall it and try it again.

How do I go about fixing this?

Thank you

SoLoGHoST

You should run the PostRatingsUninstall.php file.  You need to upload it to your Root SMF directory.  Than simply run it in your browser.  Than Install Post Ratings through the SMF Package Manager.

OR

If you want to keep your ratings in your posts, simply open up package-info.xml and remove the call to PostRatingsInstall.php from within the <install> tag for the version of SMF you are installing on.  Re-Zip it all up and install the packager from within the SMF Package Manager.

Cheers :)

Advertisement: