You are missing our premiere tool bar navigation system! Register and use it for FREE!

NukeCops  
•  Home •  Downloads •  Gallery •  Your Account •  Forums • 
Readme First
- Readme First! -

Read and follow the rules, otherwise your posts will be closed
Modules
· Home
· FAQ
· Buy a Theme
· Advertising
· AvantGo
· Bookmarks
· Columbia
· Community
· Donations
· Downloads
· Feedback
· Forums
· PHP-Nuke HOWTO
· Private Messages
· Search
· Statistics
· Stories Archive
· Submit News
· Surveys
· Theme Gallery
· Top
· Topics
· Your Account
Who's Online
There are currently, 40 guest(s) and 0 member(s) that are online.

You are Anonymous user. You can register for free by clicking here
Nuke Cops :: View topic - How To Insert JavaScript Into Modules/Blocks [ ]
 Forum FAQ  •  Search  •   •  Memberlist  •  Usergroups   •  Register  •  Profile •    •  Log in to check your private messages  •  Log in

 
Post new topic  Reply to topicprinter-friendly view
View previous topic Log in to check your private messages View next topic
Author Message
symantix
Nuke Soldier
Nuke Soldier


Joined: Feb 25, 2004
Posts: 32


PostPosted: Wed Feb 25, 2004 2:34 pm Reply with quoteBack to top

Yes, I already tried that. I don't have a header.php file. My header file is called header.html. If I change the name to header.php, and change that code in theme.php, the rollover works, but everything else is out of wack.
Find all posts by symantixView user's profileSend private messageVisit poster's website
symantix
Nuke Soldier
Nuke Soldier


Joined: Feb 25, 2004
Posts: 32


PostPosted: Wed Feb 25, 2004 2:37 pm Reply with quoteBack to top

Actually, correction:

it throws everything out of wack if I try to convert header.html with phpNuke tools and then save it as header.php. If I don't try to convert and I just rename the file, I get a blank page when I pull my site up...nothing.
Find all posts by symantixView user's profileSend private messageVisit poster's website
telli
Support Mod
Support Mod


Joined: Aug 21, 2003
Posts: 335


PostPosted: Wed Feb 25, 2004 2:37 pm Reply with quoteBack to top

Post the theme.php and the header.html

_________________
[img]http://www.codezwiz.com/extern.php?get=sig[/img]
http://www.codezwiz.com
PHPNuke Themes
$3.99 500 MB Storage & 20 GIG Trans w/ NO limit MYSQL
Click Me
Find all posts by telliView user's profileSend private message
symantix
Nuke Soldier
Nuke Soldier


Joined: Feb 25, 2004
Posts: 32


PostPosted: Wed Feb 25, 2004 2:44 pm Reply with quoteBack to top

http://symantix.net/remote/files.zip

I've posted these in a download directory because the site I'm working on is for a client and is currently running on a local server.
Find all posts by symantixView user's profileSend private messageVisit poster's website
symantix
Nuke Soldier
Nuke Soldier


Joined: Feb 25, 2004
Posts: 32


PostPosted: Wed Feb 25, 2004 2:48 pm Reply with quoteBack to top

There is a big difference in the look of the site when I convert the contents of header.html to php with phpNuke Tools and then save it as header.php, vs. just using header.html as it is. It keeps excluding all of the blocks from the outer border of the page and stacking them on top of one another, instead of laying them out how they are supposed to be layed out (i.e. blocks on left, center, and right).
Find all posts by symantixView user's profileSend private messageVisit poster's website
telli
Support Mod
Support Mod


Joined: Aug 21, 2003
Posts: 335


PostPosted: Wed Feb 25, 2004 2:52 pm Reply with quoteBack to top

http://codezwiz.com/uploads/up/fixes.zip

Try those you dont need a header.html anymore.

_________________
[img]http://www.codezwiz.com/extern.php?get=sig[/img]
http://www.codezwiz.com
PHPNuke Themes
$3.99 500 MB Storage & 20 GIG Trans w/ NO limit MYSQL
Click Me
Find all posts by telliView user's profileSend private message
symantix
Nuke Soldier
Nuke Soldier


Joined: Feb 25, 2004
Posts: 32


PostPosted: Wed Feb 25, 2004 8:09 pm Reply with quoteBack to top

Telli, I've posted the site to http://dluxprinting.com. You've gotten much further than I was able to go, but as you can see, things are still out of wack for some reason.

Thanks for trying. I'll look at your code and see if I can get any ideas. If you can possibly figure out what's going on, I'd really appreciate it, but I don't expect you to go to any great extant.

Thanks again for taking the time, my friend.
Find all posts by symantixView user's profileSend private messageVisit poster's website
symantix
Nuke Soldier
Nuke Soldier


Joined: Feb 25, 2004
Posts: 32


PostPosted: Wed Feb 25, 2004 8:21 pm Reply with quoteBack to top

The original header.html had two table tag terminators at the very end of the script, and you have removed them. I have noticed since I started hacking this theme how critical that header file is...you mess with one thing, and everything else goes out of whack. Sometimes it seems like you haven't changed a solitary thing, and it will still go out of whack.

But when I put those two table terminators back in, it only makes it worse. I don't know what the deal is.
Find all posts by symantixView user's profileSend private messageVisit poster's website
telli
Support Mod
Support Mod


Joined: Aug 21, 2003
Posts: 335


PostPosted: Wed Feb 25, 2004 8:55 pm Reply with quoteBack to top

Ok please try the files again I made a few changes.

_________________
[img]http://www.codezwiz.com/extern.php?get=sig[/img]
http://www.codezwiz.com
PHPNuke Themes
$3.99 500 MB Storage & 20 GIG Trans w/ NO limit MYSQL
Click Me
Find all posts by telliView user's profileSend private message
symantix
Nuke Soldier
Nuke Soldier


Joined: Feb 25, 2004
Posts: 32


PostPosted: Wed Feb 25, 2004 9:03 pm Reply with quoteBack to top

WOOOHOOOOO!!! I think you did it man! Dude, you're lucky you're not here...'cause I would definitely kiss you!!!

When you get some time, explain to me what you did. I'd love to learn. In the mean time, I'm off to bed.

Thank you so, so much, Telli!!!
Find all posts by symantixView user's profileSend private messageVisit poster's website
telli
Support Mod
Support Mod


Joined: Aug 21, 2003
Posts: 335


PostPosted: Wed Feb 25, 2004 9:07 pm Reply with quoteBack to top

LOL! Its no problem just glad ya got it worked out.

_________________
[img]http://www.codezwiz.com/extern.php?get=sig[/img]
http://www.codezwiz.com
PHPNuke Themes
$3.99 500 MB Storage & 20 GIG Trans w/ NO limit MYSQL
Click Me
Find all posts by telliView user's profileSend private message
Purus
Private
Private


Joined: Dec 21, 2003
Posts: 40


PostPosted: Mon Mar 22, 2004 12:00 am Reply with quoteBack to top

revspalding wrote:
Don't be afraid to just experiment with it a little bit. I've found that I spend almost as much time asking as I would have if I had just tried the mod I thought was right, uploaded it, and see if it works and what type of errors I get. I've learned a lot doing this, and I've also enjoyed a bit of satisfaction when I've gotten it right. We sometimes get intimidated by all of it, but courage gets us all a long way. After all, we're the webmasters, right?
Anyway, I think the answer is in the first example in the original post.
Code:
$someVarName = <<<_JSCODE_
<script>alert('$messageText');</script>
_JSCODE_;

$content = $someVarName;


And for the example you quoted:

Quote:
script src='http://voap.weather.com/weather/oap/32127?template=TRVLV&par=1002580522&unit=0&key=0b5fad0e67b04885a585995fef2a5d87 '></script>

I think the solution might be, and you'll notice the might........

Code:

<?php

/******************************************/
/* PHP-NUKE: Web Portal System   */
/* =========================   */
/*                                                            */
/* Copyright (c) 2002 by Francisco Burzi  */
/* http://phpnuke.org                                    */
/*                                                                    */
/* This program is free software. You can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 2 of the License.       */
/************************************************************************/

if (eregi("block-My_Weather.php",$_SERVER['PHP_SELF'])) {
    Header("Location: index.php");
    die();
}
$MyweatherContent = <<<_JSCODE_
<script src='http://voap.weather.com/weather/oap/32127?template=TRVLV&par=1002580522&unit=0&key=0b5fad0e67b04885a585995fef2a5d87 '></script>
_JSCODE_;

$content = $MyweatherContent;

?>


Save all of this as block-My_Weather.php and drop it into your blocks directory.


That's what I would have thought too, but it only displays "There is a problem right now with this block." Confused

_________________
Purus Studios | TheWaterStop
Find all posts by PurusView user's profileSend private messageVisit poster's website
ashleytaylor
Nuke Cadet
Nuke Cadet


Joined: Apr 23, 2004
Posts: 2


PostPosted: Fri Apr 23, 2004 9:00 am Reply with quoteBack to top

I am a real n00b to this...

But i need to include this script into a block, i have tried all the ways listed and i just get errors!

Please will someone help me!

Here is the script;

Code:
<script language="JavaScript" src="http://www.enemydown.co.uk/ed_clanrank.php?ladder=4&clan=7339"></script>
Find all posts by ashleytaylorView user's profileSend private message
ashleytaylor
Nuke Cadet
Nuke Cadet


Joined: Apr 23, 2004
Posts: 2


PostPosted: Fri Apr 23, 2004 9:35 am Reply with quoteBack to top

its ok i done it now.

Thx n e way if ya were gonna reply.
Find all posts by ashleytaylorView user's profileSend private message
mitch100degrees
Sergeant
Sergeant


Joined: Feb 01, 2004
Posts: 98

Location: USA, Michigan

PostPosted: Fri Apr 23, 2004 6:58 pm Reply with quoteBack to top

Ok Guys....This has been messing with me for 2 months now, I tried every code and everything i could find and nothing works. Here's the deal

I got this javascript code from another site, and i want to make it work in a block on my nuke site so i tried everything, the way i have it now the errors have died....now the block is just totally blank....nothing in it. My block file is as follows:

Code:
<?php
if (eregi("block-RandomMidi2.php", $PHP_SELF)) {
Header("Location: index.php");
die();
}

$midiplayer = <<<_JSCODE_
<script src='http://mysite.com/blocks/randommidi.js'></script>
_JSCODE_;

$content = $midiplayer;
?>


Then i have the randommidi script in the .js file just like this:

Code:
<script language="JavaScript">
song = new Array(5); //must match the number of songs and titles;
title = new Array(5);//must match the number of songs and titles;
song[0]='http://resources.bravenet.com/audio/audioclips/disco_dance/rasputin.mid';
song[1]='http://resources.bravenet.com/audio/audioclips/pop_music/tainted_love.mid';
song[2]='http://resources.bravenet.com/audio/audioclips/disco_dance/tribaldance.mid';
song[3] ='http://resources.bravenet.com/audio/audioclips/disco_dance/relax.mid';
song[4] ='http://resources.bravenet.com/audio/audioclips/disco_dance/lefreak.mid';
song[5] ='http://resources.bravenet.com/audio/audioclips/disco_dance/dancingqueen.mid';

title[0] = 'Track 1';
title[1] = 'Track 2';
title[2] = 'Track 3';
title[3] = 'Track 4';
title[4] = 'Track 5';
title[5] = 'Track 6';

index = Math.floor(Math.random() * song.length);document.write("<DL>\n");
document.write("<embed SRC="+song[index]+" width=200 height=55 autostart=true loop=infinite BGCOLOR='#000000'");
document.write(' TEXT="#FFFFFF">');
document.write("<BR>");
document.write("The randomly selected song you are listening to is: ");
document.write("<font size=4 color=red>");
document.write(title[index]);
document.write("</font>")
document.write("</DL>\n");
</script>


*NOTE: I haven't changed the midi file links in the code to my site yet*

When i try to preview the block...i get a popup in IE telling me there is a Script error on the page, Line 2 Char: 1, I can't figure anything out here, what do i have wrong? Please help me, i been trying on my own with this for 2 months.

Very big EXTRA thanks to anyone who offers there help!

Mitch
Find all posts by mitch100degreesView user's profileSend private messageAIM AddressYahoo MessengerMSN Messenger
Display posts from previous:      
Post new topic  Reply to topicprinter-friendly view
View previous topic Log in to check your private messages View next topic
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



Powered by phpBB © 2001, 2005 phpBB Group

Ported by Nuke Cops © 2003 www.nukecops.com
:: FI Theme :: PHP-Nuke theme by coldblooded (www.nukemods.com) ::
Powered by · TOGETHER TEAM srl ITALY http://www.togetherteam.it · DONDELEO E-COMMERCE http://www.DonDeLeo.com
Web site engine's code is Copyright © 2002 by PHP-Nuke. All Rights Reserved. PHP-Nuke is Free Software released under the GNU/GPL license.
Page Generation: 0.318 Seconds - 241 pages served in past 5 minutes. Nuke Cops Founded by Paul Laudanski (Zhen-Xjell)
:: FI Theme :: PHP-Nuke theme by coldblooded (www.nukemods.com) ::