PDA

View Full Version : Add-On Releases - [AJAX] Helpful Answers - Post Rating System (plus many sub-features)


Pages : 1 2 3 [4] 5 6 7 8

scabbed
06-21-2009, 03:38 PM
hey, that works like a charm

now this mod is perfect for me :)

cool

bokmade
06-21-2009, 05:30 PM
Thanks Ted S for the Add-On but some post says " Thanks " or " Thank You " and it show for the member they can vote for the post while it's not help they just show the contribute ..

My Q Is Can I Limit the vote for only chare More Than "36" ? It Can limit the vote for the best and more helpful post ?

Ted S
06-22-2009, 04:43 AM
Not following your question...

What do you want to hide and when?

trotskid
06-22-2009, 08:49 AM
Hi. I?ve installed the addon, but I don?t understand this very well: Enable the system in any of your forums by visiting the forum options and scrolling to the end of the page.

What means with "forum options"?

It is possible to use images for scaled 1-10 point ranking?

Thanks!

scabbed
06-22-2009, 08:51 AM
Ted, i received some errors today on my mail, do you know what does it mean ?

Database error in vBulletin 3.8.2:

Invalid SQL:

SELECT postid,goodrank,totalrank
FROM vb3helpfulpost as helpfulpost
WHERE threadid =
ORDER BY goodrank/totalrank DESC
LIMIT 1;

MySQL Error : You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'ORDER BY goodrank/totalrank DESC
LIMIT 1' at line 4
Error Number : 1064
Request Date : Monday, June 22nd 2009 @ 08:40:15 AM
Error Date : Monday, June 22nd 2009 @ 08:40:15 AM
Script : /forum/announcement.php?f=135&a=6
Referrer :
IP Address :
Username : Non inscrit
Classname : vB_Database
MySQL Version :

thanks

Ted S
06-22-2009, 02:58 PM
Hi. I?ve installed the addon, but I don?t understand this very well: Enable the system in any of your forums by visiting the forum options and scrolling to the end of the page.

What means with "forum options"?


Forum Options is where you configure the options on each of your forums. Every forum can be customized.

It is possible to use images for scaled 1-10 point ranking?

Sure.

Ted S
06-22-2009, 02:59 PM
Ted, i received some errors today on my mail, do you know what does it mean ?

Database error in vBulletin 3.8.2:

Invalid SQL:

SELECT postid,goodrank,totalrank
FROM vb3helpfulpost as helpfulpost
WHERE threadid =
ORDER BY goodrank/totalrank DESC
LIMIT 1;

MySQL Error : You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'ORDER BY goodrank/totalrank DESC
LIMIT 1' at line 4
Error Number : 1064
Request Date : Monday, June 22nd 2009 @ 08:40:15 AM
Error Date : Monday, June 22nd 2009 @ 08:40:15 AM
Script : /forum/announcement.php?f=135&a=6
Referrer :
IP Address :
Username : Non inscrit
Classname : vB_Database
MySQL Version :

thanks

Downgrade to the 1.8 series until I fix this.

scabbed
06-22-2009, 03:22 PM
Downgrade to the 1.8 series until I fix this.

ok, but my forum is still working good :)

i'll keep the 1.9 beta version until you make a new one ;)

thanks

trotskid
06-22-2009, 06:23 PM
Forum Options is where you configure the options on each of your forums. Every forum can be customized.

I see now it! I had watched more times but never I found it :S

It?s possible enable it only for threads instead of forums?

Sure.

How? Some guide or post that mention that? For example, I would like to put icons instead the numbers for the scaled 1-10 and variables.

Greetings :)

trotskid
06-22-2009, 09:24 PM
I´ve seen this problem in a variable: "7.6666666666667", and it´s the result of 3 votes (8+5+10). Can be fixed to two digits (7.6)?

Thanks

Ted S
06-22-2009, 09:59 PM
I see now it! I had watched more times but never I found it :S

It?s possible enable it only for threads instead of forums?


No. This is a forum by forum based tool. By thread would just not be admin friendly.

However you can use template conditionals to hide it as you see fit.


How? Some guide or post that mention that? For example, I would like to put icons instead the numbers for the scaled 1-10 and variables.


Replace the 1, 2, 3, .... text with images in the template.

Ted S
06-22-2009, 10:25 PM
I?ve seen this problem in a variable: "7.6666666666667", and it?s the result of 3 votes (8+5+10). Can be fixed to two digits (7.6)?

Thanks

Where are you seeing the long data?

trotskid
06-22-2009, 10:34 PM
No. This is a forum by forum based tool. By thread would just not be admin friendly.

However you can use template conditionals to hide it as you see fit.

Thank you. I will put an eye on this ;)

Replace the 1, 2, 3, .... text with images in the template.

In wich template can I find that? :)

Where are you seeing the long data?

On the first variable in this phrase: This post has been ranked {1} out of 10 with {2} votes.

I?m using the v1.8.4 on 3.8.3.

Greetings

Ted S
06-23-2009, 03:06 AM
In wich template can I find that? :)


helpful_answers_ten


On the first variable in this phrase: This post has been ranked {1} out of 10 with {2} votes.

This will be fixed in 1.9.0 in the meantime open up the XML file and find:


if($this->registry->options['helpans_rank_ten']){


directly under it add:


$post[avgrank] = number_format($post[avgrank], 2, '.', '');
$post[totalrank] = number_format($post[totalrank], 2, '.', '');

Ted S
06-23-2009, 03:08 AM
Downgrade to the 1.8 series until I fix this.

Use the attached version.

Ted S
06-23-2009, 03:10 AM
Hi. I?ve installed the addon, but I don?t understand this very well: Enable the system in any of your forums by visiting the forum options and scrolling to the end of the page.

What means with "forum options"?

It is possible to use images for scaled 1-10 point ranking?

Thanks!

P.S. If you create your own images and want to share them with the community I'll make the code work. I'll even make them rollover and highlight all pretty like if you do stars or the like. :D

trotskid
06-23-2009, 03:38 PM
helpful_answers_ten



This will be fixed in 1.9.0 in the meantime open up the XML file and find:


if($this->registry->options['helpans_rank_ten']){


directly under it add:


$post[avgrank] = number_format($post[avgrank], 2, '.', '');
$post[totalrank] = number_format($post[totalrank], 2, '.', '');


Thanks, but don?t works very fine...

When it doesn?t have no voting appears like this: This post has been ranked 0.00 out of 10 with 0.00 votes, and always with decimal instead of integers numbers when it ?s not necessary.

P.S. If you create your own images and want to share them with the community I'll make the code work. I'll even make them rollover and highlight all pretty like if you do stars or the like. :D

Sure ;)

Ted S
06-23-2009, 05:43 PM
Yikes. I'll have to play with the code a bit more and get back to you shortly.

tpearl5
06-23-2009, 05:55 PM
Ted - any word on adding a notification for users that have posts chosen as helpful answers?

Ted S
06-23-2009, 06:49 PM
Ted - any word on adding a notification for users that have posts chosen as helpful answers?

It's on the to do list for 1.9... Hopefully this week.

columbusgeek
06-23-2009, 11:39 PM
As I read it there really is no reward other then a user getting higher rep. A few people have suggested it in this thread but with a less then exuberant replies from you Ted. Hooking into vbCredits, vbExperience, vBPlaza, etc would push this mod into a even more useful realm.

examples being users who contribute good answers get "x" amount of points they can cash in towards <cool item>.

Just my 2 cents worth. I understand I can pay somebody to do this, I am just pointing out something I see that could be beneficial.

Thanks for this modification.

Ted S
06-24-2009, 02:50 AM
I'm always open to extending my modifications but I can't code things into systems outside my knowledgebase nor can I make this support everything. But this modification is made extendable for that very reason so while I tend to focus on extending the native functions others can add integrations... cheesegrits for example added vBcredits support which is fantastic.

But don't feel like there's no solution for the others...

I added the rep system based on request.

If someone wants to define the needs of more I'm open to making it happen if the code isn't going to require insane updating. It's not where what my product roadmap is focused on but after 8 years of doing vB mods I realize it's just as much about what you want as what I think makes sense.

So whether it's credits, experience (never heard of this one, yikes!) or some other system let me know how you see the two working together for you and ideally for others. What should be an option, what should just happen. I'll let you know if I can support it.

Ted S
06-24-2009, 02:52 AM
I should also mention that this mod wasn't ever intended to give a "reward" for good rated posts... That people are doing this is a great incentive and something I do like a lot. It gives a lot more reason for people to adopt the feature but it's also working with stuff I just don't know. Hence why it wasn't done on day one.

Just some context for ya...

Ted S
06-24-2009, 02:55 AM
When it doesn?t have no voting appears like this: This post has been ranked 0.00 out of 10 with 0.00 votes, and always with decimal instead of integers numbers when it ?s not necessary.


How about...


$post[avgrank] = number_format($post[avgrank], 2);
$post[totalrank] = number_format($post[totalrank], 2);

scabbed
06-24-2009, 09:10 AM
Use the attached version.

thanks Ted, working perfect now

:)

columbusgeek
06-24-2009, 05:05 PM
Hi Ted. Thanks for the great response. Everything made perfect sense. :)

I was under the impression none of the "rewards for doing good things" type systems where able to be used with this mod. If vBCredits can thanks to CheeseGrits, well then I have egg on my face. I dug for a few hours and dint see that. I'll look some more now that I have some direction.

As for vBExperience.
https://vborg.vbsupport.ru/showthread.php?t=199556
It was actually mod of the month in 08. I think it has some legs and is really giving the other systems a run.

Thanks for the mod and letting me know your thoughts.

columbusgeek
06-24-2009, 05:09 PM
I just found CheeseGrits plugin.
http://www.vbcredits.com/forum/showthread.php?t=2556

I don't have time to test it right now, but looking forward to digging into it in the next few days.

tpearl5
06-24-2009, 07:04 PM
As I read it there really is no reward other then a user getting higher rep. A few people have suggested it in this thread but with a less then exuberant replies from you Ted. Hooking into vbCredits, vbExperience, vBPlaza, etc would push this mod into a even more useful realm.


Here's how to get it to work with vbPlaza:
http://www.vbplaza.com/forum/showthread.php?p=6359

I'm currently using this one of my sites with great success so far.

Ted S
06-24-2009, 09:50 PM
I just found CheeseGrits plugin.
http://www.vbcredits.com/forum/showthread.php?t=2556

I don't have time to test it right now, but looking forward to digging into it in the next few days.

Just realized this isn't in the main post... I will be updating to make this more findable.

Ted S
06-26-2009, 03:51 AM
Ted - any word on adding a notification for users that have posts chosen as helpful answers?

Give the attached plugin a shot.

Note... This is code is NOT FULLY TESTED. Please use on a dev server or prepare to uninstall.

Note... This will update your existing user table structure to add a field to track unread helpfulanswer notices. Installing may take a minute.

trotskid
06-26-2009, 10:46 PM
How about...


$post[avgrank] = number_format($post[avgrank], 2);
$post[totalrank] = number_format($post[totalrank], 2);

Not yet, but I?ll wait for the new version :)

This post has been ranked 8.33 out of 10 with 3.00 votes.
This post has been ranked 7.00 out of 10 with 1.00 votes.

And sometimes shows like this: This post has been ranked 8.0 out of 10 with 24 votes (when only there are 3 votes until refresh the page); This post has been ranked 8.00 out of 10 with 3.00 votes.

Greetings

Ted S
06-27-2009, 12:04 AM
Well that's no good. I'll do some testing and work on a better beta for you

Noctavia
06-27-2009, 02:28 AM
I've read through most of the pages so far (skimmed past a lot that didn't seem to apply) and haven't found an answer yet.

How do I remove the dividing line all together? I'd like to have the "did you find helpful" part either on the bottom left hand side, or at the top right hand side of the title. But either option results in an additional line being added.

I've attached images as example...

Noctavia
06-27-2009, 05:14 AM
Ok, managed to get the line gone and to where I wanted. One last question...

Is there a way to change the colour of the text instead of the background colour for posts over a certain possitive score? So, for example, any post that gets 10 positive marks against it, has the entire text turn green?

Ted S
06-27-2009, 03:01 PM
Sure. You can use the variables shown in post #1 of this thread along with vbulletin conditionals to format posts however you like.

Noctavia
06-27-2009, 11:28 PM
Since I've not written any code before in my life, is it possible to get an idea of where I might need to place it? And what I need to include? I gather I'm meant to put it around something in the postbit_legacy template, but outside of that I'm clueless.

From further looking, I assume I place something around this section:
<!-- message -->
<div id="post_message_$post[postid]">$post[message]</div>
<!-- / message -->


What I need is to turn text green if the post receives more than 25 positive votes. Turn red if it's got 25 or more negative votes. And stay the same if it's anywhere in between.

Ted S
06-28-2009, 03:50 AM
Something along the lines of...


<if condition="$post[goodrank] > 10">
<span style="color:red;">$post[message]</span>
<else />
$post[message]
</if>

tpearl5
06-30-2009, 02:51 PM
Give the attached plugin a shot.

Note... This is code is NOT FULLY TESTED. Please use on a dev server or prepare to uninstall.

Note... This will update your existing user table structure to add a field to track unread helpfulanswer notices. Installing may take a minute.

hs anyone had a chance to test this a little?

NLP-er
06-30-2009, 03:04 PM
Waiting, and waiting for this stable version... ;) Great mod I'm already using and waiting with update till stable version. Any clue when it will be released?

Ted S
06-30-2009, 06:10 PM
Lots of travel this month but I hope to get it done soon. The more comments people give on the beta the faster that will be.

Saviour
07-01-2009, 11:51 AM
WOL location not showing when users are visiting helpfulanswers.php.

Ted S
07-01-2009, 06:25 PM
Thank you. This will be addressed in 1.9.

Noctavia
07-05-2009, 10:42 AM
Ok, managed to get the text to change colour depending on the number of positive points, so yay, thankyou for that.

My next question, which I feel is going to be more dificult. Is there a way to soft delete a post if it receives a certain number of negative points? So for example, if three people give it a negative mark, and there's no positive against it, it gets soft deleted.

Does that make sense?

Ted S
07-05-2009, 05:50 PM
You certainly could do this although it would require some code modifications to helpfulanswers.php to check votes against your business rules and perform the soft delete.

Noctavia
07-06-2009, 11:13 PM
You certainly could do this although it would require some code modifications to helpfulanswers.php to check votes against your business rules and perform the soft delete.

Bugger. That's way over my head. :(

Noctavia
07-07-2009, 06:51 AM
Quick question. Would the change to make the text show green affect the Ajax feature? It doesn't seem to be working anymore...

Also, while I'm here. I changed the phrase to say xx members like this post, which works great, for possitive hits. How can I make it say xx members liked this post, xx members didn't like this post?

Ted S
07-07-2009, 03:14 PM
Depends on how you changed it. You can certainly make the color different without impacting the ajax but breaking it would be possible too.

As for changing the text, just work with the rating phrases as you see fit.

Noctavia
07-09-2009, 09:17 AM
This is the text I've got:


<!-- message -->
<if condition="$post[goodrank] >= 10">
<span style="color:lime;">$post[message]</span>
<else />
$post[message]
</if>


<!-- <div id="post_message_$post[postid]">$post[message]</div> -->
<!-- / message -->

I can't figure out how to make the text red if there's 10 negative however. If the post has 10 positive AND 10 negative, it's still staying green. I wasn't sure if the following is correct to make it work that way:


<!-- message -->
<if condition="$post[goodrank] >= 10">
<span style="color:lime;">$post[message]</span>
<else />
<if condition="$post[badrank] >= 10">
<span style="color:red;">$post[message]</span>
<else />
$post[message]
</if>


<!-- <div id="post_message_$post[postid]">$post[message]</div> -->
<!-- / message -->

Also, with regards to the "x members liked this post." phrase, I can't figure out how to add in the second "don't like this post" line. The phrase I have is: {1} members liked this post. If I try {1} members liked this post. {2} members don't like this post. - the number 2 part is taking into account ALL votes, so it looks like 1 member liked it, but 2 didn't like it... when really, it's 1 like and 1 dislike.

Ted S
07-10-2009, 12:28 AM
I can't figure out how to make the text red if there's 10 negative however. If the post has 10 positive AND 10 negative, it's still staying green. I wasn't sure if the following is correct to make it work that way:


You need to reverse your code...

Right now you are saying if the post has more than 10 goodrank it should be green. If not AND if it has more than 10 badrank it should be lime. Instead you need to say if it has more than 10 badrank make it lime first since this is the end goal.


Also, with regards to the "x members liked this post." phrase, I can't figure out how to add in the second "don't like this post" line. The phrase I have is: {1} members liked this post. If I try {1} members liked this post. {2} members don't like this post. - the number 2 part is taking into account ALL votes, so it looks like 1 member liked it, but 2 didn't like it... when really, it's 1 like and 1 dislike.

You're using the wrong phrase variable. You need to edit:


<phrase 1="$post[goodrank]" 2="$post[totalrank]">$vbphrase[helpfulanswer_x_out_of_y]</phrase>


And change it to:


<phrase 1="$post[goodrank]" 3="$post[badrank]">$vbphrase[helpfulanswer_x_out_of_y]</phrase>

This variable already exists in 1.9.

Ted S
07-10-2009, 12:38 AM
I know there's a lot of interest in 1.9 but I still haven't had many comments on the effectiveness of the changes. For those of you who want to use the new features please try the beta on your dev site.

If you do not have a dev site PM me and I can give you access to try the new version so we can get this released.

Changes include:
- Rating a thread sends a notification to the user which can be viewed
- Viewing helpfulanswers.php updates WOL
- Optional message under the first post about which post
- Numerous small tweaks to templates and phrases

Noctavia
07-12-2009, 12:38 AM
You're using the wrong phrase variable. You need to edit:


<phrase 1="$post[goodrank]" 2="$post[totalrank]">$vbphrase[helpfulanswer_x_out_of_y]</phrase>


And change it to:


<phrase 1="$post[goodrank]" 3="$post[badrank]">$vbphrase[helpfulanswer_x_out_of_y]</phrase>



I changed the code you posted, however when I edit the helpfulanswer_x_out_of_y phease to say: {1} members liked this post. {3} members didn't like this post, I get the following message on each post:

0 members liked this post. [ARG:3 UNDEFINED] members didn't like this post.

I'm not currently running 1.9 as you mention it's not complete yet. I'm using version 1.8.4

Ted S
07-12-2009, 02:55 AM
Looks like I gave you bad guidance... You need to leave 2="$post[totalrank]"

MarkusB
07-12-2009, 03:35 PM
Have some problems with 1.8.4 during installation

did upload all files on right place
did import the Product xml

Now i don`t find the Mod in the list of Addons and no possibility to change settings because not present in the vbulletin adjustments.

The "helpful Answers Systems" Button is in the ACP, if i change something there a mysql error appears and tells me about a missing table (vb3_helpfulanswer' doesn't exist)

However, what is the best way to de install the left parts of this Mod, is it enough to remove the files with ftp, and clean the Skins from the HAS entries?
I would like to make a fresh install again.

Cheers Markus

Ted S
07-12-2009, 03:58 PM
If the mod is not showing up as an installed product you should try doing an update first allowing overwrites and see if that works.

If not, check the plugin list for any code from the mod and remove it.

You can then remove the files uploaded via FTP and revert any templates created.

cooltechie
07-15-2009, 03:47 AM
Error when using the ha_import.php file

Database error in vBulletin 3.8.3:

Invalid SQL:
UPDATE post SET totalrank=totalrank + 1,
goodrank=goodrank + 1 WHERE postid = 11756;

MySQL Error : Unknown column 'totalrank' in 'field list'
Error Number : 1054
Request Date : Wednesday, July 15th 2009 @ 04:44:08 AM
Error Date : Wednesday, July 15th 2009 @ 04:44:09 AM
Script : http://www.example.com/forum/admincp/ha_import.php
Referrer :
IP Address : xxx.xxx.xxx.xxx
Username :
Classname : vB_Database
MySQL Version : 5.0.81-community

Ted S
07-15-2009, 03:58 AM
Error when using the ha_import.php file

Database error in vBulletin 3.8.3:

Invalid SQL:
UPDATE post SET totalrank=totalrank + 1,
goodrank=goodrank + 1 WHERE postid = 11756;

MySQL Error : Unknown column 'totalrank' in 'field list'
Error Number : 1054
Request Date : Wednesday, July 15th 2009 @ 04:44:08 AM
Error Date : Wednesday, July 15th 2009 @ 04:44:09 AM
Script : http://www.example.com/forum/admincp/ha_import.php
Referrer :
IP Address : xxx.xxx.xxx.xxx
Username :
Classname : vB_Database
MySQL Version : 5.0.81-community

Try the new version I just posted.

cooltechie
07-15-2009, 04:08 AM
Try the new version I just posted.

Here's the new error:

Database error in vBulletin 3.8.3:

Invalid SQL:

SELECT postid
FROM helpfulpost as helpfulpost
WHERE post.threadid = 11756;

MySQL Error : Unknown column 'post.threadid' in 'where clause'
Error Number : 1054
Request Date : Wednesday, July 15th 2009 @ 05:07:14 AM
Error Date : Wednesday, July 15th 2009 @ 05:07:15 AM
Script : http://www.example.com/forum/admincp/ha_import.php
Referrer :
IP Address : xxx.xxx.xxx.xxx
Username :
Classname : vB_Database
MySQL Version : 5.0.81-community

Ted S
07-15-2009, 04:32 AM
Whoops. One more time please.

cooltechie
07-15-2009, 04:38 AM
Whoops. One more time please.

A different unknown column error

Database error in vBulletin 3.8.3:

Invalid SQL:

SELECT postid
FROM helpfulpost as helpfulpost
WHERE helpfulpost.threadid = 11756;

MySQL Error : Unknown column 'helpfulpost.threadid' in 'where clause'
Error Number : 1054
Request Date : Wednesday, July 15th 2009 @ 05:36:38 AM
Error Date : Wednesday, July 15th 2009 @ 05:36:40 AM
Script : http://www.example.com/forum/admincp/ha_import.php
Referrer :
IP Address : xxx.xxx.xxx.xxx
Username :
Classname : vB_Database
MySQL Version : 5.0.81-community

Ted S
07-15-2009, 03:16 PM
Are you already using the addon? If so, what version?

cooltechie
07-15-2009, 03:27 PM
Are you already using the addon? If so, what version?

I downloaded (1.8.4) and started to use it yesterday. Once it was installed, I decided to use the ha-import.php file. ha-import.php file was copied to admincp and launched from there. Should I do something differently?

Ted S
07-15-2009, 04:01 PM
No that's ok. I will need to revist the import script to work with 1.8.. The version I posted runs with 1.9 beta and the first version you used was for 1.7.

cooltechie
07-15-2009, 04:09 PM
No that's ok. I will need to revist the import script to work with 1.8.. The version I posted runs with 1.9 beta and the first version you used was for 1.7.

Can I leave the mod running along with "thanks" mod and then run the import at a later time or does the import need to run immediately after the install? Hope to see a working import soon so I can get it combined. Thanks for creating this mod and for your support.

NLP-er
07-15-2009, 05:16 PM
Are we closer to 1.9 stable :) I just cannot wait :) Are new features described somewhere?

Ted S
07-15-2009, 07:18 PM
The feature list is a few page back... somewhere. :D

We're not a whole lot closer as no one has picked up the beta and commented on it which makes it difficult for me to release as a stable. I will be doing more of my own tests to try and move things along.

Quantnet
07-15-2009, 07:45 PM
Interestingly enough, the Answer Forum mod is released today
https://vborg.vbsupport.ru/showthread.php?t=218653

Ted S
07-15-2009, 08:38 PM
Interesting modification although it looks to be more focused on picking a "best answer" rather than ranking individual answers.

Are there other features you are looking for in my modification that I may be able to bake into 1.9?

Ted S
07-15-2009, 08:40 PM
And yes, I will be adding an option to exclude certain threads from this mod. It's a difficult feature to wrap around but I've come up with the idea of giving two options:

1. Let you specify only certain thread IDs to enable for.
2. Let you specify certain thread IDs to exclude from.

tpearl5
07-15-2009, 10:07 PM
Ted - can you add a report for how many positive/negative ratings users have received in addition to the existing given report? I would like to run contests based on these reports.

Ted S
07-15-2009, 10:13 PM
Shouldn't be a problem.

Ok with entering a username and date range and getting a result?

tpearl5
07-15-2009, 10:16 PM
Interestingly enough, the Answer Forum mod is released today
https://vborg.vbsupport.ru/showthread.php?t=218653

This has been released for a while, the developer just made a 3.8 thread for it. Also, this style looks a lot more like how community server handles best answers but without the per thread "is this a question" option.

tpearl5
07-15-2009, 10:19 PM
Shouldn't be a problem.

Ok with entering a username and date range and getting a result?

If it was the same as the existing posts rated report, that would probably be more useful - that way you can see in a list who is on top for a given period of time. Could you make it so you can also see the post that is rated? (like in the other report)

Ted S
07-15-2009, 10:20 PM
Let me look at the data structure a bit and see what I can do.

Ted S
07-16-2009, 12:51 AM
Can I leave the mod running along with "thanks" mod and then run the import at a later time or does the import need to run immediately after the install? Hope to see a working import soon so I can get it combined. Thanks for creating this mod and for your support.

Yes you can. You could run them both forever... there's no damage.

Ted S
07-16-2009, 02:19 AM
After more testing and some changes I have updated 1.9. This file remains in beta until additional sites start using it but at this time it is working in live environments without problem.

Overview of changes:
- Rating a post now adds a notification to the user whose post it is
- The top rated post can be automatically linked to after the first post
- Specific threads can be excluded or included via the admin

Installing will take a few minutes as all voting records are updated in the database.

NLP-er
07-16-2009, 05:05 AM
The feature list is a few page back... somewhere. :D

We're not a whole lot closer as no one has picked up the beta and commented on it which makes it difficult for me to release as a stable. I will be doing more of my own tests to try and move things along.

Just release it as not beta and you will have plenty of installs ;)
Microsoft never cares :D LOL

Noctavia
07-16-2009, 05:28 AM
Looks like I gave you bad guidance... You need to leave 2="$post[totalrank]"

Cool, thanks, got it working now. :up:

Another question. When I try to find all ratings given to a single thread, I get the following error:

Database error in vBulletin 3.8.2:

Invalid SQL:

SELECT COUNT(helpfulanswerid) AS count
FROM helpfulanswer AS helpfulanswer
INNER JOIN user AS user ON(helpfulanswer.userid = user.userid)
WHERE helpfulanswer.helpfulanswerid <> 0
AND helpfulanswer.postid =
AND helpfulanswer.dateline >= 1245047100 AND helpfulanswer.dateline <= 1247725500
GROUP BY helpfulanswer.userid;

MySQL Error : You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AND helpfulanswer.dateline >= 1245047100 AND helpfulanswer.dateline <= 124772550' at line 6
Error Number : 1064
Request Date : Thursday, July 16th 2009 @ 02:26:25 AM
Error Date : Thursday, July 16th 2009 @ 02:26:25 AM
Script : http://xxxxxx/forums/admincp/helpfulanswers.php?do=show_helpfulanswers
Referrer : http://xxxxxxx/forums/admincp/helpfulanswers.php
IP Address : xxxxxxxxx
Username : xxxxxxx
Classname : vB_Database
MySQL Version : 5.0.81-community

Any idea on how to fix that? I can use all the other reporting features fine. This only happens when I use the Post ID section.

Saviour
07-16-2009, 12:51 PM
Ted S...

I really don't have a test forum, otherwise I'd volunteer to test the beta version. Sorry...

Until then, I'll just have to wait to update the mod until your latest release does become stable.

All my best...

Ted S
07-16-2009, 02:24 PM
Just release it as not beta and you will have plenty of installs ;)
Microsoft never cares :D LOL

After another week of my sites using it I probably will. While MS does release betas as finals it's not worth the support headache for me to do so. :D

Ted S
07-16-2009, 02:24 PM
Cool, thanks, got it working now. :up:

Another question. When I try to find all ratings given to a single thread, I get the following error:

Database error in vBulletin 3.8.2:

Invalid SQL:

SELECT COUNT(helpfulanswerid) AS count
FROM helpfulanswer AS helpfulanswer
INNER JOIN user AS user ON(helpfulanswer.userid = user.userid)
WHERE helpfulanswer.helpfulanswerid <> 0
AND helpfulanswer.postid =
AND helpfulanswer.dateline >= 1245047100 AND helpfulanswer.dateline <= 1247725500
GROUP BY helpfulanswer.userid;

MySQL Error : You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AND helpfulanswer.dateline >= 1245047100 AND helpfulanswer.dateline <= 124772550' at line 6
Error Number : 1064
Request Date : Thursday, July 16th 2009 @ 02:26:25 AM
Error Date : Thursday, July 16th 2009 @ 02:26:25 AM
Script : http://xxxxxx/forums/admincp/helpfulanswers.php?do=show_helpfulanswers
Referrer : http://xxxxxxx/forums/admincp/helpfulanswers.php
IP Address : xxxxxxxxx
Username : xxxxxxx
Classname : vB_Database
MySQL Version : 5.0.81-community

Any idea on how to fix that? I can use all the other reporting features fine. This only happens when I use the Post ID section.

Looks like a little bug. I will get a release out tonight with a fix.

cooltechie
07-16-2009, 02:40 PM
Went for it and used the beta along with ha_import. Each person that was given a "thank" seem to now have a duplicate post right under the original. I'm 100% sure it was not there before. BTW, the import works with this version without any error.

Ted S
07-16-2009, 04:47 PM
Can you clarify this a bit... Are you seeing a second copy of the post or of a link it or something else? Please feel free to post a screen shot or PM me with a URL.

What happens if you turn off the modification? Does it go away/

cooltechie
07-16-2009, 05:57 PM
Can you clarify this a bit... Are you seeing a second copy of the post or of a link it or something else? Please feel free to post a screen shot or PM me with a URL.

What happens if you turn off the modification? Does it go away/

Once I disabled it, the second copy of the post disappears. When I enable it again, it reappears.

Ted S
07-16-2009, 07:58 PM
Well let's leave it disabled for the time being then! I will take a look at the code this evening and probably PM you to get some more details as this may be related to the import only.

Ted S
07-17-2009, 01:52 AM
Hum I'm not sure why this may be happening. Please try turning manual tagging on and let me know if that resolves the issue.

If not please let me know what your settings are so I can try and duplicate this.

Saviour
07-17-2009, 02:21 AM
Ted S...

In your final release for 1.9.0, have you fixed the WOL for the helpfulanswers.php page? Also, you may want to update your read me...since it only gives instructions for new installations and not upgrades...unless I missed something when I downloaded your latest beta.

Thanks, bunches...I look forward to the latest stable release.

Ted S
07-17-2009, 02:27 AM
Yup, WOL is fixed in 1.9. few more tweaks before I mark it as final though... Including to that install script!

Saviour
07-17-2009, 02:32 AM
Sweet...looking forward to it!

Ted S
07-17-2009, 02:42 AM
Those tweaks are done. Just waiting on some additional reports of successful upgrades from others but it's working fine on my sites.

cooltechie
07-17-2009, 03:20 AM
Since you plan to release the final version soon, I was just wondering if you had the chance to look into my duplicate post issue?

Ted S
07-17-2009, 03:28 AM
Since you plan to release the final version soon, I was just wondering if you had the chance to look into my duplicate post issue?

I took a long look at the code but need more info to debug.

Please see my question above.

cooltechie
07-17-2009, 03:41 AM
I took a long look at the code but need more info to debug.

Please see my question above.

I'm sorry, this is now on a new page. Which is your question and what info can I provide to assist you with debug?

Ted S
07-17-2009, 03:46 AM
<a href="https://vborg.vbsupport.ru/showpost.php?p=1850280&postcount=835" target="_blank">https://vborg.vbsupport.ru/showp...&postcount=835</a>

cooltechie
07-17-2009, 03:59 AM
Manual Template Placement: Yes (also tried No)
Show Guest Voting Option: Yes
Hide On First Post: No
Allow Negative Responses: Yes
Banned Users:
Enable Most Helpful Answers: Tes
Enable Self Rating: No
Enable Post Minimum Check: No
Minimum Number of Posts: 10
Most Helpful Answers Limit:
Enable Profile Voting Stats - I: Yes
Enable Profile Voting Stats - II: Yes
Rating Display: Text - Yes/No

Is that what you are looking for?

Ted S
07-17-2009, 04:02 AM
Odd. Those look just fine.

Can you send me a screen shot of whats happening and the source of the code. Email address is PMd to you.

cooltechie
07-17-2009, 04:36 AM
Odd. Those look just fine.

Can you send me a screen shot of whats happening and the source of the code. Email address is PMd to you.

screenshot and source sent

Ted S
07-17-2009, 03:11 PM
Great. I will be sure to take a look and see what I can dig up for you.

Ted S
07-18-2009, 06:01 AM
screenshot and source sent

Unfortunately I'm not having any luck duplicating your issue. How extensive was your ratings before you performed the upgrade? Also have you modified the postbit template?

Daky
07-18-2009, 04:44 PM
Hello,

Maybe this option exists, but i am unable to find it.

When somebody rate post, and you get response saying you have 1 new reputation, link takes you to usercp and list which posts, is it possible to say which user actually "voted" i see that as an admin, but not as an registered user.

Thank you,
D

Ted S
07-18-2009, 05:03 PM
That's not an option that anyone has ever asked for. It's certainly possible to do but are you sure you want people to know how users are voting on their posts?

Daky
07-18-2009, 05:10 PM
Yes, i really would like that to be an option.
(or at least if you can tell me how to make it"enable it"). :)

People in my forum are complaining a lot because of that, they want to see who is voting.

Thank you,
D

Ted S
07-18-2009, 05:28 PM
I can add that in, it's pretty simple. Check back in a few.

Ted S
07-18-2009, 05:49 PM
1.9.1 beta adds the option to show users who voted on their posts in the helpful answers notification area. To upgrade from 1.9 simply upload the new XML plugin file.

To upgrade from 1.8 or 1.7 series upload all of the files in the upload folder and then apply the new XML product file.

Daky
07-18-2009, 06:03 PM
Hello Ted_S,

This doesn't work for me for some reason.

Maybe i am not looking at right place. :)

It shoudl be listed in cp?

This is hot it looks for me:
https://vborg.vbsupport.ru/external/2009/07/23.png

Also, i upgreaded, re-uploaded all files to Helpful Answers 1.9.1 beta4.zip

My Plugin page shows this:
1.9.1 Allows users to rate answers as helpful or not.

Please advise.

Thank you once again for being very helpful.

D

Daky
07-18-2009, 06:05 PM
Testing again

D

Ted S
07-18-2009, 06:07 PM
Whoops. Looks like I didnt add the table prefix tool. Please download again.

Daky
07-18-2009, 06:12 PM
Hello Ted,
Do i have to re-upload files again, or just xml file?

Thanks :)

Daky
07-18-2009, 06:31 PM
Hello,

This worked, but, it still shows if post was voted good or bad, not who voted it?

As for Post Name, it shows post Number, not the full url of the post (I am using VBSEO).

Thank you,
D

Ted S
07-18-2009, 09:24 PM
Have you enabled the option in your User CP?

Daky
07-19-2009, 04:22 AM
Hello,

I am sorry, my mistake, works perfectly.

Thank you very much for enabling this option.

D

tpearl5
07-19-2009, 03:10 PM
Let me look at the data structure a bit and see what I can do.
Did you happen to find anything with the "helpful user's" report

The Realist
07-19-2009, 03:12 PM
Are there any template edits?

Reason I ask is I've uploaded the files and the product and the box is ticked no for template placements but nothing shows.

What are the edits?

Regards

PS,

It does show up but the yes/no options dont as well as the thumbs dont show.

All I see is the rate thread as 12345 etc etc.

Regardless if I tick the option for the thumbs they still dont show up.

Also, its dropped some of my icons down a line, how can I get them back?

The Realist
07-19-2009, 04:26 PM
Well I have this problem and I cant even find the code $helpful_answers in my templates?

Some feedback after installing 1.3.4

Reading the installation instruction for the template edit,

In the search box enter "$template_hook[postbit_controls]".
Add the code $helpful_answers directly above this line.

This should be below instead of above

When I use above, it will split the Thanks button from Post Thank You mod which I reported a few pages back.

Now, using below, it is fine.

Also, when i set it up not to allow poster to rate their own posts, beneath those own posts, there is a line without the rate part.

Ted S
07-19-2009, 04:38 PM
Did you happen to find anything with the "helpful user's" report

With the way data is stored (we capture the ID of the person who did the rating, not the ID of who the rating was on) it's difficult to report on how many posts everyone has got in a single report. I will put together a lookup tool shortly on a user by user basis.

Ted S
07-19-2009, 04:39 PM
Well I have this problem and I cant even find the code $helpful_answers in my templates?

It's not in your templates unless you use manual placement mode and add it.

Ted S
07-19-2009, 04:40 PM
Are there any template edits?

Reason I ask is I've uploaded the files and the product and the box is ticked no for template placements but nothing shows.

What are the edits?

Regards

PS,

It does show up but the yes/no options dont as well as the thumbs dont show.

All I see is the rate thread as 12345 etc etc.

Regardless if I tick the option for the thumbs they still dont show up.

Also, its dropped some of my icons down a line, how can I get them back?

I'm not following your question. If nothing is showing up then how is something showing up wrong? What exactly is your issue?

cooltechie
07-19-2009, 04:40 PM
Unfortunately I'm not having any luck duplicating your issue. How extensive was your ratings before you performed the upgrade? Also have you modified the postbit template?

The only thing I can think of is that it might have something to do with the different ha_import that was available for testing. First you said the file was for 1.7 and then you ask me to try another version that you uploaded, which had a bug, and then used the one for 1.9 which at the time, I was still on 1.8. Since if I disable "ha", no duplicates are shown so I can only guess it's either "ha" or the ha_import. No one else having this problem? I'll use the latest version and see if the problem still exist.

edit: downloaded latest ha and ha_import, upgraded and ran the import. enabled plugin and now see triple post for only the ones that were thanked. those without thanks show single post.

The Realist
07-19-2009, 04:42 PM
Thank you, problem resolved.


It's not in your templates unless you use manual placement mode and add it.

Ted S
07-19-2009, 05:32 PM
The only thing I can think of is that it might have something to do with the different ha_import that was available for testing. First you said the file was for 1.7 and then you ask me to try another version that you uploaded, which had a bug, and then used the one for 1.9 which at the time, I was still on 1.8. Since if I disable "ha", no duplicates are shown so I can only guess it's either "ha" or the ha_import. No one else having this problem? I'll use the latest version and see if the problem still exist.

edit: downloaded latest ha and ha_import, upgraded and ran the import. enabled plugin and now see triple post for only the ones that were thanked. those without thanks show single post.

Well that's not good at all.

Let's start by having you remove the addon which will delete all the votes and should set you back to just one post. I will clearly need to rebuild the import script.

tpearl5
07-19-2009, 05:49 PM
With the way data is stored (we capture the ID of the person who did the rating, not the ID of who the rating was on) it's difficult to report on how many posts everyone has got in a single report. I will put together a lookup tool shortly on a user by user basis.

Okay - that'll work!

I just installed 1.9.1. I can't seem to get the Most Helpful Post Block to display after the first post even though the option is enabled. I'm seeing that "helpful_answers_mosthelp_post" isn't loading. Am I missing something?

Ted S
07-19-2009, 06:04 PM
Any errors or other behavoir or is it just not showing up?

tpearl5
07-19-2009, 06:14 PM
nevermind - I got it - the threads I were looking at didn't have the minimum ratings for the helpful post block to show.

one small feature request though... If the first post of the thread is the most helpful, don't show helpful_answers_mosthelp_post

Another feature to think about - use "Hide On First Post" for select forums. In my case I'm using the mod for a dual purpose - threads that are questions (which the first post will never be helpful), and threads that are informative only (which the first post can always be helpful)

Ted S
07-19-2009, 07:31 PM
I'll definitely get the first post excluded.

As for your second request I'd suggest using template conditions to set that up. It's probably easier.

Any other great ideas for the future?

Ted S
07-19-2009, 07:35 PM
Try the attached version for the first post exclusion.

tpearl5
07-20-2009, 02:59 PM
Try the attached version for the first post exclusion.

That didn't work, although the logic in the if condition seems right

Daky
07-20-2009, 08:22 PM
Ted S,

for some reason every time i receive notifications on new positive posts (or negative), it shows 2 notifications for one post.

Why is that?

Thanks

tpearl5
07-20-2009, 09:30 PM
Ted S,

for some reason every time i receive notifications on new positive posts (or negative), it shows 2 notifications for one post.

Why is that?

Thanks

Actually, I'm seeing the same thing.

Daky
07-20-2009, 11:18 PM
:) ah, i thought it was just me (not enabling \ disabling) something in vbulletin.

Also, i was thinking, maybe ... What do you think about having a daily limit, how many times a user can actually vote on the posts?

Why i am asking this is because on my forum this plugin is connected with reputation and i see that many people are starting to abuse this.

Thank you,
D

Ted S
07-21-2009, 01:37 AM
Whoops... Had the same code in their twice hence the double notices. Please download and reinstall upload/helpfulanswers.php.

As for a daily limit I could build it although it's another query or two to voting. How do you want it done? By usergroup? In total?

Ted S
07-21-2009, 01:44 AM
That didn't work, although the logic in the if condition seems right

Odd. Let's try again...

Quantnet
07-21-2009, 01:57 AM
i'm still a few version back. Is there any reason I need to get the latest version?

Ted S
07-21-2009, 02:07 AM
If you want the latest features yes. If you like what you have, no. All the bugs you see addressed are part of the 1.9 beta.

Daky
07-21-2009, 02:08 AM
Whoops... Had the same code in their twice hence the double notices. Please download and reinstall upload/helpfulanswers.php.

As for a daily limit I could build it although it's another query or two to voting. How do you want it done? By usergroup? In total?


Thank you sir!

Notifications are showing perfectly now.

How i see the limitation is ...

To have an option to even enable or disable it (users can vote as much as they want, or with the limit) - depends on the forum\owner of the forum etc.

... i think by usergroup it would be best. (like Registered users can vote X times in 24hrs) - different user group to have different number etc.

Thats just my idea, maybe someone else (or you) have an better idea.

On my forum in past 3 days, ppl voted over 5000 times, which is :eek: that is why i asked you for this. :)

Thank you very much,
D

cooltechie
07-21-2009, 02:12 AM
When I uninstall (not disable) to wait for a fix to the ha_import, I noticed that the beta leaves behind the "Helpful Answers System" menu behind in the ACP. Not sure if your latest beta resolves that issue.

Ted S
07-21-2009, 02:35 AM
You need to remove the XML files you uploaded to get rid of the admin links.

Ted S
07-21-2009, 02:44 AM
On my forum in past 3 days, ppl voted over 5000 times, which is :eek: that is why i asked you for this. :)


Yikes! We can't have those sorts of problems...

Down the road I will do this per usergroup but for now here's a version that does it one overall limit. You can enable via admin options.

Let me know how it works.

cooltechie
07-21-2009, 04:52 AM
You need to remove the XML files you uploaded to get rid of the admin links.

I found cpnav_helpfulanswers.xml and hooks_helpfulanswers.xml in the ../includes/xml folder. I will remove them both, thanks once again for your support. Looking forward to testing the next version of import.

Daky
07-21-2009, 05:11 AM
Yikes! We can't have those sorts of problems...

Down the road I will do this per usergroup but for now here's a version that does it one overall limit. You can enable via admin options.

Let me know how it works.

Works perfectly.

Thank you very much.

D

digicom
07-21-2009, 09:09 AM
Thanks Ted installed Helpful Answers 1.9.1 beta v7 n working pefectly so far apprciated :up:

willy888
07-21-2009, 12:19 PM
I installed it 1.8.4 but can't vote in posts !!!!! Nothing apears
I only see in admim cp Helpful Answers settings & Helpful Answers Reputation Settings

Step 3) Enable the system in any of your forums by visiting the forum options and scrolling to the end of the page.

There are not

Alternatively you can update multiple forums through the Bulk Forum Enabler located in the Helpful Answers Tab.(Required)

what is this?

Wonksta
07-21-2009, 12:47 PM
When I installed 1.8.4 it does not add the vote options in posts even though the manual insert code is disabled!

tpearl5
07-21-2009, 12:52 PM
Odd. Let's try again...

hrm, that didn't do it either

Saviour
07-21-2009, 01:16 PM
I use the Articles Forum mod and would like to know if there's any way to set your mod to just show the rating in the first thread...and not the subsequent posts.

What do I need to edit in order to accomplish this...or is there a setting in the mod, itself?

Update...

Nevermind...found out I have to edit one of the Article Forum templates in order to accomplish this.

tpearl5
07-21-2009, 02:04 PM
Odd. Let's try again...

This is the condition you'll want for helpful_answers_mosthelp_post
<if condition="!$GLOBALS['FIRSTPOSTID'] AND $helpfulanswer[postid] != $GLOBALS['qrfirstpostid']">

Ted S
07-21-2009, 02:46 PM
I installed it 1.8.4 but can't vote in posts !!!!! Nothing apears
I only see in admim cp Helpful Answers settings & Helpful Answers Reputation Settings

Step 3) Enable the system in any of your forums by visiting the forum options and scrolling to the end of the page.

There are not

Alternatively you can update multiple forums through the Bulk Forum Enabler located in the Helpful Answers Tab.(Required)

what is this?

It sounds like you didn't follow the directions properly and have not enabled the addon in any forums. By default it is turned off in all forums.

To enable it there are two options. First you may go to the forum options page for each forum and turn it on.

Secondly you may use a tool included with this addon to enable it in multiple forums. The tool can be found in the helpful answers section of your Admin CP.

Ted S
07-21-2009, 02:47 PM
This is the condition you'll want for helpful_answers_mosthelp_post
<if condition="!$GLOBALS['FIRSTPOSTID'] AND $helpfulanswer[postid] != $GLOBALS['qrfirstpostid']">

Awesome! I'll get that updated for 1.9.1 beta 290239 :D

Ted S
07-21-2009, 02:50 PM
When I installed 1.8.4 it does not add the vote options in posts even though the manual insert code is disabled!

Have you enabled the modification in the forum you are viewing threads in?

The Smoking Gun
07-21-2009, 05:08 PM
Sorry to take the easy way out but there are 500 some odd posts in this thread for me to look for what I have to ask.
~Thank you for understanding~

It states there are three utility scripts attached to this post...
ha_import.php
ha_old.php
ha_revote.php

Which I believe are VERY useful tools for this mod, however before installing it I would like to have the most (for me being a 3.8 for my first version used) applicable tool, which seems to be missing from the attachments list of files as listed here.

Attached Files
File Type: php ha_old.php (2.7 KB, 16 views)
File Type: php ha_revote.php (2.8 KB, 17 views)

Where would one find the 'ha_import.php' attachment which seems to be missing?

Thanks for sharing such a great add-on that is sure to make things much easier to find for many newer users who often get overwhelmed by what they would need to read through to get close to the answer they are looking for! (wonders why this isn't being utilized here LOL)

Thanks for enlightening me to what I may just be overlooking, or isn't obvious to someone new here!

TSG!


Tips & Tricks Using Template Variables:

While the Helpful Answers section may appear to only add to a small part of your post it can be used much more extensively to change the color of an entire post, to add a special icon or just about anything else you like. Here are list of the variables available for your postbit and postbit_legacy templates.


$post[totalrank] - The total number of ratings
$post[goodrank] - The number of good ratings
$post[badrank] - The number of bad ratings
$post[helpfulgood] - True if the post is positive overall (more good than bad ratings)
$show[rate_helpfulanswer] - True if the user can rate the post (false if they are banned or have rated it).
$post[helpfulanswerid] - True if the user has already rated the post.


================================================== ==========================

Additional variables can also be found in the user's profile page (if enabled).


$helpfulposts[totalranks] - The total ratings of a member's ppsts
$helpfulposts[goodranks] - The total good ratings of a member's posts
$helpfulposts[badranks] - The total bad ratings of a member's posts


================================================== ==========================

Identify the top rated post.

Step 1 - Enable the top rated post feature from your Helpful Answers Settings.
Step 2 - Add the code:


<if condition="$thread[toppost] == $post[postid] AND THIS_SCRIPT == 'showthread'">This is the top rated post!</code>


To your postbit or postbig_legacy template

This can be changed around to add colors, an icon or anything else you want.

================================================== ==========================

Digg Like Ratings (Format: +6 Yes | No)
Step 1 - Open the template helpful_answers
Step 2 -
Replace the code

<if condition="$post['totalrank']">
<phrase 1="$post[goodrank]" 2="$post[totalrank]">$vbphrase[helpfulanswer_x_out_of_y]</phrase>
</if>

With the new code:

<if condition="$post['totalrank']">
+ $post[goodrank]
</if>


================================================== ==========================

(Thumb Up)...5 (Thumb Down)...2
Step 1 - Open the template helpful_answers
Step 2 -
Replace the code

<if condition="$post['totalrank']">
<phrase 1="$post[goodrank]" 2="$post[totalrank]">$vbphrase[helpfulanswer_x_out_of_y]</phrase>
</if>

With the new code:

<if condition="$post['totalrank']">
<img src="images/buttons/ha_thumbsup.gif" width="11" height="20" border="0" alt="Good" /> $post[goodrank]
<img src="images/buttons/ha_thumbsdn.gif" width="11" height="20" border="0" alt="Bad" /> $post[badrank]
</if>


================================================== ==========================

Highlighting the top rated post:

Step 1 - Set "Get Top Post per Thread" to on in your Helpful Answers settings.
Step 2 - Open your postbit or postbit_legacy template (whichever your forum uses)
Step 3 - Find all instances of class="alt1" and class="alt2"
Step 4 - At each instance add the following code directly after style="
<if condition="$thread[toppost] == $post[postid]">background-color:#CCCCCC;</if>
#CCCCCC is the color to highlight the post with. You may change this to another HTML Color Code

Step 5 - Repeat this for each instance (there may be as many as 5 depending on the template)
For example:
<td class="alt1" align="$stylevar[right]" style="<if condition="$thread[toppost] == $post[postid]">background-color:#CCCCCC;</if>border: $stylevar[cellspacing]px solid $stylevar[tborder_bgcolor]; border-$stylevar[left]: 0px; border-top: 0px">

================================================== ==========================

Utility Scripts

Three utility scripts are attached to this post which you may need to use if you are modifying the addon or doing a special import. Each of these should be run from your admincp folder and deleted after use.

1. ha_import.php - This file will import thank yous out of the Thank You Post hack and import them as helpful votes.
2 . ha_old.php - This file will resync vote summaries for version 1.5 and below.
3. ha_revote.php - This file will resync vote summaries for versions 1.6 and above

Ted S
07-21-2009, 06:08 PM
That's a wonderfully observant question!

ha_import.php is missing as it contained a nasty bug and needs to be redone. In the mean time you can use the modification, you just can't import those votes but I will have it back up soon!

The Smoking Gun
07-21-2009, 06:40 PM
Thank you for your expedient reply Ted, being a bit new to this I have to ask... which votes won't I be able to import until this is re-done?
And I assume anything that has previously transpired will then still be able to be imported with out corrupting the existing stats?

And is there an ETC (estimated time of completion) ?
I am not trying to rush you, only make informed plans for my forums.

Thanks again,
TSG!

Ted S
07-22-2009, 02:37 AM
The import script pulls in votes from the Thank You post modification. Once it is fixed you will be able to import any votes without disrupting the existing system.

No ETA as of yet. I need to figure out what went wrong first.

Ted S
07-22-2009, 04:08 AM
Also to be clear, I have an updated version of ha_import but need to test it. As with all things in mods the big time issue is finding people who use the test to insure it works and fixing bugs if they are found.

The Smoking Gun
07-22-2009, 09:35 AM
Was that a subtle invitation?
My running forum might be too low in traffic to properly id bigs, but my intentions of this use was more for a new forum I plan on getting licensed for in the next two weeks, which "should" be more active and field test worthy.

Thanks for the input/updates, none the less!

TSG!

Ted S
07-22-2009, 12:13 PM
Nope, just a statement of fact!

For a new forum you have no need for the import script as there's nothing to import. Even an established forum doesn't need an import unless you want all of your "Thanks!" votes to count as Helpful Ratings... If you don't have the Thank You Post mod then you definitely don't need it.

cooltechie
07-22-2009, 12:56 PM
Also to be clear, I have an updated version of ha_import but need to test it. As with all things in mods the big time issue is finding people who use the test to insure it works and fixing bugs if they are found.

If you feel you have a near finished version of import you would like to test, I'm willing to give it a try. I could do without it, but then again, the members have invested some time to thank others, so it's probably better to get them counted.

tpearl5
07-22-2009, 02:27 PM
As for your second request I'd suggest using template conditions to set that up. It's probably easier.

Does the conditional have to go in postbit directly? I tried putting it in the template, but it didn't parse.

Awesome! I'll get that updated for 1.9.1 beta 290239 :D

haha - I did some digging for the proper condition on vbulletin.com, then I realized I already used it in my postbit for some ads.

Now that I think about it, that block isn't really useful if the second post is the most helpful either. Here's an example of what it looks like: http://cellphoneforums.net/verizon/t300228-lg-env-inbox-limit.html Any ideas for the conditional to exclude the second post if most helpful too?

Ted S
07-22-2009, 02:29 PM
No idea on the second post...

For the condition you can add it right to the helpful_answers template.

Daky
07-22-2009, 04:25 PM
Hi,

Is there a way to reset reputation + all statstics on this script?

As i mentioned before Ted enabled limitation on how many times user can vote in 24 h, they abused this script on my forum :) so, i would like to start all over, and reset everything to 0.

Is that possible? if yes, please if someone can tell me how.

Thank you very much.
D

The Smoking Gun
07-22-2009, 10:41 PM
Nope, just a statement of fact!

For a new forum you have no need for the import script as there's nothing to import. Even an established forum doesn't need an import unless you want all of your "Thanks!" votes to count as Helpful Ratings... If you don't have the Thank You Post mod then you definitely don't need it.

Yes I understand that where my next forum is concerned but my currently running forum of over two years, will also be getting this mod, and thank you hack has been installed, although the import lost those from the other BB software I got so frustrated with and ended up upgrading to this, so there are not a whole lot of thanks to consider but there may be by the time you release the new stable version since you do not wish for me to be a tester of it, which is probably better for my limited php skill level!

Thanks none the less though, we all appreciate all your hard work, as is true for all the other developers who post the many versatile hacks here for no additional cost, and as soon as any one of my sites goes from red to green, some will be shared with those whose mods contributed to that!

TSG!

Ted S
07-22-2009, 11:02 PM
Hi,

Is there a way to reset reputation + all statstics on this script?


Absolutely. Just delete all the data from the tables helpfulpost and helpfulanswer and it will all go away. Alternatively you can use the field userid to limit who has their data removed.

Ted S
07-22-2009, 11:03 PM
Yes I understand that where my next forum is concerned but my currently running forum of over two years, will also be getting this mod, and thank you hack has been installed, although the import lost those from the other BB software I got so frustrated with and ended up upgrading to this, so there are not a whole lot of thanks to consider but there may be by the time you release the new stable version since you do not wish for me to be a tester of it, which is probably better for my limited php skill level!

Thanks none the less though, we all appreciate all your hard work, as is true for all the other developers who post the many versatile hacks here for no additional cost, and as soon as any one of my sites goes from red to green, some will be shared with those whose mods contributed to that!

TSG!

Makes perfect sense.

I'm hoping the import script will be done soon so people like you can rock and roll with it.

As for modifications, frankly my biggest interest is in seeing forums evolve, thrive and become marketing forces which is why all of my mods are designed to drive traffic and activity. Some of what I've built for my own sites ends up here... it's a win-win for me and those who use them (most of the time).

Ted S
07-22-2009, 11:06 PM
If you feel you have a near finished version of import you would like to test, I'm willing to give it a try. I could do without it, but then again, the members have invested some time to thank others, so it's probably better to get them counted.

Attached is the updated version of the script. To be candid I plan to test this more myself over the weekend but if you are inclined you are more than welcome to give it a shot. Just prepare to remove the addon should you encounter a bug.

cooltechie
07-23-2009, 01:58 AM
I'm surprised no one reported issue when using the latest version (1.9.1 beta v6).

Database error in vBulletin 3.8.3:

Invalid SQL:

SELECT helpfulpost.postid as postid,post.threadid as threadid
FROM helpfulpost as helpfulpost
INNER JOIN post AS post ON(helpfulpost.postid = post.postid);

MySQL Error : Table 'example_vb.helpfulpost' doesn't exist
Error Number : 1146
Request Date : Thursday, July 23rd 2009 @ 02:55:42 AM
Error Date : Thursday, July 23rd 2009 @ 02:55:44 AM
Script : http://www.example.com/community/admincp/plugin.php?do=productimport
Referrer : http://www.example.com/community/admincp/plugin.php?do=productadd
IP Address : xxx.xxx.xxx.xxx
Classname : vB_Database
MySQL Version : 5.0.81-community

Ted S
07-23-2009, 02:20 AM
Is this a fresh install or an upgrade?

Ted S
07-23-2009, 02:34 AM
Answered my own question... Beta 1.9.1 version8 is posted which fixes a bug with new installs.

Daky
07-23-2009, 03:20 AM
Absolutely. Just delete all the data from the tables helpfulpost and helpfulanswer and it will all go away. Alternatively you can use the field userid to limit who has their data removed.

:eek: - thank you for answer, but, no thank you, i am going to leave it as it is.

I can't play with my database - not an expert, afraid i am gonna f* it up. :)

Anyway, thank you very much for detailed answer as always, great support and best script.

D

Ted S
07-23-2009, 12:16 PM
Not much risk in the delete process... I assure you (especially if you don't mind doing a complete reset).

Here's a few queries you could run:

To remove all votes:

DELETE FROM helpfulpost;
DELETE FROM helpfulanswer;


To remove votes from one user:

DELETE FROM helpfulpost WHERE userid = XYZ;
DELETE FROM helpfulanswer WHERE userid = XYZ;


Pretty simple.

cooltechie
07-23-2009, 01:16 PM
Answered my own question... Beta 1.9.1 version8 is posted which fixes a bug with new installs.

I think you forgot to attach it so we can help you test. :D

Ted S
07-23-2009, 04:33 PM
Details, details. :D

cooltechie
07-23-2009, 05:42 PM
Details, details. :D

Ok, now I see it in the download area.

cooltechie
07-23-2009, 06:04 PM
This is the error I get when using the ha_import.php

Database error in vBulletin 3.8.3:

Invalid SQL:

SELECT userid,postid,threadid
FROM post_thanks as post_thanks;

MySQL Error : Unknown column 'threadid' in 'field list'
Error Number : 1054
Request Date : Thursday, July 23rd 2009 @ 06:55:26 PM
Error Date : Thursday, July 23rd 2009 @ 06:55:26 PM
Script : http://www.example.com/forum/admincp/ha_import.php
Referrer :
IP Address : xxx.xxx.xxx.xxx
Classname : vB_Database
MySQL Version : 5.0.81-community

cooltechie
07-23-2009, 06:07 PM
Ouch, this one hurts the most when viewing posts.


Database error in vBulletin 3.8.3:

Invalid SQL:

SELECT
post.*, post.username AS postusername, post.ipaddress AS ip, IF(post.visible = 2, 1, 0) AS isdeleted,
user.*, userfield.*, usertextfield.*,
icon.title as icontitle, icon.iconpath,
avatar.avatarpath, NOT ISNULL(customavatar.userid) AS hascustomavatar, customavatar.dateline AS avatardateline,customavatar.width AS avwidth,customavatar.height AS avheight,
spamlog.postid AS spamlog_postid,
deletionlog.userid AS del_userid, deletionlog.username AS del_username, deletionlog.reason AS del_reason,
editlog.userid AS edit_userid, editlog.username AS edit_username, editlog.dateline AS edit_dateline,
editlog.reason AS edit_reason, editlog.hashistory,
postparsed.pagetext_html, postparsed.hasimages,
sigparsed.signatureparsed, sigparsed.hasimages AS sighasimages,
sigpic.userid AS sigpic, sigpic.dateline AS sigpicdateline, sigpic.width AS sigpicwidth, sigpic.height AS sigpicheight,
IF(displaygroupid=0, user.usergroupid, displaygroupid) AS displaygroupid, infractiongroupid

,helpfulpost.goodrank,helpfulpost.totalrank,helpfu lanswer.helpfulanswerid,helpfulanswer.yesno
FROM post AS post
LEFT JOIN user AS user ON(user.userid = post.userid)
LEFT JOIN userfield AS userfield ON(userfield.userid = user.userid)
LEFT JOIN usertextfield AS usertextfield ON(usertextfield.userid = user.userid)
LEFT JOIN icon AS icon ON(icon.iconid = post.iconid)
LEFT JOIN avatar AS avatar ON(avatar.avatarid = user.avatarid) LEFT JOIN customavatar AS customavatar ON(customavatar.userid = user.userid)
LEFT JOIN spamlog AS spamlog ON(spamlog.postid = post.postid)
LEFT JOIN deletionlog AS deletionlog ON(post.postid = deletionlog.primaryid AND deletionlog.type = 'post')
LEFT JOIN editlog AS editlog ON(editlog.postid = post.postid)
LEFT JOIN postparsed AS postparsed ON(postparsed.postid = post.postid AND postparsed.styleid = 8 AND postparsed.languageid = 1)
LEFT JOIN sigparsed AS sigparsed ON(sigparsed.userid = user.userid AND sigparsed.styleid = 8 AND sigparsed.languageid = 1)
LEFT JOIN sigpic AS sigpic ON(sigpic.userid = post.userid)
LEFT JOIN helpfulpost AS helpfulpost ON(helpfulpost.postid = post.postid)LEFT JOIN helpfulanswer AS helpfulanswer ON(helpfulanswer.postid = post.postid and helpfulanswer.userid = 1)
WHERE post.postid IN (0,13272,15596,15597,15611,15613)
ORDER BY post.dateline;

MySQL Error : Table 'example_vb.helpfulpost' doesn't exist
Error Number : 1146
Request Date : Thursday, July 23rd 2009 @ 06:52:51 PM
Error Date : Thursday, July 23rd 2009 @ 06:52:51 PM
Script : http://www.example.com/forum/showthread.php?t=2292
Referrer : http://www.example.com/forum/forumdisplay.php?f=12
IP Address : xxx.xxx.xxx.xxx
Classname : vB_Database
MySQL Version : 5.0.81-community

Ted S
07-23-2009, 07:57 PM
Looks like the fresh install did not fully initialize. I will be reworking the install code over the weekend to distribute to understand what went wrong.

Please remove 1.9 if you still have it installed and are getting errors. Most users of 1.9 who upgraded to it will not have issues.

furst
07-24-2009, 02:47 PM
Is it possible to make it so that someone gets a helpful rating whenever they get regular reputation? Is that feature available yet?

tpearl5
07-24-2009, 02:52 PM
Is it possible to make it so that someone gets a helpful rating whenever they get regular reputation? Is that feature available yet?
I completely eliminated the reputation links, and hooked up the helpful answer system to reputation. There's really no reason to have both.

furst
07-24-2009, 02:58 PM
I completely eliminated the reputation links, and hooked up the helpful answer system to reputation. There's really no reason to have both.
I welcome it when members want to leave a comment in the reputation they give to another. They should have the option to do so if they want to.

Ted S
07-24-2009, 06:43 PM
Reputation extends well beyond just rating posts so while votes can influence it, I have not seen much demand for the other way.

reddyink
07-25-2009, 10:34 PM
Does this integrate with points system such as vbExperience? Does the ratings of replies get points?

thanks -

Ted S
07-26-2009, 12:49 AM
This does not contribute to the points system although I'm open to suggestions.

tpearl5
07-26-2009, 01:29 AM
FYI, I have 1.9 working with vbplaza (with one small code addition) without a problem...

reddyink
07-26-2009, 02:04 AM
FYI, I have 1.9 working with vbplaza (with one small code addition) without a problem...

Appreciate if you can post the code so that others can benefit and this Mod owner can incorporate into the plug-in itself.

Ted S
07-26-2009, 03:35 AM
Appreciate if you can post the code so that others can benefit and this Mod owner can incorporate into the plug-in itself.

It's been posted a few times if you search the mod. The code is not mine to incorporate.

navjotjsingh
07-26-2009, 05:46 PM
I am trying this query to add table to the database:

CREATE TABLE vb_helpfulpost(
'postid' int(10) unsigned NOT NULL DEFAULT '0',
'threadid' int(10) unsigned NULL,
'goodrank' INT(7) UNSIGNED NOT NULL DEFAULT '0',
'totalrank' INT(7) UNSIGNED NOT NULL DEFAULT '0',
'lastvote' INT UNSIGNED NOT NULL DEFAULT '0',
'userid' int(7) unsigned NULL',
KEY 'postid' ('postid'),
KEY 'goodrank' ('goodrank'),
KEY 'totalrank' ('totalrank')
);


But still it says SQL Error :

#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''postid' int(10) unsigned NOT NULL DEFAULT '0',
'threadid' int(10) unsign' at line 2


How to add this table?

Ted S
07-26-2009, 06:58 PM
Remove the word "unsigned" from threadid.

Why are you trying to create this manually?

navjotjsingh
07-26-2009, 07:19 PM
Because it didn't got created with the installer. Another error:


#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''postid' int(10) unsigned NOT NULL DEFAULT '0',
'threadid'' at line 2

Ted S
07-26-2009, 10:41 PM
Because it didn't got created with the installer. Another error:


#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''postid' int(10) unsigned NOT NULL DEFAULT '0',
'threadid'' at line 2


What version of mySQL are you using?

TRABZONLUKAPLAN
07-27-2009, 12:50 AM
Installed but how can we use this like https://vborg.vbsupport.ru/external/2009/07/4.gif instead of "5 out of 2 found this helpful" ? I mean, its enough to learn how can I get the number of users who didnt find the post helpful ?

And one more question. If I delete this addon, the table which is created by the addon in the database will be deleted or not ? Should I do sth extra to deletion ?

Thanks in advance, thanks for this helpful addon.

navjotjsingh
07-27-2009, 12:55 AM
MySQL 5.1.30

Ted S
07-27-2009, 01:06 AM
Installed but how can we use this like https://vborg.vbsupport.ru/external/2009/07/4.gif instead of "5 out of 2 found this helpful" ? I mean, its enough to learn how can I get the number of users who didnt find the post helpful ?


The addon comes with options to use thumb images. You can edit the style / text through your phrase manager.

And one more question. If I delete this addon, the table which is created by the addon in the database will be deleted or not ? Should I do sth extra to deletion ?

The tables will be removed when you remove the addon.

Ted S
07-27-2009, 01:20 AM
MySQL 5.1.30

Try:


CREATE TABLE helpfulpost (
`postid` INT(10) NOT NULL DEFAULT '0',
`threadid` INT(10) NULL,
`goodrank` INT(7) UNSIGNED NOT NULL DEFAULT '0',
`totalrank` INT(7) UNSIGNED NOT NULL DEFAULT '0',
`lastvote` INT UNSIGNED NOT NULL DEFAULT '0',
`userid` INT(7) unsigned NULL,
KEY `postid` (`postid`),
KEY `goodrank` (`goodrank`),
KEY `totalrank` (`totalrank`)
);

Ted S
07-27-2009, 01:22 AM
1.9.2 version 9 has been posted which fixes an issue with new installs.

navjotjsingh
07-27-2009, 01:40 AM
Try:


CREATE TABLE helpfulpost (
`postid` INT(10) NOT NULL DEFAULT '0',
`threadid` INT(10) NULL,
`goodrank` INT(7) UNSIGNED NOT NULL DEFAULT '0',
`totalrank` INT(7) UNSIGNED NOT NULL DEFAULT '0',
`lastvote` INT UNSIGNED NOT NULL DEFAULT '0',
`userid` INT(7) unsigned NULL,
KEY `postid` (`postid`),
KEY `goodrank` (`goodrank`),
KEY `totalrank` (`totalrank`)
);


This worked finally.

relaxiha
07-27-2009, 01:44 AM
Database error in vBulletin 3.8.3:

Invalid SQL:

SELECT COUNT(helpfulanswerid) AS count
FROM helpfulanswer AS helpfulanswer
INNER JOIN user AS user ON(helpfulanswer.userid = user.userid)
WHERE helpfulanswer.helpfulanswerid <> 0
AND user.userid = '1' AND helpfulanswer.postid =
AND helpfulanswer.dateline >= 1245984180 AND helpfulanswer.dateline <= 1248662580
GROUP BY helpfulanswer.userid;

MySQL Error : You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AND helpfulanswer.dateline >= 1245984180 AND helpfulanswer.dateline <= 124866258' at line 6
Error Number : 1064
Request Date : Monday, July 27th 2009 @ 02:43:49 AM
Error Date : Monday, July 27th 2009 @ 02:43:49 AM
Script : http://******.com/forums/admincp/helpfulanswers.php?do=show_helpfulanswers
Referrer : http://*******.com/forums/admincp/helpfulanswers.php
IP Address : 87.236.197.182
Username : Commando
Classname : *****_Database
MySQL Version : 5.0.81-community

Ted S
07-27-2009, 03:37 AM
Thanks, this should be resolved in the next update.

SİMAR
07-27-2009, 07:26 AM
Thanks

Saviour
07-27-2009, 12:54 PM
Just updated to latest release...WOL is not working for helpfulanswers.php page.

Get the following:

Unknown Location
/forums/helpfulanswers.php

Running 1.9.2 beta of your mod on a 3.8.3 board.

tpearl5
07-27-2009, 09:21 PM
Ted, I found an interesting bug. If a post is rated most helpful, but then the post is removed (not physically removed) the most helpful post link will still exist. Here's an example: http://cellphoneforums.net/rogers/t293551-unlock-rogers-cellphones-blackberry-nokia-htc-lg-motorola-sonyericsson.html

(in my case it keeps reloading the page because of vbseo)

Also, I don't know if there's another way to link to the most helpful post other then using showpost.php. I completely turned off showpost and vbseo is redirecting. I tired changing the link to the #post1234 format, but this doesn't work if the most helpful post is on another page from the page you're on.

Ted S
07-28-2009, 12:34 AM
That's an interesting issue. Fixing the top posts page is simple but the bigger question is how or when to delete the votes. If it on soft delete they would be lost for a restored post. On hard delete and they'd sit around for invisible posts.

Thoughts?

rmd708
07-28-2009, 03:38 PM
Is it possible to include this for each user in the postbit, like the total posts, registration date, total helpful answers?

I tried searching but I couldn't find if this was resolved.

tpearl5
07-28-2009, 09:21 PM
That's an interesting issue. Fixing the top posts page is simple but the bigger question is how or when to delete the votes. If it on soft delete they would be lost for a restored post. On hard delete and they'd sit around for invisible posts.

Thoughts?

This is a rare case, so I would think they should be deleted when the post is soft deleted - or add a conditional to the query that gets the most helpful post to say 'if not soft deleted'.

Is it possible to include this for each user in the postbit, like the total posts, registration date, total helpful answers?

I tried searching but I couldn't find if this was resolved.

https://vborg.vbsupport.ru/showthread.php?p=1800216#post1800216

Chicago_VLNU_4s
07-29-2009, 03:09 PM
interesting.. might give it a try

apokphp
07-29-2009, 06:06 PM
As it stands right now, the post creator is alerted (via notification) whenever one of their posts have been rated. Is there a way to turn this off? I prefer that the system be completely anonymous (to the public).

Love the hack btw, been waiting for a working version of this feature for a couple years now. Thank you!

apokphp
07-29-2009, 09:38 PM
Also, I don't understand how to "Identify the top rated post". I got it to highlight successfully, but when it comes to putting a statement of identification or image to identify it, it isn't working correctly.

These instructions:
dentify the top rated post.

Step 1 - Enable the top rated post feature from your Helpful Answers Settings.
Step 2 - Add the code:

Code:

<if condition="$thread[toppost] == $post[postid] AND THIS_SCRIPT == 'showthread'">This is the top rated post!</code>

To your postbit or postbig_legacy template

This can be changed around to add colors, an icon or anything else you want.

Don't seem to be working for me. Is it because I have similar code already highlighting the post? If so, what specifically and where, should the changes be?

Ted S
07-29-2009, 10:24 PM
When you say it doesn't work what do you mean? Does it do nothing... does it do something else?

When you say similar code what does that mean? What other code do you have?

Ted S
07-29-2009, 10:26 PM
As it stands right now, the post creator is alerted (via notification) whenever one of their posts have been rated. Is there a way to turn this off? I prefer that the system be completely anonymous (to the public).

Love the hack btw, been waiting for a working version of this feature for a couple years now. Thank you!

This is built in to the beta and will be an option in the final release.

apokphp
07-30-2009, 03:33 PM
When you say it doesn't work what do you mean? Does it do nothing... does it do something else?
No. I guess I'm not sure where to put it.


When you say similar code what does that mean? What other code do you have?
Just your highlight code.

How do I use both the call out and highlight code?

Also, the notification system...it gives my users a 404 page not found most of the time. Sometimes it works...most of the time it doesn't. It's weird.

http://www.onlinedebate.net/profile.php?do=helpfulans

Ted S
07-30-2009, 03:40 PM
Are the URLs always getting truncated like that or did you only copy part of it?

apokphp
07-30-2009, 10:21 PM
Now that you say that, it made me realize, that it does that when someone uses the notification for this mod, from our site's main page...which is a portal. When someone uses it from w/i the /forums/ directory, it probably appears just fine.

How can I fix that url so that it is static (will always include the /forums/ directory)?

Also, any idea on how to use both the call out and highlight code for the most helpful post in a thread?

Ted S
07-30-2009, 11:06 PM
I can get the url fixed in the next beta update.

Need to look in to your template issue more before I can give a response but try both independantly and let me know if both work.

cooltechie
07-31-2009, 02:23 PM
Just curious to know what the status is for the ha_import script.

Also, if I install the non beta and members vote, what will happen when ha_import is released? Will it overwrite the existing vote or add to it?

Ted S
08-02-2009, 05:56 PM
It will add to it.

The script is posted a few pages back but still needs a test. Looking to do that this week or next weekend

tpearl5
08-03-2009, 01:53 PM
Ted, any word on that user helpful post report?

sockwater
08-03-2009, 04:11 PM
That's an interesting issue. Fixing the top posts page is simple but the bigger question is how or when to delete the votes. If it on soft delete they would be lost for a restored post. On hard delete and they'd sit around for invisible posts.

Thoughts?
Add a flag to each vote to show if it's soft deleted or not. When a post is soft deleted, soft delete the votes, when a post if hard deleted, hard delete the votes.

Ted S
08-03-2009, 07:44 PM
Soft deleting votes is possible but you start to get into more and more variables to check things adding to the queries. I'm not sure it's worth the overhead, even small overhead, for the limited times where it applies.

cooltechie
08-03-2009, 10:20 PM
It will add to it.

The script is posted a few pages back but still needs a test. Looking to do that this week or next weekend

I will look for it and might give it a quick test.

Ted S
08-05-2009, 01:55 AM
I will look for it and might give it a quick test.

here it is to save you some time. Let me know your results. I will be installing the thank you mod on my test server and running a few test imports over the weekend.

Ted S
08-05-2009, 02:04 AM
Beta release 10 has been posted. This is a small bug fix to address issues with WOL, New Installs and a few other reported issues as well as to allow the notifications system to be turned off.

Hopefully this will be the final beta (cross fingers) before the stable is posted.

Ted S
08-05-2009, 02:05 AM
Ted, any word on that user helpful post report?

Must have missed this or just lost my mind but I take it this is a new feature request... Please link/ explain.

cooltechie
08-05-2009, 02:25 AM
here it is to save you some time. Let me know your results. I will be installing the thank you mod on my test server and running a few test imports over the weekend.

Using beta 10

Database error in vBulletin 3.8.3:

Invalid SQL:

SELECT userid,postid,threadid
FROM post_thanks as post_thanks;

MySQL Error : Unknown column 'threadid' in 'field list'
Error Number : 1054
Request Date : Wednesday, August 5th 2009 @ 03:24:04 AM
Error Date : Wednesday, August 5th 2009 @ 03:24:04 AM
Script : http://www.example.com/forum/admincp/ha_import.php
Referrer : http://www.example.com/forum/login.php?do=login
Classname : vB_Database
MySQL Version : 5.0.81-community

Ted S
08-05-2009, 03:10 AM
Sorry about that. I installed the mod and ran a quick test to get past the database errors.

Also think I found the bug causing the duplicate posts. The short explination, I wasn't checking for a record on the post and was recreating it even if you already had votes. This is a bad thing and made duplicate posts show up. It's been fixed.

Just be sure not to re-run this script once it's complete, you'll reimport vote records.

cooltechie
08-05-2009, 04:29 AM
Sorry about that. I installed the mod and ran a quick test to get past the database errors.

Also think I found the bug causing the duplicate posts. The short explination, I wasn't checking for a record on the post and was recreating it even if you already had votes. This is a bad thing and made duplicate posts show up. It's been fixed.

Just be sure not to re-run this script once it's complete, you'll reimport vote records.

Thanks for working through all the annoying bugs. :up:

I'm a bit confused now that you mentioned not to re-run this script. Is there a check put in place so that it won't reimport if it exist? Should I run it or should I wait?

Was hoping to completely convert over to HA, but for now, we are feeding 'thanks' into vbexperience system to generate stats via their CDP addon which allows to score members based on their activites. Since HA is not listed as a CDP addon (https://vborg.vbsupport.ru/showthread.php?t=199556), will need both systems until CDP addon is available.

Can this be done?
HA to only show status without 'voting'
HA to coexist with THANKS and a nightly run of ha_import.php

Hope that all makes sense.

Ted S
08-05-2009, 04:54 AM
Interesting need.

The script will only import a vote once per user but let me dig in a little deeper and see if that would cause any problems and if so, how I can make sure it all works ok.

Ted S
08-05-2009, 05:23 AM
Ok cooltechie, I think I've got the script you need.

Basically I've written a combination of the import routine and the recalculate votes routine such that thank you posts are reviewed, new votes are added and old ones are skipped. This builds the vote database up properly paving the way to clear the master post records (which tell the post how many people voted up/down). Finally we rebuild all of those master records off the raw votes.

This should be something you can run every 24 hours or 24 seconds. Just keep in mind that there are a lot of queries involved as this is litterally checking every post to update the thankyous and rebuild the master vote record.

cooltechie
08-05-2009, 03:41 PM
Ok cooltechie, I think I've got the script you need.

Basically I've written a combination of the import routine and the recalculate votes routine such that thank you posts are reviewed, new votes are added and old ones are skipped. This builds the vote database up properly paving the way to clear the master post records (which tell the post how many people voted up/down). Finally we rebuild all of those master records off the raw votes.

This should be something you can run every 24 hours or 24 seconds. Just keep in mind that there are a lot of queries involved as this is litterally checking every post to update the thankyous and rebuild the master vote record.

Sorry, should I use ha_import.php first and then ha_import_clean.php after that?

tpearl5
08-05-2009, 07:32 PM
Must have missed this or just lost my mind but I take it this is a new feature request... Please link/ explain.

https://vborg.vbsupport.ru/showthread.php?p=1849562#post1849562

tpearl5
08-05-2009, 07:36 PM
I noticed another small bug - when quick replying to a thread, helpful_answers_mosthelp_post shows up under the new reply.

sockwater
08-05-2009, 07:41 PM
Soft deleting votes is possible but you start to get into more and more variables to check things adding to the queries. I'm not sure it's worth the overhead, even small overhead, for the limited times where it applies.
Here are 2 options:

1. Add a separate table to store the id of any vote that is "soft-deleted". That way current code would stay the same, and only the top helpful posts page would check it.

2. Leave votes intact when hard/soft deleting a post, and clean them out with a daily cron job. That way if you soft-delete a post and go right back and restore it, it would still have its votes.

Ted S
08-05-2009, 07:46 PM
No, just use ha_import_clean.php. It's written specifically to do what you need.

Ted S
08-05-2009, 07:55 PM
https://vborg.vbsupport.ru/showthread.php?p=1849562#post1849562

Ahh yes. I still need to build this in for an admin update.

Saviour
08-05-2009, 10:41 PM
Beta release 10 has been posted. This is a small bug fix to address issues with WOL, New Installs and a few other reported issues as well as to allow the notifications system to be turned off.

Hopefully this will be the final beta (cross fingers) before the stable is posted.

I use this mod...only with my Articles forum. WOL is still not working for the helpfulanswers.php page. Still displays Unknown location...

Ted S
08-06-2009, 01:41 AM
On the helpfulanswers.php page or others?

Saviour
08-06-2009, 01:54 AM
On the helpfulanswers.php page...

Ted S
08-06-2009, 02:29 AM
On the helpfulanswers.php page...

Geesh. I spent 15 minutes trying everything under the sun before I realized I had simply reversed the code between two hooks.

Corrected for 1.9 final and in the attached version.

cooltechie
08-07-2009, 02:30 PM
I was shocked how quickly Phalynx (the coder for vBExperience (https://vborg.vbsupport.ru/showpost.php?p=1862532&postcount=935)) included your mod as an addon to his system so that it counts towards user's contribution meter. I guess I can now officially use HA without the need run the import nightly.

Geesh. I spent 15 minutes trying everything under the sun before I realized I had simply reversed the code between two hooks.

Corrected for 1.9 final and in the attached version.

The attached version shows a date of 8/4/2009 for product-helpful_answers.xml so should I download and use the version (overwrite) you posted in the previous post as well?

Ted S
08-07-2009, 10:22 PM
No need. Wait for the stable coming this weekend.

tpearl5
08-08-2009, 05:20 PM
Ted - did you forget to attach the file again? :)

Ted S
08-08-2009, 07:19 PM
Nope... Was working on it. It's up now.

Ted S
08-08-2009, 07:25 PM
After several months of testing by many users I have released 1.9.5 which is a large update to the Helpful Answers system.

Some of the changes in this release:
- The notification system can now be used to tell them when someone voted on their post
- You can now display a message under the first post linking to the top rated post
- Updates to the hooks and plugin system to meet vbulletin guides
- Fixes to several small bugs
- Improved installer code
- Specific threads can be excluded or included via the admin

Note: Installing this version will rework your existing votes updating each one to include additional data. Please be mindful of this as an upgrade will take a few minutes for larger sites.

tpearl5
08-08-2009, 08:40 PM
Thanks Ted ! The mod shouldn't update the post table if I already had 1.9.1 beta installed, no? Should the code version for the latest install code remain as 1.9.0?

Edit: something was up with my caching when trying to update this and my settings and phrases were errased, grr! I erased the installcode for "1.9.2" so it didn't update all my posts again.

cooltechie
08-09-2009, 03:58 AM
When using digg like rating with a post that has 0 positive and 2 negative

<if condition="$post['totalrank']">
+ $post[goodrank]
</if>

It shows up as this:
+ 0 Do you think this post was helpful? Yes | No

Ted S
08-09-2009, 04:05 AM
When using digg like rating with a post that has 0 positive and 2 negative

<if condition="$post['totalrank']">
+ $post[goodrank]
</if>

It shows up as this:
+ 0 Do you think this post was helpful? Yes | No

This field is set to an int so it will show as 0 if empty. You can use the condition <if condition="$post[goodrank] > 0"> to qualify it.

Ted S
08-09-2009, 04:06 AM
Thanks Ted ! The mod shouldn't update the post table if I already had 1.9.1 beta installed, no? Should the code version for the latest install code remain as 1.9.0?

Edit: something was up with my caching when trying to update this and my settings and phrases were errased, grr! I erased the installcode for "1.9.2" so it didn't update all my posts again.

To be clear are you good (aside from losing those settings)?

cooltechie
08-09-2009, 04:20 AM
This field is set to an int so it will show as 0 if empty. You can use the condition <if condition="$post[goodrank] > 0"> to qualify it.

I tried the code below and seem to work better for me as your code was missing $post[badrank] so none showed up

<if condition="$post['totalrank']">
$post[goodrank] Yes | $post[badrank] No
</if>

I'm liking your mod more each day! Nominate for MOTM. Thanks!

Ted S
08-09-2009, 04:21 AM
Awesome!

apokphp
08-09-2009, 04:27 PM
I still can't get the "Identify the top rated post." code to work.

Where precisely should it be in the postbit_legacy template?

digicom
08-09-2009, 04:31 PM
Thanks for update Ted to 1.9.5 excellent! :up:

Ted S
08-09-2009, 04:49 PM
I still can't get the "Identify the top rated post." code to work.

Where precisely should it be in the postbit_legacy template?

It should be automatic. Have you enabled the option in your admin? What version of vB are you on?

apokphp
08-09-2009, 04:51 PM
vb3.8.3.

I was trying to manually edit the template as per the instructions in your 2nd post.

Ted S
08-09-2009, 04:54 PM
Got it.

In 1.9.5 there is an option to auto-identify the top post below the first post which is what I thought you were referring to.

Let's start with the basics...

1. Be sure you enabled the option in your admin to use the variable.
2. Try using this code which will print out "FOUND IT" in the post:


<if condition="$thread[toppost] == $post[postid]">FOUND IT</if>

tpearl5
08-09-2009, 04:55 PM
To be clear are you good (aside from losing those settings)?

Yes, everything is good now! I was just concerned for other people running 1.9.1 - when upgrading to 1.9.5 the script would try to update all their threads again. Nothing changed in that respect from 1.9.1 to 1.9.5, right?