vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   Count post work only for... (https://vborg.vbsupport.ru/showthread.php?t=75483)

TCattitude 01-31-2005 10:23 AM

Count post work only for...
 
Can someone do something like this:

In certain forums (controlled by admincp, on/off according specific forums) only the first post (the creator and started of the thread) only count for the post counter.

The replies and everything else after the first post, dont count in post counter, for anybody. Even the admins or the thread starter.

Is to hard of do it?

Thanks in advance for you attention :)
Greetings.

Marco van Herwaarden 02-01-2005 03:34 AM

Well i think it could be done.

TCattitude 02-06-2005 04:36 AM

... :S

And in a EASY and plain php way?
Can be done? :S

I love to push user to post new threads instead to reply and reply in certain forums.

Please... some one? :(

Andreas 02-06-2005 05:14 AM

General idea
- Create a new column onlyfirst TINYINT(1) in table forum, set this to 1 if only threads should be counted there
- Rebuild forum information
- In functions_newpost.php FIND
PHP Code:

if ($foruminfo['countposts']) 

REPLACE that with
PHP Code:

if ($foruminfo['countposts'] AND (!$foruminfo['onlyfirst'] OR $type == 'thread')) 

Attn: If you ever update post counters they will show the real number.
To prevent this further edits would be necessary.

TCattitude 02-08-2005 10:20 PM

Quote:

Originally Posted by KirbyDE
General idea
- Create a new column onlyfirst TINYINT(1) in table forum, set this to 1 if only threads should be counted there
- Rebuild forum information
- In functions_newpost.php FIND
PHP Code:

if ($foruminfo['countposts']) 

REPLACE that with
PHP Code:

if ($foruminfo['countposts'] AND (!$foruminfo['onlyfirst'] OR $type == 'thread')) 

Attn: If you ever update post counters they will show the real number.
To prevent this further edits would be necessary.

I'm not a skill php coder :(
Anyone can make that KirbyDE explain?

Step by Step?
Please?


All times are GMT. The time now is 08:31 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.01045 seconds
  • Memory Usage 1,726KB
  • 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
  • (4)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (5)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