News: May, 2020 - TP Docs is now updated to Version 1.6.6...!

Search Articles


Search in titles
Search in article texts

Docs Navigation





thumbnail

In the TinyPortal package a special file is included: do_hooks.php. This file is used in the installation of TinyPortal to apply the TinyPortal hooks to your SMF forum database. The file can also be used by the forum administrator to manually remove or re-apply the TinyPortal hooks.

This can be especially useful when you have issues with the TinyPortal installation and you need to remove the hooks without touching the database or risking to remove hooks that are created by other Mods.

It has also happened that admins use the repair_settings.php utility in SMF and remove all hooks by accident. This will break your forum if you are using TinyPortal on SMF2.0. In SMF2.0 the TP install is dependent of the combination of hooks AND file edits. Removing the hooks and leaving the file edits will result in this error when accessing the forum: Call to undefined function TP_loadTheme()

You can fix this error with do_hooks.

How to use the do_hooks.php utility?

You can find the file in the TinyPortal package. In order to use the do_hooks.php utility the file with this name must be placed in the forum root folder. This is where the SSI.php is located in your forum. You can upload it there using a FTP program.
The file will only load if your are logged in to the forum as admin, and the SSI.php file is found. For security reasons you should remove the file once the maintenance is completed.

To use the file, type in your browser: https://www.yourforum.com/do_hooks.php
The following screen will be displayed.



Here you can choose to Install the hooks or Uninstall the hooks.

After execution the adaptation is confirmed.



Please note: TinyPortal does require code edits for SMF2.0. The do_hooks.php utility should NOT be used to uninstall TinyPortal, unless you know what you are doing. Before using the utility you should ALWAYS create a full backup of your forum (database and files).

Doc Written 21-09-2019 By: @rjen.

Articles in « General questions »