Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.5 > vBulletin 3.5 Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
[AJAX] Mark Forum As Read Using New Post Icon Details »»
[AJAX] Mark Forum As Read Using New Post Icon
Version: 12, by Nutz Nutz is offline
Developer Last Online: Dec 2013 Show Printable Version Email this Page

Version: 3.5.4 Rating:
Released: 11-17-2005 Last Update: 04-16-2006 Installs: 38
 
No support by the author.

[AJAX] Mark Forum As Read Using New Post Icon

Description
This plug-in will allow you and your users to mark forums as read from forumhome and forumdisplay using the new post icons (see screenshot animation).


Details
  • 1 Product
  • 1 Phrase
  • 2 Template Modifications

Notes
Requires 2 small template modification to forumhome_forumbit_level2_post and forumhome_forumbit_level1_post.
Big thanks to hambil for the initial AJAX version

History
1.0
Initial Version

1.1
Initial AJAX Version

1.2
Refined AJAX Version

Last Words
I hope you enjoy the hack!
And don't forget to click install please



Thanks,
Mat

Supporters / CoAuthors

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #22  
Old 04-22-2006, 12:42 PM
Snake's Avatar
Snake Snake is offline
 
Join Date: Mar 2005
Location: Cleveland, OH
Posts: 3,832
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It's not working for me. :S

www.bonethugsforums.com
Reply With Quote
  #23  
Old 04-26-2006, 01:09 AM
BamaStangGuy's Avatar
BamaStangGuy BamaStangGuy is offline
 
Join Date: Mar 2004
Location: Alabama
Posts: 521
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Just curious but would it be possible to do this within showthread so that you can mark individual threads as read?
Reply With Quote
  #24  
Old 05-20-2006, 07:42 AM
Ziki's Avatar
Ziki Ziki is offline
 
Join Date: Nov 2005
Posts: 2,704
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Doesn't work in FF
Reply With Quote
  #25  
Old 05-20-2006, 09:43 AM
Snake's Avatar
Snake Snake is offline
 
Join Date: Mar 2005
Location: Cleveland, OH
Posts: 3,832
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yep same here.
Reply With Quote
  #26  
Old 05-20-2006, 03:49 PM
.Tim's Avatar
.Tim .Tim is offline
 
Join Date: Jan 2005
Location: Oklahoma City
Posts: 353
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #27  
Old 05-20-2006, 05:37 PM
Snake's Avatar
Snake Snake is offline
 
Join Date: Mar 2005
Location: Cleveland, OH
Posts: 3,832
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Please fix!
Reply With Quote
  #28  
Old 05-20-2006, 11:49 PM
LordJMann LordJMann is offline
 
Join Date: Jan 2003
Posts: 38
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #29  
Old 05-21-2006, 06:56 AM
Snake's Avatar
Snake Snake is offline
 
Join Date: Mar 2005
Location: Cleveland, OH
Posts: 3,832
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Can someone test this whether it works or not please?
Reply With Quote
  #30  
Old 07-06-2006, 12:26 PM
Polo's Avatar
Polo Polo is offline
 
Join Date: Jun 2004
Posts: 893
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

great hack, will definetly install
Reply With Quote
  #31  
Old 07-06-2006, 05:53 PM
Snake's Avatar
Snake Snake is offline
 
Join Date: Mar 2005
Location: Cleveland, OH
Posts: 3,832
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 10:34 AM.


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.04428 seconds
  • Memory Usage 2,317KB
  • Queries Executed 26 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (2)bbcode_code
  • (2)bbcode_php
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete