vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=113)
-   -   [AJAX] Post Thank You Hack (https://vborg.vbsupport.ru/showthread.php?t=92410)

jilly 05-30-2006 01:52 PM

Is there a way I can make an option in a member's user cp to choose whether to view the 'thanks' added to a post or not? Some of my members on slower connections are telling me on a post with a lot of thanks, it is slowing their page load down. So I'd like to give them the option to not view the thanks area.
Thanks!
jilly

Abe1 05-30-2006 02:53 PM

Quote:

Originally Posted by jilly
Is there a way I can make an option in a member's user cp to choose whether to view the 'thanks' added to a post or not? Some of my members on slower connections are telling me on a post with a lot of thanks, it is slowing their page load down. So I'd like to give them the option to not view the thanks area.
Thanks!
jilly

You can do it yourself.

1) Make a new profile option with a yes or no option.

2) open the post_thanks_postbit and put if tags around the whole thing.

jilly 05-31-2006 12:24 AM

Quote:

Originally Posted by Abe1
You can do it yourself.

1) Make a new profile option with a yes or no option.

2) open the post_thanks_postbit and put if tags around the whole thing.

Okay cool - I understand most, but I dont know exactly how to word the if statement - can you tell me what the if statement should be?

Abe1 05-31-2006 12:39 AM

Quote:

Originally Posted by jilly
Okay cool - I understand most, but I dont know exactly how to word the if statement - can you tell me what the if statement should be?

something like this.

<if condition="$bbuserinfo[userfieldxx]">

jilly 05-31-2006 12:53 AM

Okay I did that, but I set the profile field to be a single selection radio button, with a yes or no option to show 'thanks' on posts - and it works, but both options hide the thanks - when I set it to 'no', meaning to not show the thanks, it does not show them, then when I set it to 'yes' which means it should show the thanks, it still does not show them.

I guess I need some sort of==yes sort of thing in there - I just dont know enough about php to figure it out myself yet - thank you so much for helping me with this!

Abe1 05-31-2006 01:02 AM

Quote:

Originally Posted by jilly
Okay I did that, but I set the profile field to be a single selection radio button, with a yes or no option to show 'thanks' on posts - and it works, but both options hide the thanks - when I set it to 'no', meaning to not show the thanks, it does not show them, then when I set it to 'yes' which means it should show the thanks, it still does not show them.

I guess I need some sort of==yes sort of thing in there - I just dont know enough about php to figure it out myself yet - thank you so much for helping me with this!

No, you dont need the equalls. If the option is set to know, it should equal zero which will make the if not show.

putergirl 05-31-2006 02:32 AM

hello, I'm sorry to bother you with this, but I can't find MEMBERINFO in the styles to make the last change to this hack. Can someone please tell me where it is? Thanks. :)

jilly 05-31-2006 02:56 AM

oh i see - i need to make the option a one choice thing, not radio button - just one checkbox that can be cheked on or off - goin gto try that noe

putergirl, look in your main style, > edit templates > look for a list called Member Info Templates - expand that - MEMBERINFO should be the first option when in that group

putergirl 05-31-2006 08:36 PM

jilly thank you! I found it! :D

jilly 06-01-2006 03:05 PM

Okay Abe1, what am I doing wrong? It still does not show the thanks either way, if the option is set to yes or no - here's what I have set up:


All times are GMT. The time now is 10:12 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.04986 seconds
  • Memory Usage 1,740KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (3)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