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
If not, please let us know how we can do better (please make suggestions that are economically viable and scalable, not just requests to do more for free).
If so, please let others know about ocPortal whenever you see the opportunity.
This information has not loaded yet. It will be generated in the background, please come back later.
If I answered something that you think should be in the documentation, please take the initiative and add it to the community documentation. We really need people to help out here and build a well-organised large support resource.
I run Otaku Play Ground 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.
If not, please let us know how we can do better (please make suggestions that are economically viable and scalable, not just requests to do more for free).
If so, please let others know about ocPortal whenever you see the opportunity.
This information has not loaded yet. It will be generated in the background, please come back later.
If I answered something that you think should be in the documentation, please take the initiative and add it to the community documentation. We really need people to help out here and build a well-organised large support resource.
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 Otaku Play Ground 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.
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.
I run Otaku Play Ground 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.
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}
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.
If not, please let us know how we can do better (please make suggestions that are economically viable and scalable, not just requests to do more for free).
If so, please let others know about ocPortal whenever you see the opportunity.
This information has not loaded yet. It will be generated in the background, please come back later.
If I answered something that you think should be in the documentation, please take the initiative and add it to the community documentation. We really need people to help out here and build a well-organised large support resource.
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 Otaku Play Ground 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.
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'.
If not, please let us know how we can do better (please make suggestions that are economically viable and scalable, not just requests to do more for free).
If so, please let others know about ocPortal whenever you see the opportunity.
This information has not loaded yet. It will be generated in the background, please come back later.
If I answered something that you think should be in the documentation, please take the initiative and add it to the community documentation. We really need people to help out here and build a well-organised large support resource.
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?
If not, please let us know how we can do better (please make suggestions that are economically viable and scalable, not just requests to do more for free).
If so, please let others know about ocPortal whenever you see the opportunity.
This information has not loaded yet. It will be generated in the background, please come back later.
If I answered something that you think should be in the documentation, please take the initiative and add it to the community documentation. We really need people to help out here and build a well-organised large support resource.
1 guests and 0 members have just viewed this: None