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)
-   -   Skip a Forums New Posts - Add "Mark Forum Read" to New Posts search (https://vborg.vbsupport.ru/showthread.php?t=99833)

Greebo 10-31-2005 10:00 PM

Skip a Forums New Posts - Add "Mark Forum Read" to New Posts search
 
Skip a Single Forums New Posts
Add "Mark Forum Read" to New Posts search

When doing a New Posts search (and only on a New Posts search), this hack adds a "Mark This Forum Read" link to the forum column. Users can click this link to mark a single forum read from the New Posts search results, thus "skipping" that forum from the new posts search.

When the link is clicked, the selected forum is marked read and the user is redirected back to a new New Posts search.

Negatives: If forum has a time limit on searches, the user will get the message about having to wait to conduct a search if they didn't wait that long before clicking the mark read link.

Version 1.0
vBulletin Compatibility: 3.5.0

Required changes: 1 Template Edit, 1 Code File Edit

Cyricx 11-01-2005 01:03 PM

Very nice, great idea!

Greebo 11-01-2005 01:10 PM

Thanks, but its not really my idea. In the 3.0.x series, I used this hack:
https://vborg.vbsupport.ru/showthread.php?t=67154

That hack included the same thing. But 3.5.0 makes that hack no longer necessary. I just liked the behavior and converted it to the 3.5.0 engine. :)

Snake 11-01-2005 04:26 PM

Nice one!

yessir 11-01-2005 09:45 PM

Awesome mod idea.

I'll hold out for a product and work around the search timeout feature. On many boards search times are limited. My board is one of these (and for good reason).

Greebo 11-02-2005 01:02 PM

Don't hold out too long - the most appropriate hook for a plugin is forumdisplay_complete, and while that might work, it means the entire forumdisplay file will get processed before the redirect code is fired, where my code modification means the forum is marked read and the user is sent right back to the search, just as quick as possible.

I'll submit a hook request but.. don't hold yer breath. :)

SpanishHarlem 11-02-2005 02:08 PM

Thank's. My member's will love this hack. With so many forum's they don't like to read all.

Andreas 11-05-2005 03:17 PM

*** Untested ***

To avoid the fileedits:

redirect_generic
PHP Code:

global $recursecheck_hdr;
if (!empty(
$_REQUEST['returnToSearch']) AND !$recursecheck_hdr);
{
    
$recursecheck_hdr true;
    
$vbulletin->url 'search.php?' $vbulletin->session->vars['sessionurl'] . 'do=getnew';
    eval(
print_standard_redirect('markread_single'));



header_redirect
PHP Code:

global $recursecheck;
if (!empty(
$_REQUEST['returnToSearch']) AND !$recursecheck);
{
    
$recursecheck true;
    
exec_header_redirect('search.php?' $vbulletin->session->vars['sessionurl'] . 'do=getnew');    



Greebo 01-11-2006 12:55 PM

Hmm, I tried those mods, Andreas, but they ended up hanging the forum. I don't have time atm to debug it so I'm sticking with me file edits for now. :)

JohnBee 06-28-2006 04:46 PM

I love this idea - LOVE IT!

However it only works in IE and not Firefox... When I try in firefox(mark as read) it returns with an empty list after the first one. When I tested this in IE it works flawlessly by refreshing the list with the next thread in line.

Any ideas?

JohnBee 10-10-2006 10:36 AM

As an update to this, Firefox RC1/2 run the html nicely.

However I noticed a slight anomaly under the circumstances. The ling string in the mark read url can potentially break the tables so I created a simple phrase to put things back into order.

(I have also been thinking of adding this as an icon instead of text to keep things cleaner.)
In any case it's a great hack, very useful to have. - thx

Code:

<if condition="$show['forumlink']">
                <td class="alt1"><a href="forumdisplay.php?$session[sessionurl]f=$thread[forumid]">$thread[forumtitle]</a><br><if condition="$display['getnew']">$vbphrase[mark_forum_read]</if></td></if>


JohnBee 10-11-2006 08:10 PM

Correction... id still does not work with Firefox properly.

Looks as though for some reason the browser is not able to process a single search request but marks the entire lot as read instead. ( no clue why but thats what I found during testing)

Most of my members use FF so I had to remove it again :(
To bad the hack has lots of potential imo.

Canis Firebrand 11-08-2006 11:14 AM

Would love to see this updated and the issues fixed. I had it in place before and it sort of worked. It had the issues as mentioned above where it would mark an entire forum read.

JohnBee 11-09-2006 01:03 AM

Quote:

Originally Posted by Canis Firebrand
Would love to see this updated and the issues fixed. I had it in place before and it sort of worked. It had the issues as mentioned above where it would mark an entire forum read.

Actually this is how it works :(
Turns out this marks the entire forum as read and not the individual posts display'd in the new post search results. (to bad) I removed the hack since it was not what I was trying to achieve, as far as I know there is no modification that can do that.

PS. there is an html error in the template change. where it ends with <td> but it should be </td> messes up the layout.

jeremyalyea 10-02-2007 02:53 AM

I have tried this with v3.6 but it does not work. Does anyone know how to make this work or is there another mod that does something similar. It is exactly what I'm looking for.

jeremyalyea 11-13-2007 01:55 AM

Does anyone else find this hack useful? It is exactly what I need but it doesn't work on 3.6.x

dvbusuario 11-22-2007 10:42 PM

In 3.6.8 don't work :(

Greebo 11-15-2010 03:50 PM

Just reapplied this to 3.8.6 - works fine but the text to search in forumdisplay.php has changed:
Search for
Code:

        eval(print_standard_redirect($mark_read_result['phrase']));
replace with
Code:

        if (empty($_REQUEST['returnToSearch']))
        {
            eval(print_standard_redirect($mark_read_result['phrase']));
        }
        else
        {
            exec_header_redirect('search.php?do=getnew');
        }



All times are GMT. The time now is 04:50 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.01397 seconds
  • Memory Usage 1,759KB
  • 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
  • (3)bbcode_code_printable
  • (2)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (18)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete