Skip to Content Skip to Menu

[SOLVED] CB Progress in Module

  • krileon
  • krileon
  • ONLINE
  • Posts: 48479
  • Thanks: 8283
  • Karma: 1443
9 years 9 months ago #257445 by krileon
Replied by krileon on topic CB Progress in Module
Try using cb_progress>"0". Aside from that I've no idea as I've no idea how advanced module manager is testing if the module is empty or not.


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.

  • fribse2011
  • fribse2011
  • OFFLINE
  • Posts: 921
  • Thanks: 79
  • Karma: 8
9 years 9 months ago #257754 by fribse2011
Replied by fribse2011 on topic CB Progress in Module
Well, what I wonder is what's the difference.
If I don't have the 'if' sentence it does say that it's empty, and if I use it, it says that it's not empty.
I'll try and see if I can find any difference in the source...

Best regards
Fribse

Frømandsklubben Nikon, www.nikondyk.dk
We're a volunteer driven diving club in Ishøj, Denmark.
Har du brug for en dykkerklub der rummer alle, så kom ned til os.

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48479
  • Thanks: 8283
  • Karma: 1443
9 years 9 months ago #257782 by krileon
Replied by krileon on topic CB Progress in Module
You would need to edit Advanced Module Manager at its empty check code and var dump the values it's comparing. Aside from that I don't know what to tell you as I've no idea what it's comparing.


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.

  • fribse2011
  • fribse2011
  • OFFLINE
  • Posts: 921
  • Thanks: 79
  • Karma: 8
9 years 9 months ago - 9 years 9 months ago #257911 by fribse2011
Replied by fribse2011 on topic CB Progress in Module
Somehow the "if" sentence does odd stuff:
If I insert this:
Code:
[cb:if cb_progress!=""]<a href="/personlig/din-profil">[cb:userfield field="cb_progress" /]</a>[/cb:if]
And the cb_progress is empty, the source html file shows this:
Code:
<div> <h3 class="module">Din<span> profil er ikke komplet</span></h3> <div class="content-module"> <div class="cbcontentlight3 color cb_template cb_template_default"> <a href="/personlig/din-profil"></a></div> </div> </div>
Now why does it show a hyperlink in there???

If I remove the 'if' sentence and the link stuff, and just leave the 'cb_progress' part there, it doesn't output anything, so it really is empty, and the 'if sentence' is 'false'

Best regards
Fribse

Frømandsklubben Nikon, www.nikondyk.dk
We're a volunteer driven diving club in Ishøj, Denmark.
Har du brug for en dykkerklub der rummer alle, så kom ned til os.
Last edit: 9 years 9 months ago by fribse2011.

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48479
  • Thanks: 8283
  • Karma: 1443
9 years 9 months ago #257916 by krileon
Replied by krileon on topic CB Progress in Module
Try the below condition. Your issue implies the condition is always coming out true. Progress fields can't be empty. Their minimum value is 0. The output value between 0 and 100 to signify completeness.

[cb:if cb_progress>"0"]CONTENT_HERE[/cb:if]

Also ensure you're using latest CB Progress Field 3.0.3.


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.

  • fribse2011
  • fribse2011
  • OFFLINE
  • Posts: 921
  • Thanks: 79
  • Karma: 8
9 years 9 months ago #257918 by fribse2011
Replied by fribse2011 on topic CB Progress in Module
Ahh, I see, I changed it to this:
Code:
[cb:if cb_progress<"100"]<a href="/personlig/din-profil">[cb:userfield field="cb_progress" /]</a>[/cb:if]
That seems to do the trick.

Best regards
Fribse

Frømandsklubben Nikon, www.nikondyk.dk
We're a volunteer driven diving club in Ishøj, Denmark.
Har du brug for en dykkerklub der rummer alle, så kom ned til os.
The following user(s) said Thank You: nant

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

Moderators: beatnantkrileon
Powered by Kunena Forum