PDA

View Full Version : Question about rights


Eagle Creek
01-08-2006, 06:04 PM
Hi people!

I have added more information to the postbit_legacy template:

<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:

<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?

peterska2
01-08-2006, 08:41 PM
If it is for Super Mods and Admins to see that you can you the condition
<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.

Eagle Creek
01-08-2006, 09:17 PM
If it is for Super Mods and Admins to see that you can you the condition
<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 :D. 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:

Take
<if condition="$show['modcplink']"><a href="$modcpdir/index.php?$session[sessionurl]">$vbphrase[mod]</a> -</if>
And change it to:
<if condition="can_moderate()"><a href="$modcpdir/index.php?$session[sessionurl]">$vbphrase[mod]</a> -</if>

http://www.vbulletin.com/forum/showpost.php?p=654978&postcount=2

When I re-apply that idea, will your code work then?

peterska2
01-08-2006, 09:20 PM
<if condition="can_moderate()">code</if> would work then as long as all QH are mods.

Eagle Creek
01-08-2006, 09:28 PM
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?

peterska2
01-08-2006, 09:30 PM
yeah providing both conditions are true.

Eagle Creek
01-08-2006, 09:32 PM
yeah providing both conditions are true.

I'm going to change some things at my forums! THANKYOU FOR THE HELP :D.

peterska2
01-08-2006, 10:15 PM
no prob, any time :)