vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   How many threads and posts since your last visit! (https://vborg.vbsupport.ru/showthread.php?t=59583)

The Keeper 01-10-2004 11:53 AM

Does it properly parse new threads and new posts yet? A new post in an old thread is not a new thread.

walkingthepath 01-10-2004 04:36 PM

Hack not working for me!! :( I've got VB 3.0 RC2

Gary King 01-10-2004 04:41 PM

Quote:

Originally Posted by walkingthepath
Hack not working for me!! :( I've got VB 3.0 RC2

What do you mean not working? What's the problem?

Gary King 01-10-2004 04:45 PM

Quote:

Originally Posted by The Keeper
Does it properly parse new threads and new posts yet? A new post in an old thread is not a new thread.

Download instructions_regular.txt :)

Reverend 01-10-2004 06:03 PM

Like Linear Helix mentioned earlier.
Is there anyway to make it so that the totals only show threads/posts forums that users have permission to view.

i.e if a member posts in a private forum,the total only goes up for other users that have permission to view it.

Would solve any possible complaints from members when the stats show new threads/posts have been made,but when they click on "new posts" the totals don't match.

BTW, clicks Install. ;)

feldon23 01-10-2004 07:57 PM

Reverend, that would require a very complex query.

Gary King 01-10-2004 08:21 PM

Quote:

Originally Posted by Reverend
Like Linear Helix mentioned earlier.
Is there anyway to make it so that the totals only show threads/posts forums that users have permission to view.

i.e if a member posts in a private forum,the total only goes up for other users that have permission to view it.

Would solve any possible complaints from members when the stats show new threads/posts have been made,but when they click on "new posts" the totals don't match.

BTW, clicks Install. ;)

Something like that probably wouldn't be worth it for the time and power it'll require for a query like that, I'm not too sure right now anyways on how exactly the query would be written out :)

M1th 01-10-2004 08:24 PM

Quote:

Originally Posted by Reverend
Like Linear Helix mentioned earlier.
Is there anyway to make it so that the totals only show threads/posts forums that users have permission to view.

i.e if a member posts in a private forum,the total only goes up for other users that have permission to view it.

Would solve any possible complaints from members when the stats show new threads/posts have been made,but when they click on "new posts" the totals don't match.

BTW, clicks Install. ;)

you can use something like this:


PHP Code:

     // to check permissions for different users in forums
     
$forumids array_keys($forumcache);
             foreach(
$forumids AS $key => $value)
     
        {
             
$fperms = &$bbuserinfo['forumpermissions']["$forumid"];
             
$forum = &$forumcache["$forumid"];
     
         if (!(
$fperms CANVIEW) OR !($fperms CANSEARCH) OR !verify_forum_password($forumid$forum['password'], false))
             {
              
// get rid of the forumids that the user doesnt have permission to view
                 
unset($forumids["$key"]);
             }
         } 


Then you add (new threads count in this case) ,
PHP Code:

$getnewthread=$DB_site->query_first("
        SELECT COUNT(*) AS threads
        FROM "
.TABLE_PREFIX."thread
        WHERE lastpost IN(" 
implode(', '$forumids) . ") > '".$bbuserinfo['lastvisit']."'
         "
); 

as the query.

Boofo 01-10-2004 08:35 PM

Can you show us the whole thing? ;)

M1th 01-10-2004 08:59 PM

Quote:

Originally Posted by Boofo
Can you show us the whole thing? ;)

an example (for getting count of new threads since last visit):

PHP Code:

   
       $getnewthread
=$DB_site->query_first("
       SELECT COUNT(*) AS threads
       FROM "
.TABLE_PREFIX."thread
       WHERE lastpost IN(" 
implode(', '$forumids) . ") > '".$bbuserinfo['lastvisit']."'
        "
); 

You just do the same thing for the other query.

Havent tested it but it should work. :)


All times are GMT. The time now is 09:17 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.01706 seconds
  • Memory Usage 1,757KB
  • 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_php_printable
  • (5)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (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