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.


Hidden functionality

Login / Search

 [ Join | More ]
 Add topic 
Posted
Rating:
#24951 (In Topic #5906)
Avatar

I'm just documenting some of the functionality hidden inside ocPortal, for the version 4 dev-guide. For anyone interested, here's a cut-down version of it, for what exists in version 3.

Hidden 'values'

Values are like hidden configuration options. They are either hidden because they are managed by code, or because they are obscure. To set a value, open up OcCLE and type :set_value('<name>','1'); (replace '1' if appropriate, but usually we do use '1' to enable).

The values you might want to manually change are:
  • avoid_contextual_dates – set this to '1' if contextual dates (e.g. 'Today') aren't wanted
  • thumbs_per_row – set this to the number of thumbnails to line up in a row, in galleries and possibly other places
3.1+
  • emoticon_nightmare – set to '1' for an April Fools-style emoticon joke [OCF only]
  • stupidity_mode – set to 'leet' or 'bork', for a fun April Fools-style Comcode joke (clear the Comcode cache after you're done though)
  • hide_help_panel – set this to '1' if you do not want the help panel
3.2+
  • download_gallery_root – set this to a gallery name; new download galleries will be created underneath the given gallery (defaults to the root gallery)
  • comment_forum__galleries / comment_forum__images / comment_forum__videos / comment_forum__downloads / comment_forum__calendar / comment_forum__news / comment_forum__iotds / comment_forum__polls – override the comment forum for a particular content type
  • no_noise – avoid showing 'noise' in the security image
  • thumbs_per_row – set this to the number of thumbnails to line up in a row, in galleries and possibly other places
  • show_empty_galleries – set to 1 if empty galleries are to be displayed
  • ionic_on – inform the software that the IIS Ionic Rewriter plugin is installed and configured
  • htm_short_urls – use .htm style short URLs instead of the pg/ style (requires expert configuration)
  • reverse_thumb_order – set to '1' if thumbnails automatically chosen as gallery rep-images are to be taken from the latest image, rather than the first image
  • allow_html – subject member WYSIWYG output to a blacklist instead of a whitelist
3.2.1+
  • show_post_validation – set to '1' if forum and CEDI posts/topics should show in the staff checklist
3.2.2+
  • comment_forum__catalogues_<catalogue-name> – define a comment forum for a specific forum
  • tray_support – set to '1' to turn on expansion/contraction for side boxes

Hidden 'keep' parameters

'keep' parameters are placed inside URLs in order to give ocPortal some extra information when loading a page. Their URL-presence is automatically relayed/preserved in all ocPortal links within the page. To enable a 'keep' parameter, simply append &<name>=1 to the URL (replace '1' if appropriate, but usually we do use '1' to enable). If there are no parameters in the URL and short-URLs are not enabled, use a '?' instead of a '&'.

The 'keep' parameters available are:
  • keep_nocache – set to '1' to temporarily disable cacheing
  • keep_cache – set to '1' to temporarily enable cacheing
  • keep_no_ext_check – set to '1' to force the validator to not check dependency files
  • keep_force_htaccess – set to '1' to force the OCF login to go via htauth in precedence over other login methods (e.g. login cookies, sessions)
  • keep_pda – set to '1' to pretend you're using a PDA
  • keep_thin – set to '1' to pretend you're using a 'low fi' client (such as a PDA)
  • keep_has_js – set to '1' to force ocPortal to think you have Javascript (useful if the has-JS cookie isn't saving yet you need to use a JS-based interface)
  • keep_forum_root – see root below; this one works for the forum and is a 'keep' parameter due to how the forum has links going all-over
  • keep_ldap_debug –  set to '1' to forcefully show LDAP errors, when supressing them might normally be wise due to over-sensitivity
  • keep_hide_mail_failure – set to '1' if you want to avoid showing e-mailing errors
  • keep_huge – set to '1' if you want to override the precautionary filesize check used by the JS validator
  • keep_show_query – set to '1' if you want the SQL query used by a search to be echoed out
  • keep_just_show_query – set to '1' if you want ocPortal to echo out the query as above, but then to exit before running it
  • keep_id_order – use this in conjunction with the admin_ocf_groups page to force a usergroup reordering based on the named DB field of your choice
  • keep_backup_instant – set this to '1' if the backup module should do a backup instantly, rather than in the background (useful for debugging, as you can add 'echo's to the backup code)
  • keep_module_dangerous – set this to '1' to allow uninstallation of modules that are locked
  • keep_preserve_ids – set this to '1' when doing an OCP-merge import, to preserve ID's in the import (and not import duplicated ID's); this is not supported officially
The following 'keep' parameters have interface triggers, but are also handy for manual activation:
  • keep_markers – set this to '1' if you want template start/end markers to be shown in the page HTML source when viewed in ocPortal
  • keep_novalidate – set this to '1' to force page output validation to not occur
  • keep_su – set this to a username when logged in as admin, to pretend to be that username
  • keep_theme_seed – set this to kiddie or random or a 6-character HTML colour code, to get dynamic themegen going for your page view (this is very slow, but fun!)
  • keep_theme_dark – used in conjunction with keep_theme_seed; set to '1' if it is a dark seed
  • keep_print – set this to '1' to render a 'printer friendly' version of the page
  • keep_lang – set to a two-letter ISO language code to tell ocPortal which language to use
  • keep_session – this isn't useful for manual editing, but it is used to note session-IDs when [session-]cookies are not working
The following aren't 'keep' parameters, but are still useful:
  • wide – set to '1' if you don't show to show side panels
  • wide_high – set to '1' if you don't show to show panels or the TOP/BOTTOM
  • root – set to a category ID for the current viewed content type to trick the breadcrumbs into showing a 'virtual root'; this can also be activated by browsing to the category you'd like to be virtual root (as staff) and then clicking on the final link in the breacrumb chain (the link representing the current category)
  • start – set to the start number in the result browsing
  • max – set to the maximum number of results to show per-page
  • page/type/id – I hope you know what these ones do ;)
  • kfsXX – this isn't useful for manual editing but people ask what it's for; it's to preserve the browse positions in forumviews, such that when returning, the browse positions are remembered


Last edit: by Chris Graham


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:
#24953
Avatar

Fan in action

Wow, that looks useful. I think this sort of documentation will really help developers which is really good in the long run  :thumbs:

"I love deadlines. I especially like the whooshing sound they make as they go flying by."
- Douglas Adams (1952 - 2001)
Back to the top
 
Posted
Rating:
#24956
Avatar

Community saint

Nice post and very nice info thanks.

I run http://otakuplayground.com and am hopping to make themes and other things for ocportal even though I no longer use it for otakuplayground.com I still love it and feel it could go far with the right help. It needs themes and needs people to advertise for it.
Back to the top
 
Posted
Rating:
#27732
Avatar

New in 3.1…
  • emoticon_nightmare – set to '1' for an April Fools-style emoticon joke [OCF only]
  • stupidity_mode – set to 'leet' or 'bork', for a fun April Fools-style Comcode joke (clear the Comcode cache after you're done though)
  • hide_help_panel – set this to '1' if you do not want the help panel


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:
#28077
Avatar

Community saint

Chris Graham said

New in 3.1…

  • hide_help_panel – set this to '1' if you do not want the help panel


Why is this not available though a setting yet?
I knew I should have done more with the beta.

I run http://otakuplayground.com and am hopping to make themes and other things for ocportal even though I no longer use it for otakuplayground.com I still love it and feel it could go far with the right help. It needs themes and needs people to advertise for it.
Back to the top
 
Posted
Rating:
#28098
Avatar

Our logic is that the users who don't know how to hide the panel (i.e. those who don't look in the documentation, or haven't been using ocPortal for long enough) are the ones who need the help panel. Once a user is confident with ocPortal, they'll know how to turn the panel off. :)

If we made the option to hide the help panel a proper one with an interface, many people would turn it off without a though, leaving themselves stranded later on when they find they need it.

Back to the top
 
Posted
Rating:
#28099
Avatar

Community saint

Thanks for the great list.


Last edit: by amichan

I run http://otakuplayground.com and am hopping to make themes and other things for ocportal even though I no longer use it for otakuplayground.com I still love it and feel it could go far with the right help. It needs themes and needs people to advertise for it.
Back to the top
 
Posted
Rating:
#28776
Avatar

Community saint

I've tried my darndest to hide the Admin Help Panel, but I've drawn a blank at every attempt.

This is the occle code I am using:

Code

:set_value('hide_help_panel','1');

I am also using an 'adapted' version of GLOBAL.tpl. I've extracted the bit of code that I think is the one that should be doing the work, and checked that all opened braces have been closed, BUT, I'm wondering if they've been closed in the correct place. Can one of you coders cast a jaundiced eye over this snippet and let me know, please!

Code

{+START,IF,{$NOT,{$GET,fixed_width}}}
   {$SET,left_width,{$?,{$IS_EMPTY,{$GET,panel_left}},0,14.3em}}
   {$SET,right_width,{$?,{$OR,{$AND,{$EQ,{$PAGE},garden},{$EQ,{$ZONE},site}},{$AND,{$EQ,{$PAGE},jindaroo},{$EQ,{$ZONE},site}},{$AND,{$MATCH_KEY_MATCH,site:news:type=view:id=52}},{$AND,{$EQ,{$PAGE},sudoku},{$EQ,{$ZONE},site}},{$AND,{$EQ,{$PAGE},wordfinder},{$EQ,{$ZONE},site}},{$AND,{$EQ,{$PAGE},hangman},{$EQ,{$ZONE},site}}{*Insert more pages here*},{$IS_EMPTY,{$GET,panel_right}},{$?,{$AND,{$NOT,{$VALUE_OPTION,hide_help_panel}},{$GET,helper_panel}},425px,0},14.3em}}}
   {$SET,middle_width,auto}
{+END}

Take my advice. I'm not using it!

View my working ocPortal site (version 9.x.x) at Anglo-Indian Portal
Back to the top
 
Posted
Rating:
#28788
Avatar

Even I couldn't understand Tempcode of that complexity ;).

This is easier to follow and I believe it will work:

Code

{$SET,right_width,{$?,{$IS_EMPTY,{$GET,panel_right}},{$?,{$AND,{$NOT,{$VALUE_OPTION,hide_help_panel}},{$GET,helper_panel}},425px,0},14.3em}}
{$SET,right_width,{$?,{$OR,{$AND,{$EQ,{$PAGE},garden},{$EQ,{$ZONE},site}},{$AND,{$EQ,{$PAGE},jindaroo},{$EQ,{$ZONE},site}},{$AND,{$MATCH_KEY_MATCH,site:news:type=view:id=52}},{$AND,{$EQ,{$PAGE},sudoku},{$EQ,{$ZONE},site}},{$AND,{$EQ,{$PAGE},wordfinder},{$EQ,{$ZONE},site}},{$AND,{$EQ,{$PAGE},hangman},{$EQ,{$ZONE},site}}},0,{$GET,right_width}}}
It consists of the standard GLOBAL line I wrote, then another line that will amend the width my line set to zero if any of your extra defined conditions are met.


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:
#28790
Avatar

Community saint

Nope. Doesn't get rid of the 'helper_panel', no matter what I try.

Worse, it takes 'Admin' an excruciating age to load. It does - - - eventually! But, for me, there's no way to get rid of the panel.

I can live with that as long as the other pages open sans right panel. Which they do.

I won't be visiting this issue again, but if somebody else raises the topic I will follow it closely!

Take my advice. I'm not using it!

View my working ocPortal site (version 9.x.x) at Anglo-Indian Portal
Back to the top
 
Posted
Rating:
#28791
Avatar

Community saint

You could do what I did for a client of mine.
Basically what I did is put the site into a table using the global template.

Code

<Table width="100%">
<tr><td>{$GET,left_width}</td><td>{MIDDLE}</td><td>{$GET,panel_right}</td></tr></table>
Thats that code I used and the client noticed the help panel was gone and that after thing the the admin zone was in the middle.

I run http://otakuplayground.com and am hopping to make themes and other things for ocportal even though I no longer use it for otakuplayground.com I still love it and feel it could go far with the right help. It needs themes and needs people to advertise for it.
Back to the top
 
Posted
Rating:
#28792
Avatar

Community saint

Thanks, Amy. I'll take a look at your solution when I've resolved other probs. At the moment there are too many display 'dependencies' in MY GLOBAL.tpl to start experimenting with the template, so it is probably best to just 'live with it'.

Take my advice. I'm not using it!

View my working ocPortal site (version 9.x.x) at Anglo-Indian Portal
Back to the top
 
Posted
Rating:
#28820
Avatar

Line 56 of GLOBAL.tpl should be:

Code

      {+START,IF,{$NEQ,{$GET,right_width},0}}
(line 56 on the original is the line just before "<div id="panel_right"...").


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:
#29700

Non-joined user

Why isn't this pinned?
Back to the top
 
Posted
Rating:
#30553
Avatar

Well-settled

Chris Graham said

kfsXX - this isn't useful for manual editing but people ask what it's for; it's to preserve the browse positions in forumviews, such that when returning, the browse positions are remembered
I've noticed if I'm browsing my phpbb forum and I hit refresh it takes me back to the forum root. Is this setting to stop that? If so, is the XX supposed to be substituted with a number or is it literal?

[OMA] Clawcity - If It Ain't You….Frag It!!!
LAN Of The Damned - Admin
Back to the top
 
Posted
Rating:
#30558
Avatar

This is for our OCF forum only. If you browse around this forum, you'll see it appear in URLs.


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
 
1 guests and 0 members have just viewed this: None
Control functions:

Quick reply   Contract

Your name:
Your message: