https://www.icyphoenix.com/viewtopic.php?f=4&t=4157
-----------------------------------
Limun
Sun 04 May, 2008 11:24

CUSTOMIZATION - Ranks
-----------------------------------
I have this problem...
some members in their "user menade" have in:
rank 1 title - Automatic ranks by posts    and others have
rank 2 title - Automatic ranks by days

so to some members  ranks above avatar is shown (to this who have ranks by posts)
ant to others it not show (to this who have ranks by days)

i dont know why this is becomed different affter upgrading to icy....

 [img]http://www.icyphoenix.com/files/images/3336/ranking.jpg[/img] 

so question is....
any way to made this for all members same...
i want that all members have "rank 1 title - Automatic ranks by posts" like default

i have 5600 members please dont tell me that i will have to do it manualy one by one  :shock: 

thanks


-----------------------------------
KasLimon
Sun 04 May, 2008 23:32

Re: Ranking
-----------------------------------
This query will set all existing users to rank by posts:

[b]REPLACE ip_ WITH YOUR TABLE PREFIX[/b]
Specify the user ids you want to exclude in the highlighted part, separated by commas. Please do exclude anonymous (-1). All users excluded will not be affected by this query.
[code linenumbers=false]UPDATE `ip_users` SET `user_rank` = '0' WHERE `user_id` NOT IN ([highlight]-1,2,3[/highlight]);[/code]

Greets!


-----------------------------------
Limun
Mon 05 May, 2008 02:59

Re: Ranking
-----------------------------------
[quote user="KasLimon" post="28241"]This query will set all existing users to rank by posts:

[b]REPLACE ip_ WITH YOUR TABLE PREFIX[/b]
Specify the user ids you want to exclude in the highlighted part, separated by commas. Please do exclude anonymous (-1). All users excluded will not be affected by this query.
[code linenumbers=false]UPDATE `ip_users` SET `user_rank` = '0' WHERE `user_id` NOT IN ([highlight]-1,2,3[/highlight]);[/code]

Greets![/quote]

so i need to put only -1 and all members will be users with rank by posts ?

thanks Kas


-----------------------------------
KasLimon
Mon 05 May, 2008 15:46

Re: Ranking
-----------------------------------
Yes :mricy:


-----------------------------------
Limun
Mon 05 May, 2008 15:47

Re: Ranking
-----------------------------------
[quote user="KasLimon" post="28260"]Yes :mricy: Yes :mricy: Yes :mricy: Yes :mricy: [/quote]

thank you...i will report it when i made it...  :mrgreen:


-----------------------------------
Limun
Mon 14 Jul, 2008 12:29

Re: Ranking
-----------------------------------
ok it worked perfectly  :) 

i made a mistake because i didnt thinked on administrators and moderators ranks , so they also becomed users by posts  :mrviolet: 

thats why NOT IN (-1,2,3); u talked and i didnt thinked about  :mrorange: 

but i restored administrators and moderators ranks manualy (better this than 3000 members )  :mricy: 

thank you very much KasL


-----------------------------------
Limun
Thu 07 Aug, 2008 03:06

Re: SOLVED - Ranking
-----------------------------------
now i have trouble again with this  :? 

every new user is automactly added "rank 2 title - Automatic ranks by days" by default on when is registred

how to put it on "rank 1 title - Automatic ranks by posts" by default when is registred ?

thanks


-----------------------------------
andrea75
Thu 07 Aug, 2008 18:10

Re: SOLVED - Ranking
-----------------------------------
[quote user="Limun" post="30350"]now i have trouble again with this  :? 

every new user is automactly added "rank 2 title - Automatic ranks by days" by default on when is registred

how to put it on "rank 1 title - Automatic ranks by posts" by default when is registred ?

thanks[/quote]

I have the same problem... I have tried to find a solution, but without success.


-----------------------------------
novice programmer
Thu 07 Aug, 2008 18:25

Re: Ranking
-----------------------------------
Removing Solved tag....

Perhaps you should change the "0" for a "1" or "-1"


-----------------------------------
andrea75
Thu 07 Aug, 2008 18:27

Re: SOLVED - Ranking
-----------------------------------
Uhmmmm... maybe a find the solution, but I think is better if someone more expert confirm.

Try to execute this query:

[code linenumbers=false]ALTER TABLE `phpbb_users` CHANGE `user_rank2` `user_rank2` INT( 11 ) NULL DEFAULT '-2'[/code]

[hr]

[b][color=red]EDIT:[/color][/b] [size=10](I can't post another message because I'm the last user that post and is not passed one day since this post... it's a new function! :mricy: )[/size]

[quote user="KasLimon" post="28241"]This query will set all existing users to rank by posts:

[b]REPLACE ip_ WITH YOUR TABLE PREFIX[/b]
Specify the user ids you want to exclude in the highlighted part, separated by commas. Please do exclude anonymous (-1). All users excluded will not be affected by this query.
[code linenumbers=false]UPDATE `ip_users` SET `user_rank` = '0' WHERE `user_id` NOT IN ([highlight]-1,2,3[/highlight]);[/code]

Greets![/quote]

Uhmmmm.... I think that could be enough to execute this query:

[code linenumbers=false]UPDATE phpbb_users SET user_rank2 = '-2' WHERE user_rank2 = '-1' [/code]

Because I see that [b]Limun[/b] (but I was the same problem) has got rank by days on rank2. It's right? :oops:


-----------------------------------
Limun
Fri 08 Aug, 2008 00:28

Re: Ranking
-----------------------------------
i m confused now  :? 

all i want that rank1 is "ranking by posts" as default also when new members register
rank2 is not important .... it can be empty


-----------------------------------
andrea75
Fri 08 Aug, 2008 09:57

Re: Ranking
-----------------------------------
[quote user="Limun" post="30373"]i m confused now  :? 

all i want that rank1 is "ranking by posts" as default also when new members register
rank2 is not important .... it can be empty[/quote]

To do this I have executed this queries:

[code linenumbers=false]ALTER TABLE `phpbb_users` CHANGE `user_rank2` `user_rank2` INT( 11 ) NULL DEFAULT '-2'[/code]

This set as default for new members only first rank (by posts), and remove the second (by days)

[code linenumbers=false]UPDATE phpbb_users SET user_rank2 = '-2' WHERE user_rank2 = '-1' [/code]

This empty the second rank for old members that has got "ranking by days" on their profile, but I think that you don't need to do this, because you have made the same thing with query that [b]KasLimon[/b] suggest you, even if that don't need to set again all ranks for admin, mod, ecc. ecc.


-----------------------------------
Limun
Fri 08 Aug, 2008 11:32

Re: Ranking
-----------------------------------
hmmm

so whic one of those 2 i need to do 

as i see all is about user_rank2 , i dont see user_rank  :oops:


-----------------------------------
andrea75
Fri 08 Aug, 2008 12:36

Re: Ranking
-----------------------------------
[quote user="Limun" post="30382"]hmmm

so whic one of those 2 i need to do 

as i see all is about user_rank2 , i dont see user_rank  :oops:[/quote]

Use only first.... 
You don't see user_rank because this rank is ok. The problem, if u see the first image you post, is on user_rank2, that by default is actually set on "ranking by days". With first query I post above you'll set as empty rank2 by default, so all new users will have only "ranking by post" on their profile.
I hope you can understand now.....


-----------------------------------
Limun
Fri 08 Aug, 2008 12:41

Re: Ranking
-----------------------------------
[quote user="andrea75" post="30384"][quote user="Limun" post="30382"]hmmm

so whic one of those 2 i need to do 

as i see all is about user_rank2 , i dont see user_rank  :oops:[/quote]

Use only first.... 
You don't see user_rank because this rank is ok. The problem, if u see the first image you post, is on user_rank2, that by default is actually set on "ranking by days". With first query I post above you'll set as empty rank2 by default, so all new users will have only "ranking by post" on their profile.
I hope you can understand now.....[/quote]

but my rank1 is empty to all who is new registred (my first picture is before this new problem)

see this pic-this is newest registred member

 [img]http://www.icyphoenix.com/files/images/3336/abbba.png[/img]


-----------------------------------
andrea75
Fri 08 Aug, 2008 14:42

Re: Ranking
-----------------------------------
[quote user="Limun" post="30385"][quote user="andrea75" post="30384"][quote user="Limun" post="30382"]hmmm

so whic one of those 2 i need to do 

as i see all is about user_rank2 , i dont see user_rank  :oops:[/quote]

Use only first.... 
You don't see user_rank because this rank is ok. The problem, if u see the first image you post, is on user_rank2, that by default is actually set on "ranking by days". With first query I post above you'll set as empty rank2 by default, so all new users will have only "ranking by post" on their profile.
I hope you can understand now.....[/quote]

but my rank1 is empty to all who is new registred (my first picture is before this new problem)

see this pic-this is newest registred member

 [img]http://www.icyphoenix.com/files/images/3336/abbba.png[/img][/quote]

Check in phpmyadmin what is the default value for user_rank, and make sure that it were "0".


-----------------------------------
Limun
Fri 08 Aug, 2008 15:51

Re: Ranking
-----------------------------------
see pic  :oops: 

[img]http://www.icyphoenix.com/files/images/3336/rnk.png[/img]

"Da" mean "Yes"


-----------------------------------
andrea75
Fri 08 Aug, 2008 17:04

Re: Ranking
-----------------------------------
[quote user="Limun" post="30390"]see pic  :oops: 

[img]http://www.icyphoenix.com/files/images/3336/rnk.png[/img]

"Da" mean "Yes"[/quote]

Uhmmmm... try this:

[code linenumbers=false]ALTER TABLE `phpbb_users` CHANGE `user_rank` `user_rank` INT( 11 ) NULL DEFAULT '0';
ALTER TABLE `phpbb_users` CHANGE `user_rank2` `user_rank2` INT( 11 ) NULL DEFAULT '-2';[/code]

This should work.


-----------------------------------
Limun
Sat 09 Aug, 2008 01:07

Re: Ranking
-----------------------------------
yes it work on my test forum..
i didnt ttryed in real one,because i cant export database from phpmyadmin i dunno why ...i get 0 mb and from ACP database is around 170mb

i will report when i done it on real forum

thank you  andrea75 for your help :)


-----------------------------------
andrea75
Sat 09 Aug, 2008 09:17

Re: Ranking
-----------------------------------
You're welcome! ;)


-----------------------------------
Limun
Thu 14 Aug, 2008 16:15

Re: Ranking
-----------------------------------
Fixed...

thank you again andrea75 very much  [img]http://www.icyphoenix.com/images/smiles/0007.gif[/img]


-----------------------------------
novice programmer
Fri 22 Aug, 2008 09:35

Re: [Solved] Ranking
-----------------------------------
Locking and moving to faqs.


-----------------------------------
Mighty Gorgon
Thu 28 Aug, 2008 15:05

Re: [Solved] Ranking
-----------------------------------
There is no need to lock this.

Please lock only when strictly needed.


