LordJMann |
05-20-2006 11:49 PM |
Works fine in Firefox 1.5.0.3
To make it double click, change:
Code:
<if condition="$forum[statusicon] == 'new' ">
<a href="#">
<img src="$stylevar[imgdir_statusicon]/forum_$forum[statusicon].gif" alt="$vbphrase[mark_this_forum_read_home]" title="$vbphrase[mark_this_forum_read_home]" onclick="ajaxMarkForumRead($forum[forumid])" id="mfarfh_$forum[forumid]" border="0" title=""/>
</a>
<else />
<img src="$stylevar[imgdir_statusicon]/forum_$forum[statusicon].gif" alt="" border="0" />
</if>
to
Code:
<if condition="$forum[statusicon] == 'new' ">
<a href="#">
<img src="$stylevar[imgdir_statusicon]/forum_$forum[statusicon].gif" alt="$vbphrase[mark_this_forum_read_home]" title="$vbphrase[mark_this_forum_read_home]" ondblclick="ajaxMarkForumRead($forum[forumid])" id="mfarfh_$forum[forumid]" border="0" title=""/>
</a>
<else />
<img src="$stylevar[imgdir_statusicon]/forum_$forum[statusicon].gif" alt="" border="0" />
</if>
Also, I'm not sure why the href tag is in there, you can safely remove it and things work fine.
To make it show a confirmation box after clicking, edit the plugins and change:
PHP Code:
$header .= ' <script type="text/javascript"> mfarfh_AJAX_Object = new vB_AJAX_Handler(true); function mfarfh_AJAX_Changeimage(idd) {
elm = document.getElementById("mfarfh_" + idd); img = elm.src; img = img.replace("_new", "_old"); elm.src = img;
} function ajaxMarkForumRead(id) { mfarfh_AJAX_Object.send("forumdisplay.php?do=markread&f=" + id + "&mfarfh_id=" + id + "&mfarfh_ajax=true"); mfarfh_AJAX_Changeimage(id) } </script> ';
To:
PHP Code:
$header .= ' <script type="text/javascript"> mfarfh_AJAX_Object = new vB_AJAX_Handler(true); function mfarfh_AJAX_Changeimage(idd) {
elm = document.getElementById("mfarfh_" + idd); img = elm.src; img = img.replace("_new", "_old"); elm.src = img;
} function ajaxMarkForumRead(id) { if (confirm("Are you sure?")) { mfarfh_AJAX_Object.send("forumdisplay.php?do=markread&f=" + id + "&mfarfh_id=" + id + "&mfarfh_ajax=true"); mfarfh_AJAX_Changeimage(id) } } </script> ';
Hope that helps.
|