Advertisement:

Author Topic: Post Ratings  (Read 127852 times)

Offline SoLoGHoST

  • SMF Hero
  • ******
  • Posts: 1,796
  • Gender: Male
  • Real coders do not need to comment their code!
    • Dream Portal
Re: Post Ratings
« Reply #120 on: December 27, 2009, 03:20:51 PM »
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!
« Last Edit: December 27, 2009, 03:52:37 PM by SoLoGHoST »

Offline blokey

  • Jr. Member
  • **
  • Posts: 143
  • Gender: Male
Re: Post Ratings
« Reply #121 on: December 27, 2009, 03:44:30 PM »
Thanks
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

Offline SoLoGHoST

  • SMF Hero
  • ******
  • Posts: 1,796
  • Gender: Male
  • Real coders do not need to comment their code!
    • Dream Portal
Re: Post Ratings
« Reply #122 on: December 27, 2009, 03:54:32 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.

Thanks

You Welcome, will let you know.

Offline SoLoGHoST

  • SMF Hero
  • ******
  • Posts: 1,796
  • Gender: Male
  • Real coders do not need to comment their code!
    • Dream Portal
Re: Post Ratings
« Reply #123 on: December 28, 2009, 03:55:46 PM »
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 :)

Offline Vyache

  • Jr. Member
  • **
  • Posts: 164
  • Gender: Male
  • "If You Give A Mouse A Cookie?"
    • Swim Strong Network
Re: Post Ratings | Bug
« Reply #124 on: December 28, 2009, 05:43:30 PM »
Is this a bug?

./Themes/default/Display.template.php

Code: [Select]
<div id="forumposts">
<h3 class="catbg"

Missing ">" ?

Code: [Select]
', !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:

Code: [Select]
<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...

« Last Edit: December 28, 2009, 05:48:31 PM by Vyache »

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

Offline SoLoGHoST

  • SMF Hero
  • ******
  • Posts: 1,796
  • Gender: Male
  • Real coders do not need to comment their code!
    • Dream Portal
Re: Post Ratings
« Reply #125 on: December 28, 2009, 06:20:02 PM »
you need to add:
Code: [Select]
', !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
Code: [Select]
<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 :)
« Last Edit: December 28, 2009, 06:24:17 PM by SoLoGHoST »

Offline Vyache

  • Jr. Member
  • **
  • Posts: 164
  • Gender: Male
  • "If You Give A Mouse A Cookie?"
    • Swim Strong Network
Re: Post Ratings
« Reply #126 on: December 28, 2009, 06:35:26 PM »
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~

Offline SoLoGHoST

  • SMF Hero
  • ******
  • Posts: 1,796
  • Gender: Male
  • Real coders do not need to comment their code!
    • Dream Portal
Re: Post Ratings
« Reply #127 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 :)

Offline Vyache

  • Jr. Member
  • **
  • Posts: 164
  • Gender: Male
  • "If You Give A Mouse A Cookie?"
    • Swim Strong Network
Re: Post Ratings
« Reply #128 on: December 28, 2009, 07:29:59 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~

Offline SoLoGHoST

  • SMF Hero
  • ******
  • Posts: 1,796
  • Gender: Male
  • Real coders do not need to comment their code!
    • Dream Portal
Re: Post Ratings
« Reply #129 on: December 28, 2009, 07:38:57 PM »
Only change was in Admin.template.php.

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


Replace entire if statement in here with: 
Code: [Select]
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.

Offline Vyache

  • Jr. Member
  • **
  • Posts: 164
  • Gender: Male
  • "If You Give A Mouse A Cookie?"
    • Swim Strong Network
Re: Post Ratings
« Reply #130 on: December 28, 2009, 08:32:51 PM »
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!
« Last Edit: December 28, 2009, 09:02:12 PM by Vyache »

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

Offline SoLoGHoST

  • SMF Hero
  • ******
  • Posts: 1,796
  • Gender: Male
  • Real coders do not need to comment their code!
    • Dream Portal
Re: Post Ratings
« Reply #131 on: December 28, 2009, 10:31:56 PM »
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?

Offline Vyache

  • Jr. Member
  • **
  • Posts: 164
  • Gender: Male
  • "If You Give A Mouse A Cookie?"
    • Swim Strong Network
Re: Post Ratings
« Reply #132 on: December 28, 2009, 11:29:50 PM »
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~

Offline Vyache

  • Jr. Member
  • **
  • Posts: 164
  • Gender: Male
  • "If You Give A Mouse A Cookie?"
    • Swim Strong Network
Re: Post Ratings | Another Bug
« Reply #133 on: December 28, 2009, 11:59:56 PM »
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~

Offline SoLoGHoST

  • SMF Hero
  • ******
  • Posts: 1,796
  • Gender: Male
  • Real coders do not need to comment their code!
    • Dream Portal
Re: Post Ratings
« Reply #134 on: December 29, 2009, 12:22:59 AM »
What other Mods do you have installed??  Do you have the Welcome Topic Mod Installed?

Offline Vyache

  • Jr. Member
  • **
  • Posts: 164
  • Gender: Male
  • "If You Give A Mouse A Cookie?"
    • Swim Strong Network
Re: Post Ratings
« Reply #135 on: December 29, 2009, 12:24:09 AM »
Yes, Welcome topic mod is installed.

SOLVED :D
« Last Edit: December 29, 2009, 12:38:37 AM by Vyache »

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

Offline SoLoGHoST

  • SMF Hero
  • ******
  • Posts: 1,796
  • Gender: Male
  • Real coders do not need to comment their code!
    • Dream Portal
Re: Post Ratings
« Reply #136 on: December 29, 2009, 12:26:11 AM »

Offline C4G-TK

  • Sr. Member
  • ****
  • Posts: 961
  • SHOW others respect & you GET respect in return.
Re: Post Ratings
« Reply #137 on: December 29, 2009, 12:40:09 AM »
Sweet, I'm on vacation, but should have time this week to update.  Looks awesome SG!
-img removed-

Offline SoLoGHoST

  • SMF Hero
  • ******
  • Posts: 1,796
  • Gender: Male
  • Real coders do not need to comment their code!
    • Dream Portal
Re: Post Ratings
« Reply #138 on: December 29, 2009, 12:55:16 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 :)

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:
Code: [Select]
$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 :)
« Last Edit: December 29, 2009, 01:12:44 AM by SoLoGHoST »

Offline blokey

  • Jr. Member
  • **
  • Posts: 143
  • Gender: Male
Re: Post Ratings
« Reply #139 on: December 29, 2009, 01:05:00 AM »
Excellent
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