Eklediğim menü ile ilgili kodlar: www.canver.net/viewtopic.php?p=39700#39700
Şimdi ise foruma bir sağ klik menüsü eklemek istiyorum: www.canver.net/sag-mouse-tusu-hack-cok- ... t6303.html
Sağ klik menüsünü ekledim. Admin panelde felan tm ayarlar normal görünüyor. Ne var ki sağ klik çalışmıyor. Menü felan yok. Tahminlerime göre bu iki eklenti overall_header.tpl dosyasında çakışıyor. Hiç anlamam ama, css çakışması var sanırım.
Ekte sadece üst menülü overall_header.tpl dosyasını yölluyorum buraya. Aşağıdaki kodu bu dosyada nereye eklemeliyim? Kendi söylediği yere ekleyince çalışmıyor...
Sevgiler
- Kod: Tümünü seç
#
#-----[ OPEN ]------------------------------------------
#
templates/subSilver/overall_header.tpl
#
#-----[ FIND ]------------------------------------------
#
</head>
#
#-----[ AFTER, ADD ]------------------------------------------
#
<!-- I S U A T E A M -->
<!-- Begin Right Click Menu MOD -->
<style>
<!--
.skin0 {
position:absolute;
text-align:left;
width:200px;
border:2px solid black;
background-color:menu;
font-family:Verdana;
line-height:20px;
cursor:default;
visibility:hidden;
}
.skin1 {
cursor:default;
font:menutext;
position:absolute;
text-align:left;
font-family: Arial, Helvetica, sans-serif;
font-size: 10pt;
width:120px;
background-color:menu;
border:1 solid buttonface;
visibility:hidden;
border:2 outset buttonhighlight;
}
.menuitems {
padding-left:15px;
padding-right:10px;
}
-->
</style>
<SCRIPT LANGUAGE="JavaScript1.2">
<!-- Begin
var menuskin = "skin{ISUA_SKIN1}"; // skin0, or skin1
var display_url = {ISUA_STAT1}; // Show URLs in status bar?
function showmenuie5() {
var rightedge = document.body.clientWidth-event.clientX;
var bottomedge = document.body.clientHeight-event.clientY;
if (rightedge < ie5menu.offsetWidth)
ie5menu.style.left = document.body.scrollLeft + event.clientX - ie5menu.offsetWidth;
else
ie5menu.style.left = document.body.scrollLeft + event.clientX;
if (bottomedge < ie5menu.offsetHeight)
ie5menu.style.top = document.body.scrollTop + event.clientY - ie5menu.offsetHeight;
else
ie5menu.style.top = document.body.scrollTop + event.clientY;
ie5menu.style.visibility = "visible";
return false;
}
function hidemenuie5() {
ie5menu.style.visibility = "hidden";
}
function highlightie5() {
if (event.srcElement.className == "menuitems") {
event.srcElement.style.backgroundColor = "highlight";
event.srcElement.style.color = "white";
if (display_url)
window.status = event.srcElement.url;
}
}
function lowlightie5() {
if (event.srcElement.className == "menuitems") {
event.srcElement.style.backgroundColor = "";
event.srcElement.style.color = "black";
window.status = "";
}
}
function jumptoie5() {
if (event.srcElement.className == "menuitems") {
if (event.srcElement.getAttribute("target") != null)
window.open(event.srcElement.url, event.srcElement.getAttribute("target"));
else
window.location = event.srcElement.url;
}
}
// End -->
</script>
<!-- I S U A T E A M -->
<!-- End Right Click Menu MOD -->
#
#-----[ FIND ]------------------------------------------
#
<body
#
#-----[ AFTER, ADD ]------------------------------------------
#
<!-- I S U A T E A M -->
<!-- Begin Right Click Menu MOD -->
{ISUA_RCOF1}
<div id="ie5menu" class="skin0" onMouseover="highlightie5(event)" onMouseout="lowlightie5(event)" onClick="jumptoie5(event)" display:none>
<div class="menuitems" url="{ISUA_LINK1}">{ISUA_NAME1}</div>
{ISUA_DIVD1}
<div class="menuitems" url="{ISUA_LINK2}">{ISUA_NAME2}</div>
{ISUA_DIVD2}
<div class="menuitems" url="{ISUA_LINK3}">{ISUA_NAME3}</div>
{ISUA_DIVD3}
<div class="menuitems" url="{ISUA_LINK4}">{ISUA_NAME4}</div>
{ISUA_DIVD4}
<div class="menuitems" url="{ISUA_LINK5}">{ISUA_NAME5}</div>
{ISUA_DIVD5}
<div class="menuitems" url="{ISUA_LINK6}">{ISUA_NAME6}</div>
{ISUA_DIVD6}
<div class="menuitems" url="{ISUA_LINK7}">{ISUA_NAME7}</div>
{ISUA_DIVD7}
<div class="menuitems" url="{ISUA_LINK8}">{ISUA_NAME8}</div>
{ISUA_DIVD8}
<div class="menuitems" url="{ISUA_LINK9}">{ISUA_NAME9}</div>
{ISUA_DIVD9}
</div>
<script language="JavaScript1.2">
// This Code Thanks To http://www.dynamicdrive.com/
//set this variable to 1 if you wish the URLs of the highlighted menu to be displayed in the status bar
var display_url=0
var ie5=document.all&&document.getElementById
var ns6=document.getElementById&&!document.all
if (ie5||ns6)
var menuobj=document.getElementById("ie5menu")
function showmenuie5(e){
//Find out how close the mouse is to the corner of the window
var rightedge=ie5? document.body.clientWidth-event.clientX : window.innerWidth-e.clientX
var bottomedge=ie5? document.body.clientHeight-event.clientY : window.innerHeight-e.clientY
//if the horizontal distance isn't enough to accomodate the width of the context menu
if (rightedge<menuobj.offsetWidth)
//move the horizontal position of the menu to the left by it's width
menuobj.style.left=ie5? document.body.scrollLeft+event.clientX-menuobj.offsetWidth : window.pageXOffset+e.clientX-menuobj.offsetWidth
else
//position the horizontal position of the menu where the mouse was clicked
menuobj.style.left=ie5? document.body.scrollLeft+event.clientX : window.pageXOffset+e.clientX
//same concept with the vertical position
if (bottomedge<menuobj.offsetHeight)
menuobj.style.top=ie5? document.body.scrollTop+event.clientY-menuobj.offsetHeight : window.pageYOffset+e.clientY-menuobj.offsetHeight
else
menuobj.style.top=ie5? document.body.scrollTop+event.clientY : window.pageYOffset+e.clientY
menuobj.style.visibility="visible"
return false
}
function hidemenuie5(e){
menuobj.style.visibility="hidden"
}
function highlightie5(e){
var firingobj=ie5? event.srcElement : e.target
if (firingobj.className=="menuitems"||ns6&&firingobj.parentNode.className=="menuitems"){
if (ns6&&firingobj.parentNode.className=="menuitems") firingobj=firingobj.parentNode //up one node
firingobj.style.backgroundColor="highlight"
firingobj.style.color="white"
if (display_url==1)
window.status=event.srcElement.url
}
}
function lowlightie5(e){
var firingobj=ie5? event.srcElement : e.target
if (firingobj.className=="menuitems"||ns6&&firingobj.parentNode.className=="menuitems"){
if (ns6&&firingobj.parentNode.className=="menuitems") firingobj=firingobj.parentNode //up one node
firingobj.style.backgroundColor=""
firingobj.style.color="black"
window.status=''
}
}
function jumptoie5(e){
var firingobj=ie5? event.srcElement : e.target
if (firingobj.className=="menuitems"||ns6&&firingobj.parentNode.className=="menuitems"){
if (ns6&&firingobj.parentNode.className=="menuitems") firingobj=firingobj.parentNode
if (firingobj.getAttribute("target"))
window.open(firingobj.getAttribute("url"),firingobj.getAttribute("target"))
else
window.location=firingobj.getAttribute("url")
}
}
//NetscapeRCS
if (ie5||ns6){
menuobj.style.display=''
document.oncontextmenu=showmenuie5
document.onclick=hidemenuie5
}
</script>
<!-- I S U A T E A M -->
<!-- End Right Click Menu MOD -->