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

SoLoGHoST

#120
Quote from: Bugo on December 27, 2009, 01:57:43 PM
Quote from: SoLoGHoST on December 27, 2009, 01:22:21 AM
Can you be a bit more specific?  I will try and see if there is something on my end here, but I don't follow periodically.  Perhaps you can pin-point any 1 of these undefined index errors on an actual step by step basis of events??  That would be much more helpful.

Thank You :)
Usually errors appear after viewing by visitors of any page of a forum. Sometimes — after viewing by usual users.
Can you give me a Line # for this undefined index error in Display.php please?  In your Error Log, it should tell you the Line # that this error happens on.  This would be most helpful.

Thank You!

blokey

SMF Version 2.0 RC2     Server Info Apache version 2.0.63 PHP version 5.2.9 MySQL version 5.0.81-community Architecture x86_64 Operating system Linux

SoLoGHoST

Quote from: sattninja on December 27, 2009, 02:44:30 PM
Quote from: SoLoGHoST on December 26, 2009, 04:38:54 PM
No, nothing of the sort.  Have planned on making a Post Ratings Pro version of this mod (PAID) that will allow this feature, as well as a Stats Page, and also allow posts within a topic to be ordered by Highest/Lowest rating, and many many more features.

i would pay for those features

great mod thanks
Cheers :)  Will let you know when it is ready.

Quote from: blokey on December 27, 2009, 03:44:30 PM
Thanks

You Welcome, will let you know.

SoLoGHoST

Ok guys, this is the last FREE Version of Post Ratings.  Just updated to version 1.2.  Need to update the pics to reflect the changes still, but here's what's changed/new:

1.2
! Fixes all undefined indexes that would populate the SMF Error Log if Post Ratings was disabled, or a post was not rated in a topic.  Yes, these are the undefined indexes that were mentioned to have been originating from the Display.php file.

+ Added Feature for SMF 2.0 RC2 ONLY:  Allows for a different Post Ratings Layout for ratings within your posts.  There is now a Header Style Layout to chose from for those users who'd prefer this style over the default Inner Style Layout.

ENJOY :)

Vyache

#124
Is this a bug?

./Themes/default/Display.template.php

<div id="forumposts">
<h3 class="catbg"


Missing ">" ?

', !empty($modSettings['post_ratings_layout_style']) && !empty($modSettings['post_ratings_enable']) && $context['pr_is_topic_enabled'] && !empty($modSettings['post_ratings_first_post']) ? ' style="margin-bottom: 0px; padding-bottom: 0px;"' : '', '

In my ./Themes/default/Display.template.php file I have:

<h3 class="catbg"><span class="left"></span>

Is this a mod conflict?

What should I do? Put that after "catbg"> ?

Let me know, thanks!

By the way, redirect isn't working right, I get sent to maintenance after install, but it installs okay with some minor editing because I have other conflicting mods...


AjaxChat - SMF 2.0 RC2 Edition Download.
mrtrc266 ~AJAX Chat Intergration FAQ's & Tips-N-Tricks~

SoLoGHoST

#125
you need to add:', !empty($modSettings['post_ratings_layout_style']) && !empty($modSettings['post_ratings_enable']) && $context['pr_is_topic_enabled'] && !empty($modSettings['post_ratings_first_post']) ? ' style="margin-bottom: 0px; padding-bottom: 0px;"' : '', '
directly after
<h3 class="catbg" and just before the >

I'll see if I can come up with a better edit for this.

IMPORTANT NOTE:  IT MUST BE the <h3 class="catbg"> that is directly after the <div id="forumposts">

If you don't have this in your Display.template.php file, than it should be fine without this edit.  Though the Curve Theme has this in there.

Cheers :)

Vyache

Yes,

I got it working now. Thank You so much! I'm not sure why the redirect failed though...

AjaxChat - SMF 2.0 RC2 Edition Download.
mrtrc266 ~AJAX Chat Intergration FAQ's & Tips-N-Tricks~

SoLoGHoST

OK, I just updated it once more.  Though just a revision.  Basically just made it so that if there is an error on that edit, it will just skip it.  Also, fixed a minor echo '<script>' problem.

P.S. - Any change I can get the website address where you guys are using Post Ratings on?  Would just like to see how others are using it in their SMF Forums.  If you don't want to post up the URL in this topic, you can PM me if you want.

Cheers :)

Vyache

Quote from: SoLoGHoST on December 28, 2009, 07:21:13 PM
OK, I just updated it once more.  Though just a revision.  Basically just made it so that if there is an error on that edit, it will just skip it.  Also, fixed a minor echo '<script>' problem.

P.S. - Any change I can get the website address where you guys are using Post Ratings on?  Would just like to see how others are using it in their SMF Forums.  If you don't want to post up the URL in this topic, you can PM me if you want.

Cheers :)

Please tell me what changes you made, I don't really want to go through uninstalling it again. I'll add them in manually.

Thank you.

AjaxChat - SMF 2.0 RC2 Edition Download.
mrtrc266 ~AJAX Chat Intergration FAQ's & Tips-N-Tricks~

SoLoGHoST

Only change was in Admin.template.php.

Search for:if ($config_var['name'] == "post_ratings_layout_style")
{



Replace entire if statement in here with:  if ($config_var['name'] == "post_ratings_layout_style")
{
echo '
<script type="text/javascript"><!-- // --><![' . 'CDATA' . '[
var imgpath = "' . $settings['default_images_url'] . '/post_ratings/";

function prChange(obj)
{
if(obj.value == 0)
document.getElementById("prImage").src = imgpath + "inner.png";
else
{
if(obj.value == 1)
document.getElementById("prImage").src = imgpath + "header.png";
}
}

// ' . ']' . ']></script>';
}


That's really all I did, forgot the separate the CDATA [ [ and ] ] with dots so the echo can use it, since this doesn't work when placing directly into the XML file.

Vyache

#130
Thank you,

I made the changes you suggested in your update. It seems to be working fine, but I cannot rate the posts for some reason...

Edit, I see why:

./Themes/default/Display.template.php: Most of the lines were not added to this file for some reason during the install...

After the install of this mod I get this message:
Congrats, Post Ratings has been upgraded to Version 1.1 Successfully! To ensure all Post Ratings Settings are correctly placed and loaded, you will be redirected so that your File Cache will be cleared.

Isn't the version 2.1 ? It still takes me to my maintenance screen and not the area where my post rating is...

Otherwise the changes you made all work, thank you!

AjaxChat - SMF 2.0 RC2 Edition Download.
mrtrc266 ~AJAX Chat Intergration FAQ's & Tips-N-Tricks~

SoLoGHoST

It should've said, Congrats updated to 1.2.  1.2 is the current version.  You can uninstall it and still keep all of the ratings you have (that is the database remains intact).  Just uninstall it (Do not place a checkmark in remove All stuff for this mod, which will be an option up top when uninstalling it, this is unchecked by default).  And than delete it.  Than download it on the mod site, and install from the full install of it.

Just out of curiosity, which version did you have installed prior to updating it??  Version 1.0 or Version 1.1?

Vyache

Never mind,

Its cool. I have the right version. For some perverted reason, I thought it was off.

I have the current version 1.2 :D

AjaxChat - SMF 2.0 RC2 Edition Download.
mrtrc266 ~AJAX Chat Intergration FAQ's & Tips-N-Tricks~

Vyache

After activation of a user for some reason I get this error that is related to the ratings...

"The database value you're trying to insert does not exist: is_ratings"

AjaxChat - SMF 2.0 RC2 Edition Download.
mrtrc266 ~AJAX Chat Intergration FAQ's & Tips-N-Tricks~

SoLoGHoST

What other Mods do you have installed??  Do you have the Welcome Topic Mod Installed?

Vyache

#135
Yes, Welcome topic mod is installed.

SOLVED :D

AjaxChat - SMF 2.0 RC2 Edition Download.
mrtrc266 ~AJAX Chat Intergration FAQ's & Tips-N-Tricks~

SoLoGHoST


C4G-TK

Sweet, I'm on vacation, but should have time this week to update.  Looks awesome SG!

-img removed-

SoLoGHoST

#138
Quote from: C4G-TK on December 29, 2009, 12:40:09 AM
Sweet, I'm on vacation, but should have time this week to update.  Looks awesome SG!

This is the very last FREE Update for this MOD.  Adding a ton of features and options, as well as 1 or 2 more additional Layouts, into this for Post Ratings Pro, which I'll post up a link to, once I'm finished with it's 1st version.  Stay Tuned!

Thanks :)

Quote from: Eclipse16V on December 11, 2009, 12:48:30 AM
I think times which I today with the translation become finished. If I still which find announce I me once again. The last time gives to work it here much and then could I not so much on the laptop make.

Added 4 more strings to this in case you are still interested in translating this mod to German, here they are:
$txt['post_ratings_layout_style'] = 'Post Ratings Layout';
$txt['post_ratings_layout_style_inner'] = 'Inner Style';
$txt['post_ratings_layout_style_header'] = 'Header Style';
$txt['post_ratings_layout_style_help'] = 'Choose the Layout Style for showing ratings within posts.  Currently only 2 styles to choose from, Inner Style and Header Style.  While Inner Style allows for all BBC and Smileys, Header Style is somewhat restricted on certain types of BBC tags, however, it does support smileys.';


Thanks Again :)

blokey

SMF Version 2.0 RC2     Server Info Apache version 2.0.63 PHP version 5.2.9 MySQL version 5.0.81-community Architecture x86_64 Operating system Linux

Advertisement: