HTML Logo by World Wide Web Consortium (www.w3.org). Click to learn more about our commitment to accessibility and standards.

Moving forward with Composr

ocPortal has been relaunched as Composr CMS, which is now in beta. ocPortal 9 will be superseded by Composr 10.

Head over to compo.sr for our new site, and to our migration roadmap. Existing ocPortal member accounts have been mirrored.


Understanding templates

Login / Search

 [ Join | More ]
 Add topic 
Posted
Rating:
#103720 (In Topic #20278)

Non-joined user

What is this stuff?

Someone please translate the line below from a template file and let me know:
1)  What piece of software parses this line
2)  Where I can find documentation on the syntax
3)  Please tell me what CEDI is and means

{+START,IF,{$AND,{$PREG_MATCH,^http:,{$BASE_URL}},{$NOT,{$MOBILE}}}}

Thanks for the help.
Regards,
Steve White

Former JOOMLA, Tiki Wiki, MyBB administrator

PS:  Any plans to integrate Bootstrap fonts into ocPortal?

Back to the top
 
Posted
Rating:
#103721

Fan in training

I am the poster of the above topic and it is my first post.  My session timed out before I posted which is why it is posted as Guest.  Real noobie error!
Back to the top
 
Posted
Item has a rating of 5 (Liked by Steven Jarvis)  
Rating:
#103722
Avatar

Well-settled

Hi Steve,

  1. ocPortal does itself.
  2. It is Tempcode, see Tempcode programming tutorial.
  3. It's now known as Wiki+, that should Google. It's gone through a few name changes.

That Tempcode line is one of the more complex ones.

Bootstrap fonts… you could do it yourself easily enough I think. Any normal web libraries can be linked in to the templates.
Back to the top
 
Posted
Item has a rating of 5 (Liked by Steven Jarvis)  
Rating:
#103767
Avatar

Community saint

Hi Steve.

To try to be a little more specific:

1. Yes ocPortal does the parsing.

2. Good tutorial on Tempcode found here: ocPortal Tutorial: Tempcode programming - ocPortal

3. As duder said CEDI is now Wiki+ (which the new name should make obvious its purpose) but the old name I believe stood for Community (not sure the "e" was maybe edited) Documentation Initiative (but I believe it was also referred to be other similar names)

If you understand php the tempcode line you asked is similar to this in php

Code

IF ((preg_match(^http:,{$BASE_URL}))&& $_SERVER['HTTP_USER_AGENT' != "mobile")
DO SOME STUFF

Well not exactly the php equivalent but you should get the idea.
Back to the top
 
There are too many online users to list.
Control functions:

Quick reply   Contract

Your name:
Your message: