phpBB

Development Discussion Board

phpBB's testing ground of bleeding edge code
Advanced search

[RFC] hook_link: local URL rewriting

These event requests have either been rejected by the community or have become redundant because of code changes or other events requests.

[RFC] hook_link: local URL rewriting

Postby Kellanved » Thu Aug 19, 2010 4:04 pm

Name: hook_link
Rationale:: Allow url rewriting for "pretty" URLs, adding GET arguments etc.
Input:
    one array reference with the following fields
  • path : the path from the current document root
  • basename: basename of the script to invoke (can be empty)
  • vars: the query string, as key => value array
  • anchor: anchor fragment, if any
  • text: the link text
  • attributes: additonal attributes for the a tag (style, etc) as key => value array
  • data: additional contextual data, depending on the location. can be used to pass data to other MODs
  • protocol: http(s) etc
  • link: if the link is already assembled, it can be passed in this field. If so, the above fields will be ignored.
Output: identical to input (reference)
  • path : the path from the current document root
  • basename: basename of the script to invoke (can be empty)
  • vars: the query string, as key => value array
  • anchor: anchor fragment, if any
  • text: the link text
  • attributes: additional attributes for the a tag (style, etc) as key => value array
  • protocol: http(s) etc
  • link: if the link is already assembled, it can be passed in this field. If so, the above fields will be ignored.
Placement: append_sid and inside a new method link to be applied to all internal links not currentlu using append_sid. The arguments of link are identical to the hook's arguments
Semantics: The links output to the user are assembled from the resulting array. This means that hooking modules can add arguments to the query string or change the link completely.
No support via PM.
Trust me, I'm a doctor.
User avatar
Kellanved
Registered User
 
Posts: 407
Joined: Sun Jul 30, 2006 4:59 pm
Location: Berlin

Re: [RFC] hook_link: local URL rewriting

Postby keith10456 » Sun Aug 22, 2010 6:25 pm

An example of the new url?
User avatar
keith10456
Registered User
 
Posts: 269
Joined: Sat Apr 22, 2006 10:29 pm

Re: [RFC] hook_link: local URL rewriting

Postby nickvergessen » Sun Aug 22, 2010 7:44 pm

Its a hook, the mod-author can set the url how they like than.
cheers nickvergessen :geek:
Member of phpBB Development-Team
No Support via PM — My MODs for phpBB 3.0.x
User avatar
nickvergessen
Development Team
Development Team
 
Posts: 357
Joined: Sun Oct 07, 2007 11:54 am
Location: Esslingen, Germany

Re: [RFC] hook_link: local URL rewriting

Postby keith10456 » Thu Aug 26, 2010 5:15 pm

nickvergessen wrote:Its a hook, the mod-author can set the url how they like than.


Got it ;)
User avatar
keith10456
Registered User
 
Posts: 269
Joined: Sat Apr 22, 2006 10:29 pm

Re: [RFC] hook_link: local URL rewriting

Postby nickvergessen » Tue Aug 21, 2012 9:02 am

Should be replaced by viewtopic.php?f=111&t=42995
cheers nickvergessen :geek:
Member of phpBB Development-Team
No Support via PM — My MODs for phpBB 3.0.x
User avatar
nickvergessen
Development Team
Development Team
 
Posts: 357
Joined: Sun Oct 07, 2007 11:54 am
Location: Esslingen, Germany


Return to [3.x] Rejected Event Requests

Who is online

Users browsing this forum: No registered users and 0 guests