MyBB Community Forums

Full Version: A little (but maybe hard?) modification of the mod "thanks"
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello,

I don't speak english very well, so sorry for this Smile

I "build" a forum dedicated to referencing french free contests (list of websites promotions to win price) and i have make just a very little modification to mod "Thanks by SaeedGh" but i have one problem.

I just replaced the "thank you" button with a button that allows members to say "I won" to the whole community and change the language file accordingly.
There's just one little problem, we can not thank yourself of course! Big Grin
Is anyone know the code to adapt that whoever created the topic can see and use the button "i won".


Or maybe another way or mod to do this ?
(see picture joint your don't understand me)

So , i'm looking for a another mod too but i find anything:
Is it a way to display number of click on a url please ?

Thanks
(2014-03-19, 06:53 PM)cakissimo Wrote: [ -> ]There's just one little problem, we can not thank yourself of course! Big Grin
Is anyone know the code to adapt that whoever created the topic can see and use the button "i won".

Votre anglais est plus meilleur que mon francais Smile


To allow people to "thank" themselves, find this line in the plugin thx.php:
if($mybb->user['uid'] != 0 && $mybb->user['uid'] != $post['uid']) 

and replace it with this:
if($mybb->user['uid'] != 0) 

I haven't tested it, but it is a simple change.

Good luck!
Hello, thanks for your reply but that don't work.

Now i SEE the button in topic write by myself but it don't WORK wellSmile
When i return to this topic , the marker have dissapears, the data is not saved.

thanks

EDIT: finally i removed code :
if($tmp['uid'] == $mybb->user['uid'])
		{
			return false;
		}	
And that works but maybe that don't work well, need to test ,i don't understand what this line do exactly..i understand just a little the code.

In your opinion is it a way to modified code to add the possibility to install 2 mod "thanks" ? ideally , i need a another button similary to the first one.