PHP Web Host - Quality Web Hosting For All PHP Applications $35/month $250/year (Unlimited) - $25/month - 200,000 impressions - Your Ad Could be Here - Click For Details
  Login or Register
 • Home • Downloads • Your Account • Forums • 

View next topic
View previous topic


Google
 
Web RavenPHPScripts (This Site)
Post new topic   Reply to topic
Author Message
Naquadah
New Member
New Member


Joined: Feb 16, 2005
Posts: 12

PostPosted: Tue Feb 22, 2005 9:16 am Reply with quote Back to top

An easy question:
I want to put at the end of my php Nuke (on Footer line 1) this code:


Image


which is a counter and works great on the mainpage, but on the php Nuke it says there is some mistake on the code. What do i have to change?
THanks :-*
edit: something tells me that Iam trying to hack or something like that. It was only 3 lines of code Sad. Ive put them with an image hope it works
View user's profile Send private message
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 14928
Location: Kansas

PostPosted: Tue Feb 22, 2005 12:09 pm Reply with quote Back to top

You have to ECHO the code for PHP. Are you?

Like:

echo "<scr ipt>";
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
Naquadah
New Member
New Member


Joined: Feb 16, 2005
Posts: 12

PostPosted: Tue Feb 22, 2005 4:03 pm Reply with quote Back to top

thank you so much raven now it works. You are the one! Very Happy
View user's profile Send private message
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 14928
Location: Kansas

PostPosted: Tue Feb 22, 2005 4:39 pm Reply with quote Back to top

PHP 101 - wish I could take the credit RavensScripts
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
dcasmr
Worker
Worker


Joined: Feb 06, 2004
Posts: 147

PostPosted: Tue Feb 22, 2005 7:08 pm Reply with quote Back to top

Thanks for your great support ! I now understand how to do it per the link you attached.
View user's profile Send private message
pinkbeef
Client


Joined: Jul 19, 2005
Posts: 65

PostPosted: Sat Nov 12, 2005 9:06 pm Reply with quote Back to top

I just happen to be zipping around and thought i would try your first example. so i put it into the head of my page just under the first table and all i get is
= <<<_JSCODE_ _JSCODE_; echo ;
I did not change the code just cut and past.

noew i dont mess with js, but for anyone that does and doesant understand the finer points of php, it would appear that your statement
"That's it! You simply insert your JavaScript code as you use it in your HTML document and drop it in". is not quite that simple.
View user's profile Send private message
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 14928
Location: Kansas

PostPosted: Sat Nov 12, 2005 9:09 pm Reply with quote Back to top

Yes it is. If done as I explained, using a REAL editor and not notepad or wordpad, it is that simple. The fact that your code is all on one line and mine is not shows that you haven't done exactly what I outlined Smile
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
pinkbeef
Client


Joined: Jul 19, 2005
Posts: 65

PostPosted: Sun Nov 13, 2005 2:28 am Reply with quote Back to top

I just put it in my includes folder complete as you asked and it worked, so yes your right i failed to follow your instructions. sorry. I use Crimson editor, its great for hex.
View user's profile Send private message
Donovan
Client


Joined: Oct 07, 2003
Posts: 675
Location: Ohio

PostPosted: Wed Jan 25, 2006 9:26 am Reply with quote Back to top

Running RavenNuke 2.0.2.

I have been testing both ways to use javascripts for a module I built. The modules uses popup calandars and I inserted this in the includes/custom_files/custom_header.php file.
Code:

<scri pt language="javascript" src="cal2.js">
/*
Xin's Popup calendar script-  Xin Yang (http://www.yxscripts.com/)
Script featured on/available at http://www.dynamicdrive.com/
This notice must stay intact for use
*/
</scri pt>
<scri pt language="javascript" src="cal_conf2.js"></scri pt>


But it doesn't work there. It does work when I place this at the very beginning of my header.php file.

Is there any additional include file I need in my pages to use custom_header.php? Do I need to call mainfile or something?

My header has these lines

Code:
echo "\n\n\n</head>\n\n";
    if (file_exists("includes/custom_files/custom_header.php")) {
     include_once("includes/custom_files/custom_header.php");
    }


...so it should work in both places.

I am finishing the readme.txt for my module and came across this issue.

Getting nervous about the release, as this is my first attempt at PHPNuke module building. Embarassed Shocked
View user's profile Send private message Visit poster's website ICQ Number
CodyG
PHP-Portal Project


Joined: Jan 02, 2003
Posts: 561
Location: Vancouver Island

PostPosted: Wed Jan 25, 2006 11:05 am Reply with quote Back to top

Any chance your cache might be interfering? Need to clear site cookies?
View user's profile Send private message
Donovan
Client


Joined: Oct 07, 2003
Posts: 675
Location: Ohio

PostPosted: Fri Jan 27, 2006 9:46 am Reply with quote Back to top

Well I cleared cookies but no help. If I put this in the header.php it works fine but shouldn't it also work in custom_header.php?

I means that is what that is for, isn't it?
View user's profile Send private message Visit poster's website ICQ Number
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 14928
Location: Kansas

PostPosted: Fri Jan 27, 2006 9:49 am Reply with quote Back to top

It should work, you are correct.
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
Guardian2003
Site Admin


Joined: Aug 28, 2003
Posts: 4557
Location: Poland

PostPosted: Fri Jan 27, 2006 9:55 am Reply with quote Back to top

I have not tinkered with the custom_header.php yet but you might want to put the full path to cal_conf.js to avoid any issues there.
I assume the custom_header.php file is empty by default so if you are trying to use html you will need to add the <html> tags before and after, if you are trying to load the code via php you might need to use the PHP open and close tags and echo it to the page as described in previous posts in this thread.
View user's profile Send private message Send e-mail Visit poster's website
Donovan
Client


Joined: Oct 07, 2003
Posts: 675
Location: Ohio

PostPosted: Fri Jan 27, 2006 10:14 pm Reply with quote Back to top

Guardian2003 wrote:
...yet but you might want to put the full path to cal_conf.js to avoid any issues there.


I think that did the trick.

Thanks
View user's profile Send private message Visit poster's website ICQ Number
Guardian2003
Site Admin


Joined: Aug 28, 2003
Posts: 4557
Location: Poland

PostPosted: Sat Jan 28, 2006 6:09 am Reply with quote Back to top

Cool!
View user's profile Send private message Send e-mail Visit poster's website
montego
Site Admin


Joined: Aug 29, 2004
Posts: 7236
Location: Arizona

PostPosted: Sat Jan 28, 2006 11:17 am Reply with quote Back to top

Sorry to butt in here, but I wanted to expound a bit on the solution comments. When it comes to things like external j avascript files and css files, you always have to remember that it is the client-side (browser) that must be able to retrieve that file and parse it.

I try to avoid hardcoding full absolute references to these files (for example:
Only registered users can see links on this board!
Get registered or login to the forums!
You lose flexibility to move things around or if you distribute code, like many of us do, we end up forgetting and distributing code with hard-coded links.

One needs to keep in mind that the links need to be relative to the script file that the browser requested. In this case, that would be modules.php and NOT custom_header.php. Therefore, the correct relative link would be "includes/myjsfile.js", if that is in fact where you physically placed that js file.

Just wanted to take the opportunity to provide more detail in case it may help others to understand better how to do this.

Regards,
montego
View user's profile Send private message Visit poster's website
badcase
New Member
New Member


Joined: Apr 25, 2006
Posts: 1

PostPosted: Tue Apr 25, 2006 6:41 pm Reply with quote Back to top

I think im retarded cause i have be messing with this for hours i
m trying to put a menu created with xara it created 2 .js files one called xaramenu.js and menu_.js

i was trying to use the example you gave on nukecops

Code:

<?
$content = <<<_JS_
// Your Script Here
_JS_;
?>


but im unclear as to exactlly what the code should be mind helpin me out Raven?
View user's profile Send private message
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 14928
Location: Kansas

PostPosted: Tue Apr 25, 2006 8:47 pm Reply with quote Back to top

The code would be whatever javascript code or html that you wanted in your block.
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
Display posts from previous:       
Post new topic   Reply to topic

View next topic
View previous 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
Forums ©
 

All logos and trademarks in this site are property of their respective owner.
The comments are property of their posters, all the rest © 2002-2008 by Raven
Proud to be listed at Lobo Links Web Directory

You can syndicate our news using the file xml

CSE HTML Validator Helped Clean up This Page! [Valid RSS] valid RSS 2.0 Valid robots.txt Stop Spam Harvesters, Join Project Honey Pot

Website engines core code is © copyright by PHP-Nuke but has been heavily patched and modified by myself and others.
PHP-Nuke is a free software released under the GNU/GPL.


:: fisubice phpbb2 style by Daz :: PHP-Nuke theme by www.nukemods.com ::

:: fisubice Theme Recoded To 100% W3C CSS & HTML 4.01 Transitional Compliance by Raven and 64bitguy ::

:: W3C CSS Compliance Validation :: W3C HTML 4.01 Transitional Compliance Validation ::

zerosum