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

Recent

Welcome to TinyPortal. Please login or sign up.

Members
Stats
  • Total Posts: 195,994
  • Total Topics: 21,325
  • Online today: 348
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 286
  • Total: 286

[BLOCK] All in 1 User Preference

Started by brianjw, January 15, 2007, 05:38:48 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

brianjw

Yes, everyone knows my CODING SKILLS suck! But thats alright because im learning. lol. So I figured I would work with some people who arent learning and know nothing and see if I can do something. But Obviously my coding skills striked me again and people are claiming it doesnt work, lol :2funny:

brianjw

Updated Code

1. (ADD TO FAVORITES ONLY)

<script type="text/javascript"><!--
// Favorites only!
// Use in left or right block
// Change the urls and titles as you wish.
if ((navigator.appName == "Microsoft Internet Explorer") && (parseInt(navigator.appVersion) >= 4)) {
var url="http://YOURURL.com";
var title="YOURSITE";
document.write('<A HREF="javascript:window.external.AddFavorite(url,title)');
document.write('"><font face= color=#3300FF size=none>Add this site to your favorites!</font></a>');
}
else {
var alt = "<font color=#3300FF face= size=none>Add this site to your favorites!</font><BR>";
if(navigator.appName == "Netscape") alt += "Press (Ctrl-D) on your keyboard.</font>";
document.write(alt);
}
// End of favorites code --></SCRIPT>


2. (SET HOMEPAGE ONLY)

<!-- Homepage Code ONLY-->
<!--[if IE]><a HREF onClick="this.style.behavior='url(#default#homepage)';this.setHomePage('http://YOURURL.com');" style="cursor:hand">
<font color="#3300FF" face="" size="none">Make YOURSITE Your Homepage!</font></a><![endif]-->
<!-- end of homepage code -->


3. (ALL)

<script type="text/javascript"><!--
// Favorites only!
// Use in left or right block
// Change the urls and titles as you wish.
if ((navigator.appName == "Microsoft Internet Explorer") && (parseInt(navigator.appVersion) >= 4)) {
var url="http://YOURURL.com";
var title="YOURSITE";
document.write('<A HREF="javascript:window.external.AddFavorite(url,title)');
document.write('"><font face= color=#3300FF size=none>Add this site to your favorites!</font></a>');
}
else {
var alt = "<font color=#3300FF face= size=none>Add this site to your favorites!</font><BR>";
if(navigator.appName == "Netscape") alt += "Press (Ctrl-D) on your keyboard.</font>";
document.write(alt);
}
// End of favorites code --></SCRIPT>
<!-- Homepage Code ONLY-->
<!--[if IE]><a HREF onClick="this.style.behavior='url(#default#homepage)';this.setHomePage('http://YOURURL.com');" style="cursor:hand">
<font color="#3300FF" face="" size="none">Make YOURSITE Your Homepage!</font></a><![endif]-->
<!-- end of homepage code -->


MODIFY: Remember to change #3300FF to the color you wish the links to be (this applies for both of the links). Modify the http://yoururl.com to your website and add your site title in where it says YOURSITE.

These codes work 100% well. Just be sure to modify the above and it will absolutely work :D

Brianjw

This website is proudly hosted on Crocweb Cloud Website Hosting.