MyBB Community Forums

Full Version: Info Bar
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Hello what i am looking for is a info bar where i can write a disclaimer etc that can be exited and never seen again.

image example i made up in paint: http://i.imgur.com/CH612iP.png


so what im meaning is that will be above the forums on index visible to guests as well and they see it and when they hit [x] then can refresh page over and over and never see it again.
^^ The above plugin has no dismiss feature, I guess.
However the same can be done with template edits using jQuery cookie plugin for dismiss.
Ya i was going to say, he needed to edit for that close function.
(2013-07-10, 07:22 PM)effone Wrote: [ -> ]^^ The above plugin has no dismiss feature, I guess.
However the same can be done with template edits using jQuery cookie plugin for dismiss.

can u please modify the plugin for me so it does that?
Sorry for being slightly off topic but Cyberj, I did a quick google search and found a similar thread.

Link: http://forums.mybb-plugins.com/Thread-So...d-messages

Since the thread seems to be solved and has 2 replies, I think the solution has been posted on that thread however you would have to first join that community then view the thread.

Hope I Helped.
(2013-07-10, 09:57 PM)Race Wrote: [ -> ]Sorry for being slightly off topic but Cyberj, I did a quick google search and found a similar thread.

Link: http://forums.mybb-plugins.com/Thread-So...d-messages

Since the thread seems to be solved and has 2 replies, I think the solution has been posted on that thread however you would have to first join that community then view the thread.

Hope I Helped.

i joined and went there but i get


[-]
No Permission
Unfortunately you do not have sufficient rights to view replies in this thread.
There is no point of having a plugin for a global site message. That can be done by simple template edits and here is how:

1. Go to your headerinclude template and include the jQuery library (if not already included) and jQuery Cookie plugin. find the code {$stylesheets} and add the following just before that:

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script>
<script type="text/javascript">
if (typeof jQuery == 'undefined') {
    document.write(unescape("%3Cscript src='http://demonate.com/jscripts/cdn/jquery-1.8.2.min.js' type='text/javascript'%3E%3C/script%3E"));
}
</script>
<script type="text/javascript">jQuery.noConflict();</script>
<script type="text/javascript" src="http://demonate.net/CDN/Library/jquery.cookie.js"></script>

2. Now open your global.css and add at the end:

.notebox { padding: 10px; border: 1px solid #FFA600; background: #FFE478; display: none; }
#dismissnote { cursor: pointer; padding: 2px 6px; color: #000; font-weight: 700; border: 1px solid #FFA600; background: rgba(255,255,255,0.5); float: right;}
#dismissnote:hover { color: #FFF; background: #FFA600; }

3. Open your header template and add at the end:

<script type="text/javascript">
      jQuery(document).ready(function () {
      if(jQuery.cookie("sitenote") != "X") {
             jQuery('.notebox').show();
    };

            jQuery("#dismissnote").click(function(event) {
                  jQuery('.notebox').hide();
                  jQuery.cookie("sitenote","X", {expires: 365});
            });
      });
</script>

Now in the same template find a suitable location (preferably, before '{$pm_notice}') and add this code:

<div class="notebox">
<span id="dismissnote">X</span>

Your supersweet exciting global site message goes here.

</div>

Thats all.
Let me know if you have any trouble doing the same.
(2013-07-11, 04:42 AM)effone Wrote: [ -> ]There is no point of having a plugin for a global site message. That can be done by simple template edits and here is how:

1. Go to your headerinclude template and include the jQuery library (if not already included) and jQuery Cookie plugin. find the code {$stylesheets} and add the following just before that:

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script>
<script type="text/javascript">
if (typeof jQuery == 'undefined') {
    document.write(unescape("%3Cscript src='http://demonate.com/jscripts/cdn/jquery-1.8.2.min.js' type='text/javascript'%3E%3C/script%3E"));
}
</script>
<script type="text/javascript">jQuery.noConflict();</script>
<script type="text/javascript" src="http://demonate.net/CDN/Library/jquery.cookie.js"></script>

2. Now open your global.css and add at the end:

.notebox { padding: 10px; border: 1px solid #FFA600; background: #FFE478; display: none; }
#dismissnote { cursor: pointer; padding: 2px 6px; color: #000; font-weight: 700; border: 1px solid #FFA600; background: rgba(255,255,255,0.5); float: right;}
#dismissnote:hover { color: #FFF; background: #FFA600; }

3. Open your header template and add at the end:

<script type="text/javascript">
      jQuery(document).ready(function () {
      if(jQuery.cookie("sitenote") != "X") {
             jQuery('.notebox').show();
    };

            jQuery("#dismissnote").click(function(event) {
                  jQuery('.notebox').hide();
                  jQuery.cookie("sitenote","X", {expires: 365});
            });
      });
</script>

Now in the same template find a suitable location (preferably, before '{$pm_notice}') and add this code:

<div class="notebox">
<span id="dismissnote">X</span>

Your supersweet exciting global site message goes here.

</div>

Thats all.
Let me know if you have any trouble doing the same.

I followed ur instructions it all worked well other then the CSS not working.

it would not show background color/border and the [x] was not even on the right side it was on the left etc.
You have to include the css lines at the end of your global.css.

OR

Add the following at the end of your headerinclude template:

<style type="text/css">
.notebox { padding: 10px; border: 1px solid #FFA600; background: #FFE478; display: none; }
#dismissnote { cursor: pointer; padding: 2px 6px; color: #000; font-weight: 700; border: 1px solid #FFA600; background: rgba(255,255,255,0.5); float: right;}
#dismissnote:hover { color: #FFF; background: #FFA600; }
</style>
Pages: 1 2