MyBB Community Forums

Full Version: Is this possible in MyBB?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5 6
Hey,

I was going through a few websites I found one this
[Image: register_Bar.png]
A zoom.
[Image: bar.png]
I was wondering if having that bar at the top in MyBB.

Tristam
Hello there
In global.php

find
else
{
	eval("\$welcomeblock = \"".$templates->get("header_welcomeblock_guest")."\";");
}

below it add

if($mybb->user['uid'] == 0)
{
	$guest_note = '<div id="infobar"><a href="LINK_HERE" rel="nofollow">MESSAGE IN HERE......</a></div><br />';
}

Now in the header template add
{$guest_note}
above
<DIV id=container>

Now in the themes manager, under Additional CSS
Add the following

body {
	margin: 0;
	padding: 0;
}

#infobar {
	font: message-box;
}

#infobar a, #infobar a:link, #infobar a:visited, #infobar a:active {
	display: block;
	float: left;
	clear: both;
	width: 100%;
	color: InfoText;
	background: InfoBackground;
	padding: .45em .3em .45em 2em;
	border-bottom: .16em outset;
	text-decoration: none;
	cursor: default;
}

#infobar a:hover {
	color: HighlightText;
	background: Highlight;
}
Wow very nice.. and a big thank you too!
Perfect.Its appearing but there is one problem.It is also appearing to registered members how can I remove this for registered members.
ow LOL what a miss alright then..

In global.php

find
else
{
	eval("\$welcomeblock = \"".$templates->get("header_welcomeblock_guest")."\";");
}

below it add

if($mybb->user['uid'] == 0)
{
	$guest_note = '<div id="infobar"><a href="LINK_HERE" rel="nofollow">MESSAGE IN HERE......</a></div><br />';
}

Now in the header template use
{$guest_note}

instead of the old code above
<DIV id=container>

regards

Previous post updated
Perfect its working fine now.
Hey,

I wanted to know it we can have something like this below.
[Image: 47v9v90.gif]
Well if you are not able to understand it properly you can check out the site on which I found this.
This is the site.

Give the code required if this is possible.

Tristam
The same as we did it before here
But then it was just a bar but here there are images.
Would this work with all browsers?
Pages: 1 2 3 4 5 6