vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=251)
-   -   Any variable to print no permissions in the showthread?? (https://vborg.vbsupport.ru/showthread.php?t=267256)

benative 07-23-2011 12:46 AM

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?

kh99 07-23-2011 01:18 AM

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.

benative 07-23-2011 01:42 AM

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?

kh99 07-23-2011 01:50 AM

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>


benative 07-23-2011 02:13 AM

Quote:

Originally Posted by kh99 (Post 2223768)
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 https://vborg.vbsupport.ru/external/2011/07/47.jpg


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


All times are GMT. The time now is 12:07 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.01028 seconds
  • Memory Usage 1,725KB
  • 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
  • (3)bbcode_code_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (5)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete