shadow.prx
Active Member
Hey guys thought i would start contributing some useful stuff for phpbb im no pro at it so if you want to complain don't bother im going to show you how to make a nice jquery floating message
You can see a demo of it on my forum (the yellow bar at the top)
What you need ?
Where to put these files
put the jquery script in {your style name}/theme
Put the image file in {your style name}/theme/images
What to edit
Ok 1st open {your style name}/themplate/overall_header.html
Find:
Before add:
Find: (might be different its under the </head> tag)
Add after:
If you want this to only show for guests just add this instead
Ok now open {your style name}/theme/stylesheet.css
Add this to the bottom (you can add it to any other stylesheets on prosilver)
Thats is credits go to
i just adapted it for phpbb enjoy all need any help just ask here and i will try me best to help (y)
You can see a demo of it on my forum (the yellow bar at the top)
Code:
http://gfx-scene.com/forums/
Code:
The latest version of jquery-http://jquery.com/
Code:
This image (rename it to 12-em-cross.png )-http://imgcentre.com/img/uploads/big/99e9a22135.png
If you are using a dark background use this image instead (thanks to surfing)
http://imgcentre.com/img/uploads/big/fd0fb51a03.png
Where to put these files
put the jquery script in {your style name}/theme
Put the image file in {your style name}/theme/images
What to edit
Ok 1st open {your style name}/themplate/overall_header.html
Find:
Code:
</head>
Code:
<script type="text/javascript" language="javascript" src="{T_THEME_PATH}/jquery-1.4.1.min.js"></script>
<script type="text/javascript" language="javascript">
// Developed by Roshan Bhattarai
// Visit http://roshanbh.com.np for this script and more.
// This notice MUST stay intact for legal use
$(document).ready(function()
{
//scroll the message box to the top offset of browser's scrool bar
$(window).scroll(function()
{
$('#message_box').animate({top:$(window).scrollTop()+"px" },{queue: false, duration: 350});
});
//when the close button at right corner of the message box is clicked
$('#close_message').click(function()
{
//the messagebox gets scrool down with top property and gets hidden with zero opacity
$('#message_box').animate({ top:"+=15px",opacity:0 }, "slow");
});
});
</script>
Code:
<body id="phpbb">
Code:
<div id="message_box">
<img id="close_message" style="float:right;cursor:pointer" src="{T_THEME_PATH}/images/12-em-cross.png" />
Your message goes here</a>
</div>
Code:
<!-- IF not S_USER_LOGGED_IN --><div id="message_box">
<img id="close_message" style="float:right;cursor:pointer" src="{T_THEME_PATH}/images/12-em-cross.png" />
Your message goes here</a>
</div><!-- ENDIF -->
Add this to the bottom (you can add it to any other stylesheets on prosilver)
Code:
#message_box {
position: absolute;
top: 0; left: 0;
z-index: 10;
background:#ffc;
padding:5px;
border:1px solid #CCCCCC;
text-align:center;
font-weight:bold;
width:99%;
}
Code:
http://roshanbh.com.np/2008/07/top-floating-message-box-using-jquery.html