"Bookmark This Thread" hack

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • monica
    New Member
    • Jul 2002
    • 24

    #16
    Thanks so much. Do you know how to bookmeark a thread in VB2.2.6

    Thanks

    Comment

    • monica
      New Member
      • Jul 2002
      • 24

      #17
      Actually, The feature is already there as " subscribe to this thread". Thanks so much though

      Comment

      • phumphries
        Senior Member
        • Jun 2000
        • 169

        #18
        This is not the same as the "subscribe" feature; this actually puts a bookmark in the user's Favourites list (in IE) or tells them to press Ctrl-D to add it to their Netscape bookmarks.

        Near the end of the showthread template in 2.2.6, you will find
        Code:
        <!-- thread options links -->
        You need to add the code
        Code:
        <img src="images/bookmark.gif" border="0" alt="" align="absmiddle"> <SCRIPT LANGUAGE="JavaScript" src="bookmark.js"></script>
        wherever you find most pleasing, and then put the attached bookmark.js JavaScript file in your main directory.

        This is the contents of bookmark.js:
        Code:
        if ((navigator.appName == "Microsoft Internet Explorer") && (parseInt(navigator.appVersion) >= 4)) {
        	var url=window.location.href;
        	var title="$threadtitle";
        	document.write('<A HREF="javascript:window.ext');
        	document.write('ernal.AddFavorite(url,title);" ');
        	document.write('onMouseOver=" window.status=');
        	document.write("'Bookmark this thread!'; return true ");
        	document.write('"onMouseOut=" window.status=');
        	document.write("' '; return true ");
        	document.write('">Click here to bookmark this thread!</a>');
        } else {
        	var msg = "Bookmark this thread!";
        	if(navigator.appName == "Netscape") msg += "  (CTRL-D)";
        	document.write(msg);
        }
        I also put a couple of possible bookmark pic's in there for you.
        Peter E. Humphries

        Comment

        • MUG
          Senior Member
          • Apr 2002
          • 1191
          • 2.3.0

          #19
          Actually, the thread title part wouldn't work because bookmark.js isn't parsed by vBulletin

          Comment

          • phumphries
            Senior Member
            • Jun 2000
            • 169

            #20
            None of my IE users have ever said anythimg to me! It used to be in the template; I guess that I will put it back.

            So, just paste the bookmark.js code into your showthread template; then vBulletin will parse $threadtitle as usual.
            Peter E. Humphries

            Comment

            • monica
              New Member
              • Jul 2002
              • 24

              #21
              Thanks a lot

              Thanks

              Comment

              widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
              Working...