MyBB Community Forums

Full Version: [tut] Guests register topbar code
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Edit "header_welcomeblock_guest" template.

Add this to the top:

<div id="regplease" style="position: fixed; top: 0; left: 0; height: 20px; background: #ff0000; width:100%;text-align: center;">Please <a href="./member.php?action=login">Login</a> or <a href="./member.php?action=register">Register</a> to get rid of this message.</div>

That will place a rather obnoxious top bar telling people to register. Alter the style to suit your needs.

There are plugins for this too but they aren't needed. It's just a template edit.
wonderful, great tutorial labb, it just i wanted Big Grin
Oh there is a plugin too for this, made by Nickman, so whats the difference
between the two ?
Nickmans shows a message under the welcomeblock on the index, this shows a bar at the very top of every page. Unless you're talking about a different plugin to what I'm thinking...
Yes Matt I am talking the same plugin as you are thinking,
Yes it shows a very dangerous Red colour Toungue (sorry labbroca Smile )
but actually there is by default MyBB has this option, so why is its importance right out
there ?
Quote:but actually there is by default MyBB has this option, so why is its importance right out
there ?

It's not important at all imho. I just saw someone post about having a plugin problem associated with this type of feature and it made me laugh that it's even a plugn. The major difference with my code is that it will stick to top of the page even if you scroll down. So it's always visible and it's more annoying than the simple guest block. The intent is to annoy the user into registering it to remove it. I personally wouldn't use it but others might and I hate to see a plugin used when it's such a basic xhtml change.
Aww, I didnot see that it will scroll down with the page scrolls, if this hapen
then it is more good then the Nickman's plugin
Wonderful tutorial Labbrocca Smile
Yup I just installed and see that it didnot scrols down with the page scrolls
okay i understand at last that it stuck to the every page, Right ?
This is cool, it would be better though if there was a little X on the right that made the bar disappear when you clicked it (with cookies), but then that would take more advanced JavaScript, and it might as well become a plugin.
If you can make it disappear that sort of defeats the purpose of using it at all.

I assume you could use whatever existing collape feature of mybb to possibly make it disappear though if it's needed. javascript to hide is fairly small code to add...again it's purely done with template edits and no need for a plugin exists.
(2009-04-03, 09:52 PM)labrocca Wrote: [ -> ]If you can make it disappear that sort of defeats the purpose of using it at all.
Nah, it shows the message to the members, and it keeps repeating visitors from getting over annoyed with it.
I edit this yesterday, but today when i opened the forum, this Red Bar comes to the
top of Banner Toungue How it changes its position. ?
Pages: 1 2