vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   make threads have no post count (https://vborg.vbsupport.ru/showthread.php?t=67689)

Keyser S?ze 07-27-2004 05:08 PM

make threads have no post count
 
i think this is neeeded for any forum

u get threads like "post ur desktop" or just a spam thread, and i would love to be able to disable post count for that thread ya know

not the whole forum, just a certain thread

possible?

thanks :)

Keyser S?ze 08-01-2004 10:46 PM

no one thinks this would be helpful?

we make forums have no post count, why not threads

Andreas 08-01-2004 10:53 PM

UPDATE thread SET replycount=0 WHERE threadid IN (...)

Keyser S?ze 08-15-2004 02:44 PM

well i ment more of a hack i dont want to do a query for each thread, just a "flip the switch" ya know

anyone? thanks in advance

Michael Morris 08-15-2004 04:11 PM

NOT TESTED - NOT TESTED - NOT TESTED!!!

This should work. Requires 1 file modification and 1 template mod.

In postings.php Find
PHP Code:

case 'removeredirect'

Below it add
PHP Code:

case 'nopostcount'

Next find
PHP Code:

// ############################### start do open / close thread ############################### 

Above it add
PHP Code:

// ############################### start No Post Count Suckers ###############################
if ($_POST['do'] == 'nopostcount')
{
    
// permission check
    
if (!can_moderate($threadinfo['forumid'], 'canopenclose'))
    {
                    
print_no_permission();
    }

    
// check if there is a forum password and if so, ensure the user has it set
    
verify_forum_password($foruminfo['forumid'], $foruminfo['password']);
    
    
$DB_site->query("UPDATE " TABLE_PREFIX "thread SET replycount=0 WHERE threadid = $threadid");



And now for some template modifications

HTML Code:

###################################################################
# Template modifications in SHOWTHREAD
###################################################################

-------------------------------------------------------------------
search for this:
-------------------------------------------------------------------

<option value="removeredirect">$vbphrase[remove_redirects]</option>

-------------------------------------------------------------------
Put this directly underneath it
-------------------------------------------------------------------

<option value="nopostcount">Turn off Post Count</option>

-------------------------------------------------------------------
search for this:
-------------------------------------------------------------------

<div><label for="ao_rrd"><input type="radio" name="do" id="ao_rrd" value="removeredirect" />$vbphrase[remove_redirects]</label></div>

-------------------------------------------------------------------
Put this directly underneath it
-------------------------------------------------------------------

<div><label for="ao_dbump"><input type="radio" name="do" id="ao_archive" value="nopostcount" />Turn Off Post Count</label></div>

Again - I haven't tested this but I'm pretty sure (80%) that it will work since it's very similar to hacks I've done before. Backup your template, file and database first just to be sure.

What it does is create a radio button in your admin tools for the thread that, if you select it, will turn the post count for that thread off.

NOTE: I didn't provide a means to turn it back on with this hack.

Keyser S?ze 08-25-2004 12:30 AM

installed but when i go to turn off the post count i get a white screen :(

any ideas?

AN-net 08-25-2004 01:58 AM

that is because no actual template or some type of redirect is called so nothing is printed;)

Keyser S?ze 08-25-2004 01:17 PM

still doesnt work tho, i did it to one thread then noted my post count and replied and my post count went up by one

Keyser S?ze 08-31-2004 10:10 PM

i could really use this hack if anyone could do it, it would be so appreciated

really

thanks

dekel 08-31-2004 10:32 PM

if you want to disable post-count on a spesific forum (for all posts in this forum) you can do this in forum options...
go to the forum manager --> edit forum --> go to bottom and you have there "Count Posts Made in this Forum Towards User Post Counts" just check the 'no' box.

hope this helped ya :)

Dekel


All times are GMT. The time now is 02:36 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.01066 seconds
  • Memory Usage 1,746KB
  • 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_html_printable
  • (4)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