The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
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? |
#2
|
|||
|
|||
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 |
#3
|
|||
|
|||
Thanks, I'll get onto the if condition now
::EDIT:: Could someone please verify this please Code:
<if condition="$userid=='18'">-</if> |
#4
|
||||
|
||||
Should work... Why would you want to have negative count, anyways?
|
#5
|
|||
|
|||
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?
|
#6
|
||||
|
||||
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.. |
#7
|
|||
|
|||
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? |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|