vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   negative post counts? (https://vborg.vbsupport.ru/showthread.php?t=78079)

Pete_C 03-14-2005 02:12 AM

negative post counts?
 
I was curious as to whether its possible to have a negative post count at all. I tried to enter one in the admin panel, but to no avail, it was changed to 0 instead of the value.

another option I was wondering, if thats not possible, is it possible to have it so that only when my post count is shown, it has a minus sign infront of it, would that be possible at all?

why-not 03-14-2005 02:59 AM

Hi

Have a read up on INT column types over at MySQL. It will explain why what you are trying will not work with the current vB default column type for post count *UNSIGNED RANGE* <= does not allow for 'negative values'. You can change it to a *SIGNED RANGE*, but this will use more space, and also cause some table joins to use temporary tables when they would not be used for unsigned ranges! You can just do a template edit an add '-' before the post count and also use a <if condition=...> so it works only on certain users or groups of users!


Sonia

Pete_C 03-16-2005 01:08 PM

Thanks, I'll get onto the if condition now :D

::EDIT::

Could someone please verify this please

Code:

<if condition="$userid=='18'">-</if>
My user id on the forum is 18, and this seems the only way of doing it as I don't have access to the databases. would I have to use a different code? bearing in mind I'm not used to the vB variables just yet..

dstruct2k 03-16-2005 05:07 PM

Should work... Why would you want to have negative count, anyways?

Pete_C 03-16-2005 06:07 PM

no real reason other then a joke, although that if statement doesn't seem to work, I've also tried using $bbuserinfo[userid]==18 and $userinfo[userid]==18 but to no avail, can anyone give me the correct syntax, please?

Oblivion Knight 03-16-2005 06:58 PM

Run the following queries:
[sql]ALTER TABLE user MODIFY posts INT(6) DEFAULT 0 NOT NULL;[/sql][sql]ALTER TABLE usertitle MODIFY minposts INT(6);[/sql]All done, you can now set post counts to a negative figure.. :)

Pete_C 03-17-2005 12:24 PM

Cheers mate, but unfortunately I don't have access to the sql databases.

Does anyone know the correct syntax for the if condition to make it userid specific?


All times are GMT. The time now is 04:19 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.01682 seconds
  • Memory Usage 1,719KB
  • 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)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (7)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