Module: User Thank/Flame
Posted by J. David Smith
|
Re: Module: User Thank/Flame March 18, 2010 12:05PM |
Registered: 18 years ago Posts: 49 |
Well, I'm back from the dead once again with yet another edition of this module. I implemented a fix similar to SchoolAngels' for the line 142 warning (I used isset() instead of != NULL). I also added the french and swedish translations (thank you SchoolAngels and sebdah!) and Ryan's images (which are far better than mine).
There is a new option for which imageset to use (plus.png/minus.png or star.png/fire.png) and I fixed every situation that I could find where there was a foreach() warning.
I also fixed the hack error message (thank you, Ryan and hvella).
I hope you guys haven't given up on me yet, and I hope even more that this update fixes the many warnings you were getting.
Edited 1 time(s). Last edit at 03/18/2010 12:11PM by J. David Smith.
There is a new option for which imageset to use (plus.png/minus.png or star.png/fire.png) and I fixed every situation that I could find where there was a foreach() warning.
I also fixed the hack error message (thank you, Ryan and hvella).
v0.7: Added Ryan's Imagesets and setting for them Added SchoolAngels' French translation and sebdah's Swedish translation Fixed the line 142 warning and others like it (hopefully) Changed formula for top users to take flames into account Fixed Possible Hack Detected error Fixed multiple-thank/flame loophole Set custom fields to Show on the Edit Users page Changed fields to install with html_disabled FALSE
I hope you guys haven't given up on me yet, and I hope even more that this update fixes the many warnings you were getting.
Edited 1 time(s). Last edit at 03/18/2010 12:11PM by J. David Smith.
|
Re: Module: User Thank/Flame August 28, 2010 12:27PM |
Registered: 16 years ago Posts: 9 |
|
Re: Module: User Thank/Flame August 28, 2010 07:12PM |
Registered: 18 years ago Posts: 49 |
Quote
tborosak
Hi...thanks for the module..using it for a while....
is there any way to remove/bypass the flame option altogether from the code and leave just the "thank". kinda like facebook does?
thanks
You can remove the lines in the templates about flames. I'll add an option for that sometime in the near future.
|
Re: Module: User Thank/Flame September 22, 2010 09:30PM |
Registered: 17 years ago Posts: 81 |
Hi,
I was trying to use this module. I have done all the changes and enabled the module, but when I click the thank or flame image, I am getting an error which reads -
Can you please help me.
Thanks and regards,
Sreenadh
Edited 1 time(s). Last edit at 09/22/2010 09:55PM by Sreenadh OG.
I was trying to use this module. I have done all the changes and enabled the module, but when I click the thank or flame image, I am getting an error which reads -
An error occurred in the application. The error was logged to the Phorum event log.I checked the phorum event log and found the following there -
PHP error: phorum_api_user_save(): missing field "user_id" in user data array details
User info:
User ID = 2, username = sreesog [ view user's profile ]
User IP address = 114.143.174.17
Additional details:
Message:
PHP error: phorum_api_user_save(): missing field "user_id" in user data array
PHP error generated at /home/arshainf/public_html/ancientindianastrology.com/group/include/api/user.php:417
Back trace:
Function trigger_error called at
{path to Phorum}/include/api/user.php:417
----
Function phorum_api_user_save called at
{path to Phorum}/mods/user_thank_flame/functions.php:75
----
Function tf_thank called at
{path to Phorum}/mods/user_thank_flame/user_thank_flame.php:51
----
Function mod_user_tf_common called
----
Function call_user_func_array called at
{path to Phorum}/common.php:1691
----
Function phorum_hook called at
{path to Phorum}/common.php:853
----
Function include_once called at
{path to Phorum}/read.php:21
----
Request info:
HTTP_HOST = www.ancientindianastrology.com
HTTP_REFERER = [www.ancientindianastrology.com]
REQUEST_URI = /group/read.php?2,111
QUERY_STRING = 2,111
Can you please help me.
Thanks and regards,
Sreenadh
Edited 1 time(s). Last edit at 09/22/2010 09:55PM by Sreenadh OG.
|
Re: Module: User Thank/Flame November 08, 2010 04:53PM |
Registered: 16 years ago Posts: 9 |
|
Re: Module: User Thank/Flame November 15, 2010 09:04PM |
Registered: 15 years ago Posts: 10 |
Hello,
This module worked perfectly, except for when I tested it after logging out and then back in. When I tried to load the forum after logging in, i get this error:
Fatal error: Cannot redeclare phorum_api_custom_profile_field_configure() (previously declared in [my_site]/forum/include/api/custom_profile_fields.php:102) in [my_site]/forum/include/api/custom_profile_fields.php on line 234
When I log out and view the forum, it works fine. Any ideas?
This module worked perfectly, except for when I tested it after logging out and then back in. When I tried to load the forum after logging in, i get this error:
Fatal error: Cannot redeclare phorum_api_custom_profile_field_configure() (previously declared in [my_site]/forum/include/api/custom_profile_fields.php:102) in [my_site]/forum/include/api/custom_profile_fields.php on line 234
When I log out and view the forum, it works fine. Any ideas?
|
Re: Module: User Thank/Flame November 16, 2010 03:00AM |
Admin Registered: 21 years ago Posts: 8,532 |
I suspect that there is a "require" or "include" call in the module code that loads the custom_profile_fields.php script. That should have been "require_once" or "include_once" to prevent PHP from loading the file twice, resulting in the error about the redeclaration.
Edit: I checked the module package and found the likely culprit in user_thank_flame.php:
[code=php]
require('./include/api/custom_profile_fields.php');
[/code]
change that line to:
[code=php]
require_once './include/api/custom_profile_fields.php';
[/code]
Maurice Makaay
Phorum Development Team
my blog
linkedin profile
secret sauce
Edited 1 time(s). Last edit at 11/16/2010 03:03AM by Maurice Makaay.
Edit: I checked the module package and found the likely culprit in user_thank_flame.php:
[code=php]
require('./include/api/custom_profile_fields.php');
[/code]
change that line to:
[code=php]
require_once './include/api/custom_profile_fields.php';
[/code]
Maurice Makaay
Phorum Development Team
my blog
linkedin profile
secret sauceEdited 1 time(s). Last edit at 11/16/2010 03:03AM by Maurice Makaay.
|
Re: Module: User Thank/Flame November 16, 2010 09:12AM |
Registered: 15 years ago Posts: 10 |
|
Re: Module: User Thank/Flame November 16, 2010 12:46PM |
Registered: 15 years ago Posts: 10 |
I found a bug. I was checking my event logs and found this:
PHP notice: Undefined index: thread_id
PHP notice generated at [site index]/forum/mods/user_thank_flame/user_thank_flame.php:34
So I went in and checked the hidden input fields that are submitted and realized that there is no 'thread_id' name; there's a 'thread' name. This is most likely throwing the error. I suppose it can be fixed one of two ways: change the input field name in the template file, or change the variable name in user_thank_flame.php from
[code="php"]
$thread_id = $_POST['thread_id'];
[/code]
to
[code="php"]
$thread_id = $_POST['thread'];
[/code]
This seems to fix the problem on my end.
PHP notice: Undefined index: thread_id
PHP notice generated at [site index]/forum/mods/user_thank_flame/user_thank_flame.php:34
So I went in and checked the hidden input fields that are submitted and realized that there is no 'thread_id' name; there's a 'thread' name. This is most likely throwing the error. I suppose it can be fixed one of two ways: change the input field name in the template file, or change the variable name in user_thank_flame.php from
[code="php"]
$thread_id = $_POST['thread_id'];
[/code]
to
[code="php"]
$thread_id = $_POST['thread'];
[/code]
This seems to fix the problem on my end.
|
Re: Module: User Thank/Flame October 13, 2011 05:32AM |
Registered: 14 years ago Posts: 1 |
Sorry, only registered users may post in this forum.


