vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   Do not include posts from a thread in New Posts. (https://vborg.vbsupport.ru/showthread.php?t=75033)

Tenny 01-24-2005 09:00 PM

Do not include posts from a thread in New Posts.
 
Hey Everyone,

I finally got my RSS Bot working, and it works great. I am now looking for a way so that it does not spam the New Posts, and other such features. I would like to have it where you have to click that forum to see the posts in there, and that it would not be visible via "New Posts" and in the "VBAdvanced Home".

Not sure if there is a hack that exists like this, but I've gone through about 10 pages of the search looking for something along these lines with no hits... So if there already is one, can someone point me in the right direction.

Thanks,
Drew

WetWired 01-26-2005 04:33 PM

So, does your bot just post in one forum and that's all that's in the forum? If so, you can remove all users' permissions to search that forum. Otherwise, you'd probably need to add a column to the post table to specify whether a post was a user post or a bot post then include that in the search query where clause.

Tenny 01-26-2005 04:42 PM

Yes, my RSS bot posts in one particular forum, I was able to remove that forum on the vBa CMPS, and the newpost button (by adding &exclude=xx) (xx= forum number).

But the only thing I've been unable to do is, on the vBa CMPS it says: New Posts: $newposts, and I have not been able to find where $newposts comes from, so that I can exclude that forum.

WetWired 01-26-2005 04:52 PM

I have no experience with vBAdvanced, but to find new posts, the query is going to need to access $bbuserinfo['lastvisit'], so I would search for that in the vBa source. Alternately, since it's a counting query, you could search for COUNT(*) . Once you find the query, it would be pretty simple to exclude a forumid.

TTG 01-26-2005 05:11 PM

I've got the same problems .. I use the RSS to feed into 4 seperate forum category's for different news items .. ie .. Sport, Tech, UK News, World News. If anyone finds the method to remove these posts from the users 'new posts' listing, I'd be interested to know.

Tenny 01-26-2005 06:34 PM

Ok well I found this, and i'm pretty sure this is waht you are talking about (this is in the /vbb/modules/welcomeback.php)

Code:

        if ($vba_options['portal_welcome_newposts'])
        {
                $getnewposts = $DB_site->query_first("SELECT COUNT(*) AS count FROM " . TABLE_PREFIX . "post WHERE dateline >= '$bbuserinfo[lastvisit]'");
                $newposts = number_format($getnewposts['count']);
        }
}

Being I'm a complete n00b with coding... (Business major...) anyone with idea's on how to exclude certain forums?

Andreas 01-26-2005 06:39 PM

PHP Code:

$getnewposts $DB_site->query_first("
    SELECT COUNT(*) AS count FROM " 
TABLE_PREFIX "post AS post
    LEFT JOIN " 
TABLE_PREFIX "thread AS thread ON (thread.threadid=post.threadid)
     WHERE post.dateline >= '
$bbuserinfo[lastvisit]' AND thread.forumid NOT IN (1,2,3)
"
); 

This will exclude posts in forums 1, 2 and 3

Tenny 01-26-2005 06:46 PM

sweet KirbyDE, it looks like it's working perfectly, but I won't be 100% sure untill the RSS spams 30 new posts :)

Sooner95 01-26-2005 06:59 PM

I the forums disabled in search.php so that they dont show up when you click "new posts" ect..

can this be done for the forumhome as well? so that when members log on they dont see

example 34 posts 26 thread since last visit

they see new posts new threads that they can actually see when clicking "new posts"

Tenny 01-26-2005 07:10 PM

Sooner95: not quiet sure what you are talking about. Probably because I'm not logged in.

It seems kinda simliar to what I'm talking about, in the CMPS, but I don't see that in my forum index. But from how you explain it, i'm sure it'd be done with the same code almost exactly. Just got to find out where it says 34 Posts, 26 threads since your last visit. So wherever that is, I would try and search through the php to find that, and if there is something along the lines of " $getnewposts = $DB_site->query_first " i would grab that particular code that KirbyDE wrote, and slap it in there (with making a backup of the php file first of course).

That's my only idea?


All times are GMT. The time now is 12:08 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.02878 seconds
  • Memory Usage 1,734KB
  • 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
  • (1)bbcode_code_printable
  • (1)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)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