Advertise Here

Author Topic: [CODE] Cool Right-Click Links Menu (To a Topic, Post or Page) [Qub1]  (Read 7979 times)

0 Members and 1 Guest are viewing this topic.

Offline Qub1

  • SMF For Free Full Member
  • *
  • Posts: 149
    • View Profile
    • QUB1

  • Total Badges: 16
    Badges: (View All)
    Topic Starter Combination Level 3 Level 2 Level 1
Forum Url: http://narutolounge.smfforfree4.com

IE Only!

Previeuw

This Code is for a Cool new Right-Click menu. So, when you Right-Click, you will get a little menu instead of the Normal Right-Click menu, and there you can Put Links, text and if it Works also Images. BUT remember, when you put a Link in the Menu, just put the Topic, Post or Page text in it, like if you want to make a link to: www.narutolounge.smfforfree4.com/index.php/topic,1.0.html, you just insert: ''index.php/topic,1.0.html'' as link. Here's how to Install:

Put this in your Headers (Edit the Coloured Text, instructions are below):
Red = Menu Background Colour
Yellow = Menu Text Style
Quote
<STYLE>
#contextMenu {
  position: absolute;
  visibility: hidden;
  width: 120px;
  background-color: lightgrey;
  layer-background-color: lightgrey;
  border: 2px outset white;
}

.A:Menu {
   color: black;
   text-decoration: none;
  cursor: default;
   width: 100%
  }

 .A:MenuOn {
   color: white;
   text-decoration: none;
   background-color: darkblue;
  cursor: default;
   width: 100%
  }
</STYLE>

<SCRIPT>
var menu;
function showMenu (evt) {
  if (document.all) {
    document.all.contextMenu.style.pixelLeft = event.clientX;
    document.all.contextMenu.style.pixelTop = event.clientY;
    document.all.contextMenu.style.visibility = 'visible';
    return false;
  }
  else if (document.layers) {
    if (evt.which == 3) {
      document.contextMenu.left = evt.x;
      document.contextMenu.top = evt.y;
      document.contextMenu.onmouseout =
        function (evt) { this.visibility = 'hide'; };
      document.contextMenu.visibility = 'show';
      return false;
    }
  }
  return true;
}
if (document.all)
  document.oncontextmenu =showMenu;
if (document.layers) {
  document.captureEvents(Event.MOUSEDOWN);
  document.onmousedown = showMenu;
}
</SCRIPT>


And now Paste this in your Footers (Edit the Coloured Text, instructions are below):
Blue = The Link location, if you don't want it to be a Link, just delete all the Link Text
Yellow = The Text that will be Displayed as the Link before
Quote
<DIV ID="contextMenu"
     ONMOUSEOUT="menu = this; this.tid = setTimeout ('menu.style.visibility = \'hidden\'', 20);"      ONMOUSEOVER="clearTimeout(this.tid);" >
<a HREF="index.php/topic,1.0.html" CLASS="menu" ONMOUSEOVER="this.className = 'menuOn'" ONMOUSEOUT="this.className = 'menu';" ; target="_blank"> This Menu was</a>
<BR>
<a HREF="index.php/topic,1.0.html" CLASS="menu" ONMOUSEOVER="this.className = 'menuOn'" ONMOUSEOUT="this.className = 'menu';" ; target="_blank"> Created by Qub1</a>
</DIV>

To add more Lines of Text, just add more of this code before this Text </DIV>: (Edit the Coloured Text, instructions are below):
Blue = The Link location, if you don't want it to be a Link, just delete all the Link Text
Yellow = The Text that will be Displayed as the Link before
Quote
<BR>
<a HREF="index.php/topic,1.0.html" CLASS="menu" ONMOUSEOVER="this.className = 'menuOn'" ONMOUSEOUT="this.className = 'menu';" ; target="_blank"> This Menu was Created by Qub1</a>


Thanks ya all, if you like this Code, please say so.
- Qub1
« Last Edit: February 26, 2008, 05:02:55 am by Qub1 »

Offline Celebrus

  • SMF For Free Hero
  • *
  • Posts: 941
    • View Profile
    • Vikhyat Korrapati

  • Total Badges: 16
    Badges: (View All)
    Topic Starter Combination Level 3 Level 2 Level 1
Re: [CODE] Cool Right-Click Links Menu (To a Topic, Post or Page) [Qub1]
« Reply #1 on: February 25, 2008, 08:26:03 pm »
The preview ain't working on FF. It's only working on my IE.

Offline simply sibyl

  • Helpers
  • *
  • Posts: 14347
  • On hiatus
    • View Profile
    • The Tent Dwellers

  • Total Badges: 31
    Badges: (View All)
    Level 6 Poll Voter Webmaster Arcade Highscore Windows User
Re: [CODE] Cool Right-Click Links Menu (To a Topic, Post or Page) [Qub1]
« Reply #2 on: February 25, 2008, 08:54:25 pm »
same here..  works with IE 7.0....   not workin with Firefox/Seamonkey/Opera

Offline Qub1

  • SMF For Free Full Member
  • *
  • Posts: 149
    • View Profile
    • QUB1

  • Total Badges: 16
    Badges: (View All)
    Topic Starter Combination Level 3 Level 2 Level 1
Re: [CODE] Cool Right-Click Links Menu (To a Topic, Post or Page) [Qub1]
« Reply #3 on: February 26, 2008, 05:02:24 am »
Ok, i will add that to the Post.

 

Related Topics

  Subject / Started by Replies Last post
1 Replies
1192 Views
Last post August 15, 2006, 07:08:39 pm
by SMF For Free
0 Replies
1925 Views
Last post February 25, 2008, 09:52:47 am
by Qub1
4 Replies
2586 Views
Last post March 31, 2008, 09:38:42 am
by Qub1
2 Replies
1750 Views
Last post February 27, 2009, 09:44:51 am
by Qub1
2 Replies
975 Views
Last post April 30, 2010, 01:40:14 am
by doug68