|
» .::. |
Web Hosting - web hosting, dedicated servers and web design services
|
Online Degree - search for 1000+ online degrees, online colleges & online universities.
|
tattoo - we are a group of tattoo enthusiasts
|
Gexa Energy - your absolute best choice in electric service
|
|
|
|
|
|
|
|
|
Poker Chips - Clay and composite poker chips for home games.
|
|
|
About this Page This is a discussion on How to: Make link for users to make site their homepage within the Purged Topics forums, part of the NM Staff category; Hi,
I thought I saw this somewhere, but can't for the life of me remember where it is. Does ... |
|
 |
|
 |
|
 |

01-22-2003, 02:44 PM
|
|
Moderator
|
|
Join Date: Nov 2002
Posts: 737
|
|
|
How to: Make link for users to make site their homepage
Hi,
I thought I saw this somewhere, but can't for the life of me remember where it is. Does anyone know if there is already a hack done, or how create a link for users to click on the site so they can make the site their homepage.
Some of my users have mentioned that it would be a good feature. As I said before I thought I saw it mentioned somewhere but I can't remember where. A search here and a couple other places came up empty.
Thanks any help would be appreciated. 
|

01-22-2003, 03:09 PM
|
|
Member
|
|
Join Date: Nov 2002
Location: Michigan, USA
Posts: 359
|
|
well heres the script:
|
Code:
|
<script language="JavaScript1.2">
//configure the two variables below to match yoursite's own info
var bookmarkurl="http://nukemods.com"
var bookmarktitle="Title here"
function addbookmark(){
if (document.all)
window.external.AddFavorite(bookmarkurl,bookmarktitle)
}
</script> |
then add a link like this wherever youd like it to appear (probably someplace in your header.html or theme.php)
Bookmark this site!
the only thing im not sure on with nuke is where you would add the scripting, somone can help me with that oat
|

01-22-2003, 03:27 PM
|
|
Moderator
|
|
Join Date: Nov 2002
Posts: 737
|
|
Thanks Renegade
You are da best!
Will that add it to favorites or make it their homepage?
|

01-22-2003, 03:45 PM
|
|
Senior Member
|
|
Join Date: Oct 2002
Location: Alabama, USA
Posts: 619
|
|
|
That will add it to favorites.
|

01-22-2003, 04:04 PM
|
|
Moderator
|
|
Join Date: Nov 2002
Posts: 737
|
|
Thanks Martin  You da best too
What if I change the h ref to something like this?
|
Code:
|
<a HREF style="cursor:hand" class="" onClick="this.style.behavior='url(#default#homepage)';this.setHomePage('http://www.yoursite.com');">Bookmark</a> |
The class being the same as the other links in the html file?
|

01-22-2003, 04:08 PM
|
|
Senior Member
|
|
Join Date: Oct 2002
Location: Alabama, USA
Posts: 619
|
|
|
:?:
I'll look at dynamicdrive.com or somewhere to see if they have the script.
|

01-22-2003, 04:20 PM
|
|
Moderator
|
|
Join Date: Nov 2002
Posts: 737
|
|
|
Thanks Martin,
I want to add the option for both, I'm still looking too.
|

01-22-2003, 04:22 PM
|
|
Senior Member
|
|
Join Date: Oct 2002
Location: Alabama, USA
Posts: 619
|
|
Here is one.
|
Code:
|
============================================================
Script: Make This Page Your Homepage Script
Functions:
In IE 5 and later browsers, clicking the link opens
the dialog to set the current page as the visitor's
homepage. An IE conditional comment prevents the link
from showing in other browsers that do not support this.
Browsers: IE 5 and later (degrades gracefully in others)
Author: etLux
============================================================
Put the following script in the body of your page.
You may set the font with tags within the conditional
comment, as shown. An image may also be used instead
of the text link shown.
Do *not* remove the comments, and set the url in the
script to your own.
<!--[if IE]>
<font face="Arial" size="3">
<A HREF="#"
onClick="this.style.behavior='url(#default#homepage)';
this.setHomePage('http://www.codelifter.com');">
Make CodeLifter Your Homepage
</a>
</font>
<![endif]-->
============================================================ |
|

01-22-2003, 04:25 PM
|
|
Senior Member
|
|
Join Date: Oct 2002
Location: Alabama, USA
Posts: 619
|
|
Here's another
|
Code:
|
<!-- ONE STEP TO INSTALL SET HOMEPAGE LINK:
1. Copy the coding into the BODY of your HTML document -->
<BODY>
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
// If it's Internet Explorer, use automatic link
// Be sure to change the "http://www.YourWebSiteHere.com\"
// to the URL you want them to bookmark.
if (document.all){
document.write('<A HREF="javascript:history.go(0);" onClick="this.style.behavior=\'url(#default#homepage)\';this.setHomePage(\'http://www.YourWebSiteHere.com\');">');
document.write('<font size="5" color=6699FF face=arial>Click Here to Make My Web Page Your Homepage</font></a>');
}
// If it's Netscape 6, tell user to drag link onto Home button
// Be sure to change the "http://www.YourWebSiteHere.com\"
// to the URL you want them to bookmark.
else if (document.getElementById){
document.write('Drag this link onto your Home button to make this your Home Page.');
}
// If it's Netscape 4 or lower, give instructions to set Home Page
else if (document.layers){
document.write('Make this site your home page:
- Go to Preferences in the Edit Menu.
- Choose Navigator from the list on the left.
- Click on the "Use Current Page" button.');
}
// If it's any other browser, for which I don't know the specifications of home paging, display instructions
else {
document.write('Make this site your home page:
- Go to Preferences in the Edit Menu.
- Choose Navigator from the list on the left.
- Click on the "Use Current Page" button.');
}
// End -->
</script>
<center>
<font face="arial, helvetica" size"-2">Free JavaScripts provided
by The JavaScript Source</font>
</center> |
Allow the visitor to set your site as their homepage with a link. This script works best in Internet Explorer, but also displays the appropriate information based on browser type.
|

01-22-2003, 04:27 PM
|
|
Senior Member
|
|
Join Date: Oct 2002
Location: Alabama, USA
Posts: 619
|
|
|
Put the script in the header.html file at the very top.
|
 |
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
All times are GMT -5. The time now is 11:16 AM.