126

Re: Hook requests

A hook for replacing (changing) the textarea field. This can be very handy for wysiwyg text editor extensions. (for example where i 'm working on)

127

Re: Hook requests

Where exactly do you want us to add the hook? As I understand from your topic, you need the hook in post.php. But there are two hooks before ("po_pre_post_contents") and after ("po_pre_optional_fieldset") the output of the textarea field already.

128

Re: Hook requests

Slavok wrote:

Where exactly do you want us to add the hook? As I understand from your topic, you need the hook in post.php. But there are two hooks before ("po_pre_post_contents") and after ("po_pre_optional_fieldset") the output of the textarea field already.

Huh,

I didnt see them but i've seen them now. So to add a new custom field above the 'optional post settings' fieldset, i'll have to use the po_pre_optional_fieldset hook?

Thanks wink

129

Re: Hook requests

Need hook to punbb 1.3.3 :
1. adapt and put old script to auto update in extentions .
Some :
a) Easy bb code
b) Reputation system(wery neeeded!!!)
c) Hide link whith post count.
Senks wink

130 (edited by raistlin 2009-05-06 07:50)

Re: Hook requests

Hello all!

It would be very usefull to extension developers to have a hook just when retrieved value of $p_message of a quoting message (arround line 268 - 269 in 'post.php' vesion 1.3.3).

It allows pre-processing of some bbCode, for example. The name can something like 'ps_qr_afer_get_message' or 'ps_qr_post_get_message'.


PS: Edit, I mistaken released and retrived, sorry.

131

Re: Hook requests

I have added the new hook to the core. It is called "po_modify_quote_info" by rules of naming hooks.

132

Re: Hook requests

Thanks a lot !

133

Re: Hook requests

Have some hooks for the spots before and after the topic 'RSS topic feed' and 'Subsribe' links been requested? I can't seem to find any around there (or then its well hidden for a punBB newbie like me). :S

134

Re: Hook requests

Is there any full list for hooks?

I'm searching a hook for modifying '<div class="main-head">'.

Want to write a extension which allows to open and close the divs for categories using Prototype and Scriptaculous.

Thanks.

135

Re: Hook requests

Leroy wrote:

Is there any full list for hooks?

No, there is not full list of the hooks.

Leroy wrote:

I'm searching a hook for modifying '<div class="main-head">'.

Describe in more details, what you want to have, please.

136

Re: Hook requests

Hello,

I need hooks in profile.php, in the moderator assignment section.

I develop an extension in order to moderate forum by group and I want to disable checkbox if the current forum is moderate by the user group. A hook for changing category title can be useful too.

Actually, it is more complicated, because the checklist and the category legend are directly print to the screen (with an echo)...

Thanks.

137

Re: Hook requests

I think it's a little bit late for adding new hooks because the final release of PunBB 1.3 was about a year ago smile

Hooks could be added in the next version of PunBB, 1.3.5. But noone knows the date of this release.

Please, write the lines numbers where you want to add hooks.

138

Re: Hook requests

And what about add this in the current svn version ? We can checkout.

About the hook, it is line 2642 but the code must be changed a little : the HTML strings need to be in a variable in order to change it with the hook.

Thanks.

139

Re: Hook requests

I would like the 'rg_no_new_regs' hook; which gets called when the forum is not accepting new registrations (and the user clicks register).
Here is the patch: http://karpenoktem.nl/~jille/punbb-rg_no_new_regs.diff

(I already posted this to some bug-reporting tool; but that seemed to be only for critical/security bugs. I'm sorry for that)

140

Re: Hook requests

hello,
i want a hook in format_time() function just before it returns the value. There is a hook fn_format_time_start at beginning, so please add fn_format_time_end at the end of the function (just before it returns it).

141

Re: Hook requests

Valuable information.

142

Re: Hook requests

Added in [1462].

143

Re: Hook requests

Slavok wrote:

Added in [1462].

cool, thanks

144

Re: Hook requests

Hello,
What about a hook in the pun_bbcode's bar.php file, directly after this loop:

    foreach (array_unique($smilies) as $smile_text => $smile_file)
    {
        
    }

It will give a possibility to put some smileys (i.e. when $pun_bbcode_tabindex > 15) into invisible div, which can be shown by javascript.

145 (edited by dimkalinux 2010-05-08 10:10)

Re: Hook requests

Needed HOOK for adding elements to $visit_links array in HEADER.PHP

if ($forum_user['g_read_board'] == '1' && $forum_user['g_search'] == '1')
{
    $visit_links = array();

    if (!$forum_user['is_guest'])
        $visit_links['newposts'] = '<span id="visit-new"'.(empty($visit_links) ? ' class="first-item"' : '').'><a href="'.forum_link($forum_url['search_new']).'" title="'.$lang_common['New posts title'].'">'.$lang_common['New posts'].'</a></span>';

    $visit_links['recent'] = '<span id="visit-recent"'.(empty($visit_links) ? ' class="first-item"' : '').'><a href="'.forum_link($forum_url['search_recent']).'" title="'.$lang_common['Active topics title'].'">'.$lang_common['Active topics'].'</a></span>';
    $visit_links['unanswered'] = '<span id="visit-unanswered"'.(empty($visit_links) ? ' class="first-item"' : '').'><a href="'.forum_link($forum_url['search_unanswered']).'" title="'.$lang_common['Unanswered topics title'].'">'.$lang_common['Unanswered topics'].'</a></span>';
}

*** NEED HOOK RIGHT THERE ***

$visit_elements['<!-- forum_visit -->'] = (!empty($visit_links)) ? '<p id="visit-links" class="options">'.implode(' ', $visit_links).'</p>' : '';

146

Re: Hook requests

dimkalinux wrote:

Needed HOOK for adding elements to $visit_links array in HEADER.PHP

if ($forum_user['g_read_board'] == '1' && $forum_user['g_search'] == '1')
{
    $visit_links = array();

    if (!$forum_user['is_guest'])
        $visit_links['newposts'] = '<span id="visit-new"'.(empty($visit_links) ? ' class="first-item"' : '').'><a href="'.forum_link($forum_url['search_new']).'" title="'.$lang_common['New posts title'].'">'.$lang_common['New posts'].'</a></span>';

    $visit_links['recent'] = '<span id="visit-recent"'.(empty($visit_links) ? ' class="first-item"' : '').'><a href="'.forum_link($forum_url['search_recent']).'" title="'.$lang_common['Active topics title'].'">'.$lang_common['Active topics'].'</a></span>';
    $visit_links['unanswered'] = '<span id="visit-unanswered"'.(empty($visit_links) ? ' class="first-item"' : '').'><a href="'.forum_link($forum_url['search_unanswered']).'" title="'.$lang_common['Unanswered topics title'].'">'.$lang_common['Unanswered topics'].'</a></span>';
}

*** NEED HOOK RIGHT THERE ***

$visit_elements['<!-- forum_visit -->'] = (!empty($visit_links)) ? '<p id="visit-links" class="options">'.implode(' ', $visit_links).'</p>' : '';

Though there is not any hook actually, but you can still push menu here. just check the source of Pun_PM and you will know how to put new menu here smile.

but hook may be easier way of to do smile.

Re: Hook requests

Yes, i known that is possible - but its not normal method. Hook will be much better.

148

Re: Hook requests

dimkalinux wrote:

Yes, i known that is possible - but its not normal method. Hook will be much better.

No way but agree smile.

But you may try that until you get one wink.

149

Re: Hook requests

Need hook to change display out on installed extensions on extensions.php before line 1013

echo "\t".implode("\n\t", $forum_page['ext_item'])."\n";

Similar hook aex_section_install_pre_display_available_ext_list for available extesions is exist.

150 (edited by hklown 2011-04-12 23:39)

Re: Hook requests

It would be nice to have a hook in/around line 182 of help.php:

    // Display the smiley set
    if (!defined('FORUM_PARSER_LOADED'))
        require FORUM_ROOT.'include/parser.php';

    $smiley_groups = array();

    foreach ($smilies as $smiley_text => $smiley_img)
        $smiley_groups[$smiley_img][] = $smiley_text;

    foreach ($smiley_groups as $smiley_img => $smiley_texts)
        echo "\t\t\t\t".'<p>'.implode(' '.$lang_common['and'].' ', $smiley_texts).' <span>'.$lang_help['produces'].'</span> <img src="'.$base_url.'/img/smilies/'.$smiley_img.'" width="15" height="15" alt="'.$smiley_texts[0].'" /></p>'."\n";

Why: For example, I have bypassed the smiley parser (through an extension) to make it easier to add custom smilies, so this code that depends on an array of $img=>$text breaks because through a hook in the parser I replace the contents of the smilies array with a different layout.

The reason I am requesting this hook is so I can change the format of the smilies help page to be something similar to this:
http://parallaxlan.com/uc/viewsmilies.