[DEV] Thank Post Mod (hide MOD compatible ) 0.2.0

A place for MOD Authors to post and receive feedback on MODs still in development. No MODs within this forum should be used within a live environment!
Anti-Spam Guide
Locked
kurdzio
Registered User
Posts: 1
Joined: Thu Feb 12, 2009 7:47 pm

Re: [DEV] Thank Post Mod (hide MOD compatible ) 0.2.0

Post by kurdzio »

thanks for this mod!
Last edited by kurdzio on Fri Feb 13, 2009 7:51 pm, edited 3 times in total.
User avatar
Music-cro
Registered User
Posts: 33
Joined: Fri Feb 13, 2009 7:52 am
Location: Zagreb-Hrvatska
Contact:

Re: [DEV] Thank Post Mod (hide MOD compatible ) 0.2.0

Post by Music-cro »

Hi,

Why when you give or get Thank Post. I have this picture

Image

Thx
mbambung
Registered User
Posts: 1
Joined: Sun Feb 15, 2009 10:08 am

Re: [DEV] Thank Post Mod (hide MOD compatible ) 0.2.0

Post by mbambung »

thank button not show in board. my theme SF_Glacier_Lite. please help

Image
User avatar
spaceace
Registered User
Posts: 1999
Joined: Wed Jan 30, 2008 8:50 pm
Contact:

Re: [DEV] Thank Post Mod (hide MOD compatible ) 0.2.0

Post by spaceace »

nice mod. just installed and it's working fine :mrgreen:


NTH08 wrote:i got a problem here

Code: Select all

[phpBB Debug] PHP Notice: in file /viewtopic.php on line 1450: Undefined index: thanks
[phpBB Debug] PHP Notice: in file /viewtopic.php on line 1451: Undefined index: thanked
[phpBB Debug] PHP Notice: in file /viewtopic.php on line 1451: Undefined index: thanked
[phpBB Debug] PHP Notice: in file /viewtopic.php on line 1452: Undefined index: thanks_post
[phpBB Debug] PHP Notice: in file /viewtopic.php on line 1452: Undefined index: thanks_post
[phpBB Debug] PHP Notice: in file /viewtopic.php on line 1450: Undefined index: thanks
[phpBB Debug] PHP Notice: in file /viewtopic.php on line 1451: Undefined index: thanked
[phpBB Debug] PHP Notice: in file /viewtopic.php on line 1451: Undefined index: thanked
[phpBB Debug] PHP Notice: in file /viewtopic.php on line 1452: Undefined index: thanks_post
[phpBB Debug] PHP Notice: in file /viewtopic.php on line 1452: Undefined index: thanks_post
[phpBB Debug] PHP Notice: in file /viewtopic.php on line 1450: Undefined index: thanks
[phpBB Debug] PHP Notice: in file /viewtopic.php on line 1451: Undefined index: thanked
[phpBB Debug] PHP Notice: in file /viewtopic.php on line 1451: Undefined index: thanked
[phpBB Debug] PHP Notice: in file /viewtopic.php on line 1452: Undefined index: thanks_post
[phpBB Debug] PHP Notice: in file /viewtopic.php on line 1452: Undefined index: thanks_post
[phpBB Debug] PHP Notice: in file /viewtopic.php on line 1450: Undefined index: thanks
[phpBB Debug] PHP Notice: in file /viewtopic.php on line 1451: Undefined index: thanked
[phpBB Debug] PHP Notice: in file /viewtopic.php on line 1451: Undefined index: thanked
[phpBB Debug] PHP Notice: in file /viewtopic.php on line 1452: Undefined index: thanks_post
[phpBB Debug] PHP Notice: in file /viewtopic.php on line 1452: Undefined index: thanks_post
[phpBB Debug] PHP Notice: in file /viewtopic.php on line 1450: Undefined index: thanks
[phpBB Debug] PHP Notice: in file /viewtopic.php on line 1451: Undefined index: thanked
[phpBB Debug] PHP Notice: in file /viewtopic.php on line 1451: Undefined index: thanked
[phpBB Debug] PHP Notice: in file /viewtopic.php on line 1452: Undefined index: thanks_post
[phpBB Debug] PHP Notice: in file /viewtopic.php on line 1452: Undefined index: thanks_post
[phpBB Debug] PHP Notice: in file /viewtopic.php on line 1450: Undefined index: thanks
[phpBB Debug] PHP Notice: in file /viewtopic.php on line 1451: Undefined index: thanked
[phpBB Debug] PHP Notice: in file /viewtopic.php on line 1451: Undefined index: thanked
[phpBB Debug] PHP Notice: in file /viewtopic.php on line 1452: Undefined index: thanks_post
[phpBB Debug] PHP Notice: in file /viewtopic.php on line 1452: Undefined index: thanks_post
[phpBB Debug] PHP Notice: in file /viewtopic.php on line 1450: Undefined index: thanks
[phpBB Debug] PHP Notice: in file /viewtopic.php on line 1451: Undefined index: thanked
[phpBB Debug] PHP Notice: in file /viewtopic.php on line 1451: Undefined index: thanked
[phpBB Debug] PHP Notice: in file /viewtopic.php on line 1452: Undefined index: thanks_post
[phpBB Debug] PHP Notice: in file /viewtopic.php on line 1452: Undefined index: thanks_post
[phpBB Debug] PHP Notice: in file /viewtopic.php on line 1450: Undefined index: thanks
[phpBB Debug] PHP Notice: in file /viewtopic.php on line 1451: Undefined index: thanked
[phpBB Debug] PHP Notice: in file /viewtopic.php on line 1451: Undefined index: thanked
[phpBB Debug] PHP Notice: in file /viewtopic.php on line 1452: Undefined index: thanks_post
[phpBB Debug] PHP Notice: in file /viewtopic.php on line 1452: Undefined index: thanks_post
[phpBB Debug] PHP Notice: in file /viewtopic.php on line 1450: Undefined index: thanks
[phpBB Debug] PHP Notice: in file /viewtopic.php on line 1451: Undefined index: thanked
[phpBB Debug] PHP Notice: in file /viewtopic.php on line 1451: Undefined index: thanked
[phpBB Debug] PHP Notice: in file /viewtopic.php on line 1452: Undefined index: thanks_post
[phpBB Debug] PHP Notice: in file /viewtopic.php on line 1452: Undefined index: thanks_post
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3795: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3187)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3797: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3187)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3798: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3187)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3799: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3187)
line 1435 to 146 in my viewopic.php

Code: Select all

	$postrow = array(
		'POST_AUTHOR_FULL'		=> get_username_string('full', $poster_id, $row['username'], $row['user_colour'], $row['post_username']),
		'POST_AUTHOR_COLOUR'	=> get_username_string('colour', $poster_id, $row['username'], $row['user_colour'], $row['post_username']),
		'POST_AUTHOR'			=> get_username_string('username', $poster_id, $row['username'], $row['user_colour'], $row['post_username']),
		'U_POST_AUTHOR'			=> get_username_string('profile', $poster_id, $row['username'], $row['user_colour'], $row['post_username']),
//Begin Thank Post MOD
		'THANKS_FROM'   => sprintf($user->lang['THANKS_FROM'], get_username_string('full', $poster_id, $row['username'], $row['user_colour'], $row['post_username'])),
//End Thank Post MOD
		'RANK_TITLE'		=> $user_cache[$poster_id]['rank_title'],
		'RANK_IMG'			=> $user_cache[$poster_id]['rank_image'],
		'RANK_IMG_SRC'		=> $user_cache[$poster_id]['rank_image_src'],
		'POSTER_JOINED'		=> $user_cache[$poster_id]['joined'],
		'POSTER_POSTS'		=> $user_cache[$poster_id]['posts'],
		//Begin Thank Post MOD		
		'POSTER_THANKS'			=> $user_cache[$poster_id]['thanks'],
		'POSTER_THANKED'		=> ($user_cache[$poster_id]['thanked'] <= 1) ? $user_cache[$poster_id]['thanked'] . $user->lang['THANKS_TIME'] : $user_cache[$poster_id]['thanked'] . $user->lang['THANKS_TIMES'],
		'POSTER_THANKS_POST'	=> ($user_cache[$poster_id]['thanks_post'] <= 1) ? $user_cache[$poster_id]['thanks_post'] . $user->lang['THANKS_POST'] : $user_cache[$poster_id]['thanks_post'] . $user->lang['THANKS_POSTS'],
        //End Thank Post MOD
		'POSTER_FROM'		=> $user_cache[$poster_id]['from'],
		'POSTER_AVATAR'		=> $user_cache[$poster_id]['avatar'],
		'POSTER_WARNINGS'	=> $user_cache[$poster_id]['warnings'],
		'POSTER_AGE'		=> $user_cache[$poster_id]['age'],
please help me :cry:
i had that same error. here's what my problem was

when editing viewtopic.php, make sure you find this

Code: Select all

$user_cache[$poster_id] = array(
				'joined'		=> $user->format_date($row['user_regdate']),
				'posts'			=> $row['user_posts'],
and not this

Code: Select all

			$user_cache[$poster_id] = array(
				'joined'		=> '',
				'posts'			=> '',
as this will cause that error ;)
User avatar
spaceace
Registered User
Posts: 1999
Joined: Wed Jan 30, 2008 8:50 pm
Contact:

Re: [DEV] Thank Post Mod (hide MOD compatible ) 0.2.0

Post by spaceace »

Manhattan wrote:Edit.........................

Solved! :)
Thanks a lot.
by the looks of it, this member had the same problem that i did as well as other users but edited the post and removed the info so nobody else could fix their problem :x :!:
User avatar
mehrdad_epark.ir
Registered User
Posts: 87
Joined: Thu Jul 31, 2008 3:08 pm

Re: [DEV] Thank Post Mod (hide MOD compatible ) 0.2.0

Post by mehrdad_epark.ir »

hi
there is a problem in this MOD.In the other words there is a BUG .
A user by using own ID in the URL can send thanks for own .
please obviation this BUG.
thanks
User avatar
Professional
Registered User
Posts: 187
Joined: Mon Jan 21, 2008 2:40 pm

Re: [DEV] Thank Post Mod (hide MOD compatible ) 0.2.0

Post by Professional »

mehrdad_epark.ir wrote:hi
there is a problem in this MOD.In the other words there is a BUG .
A user by using own ID in the URL can send thanks for own .
please obviation this BUG.
thanks
yes i saw it too ;)
انجمن تخصصی نسل جدید موبایل ها
My Mobile Forum: M4P Forum
Every Thing That U Feel,Is Every Thing That I Feel.
cpucpu
Registered User
Posts: 40
Joined: Thu Dec 25, 2008 8:24 pm

Re: [DEV] Thank Post Mod (hide MOD compatible ) 0.2.0

Post by cpucpu »

Could someone explain me how this mod works in 'hide mod compatibility' version?

What i want is "to thank to see hidden content", but not to have to reply to see content (as it generates lots of rubbish, and i understand this is what 'Simple Hide BBcode MOD' does).

Till know, i have not found a mod that strictly say that do this, so that's my question.
cpucpu
Registered User
Posts: 40
Joined: Thu Dec 25, 2008 8:24 pm

Re: [DEV] Thank Post Mod (hide MOD compatible ) 0.2.0

Post by cpucpu »

THANK YOU
mahoney, great mod

Just typo error:
The following user would like to thank Admin for this post
testUser, testUser2, manyUsers
User avatar
spaceace
Registered User
Posts: 1999
Joined: Wed Jan 30, 2008 8:50 pm
Contact:

Re: [DEV] Thank Post Mod (hide MOD compatible ) 0.2.0

Post by spaceace »

found a small problem...

when a user has been deleted from the board and all posts are kept and you view one of that users posts, this error comes up
[phpBB Debug] PHP Notice: in file /viewtopic.php on line 1486: Undefined index: thanks
[phpBB Debug] PHP Notice: in file /viewtopic.php on line 1487: Undefined index: thanked
[phpBB Debug] PHP Notice: in file /viewtopic.php on line 1487: Undefined index: thanked
[phpBB Debug] PHP Notice: in file /viewtopic.php on line 1488: Undefined index: thanks_post
[phpBB Debug] PHP Notice: in file /viewtopic.php on line 1488: Undefined index: thanks_post
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3840: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3184)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3842: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3184)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3843: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3184)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3844: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3184)
takadante
Registered User
Posts: 62
Joined: Tue Nov 11, 2008 5:52 am
Contact:

Re: [DEV] Thank Post Mod (hide MOD compatible ) 0.2.0

Post by takadante »

I am having my prevbious problem, once again.

I installed everything, and did ALL Edits, but the THANKS button does not appear. I am using a custom template, and i have refreshed everything, and cleared the cache.

I remember editing part of the script to look somehwere else for the image, but I am not sure what that is anymore. Any ideas guys?

Also, it seems that after I refreshed my imageset, template, and theme, my css is not coming into affect or something. Image below.

Image
http://theappshare.com ~ iPhone and OSX Applications!
usenet2you
Registered User
Posts: 407
Joined: Sat Mar 22, 2008 7:31 pm
Location: The Netherlands

Re: [DEV] Thank Post Mod (hide MOD compatible ) 0.2.0

Post by usenet2you »

here is a bit of viewtopic.php

Code: Select all

// Check if the topic viewer has posted in a topic
$unhide = false;
$sql = 'SELECT post_thanked
   FROM ' . POSTS_TABLE . '
   WHERE topic_id = ' . $topic_id;
$result = $db->sql_query($sql);
$post_thanked = $db->sql_fetchfield('post_thanked');
$db->sql_freeresult($result);

if ($user->data['user_id'] != ANONYMOUS)
{
   // If moderator or admin, skip reply check, auto unhide
   if ($auth->acl_get('m_', $forum_id))
   {
      $unhide = true;
   }
   else if ($post_thanked)
   {
      $unhide = true;
   }
   else
   {
   $sql = "SELECT poster_id, topic_id 
      FROM " . POSTS_TABLE . "
      WHERE topic_id = $topic_id 
      AND poster_id = " . $user->data['user_id']; 

   $result = $db->sql_query($sql);
   $unhide = $db->sql_affectedrows($result) ? true : false;
   $db->sql_freeresult($result);
   }
}
and here is my problem;

after some errors ive decided to reMOD my forum, but i think im doin' something wrong..

see this screenshot;
http://img261.imageshack.us/img261/473/wtf.png

without giving a Thanks, the hide is unhidden, can see everything, this is only if a topic has been thanked by other members and if the topic hasnt been thanked yet then all is normal, but after giving a thank and going to another account its still the same as 1st and all is unhidden for any user.

whats wrong?
usenet2you
Registered User
Posts: 407
Joined: Sat Mar 22, 2008 7:31 pm
Location: The Netherlands

Re: [DEV] Thank Post Mod (hide MOD compatible ) 0.2.0

Post by usenet2you »

are u still know something Mahoney? is there something wrong in the other file that has been editted??
Thaitanium
Registered User
Posts: 14
Joined: Tue Oct 14, 2008 5:14 pm

Re: [DEV] Thank Post Mod (hide MOD compatible ) 0.2.0

Post by Thaitanium »

I have 0.4.0, does anyone know the edits to make it compatible with simple hide mod. Undoing the edits will be painful.
If possible please provide necessary edits of viewtopic.php for 0.4.0
cacc
Registered User
Posts: 20
Joined: Sat Nov 11, 2006 5:13 pm
Location: Toronto, Ontario
Contact:

Re: [DEV] Thank Post Mod (hide MOD compatible ) 0.2.0

Post by cacc »

Is it possible to add the number of thanks a post has received in the viewforum_body next to the number of replies a topic has received?
Locked

Return to “[3.0.x] MODs in Development”