Re: Hook requests
The hooks in login.php should be lo_ and not li_...
You are not logged in. Please login or register.
PunBB Forums → PunBB 1.3 extensions → Hook requests
The hooks in login.php should be lo_ and not li_...
Why?
extern.php line 400, can you change with something like this:
$item = array(...); ($hook = get_hook('ex_...')) ? eval($hook) : null; $feed['items'][] = $item;
?
What about this? I need it for display first post message in rss for portal extension
I don't see what makes li incorrect though.
In fact, there's one that's misnamed lo, I'll fix it tonight.
Some hooks in parser.php would be cool too.
The system is nice, but we need a lot more hooks =/
For adding options to menus for example.
parser.php is going to be rewritten.
Be more specific about where you want hooks.
viewtopic.php
Line 459, after lastedit
theres not much before that line and this hook "vt_row_pre_display" so just use this one.
Most of the menus (perhaps all) are created from arrays. Hooks have been placed to allow the arrays to be manipulated. At least thats what I've been told by the members of the dev team with a high braincell count.
exec: Specifying why is important as well, sometimes it's hard to see why a hook is necessary in a certain place
However, I believe Gizzmo is right: there's no reason I can see to have a hook there.
To add something to the message above the signature.
But this is stupid if we get hooks in parse_message(), sorry^^""
You mean you want to insert an element into the array between the message and the signature? That's what array_insert is for.
search.php (line 866-871, 1034-1039) - Add hooks similar to viewforum.php. I have a custom search that requires a column for thumbnails. Thanks.
Could you please add a hook to footer.php, line 36. Between
// END SUBST - <!-- pun_main -->
// Hook here
// START SUBST - <!-- pun_stats -->
It is needed when one wants to put some code after main content is already displayed but before database queries displayed and database connection closed.
Thanks
I have just started looking at how to make extensions, but to implement some vital bbcode extensions for my site it seems I need hooks in parser.php (yes I know it is being rewritten, but thought you might like to know some suggested locations):
Line 34, After "$smiley_img" lines so more smileys can be added
Line 320 and 329, In do_bbcode(), after $pattern and $replace arrays, so new bbcode tags can be implemented
Line 365, In do_smilies(), after "$text = preg_replace(..." inside loop so more smileys can be implemented
Line 379, In parse_message(), after "$text = censor_words($text);" so I can pre-parse some tags
Line 413, In parse_message(), after "$text = str_replace($pattern, $replace, $text);" so I can parse a tag
Line 425, In parse_message(), after "if (isset($inside[$i])) {" before "$text .= '</p><div class=..." as I need to undo the math tag inside code tags.
Line 429, In parse_message(), before "// Add paragraph tag...", which is the correct place for another tag
And whatever standard place you would include new functions
I have just started looking at how to make extensions, but to implement some vital bbcode extensions for my site it seems I need hooks in parser.php (yes I know it is being rewritten, but thought you might like to know some suggested locations):
Line 34, After "$smiley_img" lines so more smileys can be added
Line 320 and 329, In do_bbcode(), after $pattern and $replace arrays, so new bbcode tags can be implemented
Line 365, In do_smilies(), after "$text = preg_replace(..." inside loop so more smileys can be implemented
Line 379, In parse_message(), after "$text = censor_words($text);" so I can pre-parse some tags
Line 413, In parse_message(), after "$text = str_replace($pattern, $replace, $text);" so I can parse a tag
Line 425, In parse_message(), after "if (isset($inside[$i])) {" before "$text .= '</p><div class=..." as I need to undo the math tag inside code tags.
Line 429, In parse_message(), before "// Add paragraph tag...", which is the correct place for another tag
And whatever standard place you would include new functions
+1
I'd like a hook at:
extern.php line 84 or 245 to add output methods as ex_start is insecure (usable as workaround).
Johu, why you think that usage ex_start in insecure?
If you need to make checking like this (Line 81-82):
if ($forum_user['g_read_board'] == '0')
exit($lang_common['No view']);
Just do it (checking) in hook "ex_start". To add new action use hook "ex_new_action"
Johu, why you think that usage ex_start in insecure?
If you need to make checking like this (Line 81-82):if ($forum_user['g_read_board'] == '0') exit($lang_common['No view']);
Just do it (checking) in hook "ex_start". To add new action use hook "ex_new_action"
well as I told it is usable as a workaround but it is not good. Maybe there will be some other checks added later on?
I think I'll make a new topic about extern file as I find one part of it paranoid and hard to plugin.
// Edit:
http://punbb.informer.com/forums/post/116292/#p116292
hello I am requesting for a hook after the submit and preview button in new thread page.
($hook = get_hook('po_post_optional_fieldset')) ? eval($hook) : null;
?>
<div class="frm-buttons">
<span class="submit"><input type="submit" name="submit" value="<?php echo $lang_common['Submit'] ?>" accesskey="s" title="<?php echo $lang_common['Submit title'] ?>" /></span>
<span class="submit"><input type="submit" name="preview" value="<?php echo $lang_common['Preview'] ?>" accesskey="p" title="<?php echo $lang_common['Preview title'] ?>" /></span>
</div>
</form>
</div>
after this code there is another hook needed so that we can show something at the end of the form. this should be available on each page.
thanks
I need hook in cache.php in generate_quickjump_cache() function:
232 while ($cur_forum = $forum_db->fetch_assoc($result))
…
249 }
250 << hook here >>
251 $output .= "\t\t\t".'</optgroup>'."\n\t\t".'</select>'."\n\t\t".'<input type="submit" value="<?php echo $lang_common[\'Go\'] ?>" onclick="return Forum.doQuickjumpRedirect(forum_quickjump_url, sef_friendly_url_array);" /></span>'."\n\t".'</div>'."\n".'</form>'."\n";
It's no chance now to change something after last iteration.
EDIT : THIS ISSUE IS NOW SOLVED
see: http://punbb.informer.com/forums/topic/ … odebarphp/
------------------------------------------------------------------------------
in help.php
<?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";
?>
I wld like a hook as in parser.php for changing image size to match whatever set of smilies size I'm including. (20x20 instead of 15x15)
in parser.php this hook is now available :
$return = ($hook = get_hook('ps_do_smilies_end')) ? eval($hook) : null;
also in pun_bbcode bar.php I'd like a hook for the same thing (changing size of smilies)
<div id="pun_bbcode_smilies">
<?php
// Display the smiley set
EDIT : THIS ISSUE IS NOW SOLVED
see: http://punbb.informer.com/forums/topic/ … odebarphp/
thx
I'm requesting a hook for the attachment extension (and other extensions that would display info within posts), it should be located in viewtopic.php around line 499/500. Right now, using the attachment extension, attachments are displayed below the signature area which can be hard to locate (especially if you didn't know if it was there int he first place).
I posted about it here: http://punbb.informer.com/forums/post/123775/#p123775
I made my own hook identifier in that post to demonstrate what I'd like to see and provided an example. I don't know how you guys have the naming scheme setup for hooks though.
PunBB Forums → PunBB 1.3 extensions → Hook requests
Powered by PunBB, supported by Informer Technologies, Inc.