[RFC|Implemented] Topicrow Hook

These requests for events in core phpBB have been merged into 3.1/Ascraeus and will be available with the next release.
Post Reply
Registered User
Posts: 31
Joined: Fri Jan 23, 2009 10:24 pm

[RFC|Implemented] Topicrow Hook

Post by Sam » Thu Aug 19, 2010 4:08 pm

Name: hook_topicrow
Rationale: This hook will allow for people to modify the topicrow before it is sent to the $template->assign_block_vars.
Placement: viewforum.php
Input arguments: &$topicrow (single parameter passed by reference)
Output format: void
Output semantics: $topicrow is passed by reference and acts as the Output.
Infrastructure: In viewforum.php, a new array should be created, $topicrow, that contains the full array to be sent to $template->assign_block_vars. This array will be passed by reference to the hook function before send to the template.

Example: (just pseudo code)

Code: Select all

// Hook function to rewrite pretty urls
function creat_pretty_urls_topicrow($topicrow)
    // ./my-topic-name-t123.html
    $topicrow['U_VIEW_TOPIC']    = $phpbb_root_path . url_slug($topicrow['TOPIC_TITLE']) . '-t' .$topicrow['TOPIC_ID'] . '.html';

User avatar
Development Team
Development Team
Posts: 889
Joined: Thu Jan 28, 2010 6:29 pm

Re: [RFC] Topicrow Hook

Post by MichaelC » Thu Mar 15, 2012 9:08 pm

Formerly known as Unknown Bliss
psoTFX wrote: I went with Olympus because as I said to the teams ... "It's been one hell of a hill to climb"
No unsolicited PMs please except for quotes.

User avatar
Registered User
Posts: 624
Joined: Tue May 31, 2011 12:08 pm
Location: Romania

Re: [RFC] Topicrow Hook

Post by Dragosvr92 » Thu Mar 15, 2012 11:43 pm

There will be pretty/seo urls in 3.1 !? o-O :?:
Previous user: TheKiller
Avatar on Memberlist 1.0.3

User avatar
Customisations Team Leader
Customisations Team Leader
Posts: 1830
Joined: Thu Mar 02, 2006 4:29 pm
Location: Earth

Re: [RFC] Topicrow Hook

Post by DavidIQ » Thu Mar 15, 2012 11:50 pm

TheKiller wrote:There will be pretty/seo urls in 3.1 !? o-O :?:
It's an Example of what the hook can be used for, not some implementation of it. :roll:

Post Reply