[SOLVED] forum rank problem in CB profiles

14 years 11 months ago #99690 by woonydanny
[SOLVED] forum rank problem in CB profiles was created by woonydanny
I have just upgraded my site from CB1.2 to CB1.2.1 and also Kunena 1.08 to Kunena 1.0.10.

My problem i am having is that in the CB profiles the ranks of each user is not matching the ranks from Kunena.

For example, i have a moderator who has the rank of moderator in the forum and has the rank image of the 5 blue squares, but in his CB profile (with the forum integration plugin set to show forum stuff) it shows him as the rank of administrator and with the rank image of the 5 red squares.

Also a user who has 2000 posts is not showing as a vip (rank i have created in kunena) but as a fresh user.

Is this a bug or something that i have missed whilst upgrading.

thanks :)

Post edited by: krileon, at: 2009/08/14 15:14

Please Log in to join the conversation.

14 years 11 months ago #100020 by JBHawaii
Replied by JBHawaii on topic Re:forum rank problem in CB profiles
I have this problem 2, now I am wondering how to fix it.

Please Log in to join the conversation.

14 years 11 months ago #100046 by JBHawaii
Replied by JBHawaii on topic [Solved] Re:forum rank problem in CB profiles
Here is what I did to resolve this!

open: "/components/com_comprofiler/plugin/user/plug_cbsimpleboardtab/cb.simpleboardtab.model.php"

Find:
[code:1]Line: 100 -> if ( $forum->config )[/code:1]

Comment out
[code:1]Line: 101 -> $uIsAdm = isModerator( $user->id );[/code:1]

Comment out
[code:1]Line: 102 -> $uIsMod = $userDetails->moderator;[/code:1]

Find & Comment out:
[code:1]Line: 130-137 -> if ( $uIsMod ) {
$rText = CBTxt::T( 'Moderator' );
$rImg = $pathImage . '/ranks/rankmod.gif';
}
if ( $uIsAdm ) {
$rText = CBTxt::T( 'Administrator' );
$rImg = $pathImage . '/ranks/rankadmin.gif';
}[/code:1]

Finished, now upload your modified file.

Note* I couldn't wait around for someone so I figured it out myself.

Mahalo,
JBHawaii

Post edited by: JBHawaii, at: 2009/05/27 05:26

Post edited by: JBHawaii, at: 2009/05/27 05:28

Please Log in to join the conversation.

14 years 11 months ago #100065 by beat
JBHawaii wrote:

...

Note* I couldn't wait around for someone so I figured it out myself.

Mahalo,
JBHawaii

Post edited by: JBHawaii, at: 2009/05/27 05:26

Post edited by: JBHawaii, at: 2009/05/27 05:28


Cool, thanks for moving forward, and contributing to the community, by helping. Highly appreciated. That's how open-source projects work. :)

Karma for you. B)

Beat - Community Builder Team Member

Before posting on forums: Read FAQ thoroughly -- Help us spend more time coding by helping others in this forum, many thanks :)
CB links: Our membership - CBSubs - Templates - Hosting - Forge - Send me a Private Message (PM) only for private/confidential info

Please Log in to join the conversation.

14 years 11 months ago #100078 by woonydanny
Replied by woonydanny on topic Re:[Solved] Re:forum rank problem in CB profiles
Thankyou

This has corrected the Moderator and Administrator issue but the issue still exists where every user (not admin or moderator) still says they are 'fresh users' instead of the ranks i have created in kunena.

Any ideas? :(

Post edited by: peetree21, at: 2009/05/27 12:26

Please Log in to join the conversation.

14 years 11 months ago #100084 by krileon
Kunena does not appear to be using the Rank value in the database. I've restructured the query to fix this issue.

Option 1: Replace query
In: cb.simpleboardtab.model.php
On: 105
From:
[code:1]
$query = 'SELECT ' . $_CB_database->NameQuote( 'rank_title' )
. ', ' . $_CB_database->NameQuote( 'rank_image' )
. "\n FROM " . $_CB_database->NameQuote( '#__' . $forum->prefix . '_ranks' )
. "\n WHERE " . $_CB_database->NameQuote( 'rank_id' ) . " = " . ( (int) $userDetails->rank ? (int) $userDetails->rank : 1 )
;
[/code:1]
To:
[code:1]
$query = 'SELECT ' . $_CB_database->NameQuote( 'rank_title' )
. ', ' . $_CB_database->NameQuote( 'rank_image' )
. "\n FROM " . $_CB_database->NameQuote( '#__' . $forum->prefix . '_ranks' )
. "\n WHERE " . $_CB_database->NameQuote( 'rank_min' ) . ' <= ' . (int) $userDetails->posts
. "\n ORDER BY " . $_CB_database->NameQuote( 'rank_min' ) . ' DESC'
;
[/code:1]

Option 2: Replace file

Attachment cb-ad3f20701c84ffdb91c22176d4d6fe44.zip not found



Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.
Attachments:

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.197 seconds

Facebook Twitter LinkedIn