Author |
Message |
TeKKiE
Hangin' Around
Joined: May 11, 2005
Posts: 48
|
Posted:
Fri Aug 12, 2005 8:33 am |
|
I am also curious as to how I can create a simple scrolling message on the status bar. Currently, it's blank. I also could not find anywhere where it would need to be edited to add the functionality. I have tried adding the above code and once I save to the header file, either in the theme, or in the root directory, my page doesn't load. Any ideas? |
|
|
|
|
hitwalker
Sells PC To Pay For Divorce
Joined:
Posts: 5661
|
Posted:
Fri Aug 12, 2005 8:48 am |
|
This usualy goes in the header .
Try custom header firts..
But i think you have to disable the $slogan also..
But try this..
Code:
<SCR-PT LANGUAGE='JavaScr-pt'>
var default1 = "www.yoursite.com, just some text"; // loaded 1 time only
var text1 = "bla bla text 1";
var text2 = "bla bla text 2";
var text3 = "bla bla text 3";
var changeRate = 4000; // 1000 = 1 seconde
var messageNumber = 0;
function changeStatus() {
if (messageNumber == 0) {
window.status=default1;
document.title=default1;
}
else if (messageNumber == 1) {
window.status=text1;
document.title=text1;
}
else if (messageNumber == 2) {
window.status=text2;
document.title=text2;
}
else if (messageNumber == 3) {
window.status=text3;
document.title=text3;
messageNumber = 0;
}
messageNumber++;
setTimeout("changeStatus();",changeRate);
}
changeStatus(); //www.yoursite.com
// -->
</SCR-PT>
|
Edit : i tried it and works,you can leave the $slogan |
|
|
|
|
TeKKiE
|
Posted:
Fri Aug 12, 2005 10:58 am |
|
Thanks! I'll give it a shot
EDIT:
Another noob question. Where in the header would I put it? Does it matter? Or should I emplace it at the top, after this: Code:if (stristr($_SERVER['PHP_SELF'], "header.php")) {
Header("Location: index.php");
die();
}
require_once("mainfile.php");
|
|
|
|
|
|
hitwalker
|
Posted:
Fri Aug 12, 2005 11:24 am |
|
well my fault...lol
i mean header if were were talking about html pages.
but in your case,put at aftere the ?> in your custom header,thats in your includes folder.. |
|
|
|
|
TeKKiE
|
Posted:
Fri Aug 12, 2005 12:01 pm |
|
|
|
|
TeKKiE
|
Posted:
Fri Aug 12, 2005 12:05 pm |
|
One more thing. Is it feasible to have each of the messages scroll from either right to left, or left to right? I have seen some sites that have this option.
Thanks again for your help! |
|
|
|
|
hitwalker
|
Posted:
Fri Aug 12, 2005 12:54 pm |
|
well i think there are a few but realise that the more things they can the chances are you have to work with unload function..(like body onload)
But not recommended,dont turn your status or title bar in a Xmas tree.
Like you have it now is good... |
|
|
|
|
TeKKiE
|
Posted:
Fri Aug 12, 2005 9:54 pm |
|
|
|
|
Psycho
Worker
Joined: May 27, 2006
Posts: 157
|
Posted:
Sat Sep 02, 2006 8:41 am |
|
Quote: | put at aftere the ?> in your custom header,thats in your includes folder |
custom header? all i have is get_header.php or page_header.php i tried putting it in the page_header.php under the <?php tag and my forums went blank. |
|
|
|
|
montego
Site Admin
Joined: Aug 29, 2004
Posts: 9457
Location: Arizona
|
Posted:
Sat Sep 02, 2006 10:42 am |
|
Psycho, look in your includes directory, you should have another sub-directory in there called custom_files. In there, you can place a custom_head.php file where you can place any code which produces HTML that is supposed to go between the HEAD tags of the page. This is where I place ALL my added links to CSS files and javascript. |
_________________ Only registered users can see links on this board! Get registered or login!
Only registered users can see links on this board! Get registered or login! |
|
|
|
Psycho
|
Posted:
Sat Sep 02, 2006 4:25 pm |
|
ok i made a custom_head.php and pup it in the custom files folder in includes directory. I then went to the site to see if it works, but the site appears blank, there is somthing really wrong with the setup to my site lol! I dont really get how it reads that new file.. |
|
|
|
|
montego
|
Posted:
Sat Sep 02, 2006 7:14 pm |
|
The only way that your site would have gone blank is if you didn't code the file correctly. It must be standard PHP and with no parse errors. |
|
|
|
|
Psycho
|
Posted:
Mon Sep 04, 2006 11:53 am |
|
how can i show you the code i used, this site wont allow me to paste it. |
|
|
|
|
montego
|
Posted:
Tue Sep 05, 2006 5:50 am |
|
Email it to me at montego _{ AT )__ montegoscripts __D O T-- com. |
|
|
|
|
|