I know there is a block that displays private messages from phpBB, but I don't want to display it in a block, but rather in the middle of my theme.
Because of that I'm looking for a way to make a variable print that link...

What I want to achieve is to have a link displaying private messages from phpBB like "Private messages (@count)" by a variable (like "$get_phpbbforum_pm" or so)...
I've been browsing the module's files and I've found the related functions, but I just don't understand them... anyone have an idea on how to write this function?
I would highly appreciate it if anyone could tell me how this module works related to my question so I can finish my bonus module (including some nice custom blocks and code snippets) for this wonderful phpBB bridge! :D

Comments

NeoID’s picture

Nobody who knows how I may re-write phpbbforum_pm(); to phpbbforum_custom_pm(); and make it output the same, but without the icon in front (Line 288 in phpbb_api_theme.php) and change the "$user->lang['NEW_PMS']" (Line 739 in PhpbbVBridgeApp.php) to $user->lang['CUSTOM_NEW_PMS'] without hacking the module?

That way I want to place a print phpbbforum_custom_pm(); in my theme outputting a little bit different version as the one included with this module...
I would highly appreciate any help... :)

kentr’s picture

Can you do it with a view?

NeoID’s picture

As discussed on IRC, I don't think so, as all the code already is there and I only need some info on how to use/override it correctly...

kentr’s picture

Yeah, I posted that comment before the IRC discuss...

Off the top of my head, here's a thought:

  • Put your custom function in your theme's template.php file.
  • Look in the module's modulename.module and modulename.inc for the module "page" theme override mechanism.
  • If the override is a template, then I think you'll just need a preprocessor function to alter the variable which contains the main content, which will then get passed to the template.
  • If the override is a function, then create an override function in your theme's template.php that calls your custom function as needed to alter the default page output.

See the theming guide for more info...

fizk’s picture

Status: Active » Closed (fixed)