Go Back   vb.org Archive > vBulletin 5 Connect Discussion > vB5 General Discussions
  #1  
Old 09-13-2020, 10:31 AM
DemonicInu DemonicInu is offline
 
Join Date: Sep 2020
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Stop post count from increasing

I know it's possible on older vb's (well if I remember right) but i'm not seeing a option to leave users post in a forum while this post count stays the same. I want to have a spam section on my forum where users can pretty much post w/e but I don't want their post going up, is that possible?
Reply With Quote
  #2  
Old 09-14-2020, 11:08 AM
Mot235 Mot235 is offline
 
Join Date: Aug 2020
Posts: 8
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

this is not possible within the settings. Only possible through changing of the core files.

There are no resources on this that I could find, but I was able to achieve this by changing the content.php in the vb library, and the misc.php in the admincp.

I also don't know if its the best way to handle it, but it works, but unless you are willing to make such changes, it's not an option.
Reply With Quote
  #3  
Old 02-05-2021, 11:28 AM
Mot235 Mot235 is offline
 
Join Date: Aug 2020
Posts: 8
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Welp after some time and becoming a little bit more comfortable with things I thought I'd share this in case anyone else is interested. Maybe someone smarter than me or more knowledgeable than me could turn this into a mod one day.

I created this area to remind myself and all others that before we do any updates to BASE VB5, that certain items will be OVERWRITTEN, if not kept track of because at this point. We are modding core backend files and many templates have been modified.

1. Feature to prevent post increment. Two locations
core\admincp\misc.php lines 290-326
PHP Code:
// NOTICE: How we determine if a post counts in user post count here needs to
// match the criteria used in vB_Library_Content::countInUserPostCount()
// If you update in one place, please update in the other
$topChannels vB_Api::instance('content_channel')->fetchTopLevelChannelIds();
if (isset(
$topChannels['errors']))
{
print_stop_message2($topChannels['errors'][0]);
}
$checkChannels = array(
$topChannels['forum'],
$topChannels['blog'],
$topChannels['groups'],
);
$channelContentType vB_Types::instance()->getContentTypeID('vBForum_Channel');
echo 
'<p>' $vbphrase['updating_post_counts'] . '</p>';
$gotforums '';
foreach (
$checkChannels as $checkChannel)
{
$forums $vbulletin->db->query_read("
SELECT node.nodeid
FROM " 
TABLE_PREFIX "node AS node
INNER JOIN " 
TABLE_PREFIX "closure AS cl ON cl.parent = $checkChannel AND cl.child = node.nodeid
WHERE node.contenttypeid = 
$channelContentType
AND node.nodeid <> 
$checkChannel
AND node.nodeid <> 269
AND node.parentid <> 269
"
);
while (
$forum $vbulletin->db->fetch_array($forums))
{
$gotforums .= ',' $forum['nodeid'];
}

core\vb\library\content.php
line 1003
PHP Code:
if ($textCountChange $this->textCountChange AND $nodevals['routeid'] != '229'
lines 1212-1215
PHP Code:
 // Update the post count for this user (content add)
if ($nodevals['routeid'] != '229') {
$this->incrementUserPostCount($node);


How this modification works

Spam world has a set nodeid of 269. In misc.php there exists tools that will go through and fix user post counts by looking for the criteria in that select statement. updated the sql statement to exclude nodes made under spam world which will all have a parentid relating back to the the main spamworld nodeid.


for content entry, somehow I found out that any "nodes" made under spamworld were assigned a routeid of 229 in the database and wrapped post increments to only increment after it checks for a routeid not equal to 229.

To find the routeid needed to check for, I basically made a channel, and then started spamming and then looked in the node table to find out if there was any common thing i could filter by.
Reply With Quote
Reply

Thread Tools
Display Modes

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 03:41 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.06481 seconds
  • Memory Usage 2,187KB
  • Queries Executed 13 (?)
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
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (3)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (3)post_thanks_box
  • (3)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (3)post_thanks_postbit_info
  • (3)postbit
  • (3)postbit_onlinestatus
  • (3)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_postinfo_query
  • fetch_postinfo
  • 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
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete