<!-- startif --> syntax in Custom content

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
scotch33
Dev Team Member
Dev Team Member
Posts: 284
Joined: Tue Feb 14, 2006 9:56 pm

<!-- startif --> syntax in Custom content

Post by scotch33 »

Hi - I need three options in my custom content -

1 -  a message to non registered users
2 - a message to rgistered users pending approval (in my case the site owner approves by moving the registered user from 'pending' to 'member' groups)
3.  the content itself for approved members.

I can get two options playing, but the middle on is not playing.  I have tried elseif which didn't work, tried nesting the startif s and tried to end one if and start the next and that hasn't played either.  Can anyone help me - i am sure i am just being a bit dim.

???
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm
Location: Fernie British Columbia, Canada

Re: <!-- startif --> syntax in Custom content

Post by calguy1000 »

unfortunately, no you're not being dense on this one, the parser in customcontent is very ameteurish (I can say that, I wrote it :) ).  it doesn't support elseif, or nested if's.

Hmmm, you could do two seperate (but not nested) if statements though.  Something like:

Code: Select all

<!--customContent: startif group=Pending -->
Your membership is pending approval
<!--customContent: endif -->

<!--customContent: startif group=Members -->
You are authorized to see special stuff
<!--customContent: else -->
You are not yet authorized to see the special stuff.  If you have already registered, then you can ignore this message.  If you haven't already registered, then go to the registration page and sign up.
<!--customContent: endif -->
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
scotch33
Dev Team Member
Dev Team Member
Posts: 284
Joined: Tue Feb 14, 2006 9:56 pm

Re: <!-- startif --> syntax in Custom content

Post by scotch33 »

thanks mate, that will do me very nicely - implementing it now.
Post Reply

Return to “Modules/Add-Ons”