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)

Ted S 06-19-2009 06:32 PM

Quote:

Originally Posted by ragarcia87 (Post 1832817)
I love this addon :D I have it installed but I was wondering if I could have it enabled for only a certain thread? I dont need it to be enabled on a whole forum. Thank you.

You can use template conditionals to limit the display to just one thread.

scabbed 06-19-2009 06:44 PM

Quote:

Originally Posted by Ted S (Post 1832847)
You could do this with some template hacks. The variables to show this information are all in the first post.

I will probably add something like this to version 1.9

hello, thanks for the answer

i think i must add this code somewhere in the postbit ??

PHP Code:

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

but i don't know where i must add it so it will be shown under the first post

maybe you can help me ? or i will wait for the 1.9 version ;)

ragarcia87 06-19-2009 06:52 PM

Quote:

Originally Posted by Ted S (Post 1832849)
You can use template conditionals to limit the display to just one thread.

Thank you for your speedy response. Im not much of a coder but I will google what you mean and try to do this.


The code I am inserting into my postbit is
PHP Code:

<if condition="$thread['forumid'] == 703">
       <
div class="smallfont">
        
$helpfulanswers
        
</div>
        </if> 


703 is the id of the thread but it wont show in the thread. Am I doing this right?

//EDIT//
I figured out I had to use this code to target the specific threadid
PHP Code:

<if condition="$thread['forumid'] == '38' && $thread['threadid'] == '703'">
       <
div class="smallfont">
        
This is a test...
        </
div>
        </if> 

That works but when I add the variable $helpfulanswers it doesn't show. I need help on actually getting the variable to show up. The test message appeared only in that thread.

Ted S 06-19-2009 07:39 PM

Quote:

Originally Posted by scabbed (Post 1832860)
hello, thanks for the answer

i think i must add this code somewhere in the postbit ??

PHP Code:

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

but i don't know where i must add it so it will be shown under the first post

maybe you can help me ? or i will wait for the 1.9 version ;)

Give me the weekend to see if I can't get 1.9 going...

Ted S 06-19-2009 07:50 PM

Code:

<if condition="$thread[threadid] == XX">
$helpful_answers
</if>



Something along the lines of that where XX is the thread id.

scabbed 06-19-2009 07:54 PM

Quote:

Originally Posted by Ted S (Post 1832903)
Give me the weekend to see if I can't get 1.9 going...

whoo :D that would be very very nice ::p

:up::up:

ragarcia87 06-19-2009 08:02 PM

Quote:

Originally Posted by Ted S (Post 1832912)
Code:

<if condition="$thread[threadid] == XX">
$helpful_answers
</if>



Something along the lines of that where XX is the thread id.


Ive got it showing test text but not the $helpful_answers variable. I dont know what I am doing wrong. I have it set to manual in the settings.

Ted S 06-20-2009 06:05 PM

Quote:

Originally Posted by ragarcia87 (Post 1832917)
Ive got it showing test text but not the $helpful_answers variable. I dont know what I am doing wrong. I have it set to manual in the settings.

So you're seeing other text but not the rating code?

ragarcia87 06-20-2009 06:12 PM

Quote:

Originally Posted by Ted S (Post 1833480)
So you're seeing other text but not the rating code?

Correct. I can enter any text and it shows up so I know i have the coding right but the $helpful_answers variable doesnt work.

Ted S 06-20-2009 06:58 PM

And if you remove the template conditional stuff does it work?


All times are GMT. The time now is 07:27 PM.

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

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.02549 seconds
  • Memory Usage 1,763KB
  • 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
  • (4)bbcode_php_printable
  • (8)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