TopUsers in a templated Phorum-Page
Posted by Thomas Seifert
November 15, 2006 10:42PM |
Registered: 20 years ago Posts: 793 |
November 16, 2006 02:10AM |
Admin Registered: 18 years ago Posts: 8,532 |
Why don't you tell us what problems you run into?
Maurice Makaay
Phorum Development Team
my blog
linkedin profile
secret sauce
Maurice Makaay
Phorum Development Team



November 16, 2006 03:15AM |
Registered: 20 years ago Posts: 793 |
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]
this is what i'm seeing..
[beta.tribalharmonix.org]
November 16, 2006 03:48AM |
Admin Registered: 18 years ago Posts: 8,532 |
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
Maurice Makaay
Phorum Development Team



Re: TopUsers in a templated Phorum-Page November 16, 2006 04:06AM |
Registered: 18 years ago Posts: 126 |
November 16, 2006 04:25AM |
Admin Registered: 18 years ago Posts: 8,532 |
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
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



November 16, 2006 03:31PM |
Registered: 20 years ago Posts: 793 |
Re: TopUsers in a templated Phorum-Page November 16, 2006 04:04PM |
Admin Registered: 20 years ago Posts: 9,240 |
Re: TopUsers in a templated Phorum-Page December 20, 2007 02:39PM |
Registered: 19 years ago Posts: 237 |
Trying the latest files in this thread, along with phorum5-svn-2007113011, I get all kinds of lovely errors...
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.
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 |
Registered: 19 years ago Posts: 237 |
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 H, currently on: (version 5.2.23)
contributions:
Birthdays mod, Top Users mod, Icon legend.tpl, (plus a handful of bugfixes and old 5.0 creations)
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 H, currently on: (version 5.2.23)
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.