MyBB Community Forums

Full Version: Making text invisible....
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3
Hello,

I have a strange question, I have text in my header, but now I want to have the text invisible and afther logging in the text need to show up.

I'ts only text so no plug-in or something no own wroted text and I want to make it invisible for guest en visible for member (if you have login)


So how can I do this ??
Try editing the template, header_welcomeblock_member
(2010-10-20, 09:32 PM)blake Wrote: [ -> ]Try editing the template, header_welcomeblock_member

Yeah ok but I don't know wat for code I need to use, or wat I need to do,,

And I have a big forum so I can't go trying on thinks, I need it to work immediately.
Well what are you trying to put in exactly?
Use this plugin , you can creat a site notice , and decide which usergroups you want to view it.

Download: http://www.mybbextras.com/showthread.php?tid=375
I want to have the important messages, I have a Newsbar but I want to have once in a time set some text in the header with other news that no belong in the Newsbar.


But if I edit the header page you says, the text shows up in the welcome bar where you can click on new posts, new message etc.

But I want to have the text underneed the welcome bar.

And if I set the "header" template this is like the way I want but now I want only have this available for members
Well if you only want members to see the text in the header you are going to need a plugin I believe.
Add this to the end of the header_welcomeblock_member template:

</div>
<div class="pm_alert">
***your text/code here***

That will add another block below the welcomeblock with the styling of the PM alert. It will only be visible to logged in members.
(2010-10-21, 01:55 PM)AJS Wrote: [ -> ]Add this to the end of the header_welcomeblock_member template:

</div>
<div class="pm_alert">
***your text/code here***

That will add another block below the welcomeblock with the styling of the PM alert. It will only be visible to logged in members.
Thanks it works but now I have a diffrent question about this....

I want to enter new text on a diffrent pleace see the screen:

[attachment=20315]


So I want to have new text and underneed begins the forums, also this text need to be invisible for guests, and showing up afther logging in on the forum..


Thanks again!!

Ok. Here is the quick solution. Install this plugin
http://mybbhacks.zingaburga.com/showthread.php?tid=260

and open up your newsbar template.

add this before the text you want to hide.
<if !in_array($GLOBALS['mybb']->user['usergroup'], array(guestgroupid,othergroupids)) then>
and close the tag after that text using
/if

now replace the "guestgroupid" with your guest group id which is 1 by default and othergroupid with other ids that you want to hide like banned, awaiting activation and so on. you can use any number of gids separating them with ,

This will show the text only to group ids that are not mentioned here. Smile
Pages: 1 2 3