Re: Hook requests
Hook after URL rewriting scheme (include/common.php) to modify $pun_url var.
You are not logged in. Please login or register.
PunBB Forums → PunBB 1.3 extensions → Hook requests
Hook after URL rewriting scheme (include/common.php) to modify $pun_url var.
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.
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 ?
I think you should use co_common and re_rewrite_rules for that.
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
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;
?
PunBB Forums → PunBB 1.3 extensions → Hook requests
Powered by PunBB, supported by Informer Technologies, Inc.