Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
  #1  
Old 01-08-2006, 06:04 PM
Eagle Creek's Avatar
Eagle Creek Eagle Creek is offline
 
Join Date: Jan 2004
Location: Netherlands
Posts: 742
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Question about rights

Hi people!

I have added more information to the postbit_legacy template:
PHP Code:
            <div class="smallfont">
                &
nbsp;<br />
                <if 
condition="$post['joindate']"><div>$vbphrase[join_date]: $post[joindate]</div></if>
                <if 
condition="$post['field2']"><div>$vbphrase[location_perm]: $post[field2]</div></if>
                <if 
condition="$post['age']"><div>$vbphrase[age]: $post[age]</div></if>
                <
div>$vbphrase[posts]: $post[posts]</div>
                <
br>
                <if 
condition="$post['field3']"><div><b>Besturingssysteem</b>: $post[field3]</div></if>
                <if 
condition="$post['field5']"><div>Gewenste moeilijkheidsgraad antwoorden (1-5):<br$post[field5]</div></if>
                <
br>
                <if 
condition="$show['reputation']"><div><if condition="$show['reppower']">$vbphrase[reppower]: $post[reppower]</if>$post[reputationdisplay]</div></if>
                <
div>$post[icqicon$post[aimicon$post[msnicon$post[yahooicon$post[skypeicon]</div>
            </
div
As you can see I use the custom profile fields 'besturingsystseem' and 'gewenste .. etc..'.

But I want to add another field. That's not the problem as you understand. The problem is I only want to show that field to the authorized persons. So I made the field, I set it to "private", "not searchable", and "no show on members list".
The field isnt Editable by User.
I gave my moderators permission to view the whole user profile.
What I want to do is: make a private profile field, only editable by mods/smods.

Now my real question: I want to show this field directly in the thread. So I think I will use:
PHP Code:
                <if condition="$post['field5']"><div><b>Private field</b>: $post[field3]</div></if> 
.

But will other people see this text then? And the content of it?

Because it's a private field I guess they (=other members) don't see the content but still see the text I put in the postbit. How can I prevent this?
Reply With Quote
  #2  
Old 01-08-2006, 08:41 PM
peterska2 peterska2 is offline
 
Join Date: Oct 2003
Location: Manchester, UK
Posts: 6,504
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

If it is for Super Mods and Admins to see that you can you the condition
Code:
<if condition="$show[modcplink]">blah</if>
Otherwise you will have to write a condition that includes regular mods too, but I'm not awake enough to think of that one off the top of my head. I need lots more caffine first.
Reply With Quote
  #3  
Old 01-08-2006, 09:17 PM
Eagle Creek's Avatar
Eagle Creek Eagle Creek is offline
 
Join Date: Jan 2004
Location: Netherlands
Posts: 742
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by peterska2
If it is for Super Mods and Admins to see that you can you the condition
Code:
<if condition="$show[modcplink]">blah</if>
Otherwise you will have to write a condition that includes regular mods too, but I'm not awake enough to think of that one off the top of my head. I need lots more caffine first.
No it's not only S-mod/admin.
I use a special usergroup (Qualified Helpers). I want them to view the item.
They are member of the usergroup QH but they are also moderator of a forum (so not in the mod UG).

Maybe that will make it more easier to make something?

You don't have ro rush, just take as much caffine as you like . Thank you in advance!

Edit: You say 'if condition = show MODCP link". But all the moderators can see them, can't they?
*testing*
hmm.. they can't... but I asked at vB.com a while ago and they gave me a change to show the CP to my mods..
It's like this:
Quote:
Take
PHP Code:
<if condition="$show['modcplink']"><a href="$modcpdir/index.php?$session[sessionurl]">$vbphrase[mod]</a> -</if> 
And change it to:
PHP Code:
<if condition="can_moderate()"><a href="$modcpdir/index.php?$session[sessionurl]">$vbphrase[mod]</a> -</if> 
http://www.vbulletin.com/forum/showp...78&postcount=2

When I re-apply that idea, will your code work then?
Reply With Quote
  #4  
Old 01-08-2006, 09:20 PM
peterska2 peterska2 is offline
 
Join Date: Oct 2003
Location: Manchester, UK
Posts: 6,504
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Code:
<if condition="can_moderate()">code</if>
would work then as long as all QH are mods.
Reply With Quote
  #5  
Old 01-08-2006, 09:28 PM
Eagle Creek's Avatar
Eagle Creek Eagle Creek is offline
 
Join Date: Jan 2004
Location: Netherlands
Posts: 742
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Here I'm back..

When a person is member of the group QH, and has moderation rights he can see the MOD-link now in the navbar.
All the QH's do have moderationrights.

So would you thing work now?
Reply With Quote
  #6  
Old 01-08-2006, 09:30 PM
peterska2 peterska2 is offline
 
Join Date: Oct 2003
Location: Manchester, UK
Posts: 6,504
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

yeah providing both conditions are true.
Reply With Quote
  #7  
Old 01-08-2006, 09:32 PM
Eagle Creek's Avatar
Eagle Creek Eagle Creek is offline
 
Join Date: Jan 2004
Location: Netherlands
Posts: 742
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by peterska2
yeah providing both conditions are true.
I'm going to change some things at my forums! THANKYOU FOR THE HELP .
Reply With Quote
  #8  
Old 01-08-2006, 10:15 PM
peterska2 peterska2 is offline
 
Join Date: Oct 2003
Location: Manchester, UK
Posts: 6,504
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

no prob, any time
Reply With Quote
Reply

Thread Tools
Display Modes

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 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.10408 seconds
  • Memory Usage 2,260KB
  • 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
  • (4)bbcode_php
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (8)post_thanks_box
  • (8)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (8)post_thanks_postbit_info
  • (8)postbit
  • (8)postbit_onlinestatus
  • (8)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