Topic: Trying to understand hooks?

Hi im new with the extensions and hooks. i used to play about with the plugins and simple mod's in 1.2
but now i have updated to 1.3 and im trying to port over my mod and the plugin that controlled it, to an extension..

the only problem is the hooks arent going where i thot they would..

is there any documentation or tutorials on the extensions and hooks yet?

Andrew

Omeo.co.uk - [PunBB 1.3 RC]

Re: Trying to understand hooks?

Documentation is under development: first version will be released in about three weeks (some of us are gone for summer vacation here, so the work is slowed down for a while).

Nevertheless, feel free to ask questions right here. What would you like to be explained?

Carpe diem

Re: Trying to understand hooks?

try http://fluxbb.org/wiki/developing_extensions

Yeah at first i found it hard to grasp the concept of hooks. but once your use them, they are easy and fantastic.

Sorry. Unactive due to personal life.

Re: Trying to understand hooks?

Well the problem i had was trying to hook "hd_alert" in the header.php

when i hook it , it displays the output at the start of the document instead of between the menu and main board where i expect it to output ?.

    <hooks>
        <hook id="hd_alert"><![CDATA[
echo '<div id="brd-alert"><p align=center> Where does this output??</p></div>';
        ]]></hook>
    </hooks>

below is a screenshot of the output and where i thoght the output should be?

http://omeo.co.uk/host/punbbhooks1.jpg
Direct link, forum will crop image

Utchin wrote:

try http://fluxbb.org/wiki/developing_extensions

Yeah at first i found it hard to grasp the concept of hooks. but once your use them, they are easy and fantastic.

Yeah thanks i already had a look at that still didn't make much sence to me..

Andrew

Omeo.co.uk - [PunBB 1.3 RC]

5 (edited by Utchin 2008-07-18 19:11)

Re: Trying to understand hooks?

nope that is where the hook will show.

try hd_head

Sorry. Unactive due to personal life.

6 (edited by mccallum 2008-07-18 19:21)

Re: Trying to understand hooks?

hd_head outputs in the same place as hd_alert hmm

also viewing the source of the webpage shows that it is output before the html tag starts in both hd_head and hd_alert

Omeo.co.uk - [PunBB 1.3 RC]

Re: Trying to understand hooks?

you have to reinstall the extension becuase you try it. there is a fluxbb/punbb one that will allow you to reinstall it without removing and re-uploading the files. Try this: http://elbekko.stringsandints.com/fluxb … extension/

Sorry. Unactive due to personal life.

Re: Trying to understand hooks?

i have the "Extension one click reinstaller v1.0" installed and im using that to reinstall the extension

Omeo.co.uk - [PunBB 1.3 RC]

Re: Trying to understand hooks?

instead of writing the html directly, add it to $alert_items

$alert_items[] = '<p class="first-alert"> Where does this output??</p>';

10

Re: Trying to understand hooks?

Lurker.boi wrote:

instead of writing the html directly, add it to $alert_items

$alert_items[] = '<p class="first-alert"> Where does this output??</p>';

+1 I forgot about that.

Sorry. Unactive due to personal life.

11 (edited by mccallum 2008-07-18 19:48)

Re: Trying to understand hooks?

Now it doesn't show at all hmm

heres what ive got

<hooks>
        <hook id="hd_alert"><![CDATA[
$alert_items[] = '<p class="first-alert"> Where does this output??</p>';
        ]]></hook>
    </hooks>

Wait !

i found it, it shows on the admin page.

but what i was looking for is the alert box that shows on the top of every page?

Omeo.co.uk - [PunBB 1.3 RC]

Re: Trying to understand hooks?

right i still dont get why its outputing at the top instead of in the box where o thought it would...

i will wait for documentation on it.

another thing is why do i always get

 Error 500 - Internal Server Error

when i try and open an extensions own admin page i was trying some extensions from flux but any that have an admin i cant access it hmm

im guessing its something to do with permissions?

Omeo.co.uk - [PunBB 1.3 RC]