[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.
Post Reply
User avatar
Kellanved
Former Team Member
Posts: 407
Joined: Sun Jul 30, 2006 4:59 pm
Location: Berlin

[RFC] hook_link: local URL rewriting

Post by Kellanved »

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.

keith10456
Registered User
Posts: 523
Joined: Sat Apr 22, 2006 10:29 pm
Contact:

Re: [RFC] hook_link: local URL rewriting

Post by keith10456 »

An example of the new url?

User avatar
nickvergessen
Former Team Member
Posts: 733
Joined: Sun Oct 07, 2007 11:54 am
Location: Stuttgart, Germany
Contact:

Re: [RFC] hook_link: local URL rewriting

Post by nickvergessen »

Its a hook, the mod-author can set the url how they like than.
Member of the Development-TeamNo Support via PM

keith10456
Registered User
Posts: 523
Joined: Sat Apr 22, 2006 10:29 pm
Contact:

Re: [RFC] hook_link: local URL rewriting

Post by keith10456 »

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

User avatar
nickvergessen
Former Team Member
Posts: 733
Joined: Sun Oct 07, 2007 11:54 am
Location: Stuttgart, Germany
Contact:

Re: [RFC] hook_link: local URL rewriting

Post by nickvergessen »

Should be replaced by viewtopic.php?f=111&t=42995
Member of the Development-TeamNo Support via PM

Post Reply