CPF_VALUE broken after update

Post

Posted
Rating:
#6929 (In Topic #1840)
Avatar
Standard member
Terry is in the usergroup ‘Well-settled’
Updated today. So far everything's still there except the little radio player. I added a CPF value to allow people to allow music from the player to be autoplay or not autoplay. The player is on the landing page. The following code worked until the update today:


<tempcode params="{+START,IF,{$EQ,{$CPF_VALUE,43,{$MEMBER},1}, 1}}"><iframe height="425" src="https://www.reliastream.com/player/PaganRadio?autoplay=true" width="99%"></iframe> </tempcode>

<tempcode params="{+START,IF,{$EQ,{$CPF_VALUE,43,{$MEMBER},1}, 0}}"><iframe height="425" src="https://www.reliastream.com/player/PaganRadio?autoplay=false" width="99%"></iframe> </tempcode><br />

(there is an autoplay argument in the link that indicates yes or no)

In a test, {$CPF_VALUE,43,{$MEMBER},1}, 1}} seems now to return Yes and No, and not 1 and 0 like it used to before to update. I changed the code to try to use Yes and No, instead of 1 and 0, but it didn't work.

Any ideas folks?
 
Online now: No Back to the top

Post

Posted
Rating:
#6935
Avatar
Site director
Chris Graham is in the usergroup ‘Administrators’
{$CPF_VALUE,43,{$MEMBER},1} should be just {$CPF_VALUE,43,{$MEMBER}} I think.

Previously that final '1' parameter did nothing, now it flags Composr to use the rendered rather than raw value of the CPF value.

i.e. we added a new feature that by coincidence overlaps with a non-existent parameter you had been using.


Become a fan of Composr on Facebook or add me as a friend. Add me on on Mastodon. Follow me on Minds (where I am most active). Support me on Patreon

Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about Composr whenever you see the opportunity or support me on Patreon.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying Composr on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Online now: No Back to the top
1 guest and 0 members have just viewed this.
Back to Top