Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Themes
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

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! 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! 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
Member Emeritus


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

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

Post the section of the header with the code inserted in it.
 
View user's profile Send private message Visit poster's website
GanjaUK
PostPosted: Sat Feb 14, 2004 7:03 pm Reply with quote

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!

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.
 
chatserv
PostPosted: Sun Feb 15, 2004 10:05 pm Reply with quote

Try placing the code inside of includes/my_header.php
 
GanjaUK
PostPosted: Sun Feb 15, 2004 10:19 pm Reply with quote

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! 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 '
 
chatserv
PostPosted: Sun Feb 15, 2004 10:30 pm Reply with quote

Then you could try placing the make homepage code inside of your theme's themeheader() function
 
GanjaUK
PostPosted: Mon Feb 16, 2004 10:02 am Reply with quote

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
 
chatserv
PostPosted: Mon Feb 16, 2004 10:27 am Reply with quote

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]-->
 
GanjaUK
PostPosted: Mon Feb 16, 2004 10:42 am Reply with quote

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?
 
GanjaUK
PostPosted: Mon Feb 16, 2004 11:05 am Reply with quote

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
 
GanjaUK
PostPosted: Mon Feb 16, 2004 2:46 pm Reply with quote

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

Code:
print $r_file;

to
Code:
print stripslashes($r_file);
 
chatserv
PostPosted: Mon Feb 16, 2004 2:49 pm Reply with quote

good catch
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Themes

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
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©