Module: User Thank/Flame
Posted by J. David Smith
|
Re: Module: User Thank/Flame June 30, 2008 09:38AM |
Registered: 24 years ago Posts: 1,076 |
Quote
freereign
The phorum_db_search() function will not work for my needs. It searches for subject, message, author, or user_id. I need to search meta.
It would be better to store flame/thanks data in a table of it's own to be able to search it. Searching meta data is not going to be easy or fast.
---
-=[ Panu ]=-
|
Re: Module: User Thank/Flame June 30, 2008 02:01PM |
Admin Registered: 25 years ago Posts: 4,504 |
User custom fields is already moved into its own table for 5.2. It will be done for messages in 5.3 as well. phorum_user_custom_fields is the table in 5.2. In 5.3 that will be renamed to phorum_custom_fields and will hold both user and message custom info.
Now, searching that is a whole other thing.
Now, searching that is a whole other thing.
Brian - Personal Blog
|
Re: Module: User Thank/Flame June 30, 2008 03:33PM |
Admin Registered: 23 years ago Posts: 9,240 |
|
Re: Module: User Thank/Flame July 01, 2008 04:58AM |
Registered: 22 years ago Posts: 174 |
Quote
justingaynor
Yes, the User/Thank Flame module has a folder of templates files it uses for displaying ratings on various pages, and it is calling for a thread.tpl files within it's own /mods/user_thank_flame/templates/emerald folder, but it does not exist. I did not mean to suggest that this file was left out of the phorum build, simply the latest build of this particular add-on.
same problem here with latest version of mod.
what did you do in order to solve this?
|
Re: Module: User Thank/Flame July 03, 2008 03:58PM |
Registered: 18 years ago Posts: 23 |
Garghhhh, Flaming works fine but when i try to thank...
Fatal error: Call to undefined function phorum_db_update_messages() in /home/thepitc/public_html/mods/user_thank_flame/functions.php on line 51
Help anyone... I havent even changed anything yet
Also i didnt get any minimilistic template files..
[www.ipodbb.net]
Edited 1 time(s). Last edit at 07/03/2008 04:01PM by Alex1912.
Fatal error: Call to undefined function phorum_db_update_messages() in /home/thepitc/public_html/mods/user_thank_flame/functions.php on line 51
Help anyone... I havent even changed anything yet
Also i didnt get any minimilistic template files..
[www.ipodbb.net]
Edited 1 time(s). Last edit at 07/03/2008 04:01PM by Alex1912.
|
Re: Module: User Thank/Flame August 07, 2008 03:56AM |
Registered: 18 years ago Posts: 8 |
As I know, a general phorum style is to not translate admin messages, so there is no need to provide localization support in settings.php.Quote
freereign
LANG support is complete for all pages except the settings.php page. I have been unable to get $PHORUM['DATA']['LANG']['mod_user_thank_flame']['DisplayMode'] to show up as anything (although printing it in read.php or profile.php works fine).
While looking through code, I find that you define short_time in module english lang file. That’s not very good, as it doesn’t reflect the global setting and could be wrong for other languages. I’m guessing, you should reuse the following code from event_logging module:
[code="php"]
if (!isset($PHORUM['short_time'])) {
$f = str_replace($PHORUM['short_date'],'',$PHORUM['short_date_time']);
$f = preg_replace('/^\s+|\s+$/', '', $f);
$PHORUM['short_time'] = $f;
}
[/code]
Thanks for the module! :)
|
Re: Module: User Thank/Flame August 07, 2008 08:21AM |
Registered: 18 years ago Posts: 49 |
|
Re: Module: User Thank/Flame August 07, 2008 08:31AM |
Registered: 18 years ago Posts: 49 |
|
Re: Module: User Thank/Flame August 07, 2008 09:55AM |
Registered: 18 years ago Posts: 8 |
Also you need to change phorum_db_update_messages to phorum_db_update_message in functions.php, as there is no such function (at least in 5.2.8).
Another suggestion is to use hooks instead of includes. I. e. write in templates something like {HOOK "tpl_user_thank_flame_profile"} and add that hook to your module. That way, if module will be disabled in admin, it will be transparently disabled in all templates.
Also, you should use css_register hook to add your css.
Edited 1 time(s). Last edit at 08/07/2008 09:56AM by Alexey Torkhov.
Another suggestion is to use hooks instead of includes. I. e. write in templates something like {HOOK "tpl_user_thank_flame_profile"} and add that hook to your module. That way, if module will be disabled in admin, it will be transparently disabled in all templates.
Also, you should use css_register hook to add your css.
Edited 1 time(s). Last edit at 08/07/2008 09:56AM by Alexey Torkhov.
|
Re: Module: User Thank/Flame August 07, 2008 10:40AM |
Registered: 18 years ago Posts: 49 |
Thanks for the tips. The hook-template idea is a good one that I will incorporate. I also didn't know about the css_register hook. That won't take long to implement (neither will).
The phorum_db_update_messages were accidentally left unchanged to phorum_db_update_message. I have fixed them (there were 2 instances of it).
The phorum_db_update_messages were accidentally left unchanged to phorum_db_update_message. I have fixed them (there were 2 instances of it).
Sorry, only registered users may post in this forum.


