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

Moving forward with Composr

ocPortal has been relaunched as Composr CMS. ocPortal 9 is superseded by Composr 10.

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

All about addons

Login / Search

 [ Join | More ]
#40637 (In Topic #9060)

The last new aspect of ocPortal 4, it's division into optional addons, is now completed ready for the next beta. We mentioned the new addon architecture back when we first announced version 4's features, but we didn't say much more. We've held off finalising it until now because we didn't need it to start off beta testing, and it was a fairly tricky thing to design.

The purpose of this new addon architecture is to cut down bloat- we love that ocPortal has lots of features, but we feel that has also been a bit of a problem in the past. It meant there was a lot:
  • to learn
  • to configure
  • to hack out from templates
  • to secure
  • to get in the way

In order to make sure ocPortal stays feature-rich, but also act lightweight, we have made large parts of it optional. Outside ocPortal's core set of addons (which are locked down and invisible), exist the following optional ocProducts addons:
  • apache_config_files
  • authors
  • backup
  • banners
  • bookmarks
  • bulkupload
  • calendar
  • catalogues
  • cedi
  • chat
  • code_editor
  • counting_blocks
  • devguide
  • downloads
  • ecommerce
  • filedump
  • flagrant
  • forum_blocks
  • galleries
  • import
  • iotds
  • language_block
  • ldap
  • linux_helper_scripts
  • msn
  • news
  • news_shared
  • newsletter
  • occle
  • ocf_forum
  • phpinfo
  • points
  • pointstore
  • polls
  • printer_friendly_block
  • quizzes
  • random_quotes
  • recommend
  • roadsend_compiler_buildkit
  • rootkit_detector
  • ssl
  • staff
  • staff_messaging
  • stats
  • stats_block
  • supermember_directory
  • syndication_blocks
  • tester
  • textbased_persistant_cacheing
  • themewizard
  • tickets
  • users_online_block
  • windows_helper_scripts
  • zone_jump_block
All the optional addons are installed when you install ocPortal, so nothing has changed from that perspective. The big change is that these addons now all show up on the addon management screen and you can uninstall them. Uninstalling them removes the modules in the addons, clears the database content/structure, and removes the files.

This all seems quite straight-forward, but the trickiest part was making sure that two important concerns were met:
  1. You need to be able to easily reinstall the addon. An addon that was uninstalled would have originally came from the ocPortal installer – we didn't want a situation where we asked people to come download those addons from our website if they wanted them back. That would have presented a confusing situation, of addons existing in both the installer, and our own addon directory, and also a maintenance and versioning nightmare.
  2. You need to be able to run a single upgrade to upgrade all addons on the site. Again, it would be a maintenance and versioning nightmare if the addons were all separately maintained. Crucially though, the upgrader must not place files that belong to addons that have been uninstalled.

Our solution to this is simple to explain, and complex for us to implement:
  1. When an ocProducts addon is uninstalled it will now be packaged up into an addon TAR, exactly like the third-party addon TARs ocPortal already supported. This TAR file remains in the exports/mods directory and you can reinstall it at any point using the addon management interface.
  2. When an upgrade is performed, ocPortal will check whether each file in the update should be copied to the website file system, and/or whether it has to be placed within one of the TAR files residing in the exports/mods directory (i.e. it will keep the addon TARs up-to-date).

One offshoot from all this is we've had to streamline our upgrade process. The news announcements and upgrader script now together set out a clearer standard path for upgrading. If you've uninstalled official addons it's now required (well, strong recommended) to use the upgrader script to extract the TAR files (by feeding it the upgrade TAR URL in the news posts we make). In light of this we've improved our upgrader script to make sure this will work smoothly.

Last edit: by Chris Graham

Become a fan of Composr on Facebook or add me as a friend. Add me on on Twitter. Support me on Patreon
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 Composr whenever you see the opportunity or support me on Patreon.
  • 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 Composr 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

Community saint

It all sound good.
Yours actually sounds much like how the UMI (Universal mod installer) works for ipb, although those are xml files not tar files but still same principle.

But ya you did a great job and even thought ahead so keep up the good work.

Last edit: by amichan

I run and am hopping to make themes and other things for ocportal even though I no longer use it for 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
There are too many online users to list.
Control functions:

Quick reply   Contract

Your name:
Your message: