l use an easy method for including Jscripts blocks or modules save the scripts on notpad.TXT file and upload them to a directory called javascripts or what not then the block your trying to add them to simply use this
include("Javascript/Then_the.txt File");
remember this is just an example you will have to create a directory or use an exisiting directory to upload your txt files to then put thew actual path..
and you should be all set good luck !
mitch100degrees Sergeant
Joined: Feb 01, 2004
Posts: 98
Location: USA, Michigan
Posted:
Fri Apr 23, 2004 7:30 pm
Your good!!!!! Thanks a million....However...i still have problems
Now that i got that little trick...i got the song playing, but the little QuickTime music thing, and the text where it says "The song you are currently listening to:" is on top of the block, not inside. Inside we have a simple 1, And nothing else, i can't figure out where the 1 is coming from.
Can someone please help me get it inside of the block? Thanks
Mitch
XtraX Lieutenant
Joined: Aug 23, 2003
Posts: 195
Posted:
Fri Apr 23, 2004 8:21 pm
No problem glad it worked post your block info and l can see what l can do
XtraX
mitch100degrees Sergeant
Joined: Feb 01, 2004
Posts: 98
Location: USA, Michigan
Posted:
Sat Apr 24, 2004 9:33 am
Hi XtraX,
Here's my new block info since it has changed since i last posted.
File saved as block-RandomMidi2.php:
Code:
<?php
if (eregi("block-RandomMidi2.php", $PHP_SELF)) {
Header("Location: index.php");
die();
}
$content = include("blocks/randommidi.js");
?>
Kinda a short code, i saved it as a .js file insted of a .txt file and it worked.
Now my randommidi.js file:
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'
index = Math.floor(Math.random() * song.length);document.write("<DL>\n");
document.write("<embed SRC="+song[index]+" width=100 height=45 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=3 color=red>");
document.write(title[index]);
document.write("</font>")
document.write("</DL>\n");
</script>
I can't figure out why it isn't going inside of the block, maybe i have something wrong with the $content code. Any help as to getting this inside of the block would be great, and thanks again XtraX for helping so far.
Mitch
mitch100degrees Sergeant
Joined: Feb 01, 2004
Posts: 98
Location: USA, Michigan
Posted:
Fri May 14, 2004 9:11 pm
****Bump*****
Please i have spent days and nights trying to get this to work, and it just ain't happening, Here's what i have tried
1) Reading this whole long forum and others
2) XtraX's solution
3) I tried putting my code in the my_header.php file and that works, but it shows what i want in the block at the top of the page, i tried cutting the document.write tags out of the my_header.php file and putting them into the block, that did'nt work either. I tried editing the .js file so that it would only have the document.write codes in it, that worked, but again it's showing ontop of the block.
4) i tried putting the js code into the block file with the <<<_JS_ tags, that won't work either.
I seriously need to get this into this block, the best way i got it working was to do the include tag and then it shows ontop of the block, and also taking the document.write tags out of the header and putting them in the .js file and then using the include tag in the block that way, I noticed its calling the .js script before the table that it's suppose to go in. Please someone tell me how to get it inside of the block, my latest try is shown below
Code:
<?php
if (eregi("block-RandomMidi2.php", $PHP_SELF)) {
Header("Location: index.php");
die();
}
$content = "<<<_JS_
<script>
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'
index = \"Math.floor(Math.random() * song.length)\";document.write(\"<DL>\n\");
document.write(\"<embed SRC=\"+song[index]+\" width=100 height=45 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=3 color=red>\");
document.write(title[index]);
document.write(\"</font>\")
document.write(\"</DL>\n\");
</script>
_JS_;
?>
The code is also in the header and the script is working fine in the header, i just don't want it at the top of the page, nor ontop of the block, i want it in the block. As you can see i have added the \ code everywhere to make it stop saying prase error, i've seen a million of them since i started making this block.
Thanks for any help anyone can give me.
Mitch
RavennX Nuke Cadet
Joined: Sep 29, 2003
Posts: 6
Posted:
Fri Jul 09, 2004 7:39 am
Im still having problems.. here is my 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. */
/************************************************************************/
Parse error: parse error in /home/sites/site92/web/ngl/blocks/block-Server_Monitor.php on line 19
any help?
lilcrabbygal Nuke Cadet
Joined: Aug 01, 2004
Posts: 9
Posted:
Sun Aug 01, 2004 12:35 pm
Phew... I've read through all the thread and tried most of the stuff shared previously and I keep getting an error
I have a drop-down navigation I made in Xara which I created for the magazine and now that I have switched to PhpNuke I can't for the life of me figure out how to embed it into the templates. I say template because I have a range of templates for users to view the site in. I want the nav bar to show up just below the logo.
I pasted it into a text file and uploaded to blocks/block-Xara_Menu.php it showed up below my welcome message even though I set it to display 'center up'.
Last edited by lilcrabbygal on Thu Dec 16, 2004 10:07 am; edited 1 time in total
spottedhog Captain
Joined: Apr 30, 2004
Posts: 562
Posted:
Fri Aug 13, 2004 4:55 am
mitch100degrees....
about your block code......
just a quick glance shows me that I do not see a closing " for the $content=
In other words, all code for $conten= should have this format:
$content = "all your code here"
In your code, I do not see a closing " (but I have been wrong before...)
And it works wonderfull. But I need that users from each board or nuke can use ther ID and password to enter the 4 boards or nukes. I have 4 mysql databases now, but I need one unique database for the 4 sites. Is it possible??? Or I am crazy??? I someone can help I would really apreciatte it, best regards
Joe
inkydink1234 Nuke Soldier
Joined: Aug 29, 2003
Posts: 32
Posted:
Sat Aug 14, 2004 7:25 am
spottedhog wrote:
mitch100degrees....
about your block code......
just a quick glance shows me that I do not see a closing " for the $content=
In other words, all code for $conten= should have this format:
$content = "all your code here"
In your code, I do not see a closing " (but I have been wrong before...)
The quotes are all closed. Look again.
_clone_ Nuke Cadet
Joined: Sep 15, 2004
Posts: 6
Posted:
Wed Sep 15, 2004 8:22 pm
How can i changed my site status link in my nuke site. I want to Changed it and disabled those link appearing when i point my mouse over a link. Also it is possible to encrypt my index.php i want to encrypt my site when visiors view my site source codes....
EarthAngel Sergeant
Joined: Sep 05, 2004
Posts: 84
Location: Denmark
Posted:
Sat Oct 16, 2004 11:21 am
Okay, all I'm really sorry - you can call me ignorant, but I'm not much of a programmer.. but great at following instructions.
I'm trying to put in a counter from a well known Danish search engine on my site, at the very bottom. Preferably in the footer.
How do I do it? I've read through all 6 pages of replies here, and am none the wiser, I'm afraid Can someone tell me which specific file to change and with which codes? Please...
Here's the javascript I'm trying to put in my footer..
Code:
<!-- Chart Basis HTML kode start v003 -->
<script language="javascript" type="text/javascript">
<!--
document.write('<a href="http://www.chart.dk/ref.asp?ct=v003&id=106994" target="_blank">');
var myref; myref=document.referrer; if(top.document.referrer!=null) myref=top.document.referrer;
document.write('<img src="http://cluster.chart.dk/chart.asp?id=106994&style=7&secID=' + Math.random()*10000000 + '&ref=' + escape(myref) + '" border="0" alt="Chart.dk"><');
document.write('/a>');
//-->
</script>
<noscript>
<a href="http://www.chart.dk/ref.asp?ct=v003&id=106994" target="_blank"><img src="http://cluster.chart.dk/chart.asp?id=106994&style=7&secID=1" border="0" alt="Chart.dk"></a>
</noscript>
<!-- Chart Basis HTML kode slut v003 -->
Thanks whomever can help me <3
Mesum Support Staff
Joined: Mar 11, 2003
Posts: 842
Location: Chicago
Posted:
Sat Oct 16, 2004 11:28 am
EarthAngel wrote:
Okay, all I'm really sorry - you can call me ignorant, but I'm not much of a programmer.. but great at following instructions.
I'm trying to put in a counter from a well known Danish search engine on my site, at the very bottom. Preferably in the footer.
How do I do it? I've read through all 6 pages of replies here, and am none the wiser, I'm afraid Can someone tell me which specific file to change and with which codes? Please...
Here's the javascript I'm trying to put in my footer..
Code:
<!-- Chart Basis HTML kode start v003 -->
<script language="javascript" type="text/javascript">
<!--
document.write('<a href="http://www.chart.dk/ref.asp?ct=v003&id=106994" target="_blank">');
var myref; myref=document.referrer; if(top.document.referrer!=null) myref=top.document.referrer;
document.write('<img src="http://cluster.chart.dk/chart.asp?id=106994&style=7&secID=' + Math.random()*10000000 + '&ref=' + escape(myref) + '" border="0" alt="Chart.dk"><');
document.write('/a>');
//-->
</script>
<noscript>
<a href="http://www.chart.dk/ref.asp?ct=v003&id=106994" target="_blank"><img src="http://cluster.chart.dk/chart.asp?id=106994&style=7&secID=1" border="0" alt="Chart.dk"></a>
</noscript>
<!-- Chart Basis HTML kode slut v003 -->
Thanks whomever can help me <3
What's this code for? can you have it way at the end of your page or you want it to show up before copyright/footers?
It's a counter thing.. A lot of Danish people find their websites through Chart.dk which is where the counter is from. I'm basicly trying to get more traffic to my site by adding it.
You can see it as a little tiny green C on this site, at the very bottom: http://www.ungmor.dk - but I don't know how they put it there..
And yes, it can easily be at the very end of my page.. as long as its at the bottom and not too visible
Mesum Support Staff
Joined: Mar 11, 2003
Posts: 842
Location: Chicago
Posted:
Sat Oct 16, 2004 11:36 am
Well if that's the case, copy and paste this code right above the very last tag, which is ?>
Code:
?>
<!-- Chart Basis HTML kode start v003 -->
<script language="javascript" type="text/javascript">
<!--
document.write('<a href="http://www.chart.dk/ref.asp?ct=v003&id=106994" target="_blank">');
var myref; myref=document.referrer; if(top.document.referrer!=null) myref=top.document.referrer;
document.write('<img src="http://cluster.chart.dk/chart.asp?id=106994&style=7&secID=' + Math.random()*10000000 + '&ref=' + escape(myref) + '" border="0" alt="Chart.dk"><');
document.write('/a>');
//-->
</script>
<noscript>
<a href="http://www.chart.dk/ref.asp?ct=v003&id=106994" target="_blank"><img src="http://cluster.chart.dk/chart.asp?id=106994&style=7&secID=1" border="0" alt="Chart.dk"></a>
</noscript>
<!-- Chart Basis HTML kode slut v003 -->
<?
Make sure you copy and paste EACH AND EVERY LINE of this code.
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