Clan Adverts

Sponsors

CT on Facebook

Latest Product

User Box

Anonymous
38.107.179.220
Nickname:

Password:

Security Code
Security Code
Type Security Code


PND Downloads Feed

Phpnuke Downloads
How to Delete or Reset yo...
How to Delete or Reset your PHPNuke Admin Account
Lost your admin password ?  Cant login to your admin account ?This sh...
Back Online & Stuff
Back Online & Stuff
Look at us with our nifty website back up and running… Seriousl...
How to edit the admins in...
How to edit the admins in the forums
Here is a way to make someone admin in your forums on your Evo site. I...
Demo Splash Screen
Demo Splash Screen
Ped @ Clan Themes has released a simple splash screen entrance hack. ...
Free Phpnuke Business The...
Free Phpnuke Business Theme 6
This is the 6th Business theme for Phpnuke that Clan Themes has releas...
Tricked Out Slider
Tricked Out Slider
We have seen some great new things come out of Tricked Out News and th...

Custom Work

PHP Nuke Custom Work

www.clanthemes.com :: View topic - Scrolling Title
Scrolling Title

6 Replies / 2103 Views


Post new topic   Reply to topic  

   www.clanthemes.com Forum Index » Scripts

View previous topic :: View next topic


cupoftea
Reputation: 21.7 Add RepSubtract Rep
Local time: 1:20 AM
Location: Behind My Computer
belgium.gif

Spammer
Spammer

0.08 posts per day
Medals: 0

Joined: Apr 30, 2008
Last Visit: 14 Mar 2009
Posts: 113
Points: 2379 

Post Scrolling Title Posted: Thu Jul 24, 2008 8:34 am

Hey guys,

I have a javascript to make my site-title scroll. I works perfectly in html. How do I integrate into phpnuke? I've already tried, but it doesn't work:

Code:
...
##################################################
# Include some common header for HTML generation #
##################################################


function head() {
    global $slogan, $sitename, $banners, $nukeurl, $Version_Num, $artpage, $topic, $hlpfile, $user, $hr, $theme, $cookie, $bgcolor1, $bgcolor2, $bgcolor3, $bgcolor4, $textcolor1, $textcolor2, $forumpage, $adminpage, $userpage, $pagetitle;
    $ThemeSel = get_theme();
    include_once("themes/$ThemeSel/theme.php");
    echo "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">\n";
    echo "<html>\n";
    echo "<head>\n";
    include("includes/dynamic_titles.php");
    //echo "<title>$sitename $pagetitle</title>\n";
?>
<SCRIPT LANGUAGE=JAVASCRIPT TYPE="TEXT/JAVASCRIPT">
<!-- Hide script from older browsers
//Scrolling Message Across Title Bar
//By: Don Santiago
//Email: senor_santi@yahoo.com
//To change message edit below line
msg = "$sitename $pagetitle";
//To change message edit above lin
//
msg = "                                           ---                                           " + msg;
pos = 0;
function scrollMSG() {
document.title = msg.substring(pos, msg.length) + msg.substring(0, pos);
pos++;
if (pos >  msg.length) pos = 0
window.setTimeout("scrollMSG()",200);
}
// End hiding script from older browsers -->
</SCRIPT>
<?php
...


What did I do wrong?
 

Grtz, CupOfTea --- My Nuke Version: 8.0 Patched 3.5 ---  
View user's profileSend private messageSend e-mailVisit poster's websiteMSN Messenger Reply with quote

DreAdeDcoRpSE
Reputation: 2221.6 Add RepSubtract Rep
votes: 28
Local time: 7:20 PM
Location: Back of your Mind
usa.gif

Forums Moderator
Forums Moderator

1.53 posts per day
Medals: 3 (View more...)
Dedication (Amount: 1)
Site Admin
Site Admin
Joined: Sep 22, 2007
Last Visit: 09 Feb 2012
Posts: 2459
Points: 128879 

Post Scrolling Title Posted: Thu Jul 24, 2008 9:16 am

Shop Purchases:
Enemy Territory Theme (Aviator) for PHP Nuke · Clan Roster 2.0 ·  · Modern Warfare 3 Xtreme Theme

Where were you thinking of putting it. I do have a tutorial to show you about the scroll and putting it at the very top of your site.

http://www.clan-themes.co.uk/ftopict-3692-Top-dropdown-menu-with-without-scrolling-message--amp--image.html
 

 
View user's profileSend private messageVisit poster's website Reply with quote

cupoftea
Reputation: 21.7 Add RepSubtract Rep
Local time: 1:20 AM
Location: Behind My Computer
belgium.gif

Spammer
Spammer

0.08 posts per day
Medals: 0

Joined: Apr 30, 2008
Last Visit: 14 Mar 2009
Posts: 113
Points: 2379 

Post Scrolling Title Posted: Thu Jul 24, 2008 1:04 pm

Don't think you rlly know what I mean with scrolling title... I don't mean a marquee, I mean the thing you put between (title) and (/title) in html. Here's a website that has this kind of title.
 

 
View user's profileSend private messageSend e-mailVisit poster's websiteMSN Messenger Reply with quote


DreAdeDcoRpSE
Reputation: 2221.6 Add RepSubtract Rep
votes: 28
Local time: 7:20 PM
Location: Back of your Mind
usa.gif

Forums Moderator
Forums Moderator

1.53 posts per day
Medals: 3 (View more...)
Dedication (Amount: 1)
Site Admin
Site Admin
Joined: Sep 22, 2007
Last Visit: 09 Feb 2012
Posts: 2459
Points: 128879 

Post Re: Scrolling Title Posted: Thu Jul 24, 2008 6:01 pm

Shop Purchases:
Enemy Territory Theme (Aviator) for PHP Nuke · Clan Roster 2.0 ·  · Modern Warfare 3 Xtreme Theme

Okay, scrap that script you have there. I just worked this one so its not calling on any other files as it looks like yours is doing. If it's not then it sure does it. but this one should work. I don't see why it wouldn't.



##############################################################################################################
##############################################################################################################

This is a 3 step setup.
Skill Level: Easy
Time to install: 1 min

Step 1.)

Open your ROOT/header.php with your favorite editor. (Dreamweaver, Notepad, Wordpad, ect...)

###---- Find ----###

Code:
echo "<title>$sitename $pagetitle</title>\n";


###---- Replace With ----###

Code:
echo "<SCRIPT LANGUAGE=\"JavaScript\">
<!-- Begin
var scrl = \" $sitename $pagetitle \";
function scrlsts() {
 scrl = scrl.substring(1, scrl.length) + scrl.substring(0, 1);
 document.title = scrl;
 setTimeout(\"scrlsts()\", 500);
 }
//  End -->
</script>";






Step 2.)

###---- Find in Line ----###

Code:
$sitename $pagetitle


###---- Edit With Your Message ----###

Example message:
Quote:
Welcome to $sitename!!! &nbsp*;&nbsp*;&nbsp*;&nbsp*;You are viewing $pagetitle, and I hope you enjoy your stay...&nbsp*;&nbsp*;&nbsp*;&nbsp*;


***Note:***
&nbsp*; is spaces, without the *, the more you put in, the more space you will add in the message. I added the * so you can see it.





Step 3.)

###---- Find ----###

?>

###----Add Before ----###

Code:
echo "<Body onLoad=\"scrlsts()\">";




I like to point out that this has the potential to slow down the load speed of your site for different users. I wanted to point that out for you and others that decide to use this script. Well, good luck and have fun with it.

If you have any other questions, feel free to ask.

Also like to add, your previous statement, this is a form of a marquee. Wink
 

 
View user's profileSend private messageVisit poster's website Reply with quote

cupoftea
Reputation: 21.7 Add RepSubtract Rep
Local time: 1:20 AM
Location: Behind My Computer
belgium.gif

Spammer
Spammer

0.08 posts per day
Medals: 0

Joined: Apr 30, 2008
Last Visit: 14 Mar 2009
Posts: 113
Points: 2379 

Post Scrolling Title Posted: Tue Jul 29, 2008 7:16 am

First of all I wanna say thanks for what you've done.
Well, it isn't a normal marquee that you use in plain html. you can't say (title)(marquee)THE_TITLE(/marquee)(/title). Angel
Just wanna ask, isn't it possible to instead of onload something that starts the scrolling after loading?
 

 
View user's profileSend private messageSend e-mailVisit poster's websiteMSN Messenger Reply with quote

gerben
Reputation: 0.3 Add RepSubtract Rep
Local time: 6:20 PM


Noob
Noob

0.00 posts per day
Medals: 0

Joined: Feb 03, 2009
Last Visit: 03 Feb 2009
Posts: 3
Points: 75 

Post Re: Scrolling Title Posted: Tue Feb 03, 2009 9:36 am

thaks for the script.
Ít's works fine for me.
 

 
View user's profileSend private message Reply with quote


northernstu
Reputation: 490.3 Add RepSubtract Rep
Local time: 6:20 PM

uk.gif

Spawn Killer
Spawn Killer

0.02 posts per day
Medals: 0

Joined: Nov 08, 2007
Last Visit: 11 Apr 2010
Posts: 30
Points: 7194 

Post Scrolling Title Posted: Mon Feb 16, 2009 2:06 pm

Shop Purchases:
Americas Army PhpNuke Theme · Multi Gaming (Warrior) Theme · Modern Warfare 2 Evo Xtreme · Modern Gamer Evo Xtreme Theme

hey thanks for the code i will try this out
 

 
View user's profileSend private message Reply with quote
Post new topic   Reply to topic  
   www.clanthemes.com Forum Index » Scripts


 
6 Replies / 2103 Views
Page 1 of 1
All times are GMT
Display posts from previous:   
 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum