vb.org Archive

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

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

Quote:

Originally Posted by Ted S (Post 1843315)
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:

PHP Code:

        <!-- 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:

PHP Code:

        <!-- 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

Quote:

Originally Posted by Noctavia (Post 1845656)
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.

Quote:

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:

Code:

<phrase 1="$post[goodrank]" 2="$post[totalrank]">$vbphrase[helpfulanswer_x_out_of_y]</phrase>
And change it to:

Code:

<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


All times are GMT. The time now is 03:41 AM.

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

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

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

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