ipboards a good forum for developers

In the past year or so i’ve been developing addons for a forum called invisionpower, not specifically for the company but for a gaming community that uses their systems. Previous to this the most i have ever worked with is phpbb as this is free and i’ve yet to meet a client that has been willing to pay for a forum. However if there was ever a reason to pay for a forum this would be the forum to fork the cash out for and i’d recommend it to a client easily. I started off quite skeptical at being able to have any freedom in developing changes to the forums but i found it to be quite refreshing and infact has made me think about the way i am currently developing my bespoke projects. IPboards uses a number of methods for extending the functionality and design without breaking the system or creating something so different from the original product that its near impossible for others to assist when problems occour. It uses a combination of xml files and php classes to create new applications and hooks which allow you to create full blown systems like the prebuilt calendar and gallery or to add new features to the templates. Having used it for roughly over a year now i feel i am still only touching the tip of the iceberg of what can be done. I would like to share with you a simple how to on creating a hook for the forums and installing it. Alot of the development is actually done through the boards, so if you can log in to the admin area and click on hooks and click create hook. This will take you through the basics first up is the basic information of who created it etc. hookfile So you will need to select the following to do the mod tool bar addon File hook type: template hooks The skin group this hook is in: skin_global The skin function this hook is in: globalTemplate Type of template hook: if statement The hook ‘ID’: issupermod Position of template hook: (pre.startif) before the start of the if statement Once thats done save the hook and you should now see it in the hooks list. Click the little triangle on the right and export the hook this will take you to a new page where you can specify extra settings but you don’t have too. Just click the export button and it will let you download the xml file. Once you have the file you will now want to add in the php code to do the work, heres my final hook code which does just that.

<?xml version="1.0" encoding="utf-8"?>
          <hook_name>My Example Hook</hook_name>
          <hook_desc>Adds a new link in the mod tools bar</hook_desc>
          <hook_author>Invisible Man</hook_author>
class modToolsAddon
    	protected $registry;
    	protected $settings;
    	protected $cache;
    	public function __construct()
    		/* Make registry objects */
    		$this->registry = ipsRegistry::instance();
    		$this->settings =& $this->registry->fetchSettings();
    		$this->request  =& $this->registry->fetchRequest();
    		$this->lang     = $this->registry->getClass('class_localization');
    		$this->member   = $this->registry->member();
    		$this->memberData =& $this->registry->member()->fetchMemberData();
    		$this->cache    = $this->registry->cache();
    		$this->caches   =& $this->registry->cache()->fetchCaches();
    	public function getOutput()
    		//you may have some check here, e.g if admin then show link
    		//heres an example with a static list of allowed user group ids
    		if(!in_array($this->memberData['member_group_id'], array(4,11,10,9)))
    		return '<li><a href="http://www.davidejones.com/" title="Test Link" target="_blank">Test Link</a></li>';

Once you have this you can install the hook by uploading the xml file. Once its installed you should see it listed in the hooks like before. test link


    Comments are currently closed