Firefox PHP

TopUsers in a templated Phorum-Page

Posted by Thomas Seifert 
Re: TopUsers in a templated Phorum-Page
November 15, 2006 10:42PM
what does it take to get this working with mmakaay's embed_phorum module?
Re: TopUsers in a templated Phorum-Page
November 16, 2006 02:10AM
Why don't you tell us what problems you run into?


Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Re: TopUsers in a templated Phorum-Page
November 16, 2006 03:15AM
sorry, i thought there was perhaps some kind of formula for converting these templated type add-ons maybe.

this is what i'm seeing..

[beta.tribalharmonix.org]
Re: TopUsers in a templated Phorum-Page
November 16, 2006 03:48AM
That seems to be a direct call to the forum index.php script and not one through the embedded module. But I do not know your embedded start URL, so I'm not sure about it. This also depends on the way in which topusers behaves. I know that addon scripts which use the new addon.php helper script, do work in an embedded invironment. So maybe some rewriting of the mod is neccessary to make it work.


Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Re: TopUsers in a templated Phorum-Page
November 16, 2006 04:06AM
It works fine for my templated forum with Phorum 5.1.16

--
Amilcar Lucas
www.kdevelop.org webmaster
Re: TopUsers in a templated Phorum-Page
November 16, 2006 04:25AM
Yes, but rheo is talking about using it in an embedded Phorum. When running embedded, this has some implications on how things should be done. Not all constructions that work in a regular Phorum install will work in an embedded install.

A simple example of this would be where a script prints the header, content and footer and does an exit() call after that. In such a case, the wrappers script for embedding would not get a chance to process the Phorum output anymore. After finishing and sending the page output, a script should return to whatever called the script instead of exiting. There are probably other constructions that won't work, but IMO this would be the most important one.


Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Re: TopUsers in a templated Phorum-Page
November 16, 2006 03:31PM
The url I am trying to access it through is /forums/index.php?topusers

my embed_phorum start url is /forums/index.php then isn't it?
Re: TopUsers in a templated Phorum-Page
November 16, 2006 04:04PM
you topusers-template asks for ./templates/thx_green/loginout_menu.tpl which doesn't exist and the templates code calls "die" if a nonexistant template is called.
fix the template to fit in your embedded template.


Thomas Seifert
Re: TopUsers in a templated Phorum-Page
December 20, 2007 02:39PM
Trying the latest files in this thread, along with phorum5-svn-2007113011, I get all kinds of lovely errors...

Quote
event log
PHP error: phorum_get_file_contents: file "./templates/emerald/loginout_menu.tpl" does not exist

PHP error generated at /var/www/html/forum/include/templates.php:687

Back trace:

Function trigger_error called at
{path to Phorum}/include/templates.php:687
----
Function phorum_read_file called at
{path to Phorum}/include/templates.php:132
----
Function phorum_import_template_pass1 called at
{path to Phorum}/include/templates.php:162
----
Function phorum_import_template_pass1 called at
{path to Phorum}/include/templates.php:49
----
Function phorum_import_template called at
{path to Phorum}/common.php:836
----
Function phorum_get_template called at
{path to Phorum}/topusers.php:63

Quote
event log
PHP warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource

PHP warning generated at /var/www/html/forum/topusers.php:37

Back trace:

Function mysql_fetch_assoc called at
{path to Phorum}/topusers.php:37
----
Function phorum_db_user_get_top called at
{path to Phorum}/topusers.php:55

That's just a taste, but you get the idea...
It's also creating other errors related to the Announcement and Recent Messages modules, but that's another story.
Re: TopUsers in a templated Phorum-Page
January 29, 2008 02:51PM
I've been playing around with this a bit trying to fix it for 5.2.

It occurred to me that it should really be updated to become a full-fledged module rather than an add-on page. The new module system seems to support this now. I am looking at the Recent Messages module as an example. Are there better examples or help/tips anyone can give?

...
Steve Healy, Phorum hacker, currently on: (version 5.2.19)
contributions:
Birthdays mod, Top Users mod, Icon legend.tpl, (plus a handful of bugfixes and old 5.0 creations)
Sorry, only registered users may post in this forum.

Click here to login