vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=113)
-   -   [AJAX] Mark Forum As Read Using New Post Icon (https://vborg.vbsupport.ru/showthread.php?t=101101)

Snake 04-22-2006 12:42 PM

It's not working for me. :S

www.bonethugsforums.com

BamaStangGuy 04-26-2006 01:09 AM

Just curious but would it be possible to do this within showthread so that you can mark individual threads as read?

Ziki 05-20-2006 07:42 AM

Doesn't work in FF

Snake 05-20-2006 09:43 AM

Yep same here.

.Tim 05-20-2006 03:49 PM

Quote:

Originally Posted by BamaStangGuy
Just curious but would it be possible to do this within showthread so that you can mark individual threads as read?

That would be very nice!


Quote:

Originally Posted by ZIKI-SET
Doesn't work in FF

Yep. :(

Snake 05-20-2006 05:37 PM

Please fix!

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.

Snake 05-21-2006 06:56 AM

Can someone test this whether it works or not please?

Polo 07-06-2006 12:26 PM

great hack, will definetly install :)

Snake 07-06-2006 05:53 PM

And does it works to you if you're running on v3.5.4?


All times are GMT. The time now is 03:13 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01050 seconds
  • Memory Usage 1,749KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code_printable
  • (2)bbcode_php_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete