![]() |
Permission based links? Is it possible?
I've created several vbpowered pages which no matter what I do, I cannot get them to use permissions.
So........... I'd like to know if it's possible to hide the pages and just make a link to them, but make the link permission based? I'd like to make it so only registered users see the link and guests don't. |
Are you doing this in vBulletin templates?
|
Quote:
https://vborg.vbsupport.ru/showthrea...t=powered+page |
If your just trying to make it where guests can't view the pages, in the php file which in that tutorial would be test.php add this code below where global.php is included
PHP Code:
|
Like this?
Code:
<?php |
Quote:
eval('print_output("' . fetch_template('downloads') . '");'); except have it fetch a template you create saying they don't have permissions PHP Code:
|
like this?
Code:
<?php |
Exactly...
|
Doesn't work for me. Oh well. Guess I'll go back to using the cmps hide mod then. Thanks for your help.
|
1 Attachment(s)
Ive just tried exactly what you posted with 3.7 and it worked. Are you sure that your default style holds the 'reg' template?
here are some screenshots of it working on my board... the downloads template is just the code for the template from that tutorial you posted with the title part changed to 'Downloads' and the reg template is the same code except with the title changed to 'You can't view this page' |
Quote:
|
Is the name of the template 'custom_reg'? If so then you would need to fetch 'custom_reg' not 'reg'
|
Quote:
Is this call different? |
If they are linked within vBulletin templates, you can surround them with <if condition="is_member_of($vbulletin->userinfo, array(group_ids))">
|
Quote:
|
No. The <if condition=""> needs to be wrapped around the <a href=""> within the templates.
|
Quote:
|
All times are GMT. The time now is 08:52 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 | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|