Skip to main content
Skip to login
Skip to sign up
Skip to menu
Facebook
Twitter
Youtube
Log in
Sign up
Home
Community Builder
Add-ons
CB Quickstart
CB Paid Subscriptions
CB Activity
CB Gallery
CB GroupJive
CB Auto Actions
More ...
Memberships
Demo
Downloads
News
Featured
Releases
Blog
Support
Resources
Localization
Documentation
Videos
Forge
About Us
Help Me
Help Us Help You
FAQ
Forums
Warranty
Contact Us
Index
Recent Support Topics
New Support Topics
Recent Topics
Etiquette
Search
Index
Recent Support Topics
New Support Topics
Recent Topics
Etiquette
Search
Forums
Archive
CB
CB 1.0 RC2
Usability
cb_categorie variable (Field Manager)
cb_categorie variable (Field Manager)
Start
Prev
1
2
Next
End
1
2
Jacob
OFFLINE
Premium Member
Posts: 123
Thanks: 17
Karma: 8
18 years 2 weeks ago
#10057
by
Jacob
cb_categorie variable (Field Manager)
was created by
Jacob
I'm wondering if its possible to detect the value of the "cb_categorie" after a user is logged in.
I'd like to make some template changes based on different user categories.
Much appreciated!
Jacob
Joomla Development and Support since 2005
Please
Log in
to join the conversation.
mikko
OFFLINE
Platinum Member
Posts: 2223
Thanks: 2
Karma: 115
18 years 2 weeks ago
#10066
by
mikko
Replied by
mikko
on topic
Re:cb_categorie variable (Field Manager)
You need to make an sql query to table #__comprofiler with the user id to get data.
mikko
Please
Log in
to join the conversation.
Jacob
OFFLINE
Premium Member
Posts: 123
Thanks: 17
Karma: 8
18 years 2 weeks ago
#10078
by
Jacob
Replied by
Jacob
on topic
Re:cb_categorie variable (Field Manager)
Mikko,
Thanks for the quick reply.
Can you help me with writing this query, my php/mysql knowledge aren't one of my strengths.
Thanks
Jacob
Joomla Development and Support since 2005
Please
Log in
to join the conversation.
mikko
OFFLINE
Platinum Member
Posts: 2223
Thanks: 2
Karma: 115
18 years 2 weeks ago
#10082
by
mikko
Replied by
mikko
on topic
Re:cb_categorie variable (Field Manager)
See the source. Plenty of examples there. Try grep -R "from #__comprofiler" * to find some.
-Mikko
Please
Log in
to join the conversation.
Jacob
OFFLINE
Premium Member
Posts: 123
Thanks: 17
Karma: 8
18 years 1 week ago
#10143
by
Jacob
Replied by
Jacob
on topic
Re:cb_categorie variable (Field Manager)
here's the query I got so far, let me know if its correct:
[code:1]
$query = "SELECT cb_categorie, id FROM #__comprofiler"
."\n WHERE id = ". $my->id;
$cat= $database->loadResult();
echo $cat;
[/code:1]
I put this code in my template and logged in via front end, didnt see anything echo'd out.
Any help is appreciated.
Jacob
Joomla Development and Support since 2005
Please
Log in
to join the conversation.
mikko
OFFLINE
Platinum Member
Posts: 2223
Thanks: 2
Karma: 115
18 years 1 week ago
#10159
by
mikko
Replied by
mikko
on topic
Re:cb_categorie variable (Field Manager)
Looks OK to me. Good that you got it right!
If you experience performance issues, you could consider storing the field you fetch to the session, but this is much more compicated.
-mikko
Please
Log in
to join the conversation.
Start
Prev
1
2
Next
End
1
2
Moderators:
beat
,
nant
,
krileon
Forums
Archive
CB
CB 1.0 RC2
Usability
cb_categorie variable (Field Manager)
Time to create page: 0.244 seconds
Powered by
Kunena Forum
Search
Login / Logout
Remember Me
Log in
Menu
Home
Community Builder
Add-ons
CB Quickstart
CB Paid Subscriptions
CB Activity
CB Gallery
CB GroupJive
CB Auto Actions
More ...
Memberships
Demo
Downloads
News
Featured
Releases
Blog
Support
Resources
Localization
Documentation
Videos
Forge
About Us
Help Me
Help Us Help You
FAQ
Forums
Warranty
Contact Us
User Menu
Forgot Login
Sign Up