Substitutions parameters | #me, #displayed ...

13 years 7 months ago #139908 by pepperstreet
Sorry, maybe a dumb question, but i am still confused by the substitutions parameters. I read krileon's tutorial page... and the ifs-section at the bottom. But the examples are not clear (to me).

Could someone explain it in really simple words or other examples? Please...
I am currently interested in ways to differentiate between profile owner and visiters.

What is the meaning of:
#me, #displayed, #displayedOrMe

Thanks for listening.

Please Log in to join the conversation.

13 years 7 months ago #139959 by krileon
#me = exactly as it says, the user is me.
#displayed = exactly as it says, the user is the user displayed.
#displayedOrMe = exactly as it says, the user is me or the user being displayed.

Not sure how much more to explain it. Best approach is simply trial and error until you get the desired results.


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.

13 years 7 months ago #139968 by pepperstreet
Replied by pepperstreet on topic Re:Substitutions parameters | #me, #displayed ...
;-) sorry, its me again.
i don´t get the idea in combination with "if" ... what does it mean, when i surround something with IF and DISPLAYED ?

a) i am a visiter of the profile
b) i am the owner of the profile

Please Log in to join the conversation.

13 years 7 months ago #140045 by krileon
It's an IF statement just like in PHP. The $user object used in the substitutions is that of yourself (unless you specify an itemid or something of the sort). So what you're doing is checking that object against various conditions such as IF USER IS DISPLAYED THEN SHOW HELLO would be as follows.

[code:1]
[cb:if user="#displayed"]HELLO[/cb:if]
[/code:1]

Not sure how else to explain it, substitutions are a matter of trial and error until you have the desired results. They're subjective to the location they're being executed at.


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.

13 years 7 months ago #140098 by pepperstreet
Replied by pepperstreet on topic Re:Substitutions parameters | #me, #displayed ...
Thanks for your patience! ;-)

I am thinking about using the cb_content_bot with substitutions for membership-card and acknowledgement. These two prints are normal joomla articles, each filled with substitutions for some user-data.

My first approach (alternative before the content_bot was released), was CB PROFILE PRO. Its o.k. and has many more features, but it gives me a TAB with two jquery sub-pages. I even could hide the content to viewers, which is nessecary, because the tab is part of the profile!

Now i am thinking of two menuitems in the usermenu, and replace CB Profile Pro with two Joomla articles. Not sure if i still need to differentiate between viewer<>owner. But it would be nice to Show/Hide the two links, if a CB checkbox says NO! This is a task for content_module, right?

If i can´t hide the menulinks, i could hide the Article-content dependent on a CB checkbox field... i guess, this is possible with CB:IF , right?!


Post edited by: pepperstreet, at: 2010/08/17 00:50
EDIT: CB Content bot (hence the name!) is not J!1.5 native ???!!!


Post edited by: pepperstreet, at: 2010/08/17 03:29

Please Log in to join the conversation.

13 years 7 months ago #140116 by krileon

This is a task for content_module, right?

Yes, as you can use substitutions within CB Content module.

If i can´t hide the menulinks, i could hide the Article-content dependent on a CB checkbox field... i guess, this is possible with CB:IF , right?!

Correct, complex IF substitutions will give you the desired results.

EDIT: CB Content bot (hence the name!) is not J!1.5 native ???!!!

Yes it is, it just features a dual install XML in the same manner CBSubs bot is. Do some minor renaming of the XMLs and it'll pass the native check.


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.

Moderators: beatnantkrileon
Time to create page: 0.208 seconds

Facebook Twitter LinkedIn