[SOLVED] forum rank problem in CB profiles

14 years 9 months ago #107951 by DeviDarkL
Replied by DeviDarkL on topic Re:forum rank problem in CB profiles
Hi,

I tried to make special ranks work but I don't know enough php to do that.

The code posted somewhere in this topics fetches the rank by number of posts so it'll never work for special ranks. Therefore, my ideia is to fetch the rank by userid and rank_id.

I did this:
[code:1] $query = 'SELECT r.' . $_CB_database->NameQuote( 'rank_title' )
. ', r.' . $_CB_database->NameQuote( 'rank_image' )
. ', r.' . $_CB_database->NameQuote( 'rank_id' )
. ', u.' . $_CB_database->NameQuote( 'userid' )
. ', u.' . $_CB_database->NameQuote( 'rank' )
. "\n FROM " . $_CB_database->NameQuote( '#__' . $forum->prefix . '_ranks' ). 'AS r'
. "\n AND " . $_CB_database->NameQuote( '#__' . $forum->prefix . '_users' ). 'AS u'
. "\n WHERE u." . $_CB_database->NameQuote( 'userid' ) . ' = ' . (int) $user->id
. "\n AND u." . $_CB_database->NameQuote( 'rank' ) . ' = r.' . $_CB_database->NameQuote( 'rank_id' )
;[/code:1]

But now the ranks are not appearing in the profile. What's wrong with the code? What's the error?

I knew how to pick up data from the db in SMF but since I moved on to Joomla nothing I do really works as I planned to :pinch:

So, I'm trying to learn a bit :lol:

If someone could help me, i would be very grateful

(sorry for my English by the way)

Please Log in to join the conversation.

14 years 9 months ago #107984 by krileon


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.

Please Log in to join the conversation.

14 years 9 months ago #108007 by DeviDarkL
Replied by DeviDarkL on topic Re:forum rank problem in CB profiles
Oh... Sorry for not searching that well :(

It worked, thanks :laugh:

Please Log in to join the conversation.

14 years 5 months ago #119065 by CGIcon
Replied by CGIcon on topic Re:forum rank problem in CB profiles
After searching - both rank and unsubscribe issues were solved - thank you to all the work done to resolve these issues!!

:woohoo:

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.276 seconds

Facebook Twitter LinkedIn