Jump to content
teraßyte

IP.Board 3.3 Dev Update: Applications & Hooks Enhancements

Parts of this entry may only apply to those who create hooks for IP.Board. Feel free to skip the sections that may not interest you.

For IP.Board 3.2 I made several changes for both applications and hooks and now with this new major version I went ahead and made some more changes that I hope will simplify things for everyone.


Applications Ordering

Very often customers asked us for a simple way to reorder applications in the ACP, and subsequently in the front end, without having them split in 3 different categories (Root, IPS Addons and Third Party Addons) which for example prevented having the Blog link before the Forums one without having to manually modify the templates to add it. I am pleased to inform you that this is now possible without having to edit anything!

This image shows the old layout with the split categories in IP.Board 3.2:
blogentry-126321-0-27289600-1322762396_t

While this one lets you see the new and updated layout in IP.Board 3.3:
blogentry-126321-0-11517400-1322762400_t

As you can see from the image above the System application (which is hidden for the front end) is always listed at the top but all the others can be re-ordered. Let's now take a look at the main navigation in the front end which properly displays the applications in our chosen order:
blogentry-126321-0-40250900-1322762374_t



Applications Status & Restrictions

From the image above of the new layout you will have surely noticed that now the applications page has 2 tabs which list enabled and disabled applications, the disabled page looks exactly the same except for the first button which is a green plus to enable it opposed to the red cross in the enabled list. Note also that the uninstall button has been replaced with the enable/disable button and has been moved in the dropdown where the less used options are available, after all if you install an application on your community you want to keep it!

Another change is the "Tab Restrictions" column which displays an icon to inform the admin that the front end tab may not show to some (or all) members depending on the chosen options:
blogentry-126321-0-05761400-1322762369_t


Application Details

Unlike for hooks which already have a page to view all their details, applications had nothing and the list itself doesn't have any information about the application author, website and similar data. I have gone ahead and added a new view for that which lists most of the known information for the application:
blogentry-126321-0-79865300-1322762366_t


Hooks List

For consistency with the new applications layout and the recent changes introduced in IP.Content the hooks listing now has two tabs to list enabled and disabled hooks while the old "Install a New Hook" tab is now replaced by a button which opens a modal popup to import the file:
blogentry-126321-0-75128400-1322762377_t


Hooks Settings

Several hooks being released include new settings or whole new group settings but those settings are not always where you expect them. To help admins find those faster we have included a new link in the dropdown that takes you directly to the settings page once clicked.

Since none of our default hooks add settings the example below is from one of the hooks I've released for free:
blogentry-126321-0-01068700-1322762386_t

Since hooks also support multiple groups or even individual settings in the image below as a test I have added a setting from the "Spam Prevention" group in IP.Board in the hook, as you can see both groups are now listed:
blogentry-126321-0-64752000-1322762380_t


Hooks Development

Sometimes a developer might need to run code before allowing the admin to install or uninstall a specific hook, starting with IP.Board 3.3 this is possible adding the functions "pre_install" and "pre_uninstall" in the custom installation file. A simple example with the basic structure can be found below:


<?php

class myHookSetup

{

public function __construct( ipsRegistry $registry )

{

  // Your constructor code here

}


public function pre_install()

{

  //This is run BEFORE the hook is installed on the board, nothing is added in the database or in the files yet

}


public function install()

{

  //This is run AFTER the hook is installed on the board

}


public function pre_uninstall()

{

  //This is run BEFORE the hook is unistalled from the board, nothing is changed/removed in the database or in the files yet

}


public function uninstall()

{

  //This is run AFTER the hook is unistalled from the board

}

}




Furthermore to make development of hooks easier the requirements page now provides an easy-to-use dropdown menu with the versions of the chosen application, there is no need anymore to search manually in the XML files the ID for the version you want to specify!
blogentry-126321-0-60467700-1322762382_t



Feel free to comment on this blog entry below or, if you have feedback unrelated to this blog entry, start a new topic in our feedback forum.


×
×
  • Create New...