Go Back   vb.org Archive > vBulletin 4 Discussion > vB4 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 07-23-2011, 12:46 AM
benative's Avatar
benative benative is offline
 
Join Date: Oct 2009
Posts: 89
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Any variable to print no permissions in the showthread??

I have a custom image link in the showthread and I would like to block people with no permission... is there a way to do it in the template with a vb variable? or do I have to create a plug in for that?
Reply With Quote
  #2  
Old 07-23-2011, 01:18 AM
kh99 kh99 is offline
 
Join Date: Aug 2009
Location: Maine
Posts: 13,185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Do you mean you want to block certain usergroups? You can do this:

Code:
<vb:if condition="!is_member_of($bbuserinfo, A, B, C)">
// custom image link code
</vb:if>

where A, B, C are usergroup ids to block. If you'd rather list the groups that have permission, remove the '!' from in front of is_member_of.
Reply With Quote
  #3  
Old 07-23-2011, 01:42 AM
benative's Avatar
benative benative is offline
 
Join Date: Oct 2009
Posts: 89
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks but that hide the link. I want it to remain the image link and block guest to access to that link.. so that they want to sign up.
Thanks

--------------- Added [DATE]1311389160[/DATE] at [TIME]1311389160[/TIME] ---------------

to be more specific.. I would like them to click on it and get a no permission notice so that they are forced to sign in. then, I wish that they comeback to where they were.
is it complicated? do I need to write a plug in?
Reply With Quote
  #4  
Old 07-23-2011, 01:50 AM
kh99 kh99 is offline
 
Join Date: Aug 2009
Location: Maine
Posts: 13,185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

What does the custom link link to? Is it a vbulletin page? If so then you might be able to check in that page by writing a plugin. If you're linking directly to an image then I think all you can do is replace the link with something else, like

Code:
<vb:if condition="!is_member_of($bbuserinfo, A, B, C)">
// custom image link code
<vb:else />
// a link to a "no permission" page
</vb:if>
Reply With Quote
  #5  
Old 07-23-2011, 02:13 AM
benative's Avatar
benative benative is offline
 
Join Date: Oct 2009
Posts: 89
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by kh99 View Post
What does the custom link link to? Is it a vbulletin page? If so then you might be able to check in that page by writing a plugin. If you're linking directly to an image then I think all you can do is replace the link with something else, like

Code:
<vb:if condition="!is_member_of($bbuserinfo, A, B, C)">
// custom image link code
<vb:else />
// a link to a "no permission" page
</vb:if>
Thank you for the above code but I think I need a plug in rather than a vriable..the image link will lead people to the same exact page.. that's just a way of having people log in

here is an example if a guest want to see what's the content, they will want to click on the image link... then I want it to show no permission. and then people will log in. and finally, they will return to the last showthread page that they were looking at.. and they will be able to see their hidden contents..

just like Click here to


in that case I don't have the no permission.. but I want that to be the no permission. and once they log in they come back to where they are and they can see the contents now...

Thank you for your help. hope I make sense
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 08:44 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04451 seconds
  • Memory Usage 2,201KB
  • Queries Executed 13 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (3)bbcode_code
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (5)post_thanks_box
  • (5)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (5)post_thanks_postbit_info
  • (5)postbit
  • (5)postbit_onlinestatus
  • (5)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete