Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 Programming Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #11  
Old 02-26-2016, 06:26 PM
nhawk nhawk is offline
 
Join Date: Jan 2011
Posts: 1,604
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

so you want

Option ON
Guest View and Admin View
Registered can NOT VIEW

Option OFF
Guest View
Admin and Registered can NOT VIEW
Reply With Quote
  #12  
Old 02-26-2016, 06:29 PM
Dr.CustUmz's Avatar
Dr.CustUmz Dr.CustUmz is offline
 
Join Date: Aug 2013
Location: USA
Posts: 647
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by nhawk View Post
so you want

Option ON
Guest View and Admin View
Registered can NOT VIEW

Option OFF
Guest View
Admin and Registered can NOT VIEW
EXACTLY =)

im playing with it too.

i attached the file also if you didnt see that post

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

it really seems like
Code:
<if condition="$show['registerbutton'] OR ($vboptions[drc_rb_edt] == 1 AND ($vboptions[drc_rb_edt] == 1 AND $show['admin']))">
would be the code i need, but for some reason thats not working
Reply With Quote
  #13  
Old 02-26-2016, 06:50 PM
nhawk nhawk is offline
 
Join Date: Jan 2011
Posts: 1,604
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Are you setting $show['admin'] anywhere in your add-on?

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

Wait a second, this should work...
Code:
<if condition="$show['registerbutton'] AND (($vboptions['drc_rb_edt'] == 0 AND !$userinfo['userid']) OR (($vboptions['drc_rb_edt'] == 1 AND !$userinfo['userid']) OR ($vboptions['drc_rb_edt'] == 1 AND $show['admin'])))">
The $show['registerbutton'] eliminates all registered users.

The rest takes care of the other options.

You may need to change userinfo to bbuserinfo. It's been a very long time since I did anything with vB3.
Reply With Quote
  #14  
Old 02-26-2016, 07:12 PM
Dr.CustUmz's Avatar
Dr.CustUmz Dr.CustUmz is offline
 
Join Date: Aug 2013
Location: USA
Posts: 647
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

wholly wow thats a long condition lol, but i have tried that with no avail.

replace userinfo with bbuserinfo, and userid with 1 and still nothing =/

i didnt think this would be this difficult to achieve =/

and no i dont set show admin anywhere in the addon, it is attached up a little further

side note: even with all this code it is viewable from a guest, so somethings partially right lol
Reply With Quote
  #15  
Old 02-26-2016, 07:17 PM
nhawk nhawk is offline
 
Join Date: Jan 2011
Posts: 1,604
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

OK, so a guest can view it with or without the option set?

Then the problem is the admin, correct?

If that's the case then this should show it to the admin...
Code:
<if condition="(($show['registerbutton'] AND $vboptions['drc_rb_edt'] == 0) OR (($show['registerbutton'] AND $vboptions['drc_rb_edt'] == 1) OR ($vboptions['drc_rb_edt'] == 1 AND $show['admin'])))">
Reply With Quote
Благодарность от:
Dr.CustUmz
  #16  
Old 02-26-2016, 07:26 PM
Dr.CustUmz's Avatar
Dr.CustUmz Dr.CustUmz is offline
 
Join Date: Aug 2013
Location: USA
Posts: 647
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

that didnt work either, i broke it down like:
Code:
<if condition="$show['registerbutton']">
REG ON
</if>

<if condition="$vboptions[drc_rb_edt] == 1 AND $show['admin']">
IS ADMIN OPTION ON
</if>

<if condition="$vboptions[drc_rb_edt] == 1">
OPTION ON
</if>

<if condition="$show['admin']">
IS ADMIN
</if>
and wasnt getting my admin blocks, so a simple change to
Code:
is_member_of($bbuserinfo, 6)
solved that issue. so im going to give the original code one more shot and ill let you know =)

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

Code:
<if condition="$show['registerbutton'] OR ($vboptions[drc_rb] == 1 AND ($vboptions[drc_rb_edt] == 1 AND is_member_of($bbuserinfo, 6)))">
WORKS! =)

wholly crap that was too much lol, but why didnt the show admin work... there should have been no issue there....
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 03:56 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.04444 seconds
  • Memory Usage 2,239KB
  • Queries Executed 14 (?)
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
  • (6)bbcode_code
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (6)post_thanks_box
  • (1)post_thanks_box_bit
  • (6)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (6)post_thanks_postbit_info
  • (6)postbit
  • (6)postbit_onlinestatus
  • (6)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
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete