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.


Miscellaneous features and usage

Use this space to share information relating to miscellaneous features and usage


In addition to the community-editable documentation above, we have the following official tutorials:

  • ocPortal keyboard shortcuts
    Many functions may be activated by key code, rather than clicking. Find out the key codes you can use in this tutorial.
  • Searching your website
    Find out how ocPortal's search engine can make it easy to search all the content on your website at once.
  • Running advertisements
    Use the banners system to run multiple advertising campaigns on your website, using multiple media profiles.
  • Feedback, and user interaction
    ocPortal helps you create a highly interactive site, with features for user interaction/feedback at your disposal.
  • eCommerce
    Use the eCommerce system to sell things. Usergroup subscription and member invoicing are available out-of-the-box.
  • OcCLE's True Potential
    Did you know you can reconfigure half your site's systems in a few easy keystrokes? We explore this and more…

Child pages:

Posted
Submitted by Hamburgler
Adding Video conferencing to your site with TokBox.

This was suggested by Rick Henson on the forum and I thought I would have a look at the software. I realised you can add a video chat box without an API and just pasting in some HTML and I've written a brief step by step to go through the process.

1. Sign up for an account at TokBox
2. Create a Comcode page on your site where you want the video chat/conferencing to be located
3. Go to http://www.tokbox.com/#embed= and log in using the user name and password from step 1 if you aren't already logged in.
4. Select the size you want your video chat to be
5. Choose whether you want to add text chat or not
6. Choose whether you want to show the list of participants or not
7. Click "Add to my site"
8. Click "Copy code"
9. Go to your previously created video chat/conference page and click to edit it
10. Disable the WYSIWYG editor
11. On the pop up agree and convert the page to Comcode
12. After the title or the text where you want to box to appear paste the code you have copied in between and tags which will look something like this

Code

[html]<object type="application/x-shockwave-flash" data="http://www.tokbox.com/vc/zy57q6aodg1k7lvw" width="800" height="600" pid="4b9a2b80beb18ab2"> <param name="movie" value="http://www.tokbox.com/vc/zy57q6aodg1k7lvw"/> <param name="flashvars" value="guestList=true&textChat=true&showExpandButton=true"/></object><br /><a href="http://www.tokbox.com/">TokBox - Free Video Chat and Video Messaging</a>[/html]

13. Fill in the rest of the page data and save the page

If the size is not quite right you can modify the width and height easily to make sure it fits into your website nicely. Your website users will need to sign up to TokBox to use the video conference.

Hope this is helpful
 
Posted
Submitted by Hamburgler
Adding an extra quotes block

This tutorial is basically a simple how to for adding a second random quote block this on is a random "reasons why ocPortal rocks"

Firstly create a .txt file called ocprocks.txt then add a list of reasons why ocPortal rocks each on their own line with word wrap turned off which will look something like this

Code

"ocPortal has no licensing costs - it is completely free, even for commercial use"
"ocPortal has an inbuilt feature that allows you to remove the branding - we help you achieve White Label, for free"
"ocPortal has many 100's of pages of documentation freely available on our website, as well as video tutorials"
"ocPortal has many almost any familiar website feature builtin, so there's no need to rely on third party addons"
"The team behind ocPortal have a commercial support service available to you if required"
"ocPortal is Open Source, meaning you can make and distribute your own changes"
"ocPortal can be easily customised - you can do a surprising amount without a programmer"
"Because many common website features are available out of the box, ocPortal can help save you development time and money"
"ocPortal has a proper company behind it, so you can trust that the developers won't just disappear"
"Because ocPortal is used commercially, it is kept up to date with technology changes"
"ocPortal is built for ultimate flexibility, few assumptions are made, and features are implemented as building blocks, meaning almost anything can be achieved"
"Through ocPortal's advanced theme technology, and stock base themes, you can get a unique design up in minutes"
"You can integrate ocPortal with most forum software, so that forum users may login to the website and comment topics are stored on the forum"
"ocPortal is a hot bed of innovation, with many features not found anywhere else"
"Because ocPortal is developed by a dedicated team, everything is designed for simplicity and coherence; think of them as the Apple(tm) of the CMS world - but free"
"ocPortal's developers support and sponsor an active community of users"
"ocPortal developers find and fix problems remarkably quickly, whilst other CMS's tend to leave bugs unfixed for months"
"ocPortal has layers and layers of security, including an integration Web Application Firewall"
"ocPortal has been tuned over years to run on almost any PHP web server - there are no special software or hardware requirements"
"The ocPortal developers named their company ocProducts, after the evil corporation from the Robocop films - to imply users should harshly monitor and judge their actions, instead of making a more self-righteous proclamation that they 'do no evil'"

*Please note I've taken these from this page - ocPortal.com - Why we're different

Save the text file to the yourinstalldirectory/text_custom/EN folder

Next goto your install of ocPortal and where you want the new block to be placed add the following comcode

Code

[block="ocprocks"]main_quotes[/block]

This should add your new random reason why ocPortal rocks block, of course you can make the subject about anything, best Hamburger places for example :lol:

Hamburgler

 
Posted
Submitted by SoccerDad
To change the length/amount of text in your breadcrumb trail, open:

Code

ocp/sources/site.php
on or around line 72, edit

Code

define('BREADCRUMB_CROP_LENGTH',26);
changing the 26 to your desired value. Save.
 
Posted
Submitted by SoccerDad
To change the amount of text shown when using the "main_forum_topics" block:

Code

ocp/themes/default/templates/BLOCK_MAIN_FORUM_TOPICS_TOPIC.tpl

Code

{$TRUNCATE_SPREAD,{TITLE`},25}
Second line, change 25 to whatever you'd like. Done!
 
Posted
Submitted by SoccerDad
The OCP download listing page defaults to t.text_original ASC resulting in alphabetical sorting. If you would like to have the listings sorted by date added, change line 425 in ocp/sources/downloads.php

Code

if (is_null($order)) $order=get_param('order','t.text_original ASC');
to

Code

if (is_null($order)) $order=get_param('order','add_date DESC');
The DESC can be replaced with ASC if so desired.
 
Posted
Submitted by Hamburgler
More quotes text Files

Following from the above post i've made a 50 Homer Simpson Quotes list as i was adding them to my quotes list, thought i'd share them on here too. I'm hoping to create a few more of these as well

Attachment
» Download: homer simpson quotes.txt (6 Kb, 2111 downloads so far)
 
Posted
Submitted by SoccerDad
There may be instances where you do not want a comcode page to appear in your sitemap. Preface the page name with an underscore (_) and you are all set.
 
Posted
Submitted by Can.do
Use php code (almost) anywhere in OCP.

Chris G said

Recommended way to add PHP code is to put it in sources_custom/miniblocks/whatever.php and include it…
Full details here / I didn't have permissions allowing a full quote of all the info.
 
Posted
Submitted by Can.do
Various Custom Pages, Including 'Simple SSO'

Chris Graham said

So now we have loads of scripts people can use.
In order:
 - Get ocPortal's login ID from another script
 - Show an ocPortal page using a certain desired login ID (full HTML)
 - Show an ocPortal page using a certain desired login ID (HTML snippet)
 - Force open an ocPortal session to a given login ID and redirect to the front page

 - Get ocPortal's login ID from another script

<?php
global $FILE_BASE,$RELATIVE_PATH;
$FILE_BASE='TODO'; // Hard-code this to the base path, e.g. /home/foo/public_html/ocp_site
$RELATIVE_PATH=''; // ocPortal will think the request is for the root zone, permission-wise
global $NON_PAGE_SCRIPT;
$NON_PAGE_SCRIPT=1;
require($FILE_BASE.'/sources/global.php');

$member=get_member();
$username=$GLOBALS['FORUM_DRIVER']->get_username($member);


- Show an ocPortal page using a certain desired login ID (full HTML)

<?php

// Fake some environment parameters
$_GET['wide_high']='1';
$_GET['page']='start';
$_POST['no_seo_redirect']='1';

// Simple ocPortal initialisation
global $FILE_BASE,$RELATIVE_PATH;
$FILE_BASE='/Library/WebServer/Documents/svn/code/4.2.x'; // Hard-code this to the base path, e.g. /home/foo/public_html/ocp_site
$RELATIVE_PATH=''; // ocPortal will think the request is for the root zone, permission/page-wise
global $NON_PAGE_SCRIPT;
$NON_PAGE_SCRIPT=1;
require($FILE_BASE.'/sources/global.php');

// Force login to specific user
$username='test';
$GLOBALS['MEMBER_CACHED']=$GLOBALS['FORUM_DRIVER']->get_member_from_username($username);

// Load up a page, as specified by $_GET parameters
require_code('site');
do_site();

// Unset the parameters we set, to return environment back to normal
unset($_GET['wide_high']);
unset($_GET['page']);


 - Show an ocPortal page using a certain desired login ID (HTML snippet)


<?php

// Simple ocPortal initialisation
global $FILE_BASE,$RELATIVE_PATH;
$FILE_BASE='/Library/WebServer/Documents/svn/code/4.2.x'; // Hard-code this to the base path, e.g. /home/foo/public_html/ocp_site
$RELATIVE_PATH=''; // ocPortal will think the request is for the root zone, permission/page-wise
global $NON_PAGE_SCRIPT;
$NON_PAGE_SCRIPT=1;
require($FILE_BASE.'/sources/global.php');

// Force login to specific user
$username='test';
$GLOBALS['MEMBER_CACHED']=$GLOBALS['FORUM_DRIVER']->get_member_from_username($username);

// Load up a page
require_code('site');
$page_wanted='start';
$page=request_page($page_wanted,true,$RELATIVE_PATH,NULL,true);
$page->evaluate_echo();

// Unset the parameters we set, to return environment back to normal
unset($_GET['wide_high']);
unset($_GET['page']);


 - Force open an ocPortal session to a given login ID and redirect to the front page

! Login without a password, use with caution !
!! Note for use with SSO (Single-Sign -On) You can verify the user externally and pass a secure (temporary) token (using SSL); Verifiying the secure token (possibly done several different ways) is not shown with this snippet.

<?php

// Simple ocPortal initialisation
global $FILE_BASE,$RELATIVE_PATH;
$FILE_BASE='/Library/WebServer/Documents/svn/code/4.2.x'; // Hard-code this to the base path, e.g. /home/foo/public_html/ocp_site
$RELATIVE_PATH=''; // ocPortal will think the request is for the root zone, permission/page-wise
global $NON_PAGE_SCRIPT;
$NON_PAGE_SCRIPT=1;
require($FILE_BASE.'/sources/global.php');

// Force login to specific user
$username='test';
$member_id=$GLOBALS['FORUM_DRIVER']->get_member_from_username($username);
require_code('users_active_actions');
$GLOBALS['FORUM_DRIVER']->forum_create_cookie($member_id,$username,'');

header('Location: '.get_base_url());

      
 
Posted
Submitted by kenno

Seperate forums for additional zone via virtual root


Hope this helps others, what I wanted to achieve was the look and feel that I had separate forums for certain clubs, which in my eyes looks a little better then just giving them a sub forum on the main forums pages.

I also wanted it so that you could not view either forum on each main page.

What I had to do was virtual root both sections (more if you have more clubs you want to show separate) which in essence gives the look to the user that both of these run separate when in essence they actually don`t.
Once finished you will have to replace all links to the normal forumview as this will now be a virtual rooted page link, otherwise your users will see both forums in the same page which is not what you are wanting to achieve.



Here is some info provided by Chris Graham in how to do this

Ok so in ocPortal there are content modules, which are a kind of page.
For the forum, this is forumview and topicview. They are in the forum zone.

If you want them to be able to operate from another zone you can do this, via setting transparent redirects.
Go to Admin Zone > Structure > Redirects, and set them up.
Let's say our new zone is called foo.
You'd set foo:forumview -> forum:forumview, with transparent checked.
You'd also set foo:topicview -> topic:topicview, with transparent checked.
Now we have the forum pages running from another zone.
However, if we were to link to them directly, it'd go to the forum root which we do not want.
This is where virtual roots come in.
You can generate a URL that "pretends" that it is the root of the forum tree, and then use this URL on that menu.
Add foo:forumview to the menu of your foo zone. It will take you to the forum home.
I'm assuming your desired new forum root has been added. So now, browse to that. Then in the breadcrumbs, click the final node in it, which corresponds to the forum you are at.
After clicking it you will see magically the breadcrumbs change so it appears this is the root forum.
Now grab the URL you're at, go edit your foo zone's menu, and put this URL in.



Please follow this topic for more details in regards to what I wanted to achieve http://ocportal.com/forum/topicview/misc/deploying/seperate-forums-for.htm?kfs233=30&threaded=0

Also this tutorial gives a little better understanding of what can be achieved for these types of sites http://ocportal.com/docs/tut_subcom.htm#title__4


Hope this helps someone
 
CEDI change-log Post