PHP Web Host - Quality Web Hosting For All PHP Applications Sign up for PayPal and start accepting credit card payments instantly
  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
GanjaUK
Life Cycles Becoming CPU Cycles


Joined: Feb 14, 2004
Posts: 633
Location: England

PostPosted: Sat Feb 14, 2004 1:57 pm Reply with quote Back to top

I need to add a couple of bits of java to header.html for my site
Only registered users can see links on this board!
Get registered or login to the forums!
when i add the java it does nothing.

on the GT website:
Only registered users can see links on this board!
Get registered or login to the forums!
like that at the top, i have been looking for a theme download that already has them in so i can break it down and see how it works.

Code:

<A HREF="#"
onClick="this.style.behavior='url(#default#homepage)';
this.setHomePage('http://www.GanjaUK.com');">
Set Homepage
</A>


Why does this above code not work in nuke?

If you dont know how, but know a theme that is for download that has these things in the header let me know so i can take a look how it works.

I posted this message on nuke cops but dont often get a reply there so i thought i would try this site.

Thanks
View user's profile Send private message Visit poster's website
chatserv
The Mouse Is Extension Of Arm


Joined: May 02, 2003
Posts: 1396
Location: Puerto Rico

PostPosted: Sat Feb 14, 2004 6:42 pm Reply with quote Back to top

Post the section of the header with the code inserted in it.
View user's profile Send private message Visit poster's website
GanjaUK
Life Cycles Becoming CPU Cycles


Joined: Feb 14, 2004
Posts: 633
Location: England

PostPosted: Sat Feb 14, 2004 7:03 pm Reply with quote Back to top

Thats a link to the header with the homepage java in, it works where it is now, but when its loaded up with the rest of the nuke page it no longer sets homepage.
Only registered users can see links on this board!
Get registered or login to the forums!


The homepage java does not require java in the head section, however i would like to add bookmark java to that header too, that does however require java in the head of the page.

Code:
<script language="JavaScript1.2" type="text/JavaScript">

/*
GanjaUK.com*/

//bookmark
var bookmarkurl="http://www.GanjaUK.com"
var bookmarktitle="GanjaUK.com"

function addbookmark(){
if (document.all)
window.external.AddFavorite(bookmarkurl,bookmarktitle)
}

</script>

Soon as i learn how to put java into nuke i will be able to sort all this out, i just got stuck with the homepage link as it does not have any java so i couldnt work out why it does not work in nuke.

Any help would be much appreciated.
View user's profile Send private message Visit poster's website
chatserv
The Mouse Is Extension Of Arm


Joined: May 02, 2003
Posts: 1396
Location: Puerto Rico

PostPosted: Sun Feb 15, 2004 10:05 pm Reply with quote Back to top

Try placing the code inside of includes/my_header.php
View user's profile Send private message Visit poster's website
GanjaUK
Life Cycles Becoming CPU Cycles


Joined: Feb 14, 2004
Posts: 633
Location: England

PostPosted: Sun Feb 15, 2004 10:19 pm Reply with quote Back to top

The code needs to be placed on the exact button on my header.
You can see my header on the site:
Only registered users can see links on this board!
Get registered or login to the forums!
I want to put the homepage/set bookmark link on the buttons I have already put in place on the right of the header (Above the forward/rewind buttons).

Make homepage button does not need any code other than the onClick tag in the <body> of the page.

The problem seems to be nuke adds \ infront of every '
View user's profile Send private message Visit poster's website
chatserv
The Mouse Is Extension Of Arm


Joined: May 02, 2003
Posts: 1396
Location: Puerto Rico

PostPosted: Sun Feb 15, 2004 10:30 pm Reply with quote Back to top

Then you could try placing the make homepage code inside of your theme's themeheader() function
View user's profile Send private message Visit poster's website
GanjaUK
Life Cycles Becoming CPU Cycles


Joined: Feb 14, 2004
Posts: 633
Location: England

PostPosted: Mon Feb 16, 2004 10:02 am Reply with quote Back to top

I added this line to the themeheader()

Code:

    $set_homepage = "<A HREF=\"#\"
onClick=\"this.style.behavior='url(#default#homepage)';
this.setHomePage('http://www.GanjaUK.com');\">\n";


I then added $set_homepage to my header.html It went in the right place but the output of it still has the \ inside which stops it from working. Is there some way to put it in theme header so it ignores the \
This is probably starting to sound confusing now, i hope you can bare with me. Shocked
View user's profile Send private message Visit poster's website
chatserv
The Mouse Is Extension Of Arm


Joined: May 02, 2003
Posts: 1396
Location: Puerto Rico

PostPosted: Mon Feb 16, 2004 10:27 am Reply with quote Back to top

Try this one:
Code:
<!--[if IE]>
<font face="Arial" size="3">
<A HREF=\"#\"
onClick=\"this.style.behavior='url(#default#homepage)';
this.setHomePage('http://www.GanjaUK.com'');\">
Make GanjaUK Your Homepage
</A>
</font>
<![endif]-->
View user's profile Send private message Visit poster's website
GanjaUK
Life Cycles Becoming CPU Cycles


Joined: Feb 14, 2004
Posts: 633
Location: England

PostPosted: Mon Feb 16, 2004 10:42 am Reply with quote Back to top

Thats the same code. The only probably seems to be that nuke changes
Code:
'
to
Code:
\'


Should i try adding it to includes/javascript.php?
View user's profile Send private message Visit poster's website
GanjaUK
Life Cycles Becoming CPU Cycles


Joined: Feb 14, 2004
Posts: 633
Location: England

PostPosted: Mon Feb 16, 2004 11:05 am Reply with quote Back to top

I think i need to echo the line, but i dont know how to do that so it only displays where i type $set_homepage and call it from header.html
View user's profile Send private message Visit poster's website
GanjaUK
Life Cycles Becoming CPU Cycles


Joined: Feb 14, 2004
Posts: 633
Location: England

PostPosted: Mon Feb 16, 2004 2:46 pm Reply with quote Back to top

It's fixed now, open theme.php and change:

Code:
print $r_file;

to
Code:
print stripslashes($r_file);
View user's profile Send private message Visit poster's website
chatserv
The Mouse Is Extension Of Arm


Joined: May 02, 2003
Posts: 1396
Location: Puerto Rico

PostPosted: Mon Feb 16, 2004 2:49 pm Reply with quote Back to top

good catch
View user's profile Send private message Visit poster's website
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-2011 by Raven

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 Modified by the RavenNuke™ Team ::

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

zerosum