1
Alcire
Announcement slide panel on xoops.org
  • 2010/9/24 11:52

  • Alcire

  • Just popping in

  • Posts: 2

  • Since: 2010/9/23


Hi,
I would like to know which is the module or the script that is used for the announcement slide panel on the homepage of xoops.org (the yellow one on the top of the page that appears automatically when the page is open) ? I would like to do the same on my xoops site (2.4.5).
Thank you !
(sorry for my very bad english)

2
ghia
Re: Announcement slide panel on xoops.org
  • 2010/9/24 12:42

  • ghia

  • Community Support Member

  • Posts: 4953

  • Since: 2008/7/3 1


I guess it is just some hidden div panel (see HTML source) in theme.html, together with some JQuery from effects.js for showing it at page loading and make it disappear after some time or a click.

3
culex
Re: Announcement slide panel on xoops.org
  • 2010/9/24 13:15

  • culex

  • Module Developer

  • Posts: 711

  • Since: 2004/9/23


This is not jquery but simple javascript still it should do the trick.

in your theme css add (you can add more of course backgroundcolor, fontsize, borderstyle etc)
#startup_message {
width:100%;
border:3px double #000;
padding:20px;
margin:30px auto;
text-align:justify;
}


in your theme header insert
<script type="text/javascript">
window.onload=function() {
setTimeout('document.getElementById("startup_message").style.display="none"',5000);
return;
}
</
script>


And in top of yout theme make a div with id = hide

<div id="startup_message">
Xoops is the best!! Xoops is the best!! Xoops is the best!! Xoops is the best!! Xoops is the best!! Xoops is the best!! Xoops is the best!! Xoops is the best!! Xoops is the best!! 
</
div>
Programming is like sex:
One mistake and you have to support it for the rest of your life.

4
ghia
Re: Announcement slide panel on xoops.org
  • 2010/9/24 14:44

  • ghia

  • Community Support Member

  • Posts: 4953

  • Since: 2008/7/3 1


Quote:
This is not jquery
Yes, it is JQuery on xoops.org
if ($("#wox-announcement").length>0){
        $(
"#wox-announcement").slideDown();
        
setTimeout(function(){
            $(
"#wox-announcement").slideUp();
        }, 
10000);
    }
    
    $(
"#wox-announcement img.close").click(function(){
        $(
"#wox-announcement").slideUp();
    });

Quote:
but simple javascript still it should do the trick.
There are many ways to do it.
Quote:
And in top of yout theme make a div with id = hide
id = startup_message

5
culex
Re: Announcement slide panel on xoops.org
  • 2010/9/24 15:05

  • culex

  • Module Developer

  • Posts: 711

  • Since: 2004/9/23


Quote:

This is not jquery


I mean my example is not jquery

Quote:

id = startup_message


Ups, sorry. Of course the id should be startup_message. Good catch Ghia
Programming is like sex:
One mistake and you have to support it for the rest of your life.

6
Alcire
Re: Announcement slide panel on xoops.org
  • 2010/9/27 12:53

  • Alcire

  • Just popping in

  • Posts: 2

  • Since: 2010/9/23


I've tested it, and it works perfectly ! Thank you so much !

Login

Who's Online

246 user(s) are online (152 user(s) are browsing Support Forums)


Members: 0


Guests: 246


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Apr 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits