1 (edited by Lion 2011-11-14 18:15)

Topic: [not bug] Bad hd_visit_elements hook location in header.php

In header.php, the hd_visit_elements hook is located on line 206 BEFORE the declaration of $visit_elements['<!-- forum_visit -->'] (on line 208).

It causes an error when using extensions like pun_pm who extends the content of $visit_elements['<!-- forum_visit -->'].
The error is gone when the hook is moved after the variable declaration.

In the 1.3.6 version of header.php, the hook was after the variable declaration.


So I assume the new location of the hook is really an error in the code of PunBB 1.4 ?

Regards, Lion
Annopedia.net, French Anno 1404 and  Anno 2070 community.

Re: [not bug] Bad hd_visit_elements hook location in header.php

Its not error.

It changed in 1.4 for adding menu elements by simple adding entries in $visit_elements array or $visit_links array. In 1.4 extensions must extend $visit_links or $visit_elements arrays for adding new elements.

We use this new method in pun_pm for 1.4 - https://github.com/punbb/extensions/blo … t.xml#L474

3

Re: [not bug] Bad hd_visit_elements hook location in header.php

Ok, thanks for the infos.
Everythings works great now.

Regards, Lion
Annopedia.net, French Anno 1404 and  Anno 2070 community.