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.


Missing symbols and directives in Tempcode programming tutorial

Login / Search

 [ Join | More ]
 Add topic 
Posted
Item has a rating of 5 (Liked by Arbo)  
Rating:
#90605 (In Topic #18304)
Avatar

Community saint

After finding that the $CONFIG_OPTION symbol was missing from the Tempcode programming tutorial, I did a quick programmatic comparison of the tutorial against the symbols and directives defined in symbols.php (v7.0.1) and have identified issues with the following items:

Directives:

NOT_IN_ARRAY
SHIFT_ENCODE

Symbols:

$BRAND_BASE_URL
$BRAND_NAME
$CONFIG_OPTION
$COPPA_ON
$CSS_INCLUDE
$DIV_FLOAT
$GROUP_ID
$GROUP_NAME
$HAS_JS
$HAS_SPECIFIC_PERMISSION
$HIDDENS_FOR_GET_FORM
$HIDE_HELP_PANEL
$IS_HTTPAUTH_LOGIN
$IS_SUPER_ADMIN
$JAVASCRIPT_INCLUDE
$KEYWORDS_SPACED
$LAST_VISIT_TIME
$MEMBER
$NUM_NEW_POSTS
$NUM_NEW_TOPICS
$OCF_RANK_IMAGE
$PAGE_LINK
$PANEL_WIDTH
$PANEL_WIDTH_SPACED
$SESSION_HASHED
$SHIFT_DECODE
$SHOW_DOCS
$URL_FOR_GET_FORM
$VALUE_OPTION

Random sampling of the above show that most appear to be missing completely from the tutorial, while at least two are documented but have typo's (OCF_RANK_IMAGES should be OCF_RANK_IMAGE and PAGE_LINK should be $PAGE_LINK).

Do you have a Samsung Galaxy S / Galaxy S II ? If so, why not check out my ScreenFree FM Radio .
Back to the top
 
Posted
Rating:
#90606
Avatar

Community saint

Nice work, I didn't even know what file handled all that, thus where to look.  

There's no doubt there is a lot to learn on the back end of OCP.  

Paul
Back to the top
 
Posted
Rating:
#90633
Avatar

Thanks.

Mostly I actually handled this about a week back, but I didn't spot those two typos you found.

The WIP v10 repository has a unit test (wrong word, but that's the implementation) that automatically checks the Tempcode tutorial documents all the symbols and directives, and I corrected the missing ones. I probably should have done this in v9 and uploaded the tutorial there, but I did it for v10 meaning that the undocumented ones can be seen via:
https://github.com/chrisgraham/ocPortal/blob/v10/docs/pages/comcode_custom/EN/tut_tempcode.txt
Actually I went further than this and made the test pick up on undocumented hidden options, and undocumented keep_ parameters. The codebook is supposed to list all of those.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
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 ocPortal whenever you see the opportunity.
  • 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 ocPortal 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.
Back to the top
 
Posted
Rating:
#90644
Avatar

Community saint

Chris Graham said

Mostly I actually handled this about a week back, but I didn't spot those two typos you found.
By my calculations you handled about 58% of them (13 out of 31), including one of the typo's, so yeah, technical most of them ;).


Do you have a Samsung Galaxy S / Galaxy S II ? If so, why not check out my ScreenFree FM Radio .
Back to the top
 
Posted
Rating:
#90646
Avatar

Between 7 and the WIP 10 some things have changed…

NOT_IN_ARRAY – renamed to IF_NOT_IN_ARRAY for naming consistency
$SHIFT_ENCODE – dropped (SET used now)
$CSS_INCLUDE – renamed to REQUIRE_CSS for consistency with PHP
$HAS_JS – merged with JS_ON
$HAS_SPECIFIC_PERMISSION – renamed to HAS_PRIVILEGE
$IS_SUPER_ADMIN – renamed to IS_ADMIN
$JAVASCRIPT_INCLUDE – renamed to REQUIRE_JAVASCRIPT for consistency with PHP
$KEYWORDS_SPACED – merged with META_DATA
$MEMBER – duplicate of $USER, there because people may think in terms of 'member' terminology rather than 'user' terminology
$PANEL_WIDTH – dropped due to loss of this option in v9
$PANEL_WIDTH_SPACED – dropped due to loss of this option in v9
$SHIFT_DECODE – dropped (GET used now)


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
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 ocPortal whenever you see the opportunity.
  • 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 ocPortal 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.
Back to the top
 
Posted
Rating:
#90648
Avatar

Community saint

:thumbs:

Do you have a Samsung Galaxy S / Galaxy S II ? If so, why not check out my ScreenFree FM Radio .
Back to the top
 
There are too many online users to list.
Control functions:

Quick reply   Contract

Your name:
Your message: