TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

May 02, 2024, 02:19:39 PM

Login with username, password and session length
Members
  • Total Members: 3,885
  • Latest: Growner
Stats
  • Total Posts: 195,178
  • Total Topics: 21,220
  • Online today: 151
  • Online ever: 3,540 (September 03, 2022, 01:38:54 AM)
Users Online
  • Users: 0
  • Guests: 125
  • Total: 125

Add to favorites / Set as Homepage Block

Started by Gargoyle, March 05, 2006, 12:25:46 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Gargoyle

This goes in a Java/html box and adds the ability for your users to either add you to their favorites or set your site as their homepage.

You will OBVIOUSLY want to replace the URL that points to my site to your sites URL in ALL of the below instances where it occurs.

The Bookmark script was fetched from another post in here... Just not sure where...


<center>
<Script>
function ssbookmark(title, url){
if (document.all)
window.external.AddFavorite(url, title);
else if (window.sidebar)
window.sidebar.addPanel(title, url, "")
}
</script>
<a href="javascript:ssbookmark('SouthSideStreetCars.org', 'http://www.SouthSideStreetCars.org')"><b>Add South Side Street Cars to your list of favorite's</b></a>
<br><br>
<SCRIPT LANGUAGE="JavaScript">

if (document.all){
  document.write('<A HREF="javascript:history.go(0);" onClick="this.style.behavior=\'url(#default#homepage)\';this.setHomePage(\'http://www.southsidestreetcars.org\');">');
  document.write('<B>Make South Side Street Cars Your Homepage</B></a>');
}

// If it's Netscape 6, tell user to drag link onto Home button
else if (document.getElementById){
  document.write('<a href="http://www.southsidestreetcars.org"><b>Drag this link onto your Home button to make South Side Street Cars your Home Page.</b></a>');
}

// If it's Netscape 4 or lower, give instructions to set Home Page
else if (document.layers){
  document.write('<b>Make this site your home page:</b><br>- Go to <b>Preferences</b> in the <B>Edit</B> Menu.<br>- Choose <b>Navigator</b> from the list on the left.<br>- Click on the <b>"Use Current Page"</b> button.');
}

// If it's any other browser, for which I don't know the specifications of home paging, display instructions
else {
  document.write('<b>Make South Side Street Cars your home page:</b><br>- Go to <b>Preferences</b> in the <B>Edit</B> Menu.<br>- Choose <b>Navigator</b> from the list on the left.<br>- Click on the <b>"Use Current Page"</b> button.');
}
//  End -->
</script></center>

alan s



alan s


Gargoyle

Quote from: OnTap! on March 06, 2006, 09:50:18 AM

something like this was posted before....

http://www.tinyportal.net/smf/index.php?topic=1847.msg16069#msg16069

That is similar but this also adds the ability to set the site as your homepage. I think I used the code from that post in the bookmark section though. ;D

TwinsX2Dad

Or you might have pulled it from just about anywhere - that script is very standard.

I am noticing that your code above causes some themes to move out - the block created by this doesn't always render correctly.

I am looking at it to see what bugs might be worked out.


crip

The code is strait forward, it works good in a script block..



akulion

#9
Well this isnt much (the button graphics arent that great) but I made buttons instead of those long text lnks




simply use the code below: (and be sure to replace yoursite.com with ur site addy)




<center>
<Script>
function ssbookmark(title, url){
if (document.all)
window.external.AddFavorite(url, title);
else if (window.sidebar)
window.sidebar.addPanel(title, url, "")
}
</script>
<a href="javascript:ssbookmark('Your Site.Com', 'http://www.yoursite.net')"><img src="http://yoursite.com/bookmark.gif" border=0></a>
<br><br>
<SCRIPT LANGUAGE="JavaScript">

if (document.all){
  document.write('<A HREF="javascript:history.go(0);" onClick="this.style.behavior=\'url(#default#homepage)\';this.setHomePage(\'http://yoursite.com\');">');
  document.write('<img src="http://yoursite.com/homepage.gif" border=0>');
}

// If it's Netscape 6, tell user to drag link onto Home button
else if (document.getElementById){
  document.write('<a href="http://yoursite.com"><img src="http://yoursite.com/homepage.gif" border=0><br><font size=1>Drag the icon above<br>to your browser<br>homebutton</font></a>');
}

// If it's Netscape 4 or lower, give instructions to set Home Page
else if (document.layers){
  document.write('<font size="2"><b>Make this page your home page:</b><br>- Go to <b>Preferences</b> in the <B>Edit</B> Menu.<br>- Choose <b>Navigator</b> from the list on the left.<br>- Click on the <b>"Use Current Page"</b> button.</font>');
}

// If it's any other browser, for which I don't know the specifications of home paging, display instructions
else {
  document.write('<font size="2"><b>Make this page:</b><br>- Go to <b>Preferences</b> in the <B>Edit</B> Menu.<br>- Choose <b>Navigator</b> from the list on the left.<br>- Click on the <b>"Use Current Page"</b> button.</font>');
}
//  End -->
</script></center>





Demo: Here

akulion


deadpoeticstar

Here is My Try at a Bookmark image, and Home

akulion

OI u just used the button generator lool

But still good - i think u shoudl rename the "home" to "set as homepage" or something

Jump1979man



sburke930


Joshsux

#16
"""FIXED"""" durr, i had to use javascrit / html not just html.

nikita


ZarPrime

Quote from: akulion on April 30, 2006, 01:18:20 PM
Well this isnt much (the button graphics arent that great) but I made buttons instead of those long text lnks




simply use the code below: (and be sure to replace yoursite.com with ur site addy)



SNIP




Demo: Here


Greetings,

The buttons aren't there anymore so I can't check it out.  However, I did see a couple of things I really liked.  For instance that Top Posters Section at the bottom.  Oh wait, that looks like it is maybe some fancy dhtml using a div class called windowbg.  Perhaps I will have to look into that.

Oh, and I really like your requirements.jpg on the site.  Any chance you wouldn't mind if I borrowed that for mine?

ZarPrime

akulion

sure feel free to copy the image

as for the top posters thingie you see....thats called Poster Cloud, just check in the Block Code Snippets Index (on this site) and you will find it listed...easy to install and use :)

ZarPrime

Quote from: akulion on September 11, 2006, 08:09:41 AM
sure feel free to copy the image

as for the top posters thingie you see....thats called Poster Cloud, just check in the Block Code Snippets Index (on this site) and you will find it listed...easy to install and use :)

Ah, great, thanks.  :up: I'll check it out.  ;)

ZarPrime

Porky

#21
what type of box due you put them in now that java and html boxes are split up?
I am retarded I should read first....Don't yell at me G6

exodia

am using the following code but the homepage button isnt working in firefox.can someone help me.
<center>
<Script>
function ssbookmark(title, url){
if (document.all)
window.external.AddFavorite(url, title);
else if (window.sidebar)
window.sidebar.addPanel(title, url, "")
}

</script>
<a href="javascript:ssbookmark('ltlforum.net', 'http://www.ltlforum.net')"><b><img src="Themes/images/b32.gif"/> Favorites</b></a>
<br><br>
<SCRIPT LANGUAGE="JavaScript">
if (document.all){
  document.write('<A HREF="javascript:history.go(0);" onClick="this.style.behavior=\'url(#default#homepage)\';this.setHomePage(\'http://www.ltlforum.net\');">');
  document.write('<B><img src="Themes/images/b34.gif"/> Homepage</B></a>');
}

// If it's Netscape 6, tell user to drag link onto Home button
else if (document.getElementById){
  document.write('<a href="http://www.ltlforum.net"><b><img src="Themes/images/b34.gif"/> Home Page</b></a>');
}

// If it's Netscape 4 or lower, give instructions to set Home Page
else if (document.layers){
  document.write('<b><img src="Themes/images/b34.gif"/> Make this site your home page</b><br>- Go to <b>Preferences</b> in the <B>Edit</B> Menu.<br>- Choose <b>Navigator</b> from the list on the left.<br>- Click on the <b>"Use Current Page"</b> button.');
}

// If it's any other browser, for which I don't know the specifications of home paging, display instructions
else {
  document.write('<b><img src="Themes/images/b34.gif"/> Home page</b><br>- Go to <b>Preferences</b> in the <B>Edit</B> Menu.<br>- Choose <b>Navigator</b> from the list on the left.<br>- Click on the <b>"Use Current Page"</b> button.');
}

//  End -->
</script></center>

copter

Hi!

I get a problem in FF too, but anyway here is my code:




Javascript/Html Block

Bookmark Us

<b><img hspace="3" src="http://img315.imageshack.us/img315/8533/favsnx2.png" align="absMiddle" vspace="3" width="16" height="16">   
<a href="javascript:window.external.AddFavorite('url','sitename');">Bookmark Site</a><br>
<img hspace="3" src="http://img428.imageshack.us/img428/4397/pagenv5.png" align="absMiddle" vspace="3" width="16" height="16">   
<a href="javascript:window.external.AddFavorite(location.href,document.title);">Bookmark Page</a><br>
<img hspace="3" src="http://img428.imageshack.us/img428/2893/homeiu6.png" align="absMiddle" vspace="3" width="16" height="16">   
<a href onclick="javascript:this.style.behavior='url(#default#homepage)';this.setHomePage('url') ;">Make Homepage</a></b>


Yup you'll need to edit the url to your forums url and also edit ur site name, im not sure if it'll work - but it shud do. if not ul have to mess around with it.

akulion

yea the functions in each browser are different for bookmarking
so causes a conflict

falguni1

I sill cant get how to make this your homepage

I have the bookmark code

I want the homepage code, the homepage code here doesnot work, it only opens the site, doesnot make it your homepage.