vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.8 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=235)
-   -   Add-On Releases - [AJAX] Helpful Answers - Post Rating System (plus many sub-features) (https://vborg.vbsupport.ru/showthread.php?t=204117)

tpearl5 04-27-2009 10:30 PM

Yeh, my next question was going to be if that would add a lot of queries. If you could do it without adding a lot of overhead that would be awesome.

Ted S 04-27-2009 11:12 PM

It's not planned in the addon now but you certainly could extend things to update as I mentioned above.

cellarius 04-28-2009 04:44 PM

Hi Ted,

thanks for your work.

There might be a bug in the product file, tho: I tried to install, but the script threw a mysql error at me, saying there was no field "helpfulanswerid" in the fieldset of table "helpfulpost".
I checked and found that there had been no tables installed into my database and thought: Well, of course, there's no field if the tables did not get installed. So I looked at your product file and took out the mysql-CREATEs and created the tables in phpmyadmin.
I tried to install again, and yet again the script threw the same error at me, tho I was pretty sure the tables were created as they were supposed to be. Indeed, there was no such field in helpfulpost. After a closer look at your script, I was pretty sure that the line
Code:

SELECT COUNT(helpfulanswerid) as count FROM " . TABLE_PREFIX . "helpfulpost
was supposed to read
Code:

SELECT COUNT(helpfulanswerid) as count FROM " . TABLE_PREFIX . "helpfulanswer
i.e., the query was going to the wrong table. After changing this, I had no further problems installing, and the mod works just fine (at least, I did not find any errors up to now).

Another question concerning phrase helpfulanswer_postshavebeen. It reads "{1}'s Posts have been rated good {2} out of {3} times</span>". Is that </span>-Tag really supposed to be there?

Then I did a little modification to the helpful_answers_roll-Template. I was somewhat disappointed that there was no way to have icons when I want to allow only positive ratings (or did I miss something?). So I set the options to "Images - Thumbs with rollover" anyway and changed the template code as follows:

Find:
Code:

                    <if condition="$show['rate_helpfulanswer']">
                        <strong>$vbphrase[helpfulanswer_didyoufind] <a href="./helpfulanswers.php?do=rate&postid=$post[postid]&rank=1">$vbphrase[helpfulanswer_yesidid]</a></strong>
                    </if>

Replace with:
Code:

                    <if condition="$show['rate_helpfulanswer']">
                        $vbphrase[helpfulanswer_didyoufind] <a href="./helpfulanswers.php?do=rate&postid=$post[postid]&rank=1" <if condition="$vboptions[disable_ajax] != 2"> onclick="return helpfulanswers_rate($post[postid], 1);" </if> rel="nofollow" onmouseover="document.post_$post[postid]_up.src='images/buttons/ha_thumbsup.gif';" onmouseout="document.post_$post[postid]_up.src='images/buttons/ha_thumbsup_gray.gif';"><img name="post_$post[postid]_up" src="images/buttons/ha_thumbsup_gray.gif" width="11" height="20" border="0" alt="$vbphrase[helpfulanswer_yes]" align="absmiddle" /></a>

                    <if condition="$show['guest'] AND $vboptions['helpans_guestshow']">
                      $vbphrase[helpfulanswer_didyoufind]
                        <a href="./helpfulanswers.php?do=guestrate" <if condition="$vboptions[disable_ajax] != 2"> onclick="return helpfulanswers_rate($post[postid], 1);" </if> rel="nofollow" onmouseover="document.post_$post[postid]_up.src='images/buttons/ha_plus.png';" onmouseout="document.post_$post[postid]_up.src='images/buttons/ha_plus_gray.png';"><img name="post_$post[postid]_up" src="images/buttons/ha_plus_gray.png" width="20" height="20" border="0" alt="$vbphrase[helpfulanswer_yes]" align="absmiddle" /></a>
                    </if>

It will also show the green thumbsup for posts the user has already rated.

Ted S 04-28-2009 06:15 PM

Thanks for your two comments. I'm posting an updated verison to fix the install bug.

I'll look at the span tag later this evening.

cellarius 04-28-2009 09:27 PM

Hope you won't stone me, but in the template I edited, it seems to me that several <strong>-Tags are opened but never closed. Same in other templates. Not sure if I'm overlooking something.

Lines 131, 203, 222, 256, 262 in the .xml-file.

Ted S 04-29-2009 01:08 AM

Quote:

Originally Posted by cellarius (Post 1800839)
Hope you won't stone me, but in the template I edited, it seems to me that several <strong>-Tags are opened but never closed. Same in other templates. Not sure if I'm overlooking something.

Lines 131, 203, 222, 256, 262 in the .xml-file.

Too many edits without doing a rebuild. These will be fixed in 1.8.1

Ted S 04-29-2009 01:11 AM

Quote:

Originally Posted by cellarius (Post 1800659)
Hi Ted,

I was somewhat disappointed that there was no way to have icons when I want to allow only positive ratings (or did I miss something?). So I set the options to "Images - Thumbs with rollover" anyway and changed the template code as follows:

As you discovered there isn't an option to do thumbs up only by removing the thumbs down icon will get you pretty close.

To date no one else has requested this.

Ted S 04-29-2009 01:12 AM

I have posted version 1.8.1 which is a small update release fixing a bug in the installer and a few erroneous HTML tags. Updating is optional.

To upgrade replace the xml file only. No changes were made to any upload files.

BehG 04-30-2009 06:24 PM

Hi Ted,

We installed this hack and it wasn't what we were looking for, so we removed it. However, since then (actually even after we disabled the product and before we removed it), all our regular Vbulletin polls are getting redirected to other threads (either upong voting or through the edit poll function by MODS).

I'm just wondering if there's any part of this hack which would have modified the poll.php file or any of its functions to cause this problem . We did not have this issue before. Your help would be greatly appreciated as we're getting a lot of grif from our members now. :(

landrewolsen72 04-30-2009 07:31 PM

1 Attachment(s)
I installed version 1.7.0 on a system running vbulletin 3.8.2 and ran into a a small problem where the admin section could not find the postid.

I am new enough to vbulletin that this error could have been pilot error on my part, but I am posting the patch here in case it is useful to anyone else.

Thanks
-Andy


All times are GMT. The time now is 05:04 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.02190 seconds
  • Memory Usage 1,752KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (4)bbcode_code_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (5)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete