Skip to Content Skip to Menu

[#4413] cb substitution for logged user

10 years 9 months ago - 10 years 9 months ago #240428 by thewebsurfer
[#4413] cb substitution for logged user was created by thewebsurfer
hi, quick question:
how can i show something just for logged user (and not in owner page)
[cb:if user_id!="myid" AND user_id>0]

doesnt work
Last edit: 10 years 9 months ago by krileon.

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48477
  • Thanks: 8281
  • Karma: 1443
10 years 9 months ago #240441 by krileon
Replied by krileon on topic cb substitution for logged user
Bottom of the substitution tutorial below has an example of such usage.

www.joomlapolis.com/support/tutorials/107-use-cases/18353-using-substitutions-throughout-cb

[cb:if user="#displayedOrMe" user_id>"0"]I am NOT A GUEST.[/cb:if]


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 or Create an account to join the conversation.

10 years 9 months ago #240449 by thewebsurfer
Replied by thewebsurfer on topic cb substitution for logged user
yeah i tried this too, but there is still a strange problem
this is the whole code
Code:
[cb:if user="#displayedOrMe" user_id>"0" AND cb_usertype!="visitor"]<div class="btn-group"> [menu caption="<i class=\'fa fa-heart\'></i> Became Fan!" img="" class="btn"] _UE_MENU_CONNECTIONS : _UE_ADDCONNECTION[/menu] [menu caption="<i class=\'fa fa-times-circle\'></i> Not Fan anymore :(" img="" class="btn"] _UE_MENU_CONNECTIONS : _UE_REMOVECONNECTION[/menu] <a class="btn dropdown-toggle" href="#" data-toggle="dropdown"> <span class=\'fa fa-caret-down\'></span></a> <ul class="dropdown-menu pull-right"> <li>[menu caption="<i class=\'fa fa-envelope\'></i> Send Email" img="" class=""] _UE_MENU_MESSAGES : _UE_MENU_SENDUSEREMAIL[/menu]</li> <li>[menu caption="<i class=\'fa fa-comments\'></i>Send Private Message" img="" class=""] _UE_MENU_MESSAGES : _UE_PM_USER[/menu]</li> <li>[menu caption="<i class=\'fa fa-exclamation-triangle\'></i>Report User" img="" class=""] _UE_MENU_MODERATE : _UE_REPORTUSER[/menu]</li> </ul> </div>[/cb:if]

when im not logged i still see the following code
Code:
<div class="btn-group"> <a class="btn dropdown-toggle" href="#" data-toggle="dropdown"> <span class="fa fa-caret-down"></span></a> <ul class="dropdown-menu pull-right"> <li></li> <li></li> <li></li> </ul> </div>

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48477
  • Thanks: 8281
  • Karma: 1443
10 years 9 months ago #240479 by krileon
Replied by krileon on topic cb substitution for logged user
It's bugged, we confirmed in 1.9 and 2.0 it's not working for some reason. I'll be investigating to fix in CB 2.0. If possible I'll provide a quickfix for the issue. Bug ticket as follows.

forge.joomlapolis.com/issues/4413


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 or Create an account to join the conversation.

10 years 9 months ago #240482 by thewebsurfer
Replied by thewebsurfer on topic cb substitution for logged user
uhm maybe i can walk around this bug with a registered access delimiter field

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48477
  • Thanks: 8281
  • Karma: 1443
10 years 9 months ago #240491 by krileon
Replied by krileon on topic cb substitution for logged user
That works too, but fields don't have access so you'll need to place it on a tab that's registered access only.


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 or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum