Re: Hook requests
Hook after URL rewriting scheme (include/common.php) to modify $pun_url var.
Last edited by Herbivor (2008-03-08 13:43:47)
Unfortunately no one can be told what PunBB is - you have to see it for yourself.
You are not logged in. Please login or register.
Hook after URL rewriting scheme (include/common.php) to modify $pun_url var.
Last edited by Herbivor (2008-03-08 13:43:47)
Herbivor: That's the purpose of co_common
Sorry, the hook I was searching is in rewrite.php ^^
That's to modify pun_rewrite_rules, not pun_url.
I know, I want to modify pun_rewrite_rules too ![]()
I have a problem with an extension, when the URL rewriting sheme is File_Based, I can't modify $pun_url['index'] var. Here is my code :
<hook id="co_common"><![CDATA[
if ($pun_config['o_sef'] == 'Default')
$pun_url['index'] = 'index.php';
elseif ($pun_config['o_sef'] == 'File_Based' || $pun_config['o_sef'] == 'File_based_(fancy)')
$pun_url['index'] = 'index.html';
elseif ($pun_config['o_sef'] == 'Folder_Based' || $pun_config['o_sef'] == 'Folder_Based_(fancy)')
$pun_url['index'] = 'index/';
else
$pun_url['index'] = 'index.php';
]]></hook>I hope you understand my question, I'm not very good at english ![]()
Well, I don't know what problem you're having: what happens when you install an extension with that hook?
When I install an extension with URL rewriting sheme is File_Based, $pun_url['index'] = index.php instead of index.html ![]()
I believe that's because of the upper case B you're using in some of your examples.
It works
Thank you very much Smartys ![]()
I need a hook at the top of generate_navlinks function to add links before default links.
Last edited by Herbivor (2008-03-08 15:26:41)
Take a look at PunBB's array_insert function.
And a hook before "@natcasesort($url_schemes);" in admin/options.php to add new method of URL Rewriting Scheme ?
For example :
$url_schemes[] = 'Method.php';Maybe aop_add_url_scheme ?
Last edited by Herbivor (2008-03-14 19:27:05)
I think you should use co_common and re_rewrite_rules for that.
Last edited by kierownik (2008-03-14 19:37:57)
And a hook before "@natcasesort($url_schemes);" in admin/options.php to add new method of URL Rewriting Scheme ?
For example :$url_schemes[] = 'Method.php';Maybe aop_add_url_scheme ?
You just need to put your URL rewrite scheme PHP file in include/url. It'll be added automatically.
how about a hook after a profile has been updated, but before the redirect? this same scheme could be added else where, maybe.
Why?
Well i have a function that pulls info from the user database. if its run before the database is updated, it generates old data. i need it run when ever a profile is updated. i cant think of any other place to do this.
A hook like in_forum_loop_start(index.php) in search.php. If you want to add virtual categories or alter the output of forums/categories, you want them to be displayed/altered on index.php and search.php (Forums to search <select>).
Take a look at l. 1176 of search.php and l. 105 of index.php as reference..
//edit:
A hook in search.php on l. 693 (just before the query is executed) to enable a general modification of $query
Last edited by damaxxed (2008-03-21 18:04:47)
forums.php (after line 490) - Be able to specify other options to sort by (ex. subject).
forums.php (after line 490) - Be able to specify other options to sort by (ex. subject).
forums.php?
admin/forums.php ![]()
admin/forums.php
![]()
po_pre_preview would be nice.
(Line 358 on Rev 1565)
extern.php line 400, can you change with something like this:
$item = array(...);
($hook = get_hook('ex_...')) ? eval($hook) : null;
$feed['items'][] = $item;?
Powered by PunBB, supported by Informer Technologies, Inc.
Currently installed 5 official extensions. Copyright © 2003–2009 PunBB.