The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
need help "adjusting" how the member number is displayed:
OK, I messed up the import from SMF. Somehow the member numbers ended up being a little too high, and our members want their numbers displayed in the area under their username...
Here's the code I have in the postbit_legacy now to do this: Code:
<b>Member#:</b> $post[userid] Code:
if userid < 176 <b>Member#:</b> $post[userid] else <b>Member#:</b> $post[userid-338] Thanks, Ben |
#2
|
|||
|
|||
How do you mean that your numbers are off?
The userid is a number internally used to identify a member, but has no meaning at all. There is no reason to change it. |
#3
|
|||
|
|||
$post is a named array.
"userid" is an index. So, if you want to do this in templates, you cannot. You need to change showthread.php before userid was been used. Use hooks. |
#4
|
|||
|
|||
Quote:
We display the userid as a member number in each post. It's something our members want to have displayed, so it needs to be sorted out. What happened is that when we imported the db for the test, that brought in 170 members. Then when we did it again, somehow those first 170 weren't removed (they were gone, but the numbers picked up at 170) so everyone was 170 higher than they should have been. Then I shut down the forum and redid it again to get everyone correct by doing the import twice and that reset everyone back down to their original numbers... But then each new member would cause a db error because they were overwriting old locations. This would lock them out of their new account but it had the right member number. To fix the db errors the guys at vB reset the pointers, but they reset them to ~510... So all the original members are coming up correct, but all the new members are coming in above 500... Basically we're missing 330 member numbers the way it's displayed. I know I can reinstall vB, make a new db, and do a fresh import to cure it, but if I can just subtract a given number from anyone with a userid above 170 then this way would work w/o having to close the forum down again. I know the actual userid doesn't matter, but my members want to have their member number displayed, so I need it just for that reason. Purely cosmetic. That's why I'd prefer to do some math on the number as it's displayed over doing an entire install/import again as I'll have to set everything up all over again which will take me a few days... Thanks, Ben |
#5
|
||||
|
||||
Your best bet is to redo it again.
Did you try using the Maintence tools to rebuild userinfo and all that stuff? |
#6
|
|||
|
|||
You should never be messing with the id's that are automatically generated. This is a sure way to mess things up beyond repair.
As i see it you only have the following options: - Just display the (new) userid. Who cares if there are numbers missing. - Substract a fix number from the userid and display this as some kind of membernumber. - Create a User Profile Field to hold an admin set number and display this. |
#7
|
|||
|
|||
Quote:
Quote:
Make sense? |
#8
|
|||
|
|||
Not really makes sense yet.
- There is no way of knowing if the members on your old board are loaded in the same order. So old userid 1 could now be 339, but old if 2 can now be 400. - you are teaching your members to use numbers that are not used anymore. This could lead to confusion (link to member profile with userid = 1, will not give the expected member with userid=339). |
#9
|
|||
|
|||
all the usersids are in order. Everyone that was there before the switch to vB has their correct number, it's just that any new user is 338 higher than they should be. In every case so far, that's how it's working.
and it's just to display Member #:1 on their profiles in their posts.... These guys love to have that so they feel like an original member... IE the guys in the 50s feel cooler than the n00bs coming in at 18x now... It's very superficial, but it's what they want so I'm going to have it there. I just finished uploading a fresh vB install with a new db and I put impex in there too. So I'm all set to go at this point. I just have to double check all the settings, then import it w/o "testing" it first this time. I figure if it works (vB -> vB should be cake) then I'm all set. If it doesn't, I just turn the old version back on and figure out what I did wrong. |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|