Thanks MOD 0.4.0 [works with PHPBB3 Gold]_Small Fix

Discussion forum for MOD Writers regarding MOD Development.
pauleine
Registered User
Posts: 1
Joined: Mon Jan 14, 2008 3:59 pm

Re: [DEV]Thanks MOD 0.4.0 [works with PHPBB3 Gold]_Small Fix

Post by pauleine »

I am getting this error with mine help please??

Fatal error: Cannot redeclare install_040() (previously declared in /home/plodge/public_html/members/thanks.php:72) in /home/plodge/public_html/members/thanks.php on line 134
Surf007
Registered User
Posts: 141
Joined: Wed Jun 20, 2007 1:16 pm

Re: [DEV]Thanks MOD 0.4.0 [works with PHPBB3 Gold]_Small Fix

Post by Surf007 »

Thanks for continue working on this MOD i always wanted to have it. Now its working gr8 on my forums.
Surf007
Registered User
Posts: 141
Joined: Wed Jun 20, 2007 1:16 pm

Re: [DEV]Thanks MOD 0.4.0 [works with PHPBB3 Gold]_Small Fix

Post by Surf007 »

One problem, Even Google adsense Bot is saying thanks in my posts.
User avatar
justhink
Registered User
Posts: 55
Joined: Fri Jun 29, 2007 10:26 pm
Name: Saugata Datta

Re: [DEV]Thanks MOD 0.4.0 [works with PHPBB3 Gold]_Small Fix

Post by justhink »

in viewtopic_body.html it's already blocked, if user is a bot, then it won't show any thanks button..

Code: Select all

<!-- IF S_USER_LOGGED_IN and not postrow.S_IS_OWN_POST and not S_IS_BOT -->
Surf007
Registered User
Posts: 141
Joined: Wed Jun 20, 2007 1:16 pm

Re: [DEV]Thanks MOD 0.4.0 [works with PHPBB3 Gold]_Small Fix

Post by Surf007 »

Image

see google adsense bot thanks to me.
Sisem
Registered User
Posts: 121
Joined: Fri May 25, 2007 11:52 am

Re: [DEV]Thanks MOD 0.4.0 [works with PHPBB3 Gold]_Small Fix

Post by Sisem »

I've found this and it's a bug with the mod and not the problem with Bot's thanking.

If you thank a post, and then you remove the thanks, it will then show Google(Adsense) in the thanked list.

What you have to do to fix is to thank the same post again yourself, and it will remove the Google (Adsense) entry, and you can then remove the thanks for the second time and it will be removed and not show the Google thanks.

Reeally not sure why it's doing this, but it's got something to do with the Google (Adsense) bot is the first 'user' listed in the bot listings and it being picked up for some reason.

I someone would come up with a fix it would be great.

Sisem
greensmachine_snake
Registered User
Posts: 117
Joined: Sun Jun 03, 2007 12:53 am

Re: [DEV]Thanks MOD 0.4.0 [works with PHPBB3 Gold]_Small Fix

Post by greensmachine_snake »

i have done the sql the uploading the clearing of cache and all and the edits no errors at all ut no sign of the thanks button or the tahanks area
greensmachine_snake
Registered User
Posts: 117
Joined: Sun Jun 03, 2007 12:53 am

Re: [DEV]Thanks MOD 0.4.0 [works with PHPBB3 Gold]_Small Fix

Post by greensmachine_snake »

sholdnt there be more files to include or edit in the style to make this appear i dont have but the imageset foler in the style folder
greensmachine_snake
Registered User
Posts: 117
Joined: Sun Jun 03, 2007 12:53 am

Re: [DEV]Thanks MOD 0.4.0 [works with PHPBB3 Gold]_Small Fix

Post by greensmachine_snake »

ive cleared cache and cleared style but still no thanks button and idea any help should ther be an edit in the template to make this apear or what hell the images dont even have a place to make the setting in imageset when i go to set images nothing no thanks button no thanks area ????????????????????? thanks
ninhanhlove
Registered User
Posts: 6
Joined: Sat Jan 05, 2008 5:26 am
Location: Việt Nam
Contact:

Re: [DEV]Thanks MOD 0.4.0 [works with PHPBB3 Gold]_Small Fix

Post by ninhanhlove »

fix ;

Code: Select all

ALTER TABLE `phpbb_users` ADD `user_thanked` INT NOT NULL DEFAULT '0';

ALTER TABLE `phpbb_users` ADD `user_thanked_others` INT NOT NULL DEFAULT '0'; 
alexi02
Registered User
Posts: 271
Joined: Fri Mar 05, 2004 2:15 am
Location: Australia
Contact:

Re: [DEV]Thanks MOD 0.4.0 [works with PHPBB3 Gold]_Small Fix

Post by alexi02 »

Sisem wrote:If you thank a post, and then you remove the thanks, it will then show Google(Adsense) in the thanked list.Reeally not sure why it's doing this, but it's got something to do with the Google (Adsense) bot is the first 'user' listed in the bot listings and it being picked up for some reason.
I don't have this mod installed but one thing you can do is firstly not allow any bot to thank a post (I'm assuming that bots are user_id 3 to 52) and secondly not show the bots thanks in any post. Please backup your thanks.php file.

In thanks.php

Find

Code: Select all

if ($thankers[$key]['post_id'] == $post_id && $thankers[$key]['user_id'] != $poster_id)
Replace with

Code: Select all

if ($thankers[$key]['post_id'] == $post_id && $thankers[$key]['user_id'] != $poster_id && ($thankers[$key]['user_id'] == 2 || $thankers[$key]['user_id'] > 52))
Find

Code: Select all

function insert_thanks($post_id, $user_id)
{
	global $db, $users;
	if ($user_id != ANONYMOUS)
Replace with:

Code: Select all

function insert_thanks($post_id, $user_id)
{
	global $db, $users;
	if ($user_id != ANONYMOUS && ($user_id == 2 || $user_id > 52))
Hope that helped.
Sisem
Registered User
Posts: 121
Joined: Fri May 25, 2007 11:52 am

Re: [DEV]Thanks MOD 0.4.0 [works with PHPBB3 Gold]_Small Fix

Post by Sisem »

Thats a bit odd, just made those changes and tested and it will now thank and remove thanks correctly, great I thought. Reverted back to the original file to prove and it's still working alright.

Hmmm...

Either way it's working fine now.

Sisem
Sisem
Registered User
Posts: 121
Joined: Fri May 25, 2007 11:52 am

Re: [DEV]Thanks MOD 0.4.0 [works with PHPBB3 Gold]_Small Fix

Post by Sisem »

And now I've got Google Adsense listed as thanking the test post again now, and i can't remove it by the old thank and remove thanks as I was doing before.

Bloody odd this!

EDIT: Now not showing the google entry, but the test user who made the post still has 1 thanks listed even tho it does not show under the post. But I assume this will not be an issue with those two tweaks in place for any actual users.

Thanks.

Sisem
kylo_16
Registered User
Posts: 30
Joined: Thu Apr 03, 2008 10:05 pm

Re: [DEV]Thanks MOD 0.4.0 [works with PHPBB3 Gold]_Small Fix

Post by kylo_16 »

you should add to this mod ;) i think so

show thanks in forum yes or no
show thanks people yes or no
thanks only in first post yes or no
in caegory/forum edit

can you do this ?? ;) hymm ?? it will be wery helpfull and mod will be more usefull
kylo_16
Registered User
Posts: 30
Joined: Thu Apr 03, 2008 10:05 pm

Re: [DEV]Thanks MOD 0.4.0 [works with PHPBB3 Gold]_Small Fix

Post by kylo_16 »

hello i ave big problem with this mod i think

when some one try to register see that

Code: Select all

Błąd ogólny
SQL ERROR [ mysqli ]

Field 'user_thanked' doesn't have a default value [1364]
what can i do?

okey i know it worging now ;/
Last edited by kylo_16 on Sun Apr 06, 2008 10:33 am, edited 1 time in total.
Locked

Return to “[3.0.x] MOD Writers Discussion”