[RC1] Thank Post by User v0.3.2

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! No new topics are allowed in this forum.
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

IMPORTANT: MOD Development Forum rules

On February 1, 2009 this forum will be set to read only as part of retiring of phpBB2.
alexi02
Registered User
Posts: 271
Joined: Fri Mar 05, 2004 2:15 am
Location: Australia
Contact:

Re: [BETA] Thank Post by User 0.2.5a

Post by alexi02 » Wed Sep 26, 2007 7:03 am

ebliser wrote:Is anybody here ?!? :roll:
Check your PM asking you to email your viewtopic.php to me.

alexi02
Registered User
Posts: 271
Joined: Fri Mar 05, 2004 2:15 am
Location: Australia
Contact:

Re: [BETA] Thank Post by User 0.2.5a

Post by alexi02 » Wed Sep 26, 2007 7:13 am

kakiloki wrote:Thanks for great MOD.

If I want to remove some users that in Thanked Users list, how I can do it? I just want to remove few users not all.

Thanks again
Sorry about the delay, you've got quite a bit of a process to go through...

1. You would need to find the post id for the post and each user's id (numeric)
2. In your database go to the table phpbb_posts and find the post id
3. Edit the thanks_count and decrease that by each user you wish to remove
4. Edit the thanks_from_user_id and remove the user's id
5. In your database go to the table phpbb_users
6. Find the user's id and decrease the user_thanks_given by 1.

Probably should of set up this mod to have it's own table for simplicity.

ebliser
Registered User
Posts: 4
Joined: Fri Sep 14, 2007 6:07 am

Re: [BETA] Thank Post by User 0.2.5a

Post by ebliser » Fri Sep 28, 2007 11:18 am

nice to see you alexi02 !
i answered the pm !

ramin
Registered User
Posts: 2
Joined: Mon Oct 08, 2007 4:03 pm

Re: [BETA] Thank Post by User 0.2.5a

Post by ramin » Mon Oct 08, 2007 5:20 pm

Hi to all
the table which shows the users who thanked the post doesnt show up
I have this problem too! :(

this codes are not working:

Code: Select all

 {postrow.thanks.L_THANKS_TEXT}: {postrow.thanks.THANKS_USERS} 
in viewtopic_body.tpl file!

I use "Charcoal" template.

Help me please!

alexi02
Registered User
Posts: 271
Joined: Fri Mar 05, 2004 2:15 am
Location: Australia
Contact:

Re: [BETA] Thank Post by User 0.2.5a

Post by alexi02 » Tue Oct 09, 2007 6:58 am

Hi,

When you followed:

Code: Select all

#
#-----[ FIND ]------------------------------------------
#

'EDIT' => $edit,

#
#-----[ AFTER, ADD ]------------------------------------------
#

                'THANKS_IMG' => $thanks_img,
Scroll down until you find the closing bracket, which will look something like:

Code: Select all

 'U_MINI_POST' => $mini_post_url,
                'U_POST_ID' => $postrow[$i]['post_id'])
        );
After the above code is where the following code should be:

Code: Select all

 //
        // Start Thank Post by User Mod
        //

        if ($postrow[$i]['thanks_count'] >= 1) {

          $thanked_by = "";

          $thanked_users = explode("|",$postrow[$i]['thanks_from_user_id']);
          $thanked_count = $postrow[$i]['thanks_count'];

          // Loop through all users who thanked the post
          for ($x = 0; $x < $thanked_count; $x++) {

             // Users SQL
             $sql = "SELECT user_id, username
                     FROM " . USERS_TABLE . "
                     WHERE user_id = " . $thanked_users[$x];

             if ( !($result = $db->sql_query($sql)) ) {
                message_die(GENERAL_ERROR, "Could not obtain user information", '', __LINE__, __FILE__, $sql);
             }

             $user_row = $db->sql_fetchrow($result);
             $db->sql_freeresult($result);

             if ($x >= 1) { $thanked_by .= ", "; }

             // Add user to thanked by list
             $temp_url = "profile.$phpEx?mode=viewprofile&u=" . $user_row['user_id'];
             $thanked_by .= '<a href="' . $temp_url . '">' . $user_row['username'] . '</a>';
          }

          $template->assign_block_vars('postrow.thanks', array(
                'L_THANKS_TEXT' => $lang['Thanks_thanked_by'],
                'THANKS_USERS' => $thanked_by)
          );
        }

        //
        // End Thank Post by User Mod
        //

ramin
Registered User
Posts: 2
Joined: Mon Oct 08, 2007 4:03 pm

Re: [BETA] Thank Post by User 0.2.5a

Post by ramin » Tue Oct 09, 2007 7:47 am

thank you
thank you
thank you
thank you
thank you
thank you

:mrgreen: :mrgreen: :mrgreen:

mahninphyu
Registered User
Posts: 7
Joined: Sat Sep 08, 2007 4:30 am

Re: [BETA] Thank Post by User 0.2.5a

Post by mahninphyu » Mon Oct 15, 2007 3:37 pm

hello.
i bought enlighten skin from extremepixels.com. i can not add this mod. so i give it to them and they add it for me. everything come out ok except one probelm. the post expend. please look at the picture.

http://img440.imageshack.us/my.php?imag ... ts3ag0.png

here is the code that they add it for me in view_topic.tpl.
{THANKS_JAVASCRIPT}
<table width="100%" cellspacing="1" cellpadding="4" border="0" class="tborder">
<tr>
<td class="row2" align="left" valign="bottom" colspan="2"><span class="nav"><a href="{U_INDEX}" class="nav">{L_INDEX}</a> -> <a href="{U_VIEW_FORUM}" class="nav">{FORUM_NAME}</a> -> {TOPIC_TITLE}</span><br />
</td>
</tr>
</table>

<br />

<table width="100%" cellspacing="0" cellpadding="0" border="0" style="margin-bottom:5px">
<tr align="right">
<td align="left" valign="middle" nowrap="nowrap"><span class="nav"><a href="{U_POST_NEW_TOPIC}"><img src="{POST_IMG}" border="0" alt="{L_POST_NEW_TOPIC}" align="middle" /></a>&nbsp;&nbsp;&nbsp;<a href="{U_POST_REPLY_TOPIC}"><img src="{REPLY_IMG}" border="0" alt="{L_POST_REPLY_TOPIC}" align="middle" /></a></span></td>

<td colspan="2" valign="middle"><span class="nav2"><a href="{U_VIEW_OLDER_TOPIC}" class="nav2">{L_VIEW_PREVIOUS_TOPIC}</a> :: <a href="{U_VIEW_NEWER_TOPIC}" class="nav2">{L_VIEW_NEXT_TOPIC}</a></span><br /><div class="gensmall" style="margin-top:2px"><b>{PAGINATION}</b></div></td>
</tr>
</table>

{POLL_DISPLAY}


<!-- BEGIN postrow -->


<!-- top category table setup -->
<table width="100%" style="background-image:url(templates/enlighten/images/cat_back.gif)" border="0" cellpadding="0" cellspacing="0" class="tcat">
<tr>
<td width="16" height="35" align="left" valign="top"><img src="templates/enlighten/images/cat_top_ls.gif" width="16" height="35" alt=" " border="0" /></td>
<td width="100%" align="left" valign="middle">
<a href="{postrow.U_MINI_POST}"><img align="absmiddle" src="{postrow.MINI_POST_IMG}" width="10" alt="{postrow.L_MINI_POST_ALT}" title="{postrow.L_MINI_POST_ALT}" border="0" /></a> <span class="cattitle">{postrow.POST_SUBJECT}</span>
</td>
<td width="19" height="27" align="left" valign="middle"><a href="javascript:scroll(0,0);"><img src="templates/enlighten/images/collapse_tcat.gif" width="11" height="12" alt="" border="0" /></a></td>
<td width="34" height="35" align="right" valign="top"><img src="templates/enlighten/images/cat_top_rs.gif" width="34" height="35" alt=" " border="0" /></td>
</tr>
</table>
<!-- End top category table setup -->


<table class="tborder" width="100%" cellspacing="1" cellpadding="3" border="0" align="center">
<tr>
<th width="150" height="26" nowrap="nowrap">{L_AUTHOR}</th>
<th nowrap="nowrap">{L_MESSAGE}</th>
</tr>
<tr>
<td class="row1" width="150" align="left" valign="top" nowrap="nowrap" style="padding-right:11px"><span class="name"><a name="{postrow.U_POST_ID}"></a><b>{postrow.POSTER_NAME}</b></span><br /><span class="postdetails">{postrow.POSTER_RANK}<br />{postrow.RANK_IMAGE}{postrow.POSTER_AVATAR}<br /><br />{postrow.POSTER_JOINED}<br />{postrow.POSTER_POSTS}<br /><br />{postrow.POSTER_THANKS_GIVEN}<br />{postrow.POSTER_THANKS_RECEIVED}<br /><br />{postrow.POSTER_FROM}</span><br /><br /><span class="postdetails">{postrow.POST_DATE}</span></td>
<td class="row2" width="100%" valign="top">

<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td valign="top" style="padding-bottom:3px; padding-top:3px" align="right">{postrow.QUOTE_IMG} {postrow.THANKS_IMG} {postrow.EDIT_IMG} {postrow.DELETE_IMG} {postrow.IP_IMG}</td>
</tr><tr>
<td style="background-color: #635A49" height="1"><img src="templates/enlighten/images/trans.gif" width="1" height="1" alt="" border="0" /></td>
</tr><tr>
<td style="padding-top:3px" colspan="2" align="left" valign="top"><span class="postbody">{postrow.MESSAGE}</span></td>
</tr><tr>
<td colspan="2" align="left" valign="bottom" height="100%"><span class="postsig">{postrow.SIGNATURE}</span><span class="gensmall">{postrow.EDITED_MESSAGE}</span></td>
</tr>
</table>

</td>
</tr>
<tr>
<td colspan="2" class="row1" width="100%" height="15" align="left" valign="bottom" nowrap="nowrap">

<table cellspacing="0" cellpadding="0" border="0">
<tr>
<td style="padding-left:2px; padding-top:2px" valign="bottom" align="center">{postrow.PROFILE_IMG} {postrow.PM_IMG} {postrow.EMAIL_IMG} {postrow.WWW_IMG} {postrow.AIM_IMG} {postrow.YIM_IMG} {postrow.MSN_IMG} {postrow.ICQ_IMG}</td>
</tr>
</table>

</td>
</tr>
</table>

<!-- bottom table setup -->
<table width="100%" class="thead" cellpadding="0" cellspacing="0">
<tr>
<td width="100%" height="5"><img src="templates/enlighten/images/trans.gif" height="5" alt=" " border="0" /></td>
</tr>
</table>
<!-- End bottom table setup -->
<!-- BEGIN thanks -->
<tr>
<td colspan="2" class="{postrow.ROW_CLASS}" width="100%" valign="bottom"><table cellspacing="0" cellpadding="0" border="0" height="18">
<tr>
<td valign="middle"><span class="gen">{postrow.thanks.L_THANKS_TEXT}: {postrow.thanks.THANKS_USERS}</span></td>
</tr>
</table></td>
</tr>
<!-- END thanks -->
<br />
<!-- END postrow -->

<form method="post" action="{S_POST_DAYS_ACTION}" style="padding:0px;margin:0px">
<table class="tborder" width="100%" cellspacing="1" cellpadding="3" border="0" align="center">
<tr align="center">

<td class="row1" colspan="2" height="15"><table cellspacing="0" cellpadding="0" border="0">
<tr>
<td align="center"><span class="genmed">{L_DISPLAY_POSTS}: {S_SELECT_POST_DAYS}&nbsp;{S_SELECT_POST_ORDER}&nbsp;<input type="submit" class="mainoption" value="Go" name="submit" /></span></td>
</tr>
</table></td>
</tr>
</table>
</form>

<table width="100%" cellspacing="0" cellpadding="0" border="0" align="center" style="margin-top:3px">
<tr>
<td align="left" valign="middle" nowrap="nowrap"><span class="nav"><a href="{U_POST_NEW_TOPIC}"><img src="{POST_IMG}" border="0" alt="{L_POST_NEW_TOPIC}" align="middle" /></a>&nbsp;&nbsp;&nbsp;<a href="{U_POST_REPLY_TOPIC}"><img src="{REPLY_IMG}" border="0" alt="{L_POST_REPLY_TOPIC}" align="middle" /></a></span></td>
<td align="left" valign="middle" width="100%"><span class="nav">&nbsp;&nbsp;&nbsp;{PAGE_NUMBER}</span></td>
<td align="right" valign="top" nowrap="nowrap"><span class="gensmall">{S_TIMEZONE}</span><br /><span class="nav">{PAGINATION}</span>
</td>
</tr>
</table>

<br />

<table width="100%" cellspacing="2" border="0" align="center">
<tr>
<td width="40%" valign="top" nowrap="nowrap" align="left"><span class="gensmall">{S_WATCH_TOPIC}</span><br />
&nbsp;<br />
{S_TOPIC_ADMIN}</td>
<td align="right" valign="top" nowrap="nowrap">{JUMPBOX}<span class="gensmall">{S_AUTH_LIST}</span></td>
</tr>
</table>
can you please help me.
thanks

alexi02
Registered User
Posts: 271
Joined: Fri Mar 05, 2004 2:15 am
Location: Australia
Contact:

Re: [BETA] Thank Post by User 0.2.5a

Post by alexi02 » Tue Oct 16, 2007 2:24 pm

Hi,

You may replacing this:

Code: Select all

<table cellspacing="0" cellpadding="0" border="0">
<tr>
<td style="padding-left:2px; padding-top:2px" valign="bottom" align="center">{postrow.PROFILE_IMG} {postrow.PM_IMG} {postrow.EMAIL_IMG} {postrow.WWW_IMG} {postrow.AIM_IMG} {postrow.YIM_IMG} {postrow.MSN_IMG} {postrow.ICQ_IMG}</td>
</tr>
</table>

With this:

Code: Select all

<table cellspacing="0" cellpadding="0" border="0">
<tr>
<td style="padding-left:2px; padding-top:2px" valign="bottom" align="center">{postrow.PROFILE_IMG} {postrow.PM_IMG} {postrow.EMAIL_IMG} {postrow.WWW_IMG} {postrow.AIM_IMG} {postrow.YIM_IMG} {postrow.MSN_IMG} {postrow.ICQ_IMG}</td>
<!-- BEGIN thanks -->
<td style="padding-left:2px; padding-top:2px" valign="bottom" align="center"><span class="gen">{postrow.thanks.L_THANKS_TEXT}: {postrow.thanks.THANKS_USERS}</span>
</td>
<!-- END thanks -->
</tr>
</table>

mahninphyu
Registered User
Posts: 7
Joined: Sat Sep 08, 2007 4:30 am

Re: [BETA] Thank Post by User 0.2.5a

Post by mahninphyu » Tue Oct 16, 2007 3:08 pm

when i replace it, there is two place 'thank by' :D
the problem is the top post is reguler skin and the bottom post is expend.
i dont know why :(
this thank post is my first mod.
i did not add anyother mod yet.
ple help.
thanks

Image

cavallino
Registered User
Posts: 317
Joined: Thu Aug 04, 2005 7:06 am

Re: [BETA] Thank Post by User 0.2.5a

Post by cavallino » Mon Oct 22, 2007 8:35 am

hey alexi,
it would be nice if you can put an hyperlink over the "thanked x time in x post" in user details or wherever you want, to open a new page that shows up all the thanked posts... so It would be nice for members or the user himself to see which post(s) has/have been thanked! Otherwise, how can we find the thanked post in a crowded forum? Pass hand by hand all posts...? You can't even use the search for the string "Thanked by"... probably it is not even implemented in the search function.

What do you think?

alexi02
Registered User
Posts: 271
Joined: Fri Mar 05, 2004 2:15 am
Location: Australia
Contact:

Re: [BETA] Thank Post by User 0.2.5a

Post by alexi02 » Tue Oct 23, 2007 11:53 pm

To view all the users and the topics who have thanked a user in their profile follow the instructions below. In the profile you will firstly see a link on the "Thanked x times in x posts". This links back to the profile page and then displays the Thanked Listing which shows the users whom have thanked the post, the topic title and the post number (all with links of course).

1. Modify the Thank Post by User 0.2.5a as per this post
http://www.phpbb.com/community/viewtopi ... 7#p2938797

2. Then follow the modifications below.

Open includes/usercp_profile.php

Find

Code: Select all

$thanked_post_count = $db->sql_fetchrow($result);
$db->sql_freeresult($result);

$thanks_given = $user_row['user_thanks_given'];
$thanks_received = $user_row['user_thanks_received'] . ' ' . $lang['Thanks_thanked_2'] . ' ' . $thanked_post_count['thanks_count'] . ' ' . $lang['Thanks_thanked_3'];

}
else {
   $thanks_given = "";
   $thanks_received = "";
}

//
// End Thank Post by User Mod
//
Replace with

Code: Select all

$thanked_post_count = $db->sql_fetchrow($result);
$db->sql_freeresult($result);

$temp_url = "profile.$phpEx?mode=viewprofile&u=" . $profiledata['user_id'] . "&thankslist=1";
$thanks_given = $user_row['user_thanks_given'];
$thanks_received = '<a href="' . $temp_url . '">' . $user_row['user_thanks_received'] . ' ' . $lang['Thanks_thanked_2'] . ' ' . $thanked_post_count['thanks_count'] . ' ' . $lang['Thanks_thanked_3'] . '</a>';

}
else {
   $thanks_given = "";
   $thanks_received = "";
}

//
// End Thank Post by User Mod
//


// Thanks Listing
if ( isset($HTTP_GET_VARS['thankslist']) || $HTTP_GET_VARS['thankslist'] ) {

   // Thanked Listing SQL
   $sql = "SELECT thanks_from_user_id, thanks_count, topic_id, post_id
           FROM " . POSTS_TABLE . "
           WHERE poster_id = " . $profiledata['user_id'] . " AND thanks_count <> 0";

   if ( !($result = $db->sql_query($sql)) ) {
   message_die(GENERAL_ERROR, "Could not obtain posts information", '', __LINE__, __FILE__, $sql);
   }

   $thanked_listing = $db->sql_fetchrowset($result);
   $db->sql_freeresult($result);
   $thanked_listing_count = count($thanked_listing);

   for ($i = 0; $i < $thanked_listing_count; $i++) {

      $thanked_users = explode("|",$thanked_listing[$i]['thanks_from_user_id']);
      $thanked_count = $thanked_listing[$i]['thanks_count'];

      // Loop through all users who thanked the post
      for ($x = 0; $x < $thanked_count; $x++) {

         // Users SQL
         $sql = "SELECT user_id, username
                 FROM " . USERS_TABLE . "
                 WHERE user_id = " . $thanked_users[$x];

         if ( !($result = $db->sql_query($sql)) ) {
            message_die(GENERAL_ERROR, "Could not obtain user information", '', __LINE__, __FILE__, $sql);
         }

         $user_row = $db->sql_fetchrow($result);
         $db->sql_freeresult($result);

         if ($x >= 1) { $thanks_compiled .= ", "; }

            // Add user to thanked by list
            $temp_url = "profile.$phpEx?mode=viewprofile&u=" . $user_row['user_id'];
            $thanks_compiled .= '<a href="' . $temp_url . '">' . $user_row['username'] . '</a>';
      }

      // Topic SQL
      $sql = "SELECT topic_title
              FROM " . TOPICS_TABLE . "
              WHERE topic_id = " . $thanked_listing[$i]['topic_id'];

      if ( !($result = $db->sql_query($sql)) ) {
         message_die(GENERAL_ERROR, "Could not obtain user information", '', __LINE__, __FILE__, $sql);
      }

      $topic_row = $db->sql_fetchrow($result);
      $db->sql_freeresult($result);


      $temp_url_post = "viewtopic.$phpEx?p=" . $thanked_listing[$i]['post_id'] . "#" . $thanked_listing[$i]['post_id'];
      $temp_url_topic = "viewtopic.$phpEx?t=" . $thanked_listing[$i]['topic_id'];
      $thanks_post = '<a href="' . $temp_url_post . '"> (Post #' . $thanked_listing[$i]['post_id'] . ')</a>';
      $thanks_topic = '<a href="' . $temp_url_topic . '">' . $topic_row['topic_title'] . '</a>';
      $thanks_listing .= "Thanked by $thanks_compiled in $thanks_topic - $thanks_post<br/>";

      $thanks_compiled = '';
   }

   $template->assign_block_vars('thankslist', array(
      'THANKS_LISTING' => $thanks_listing,
      'L_THANKS_LISTING' => $lang['Thanks_listing'])
   );
}

Open templates/subSilver/profile_view_body.tpl

Find

Code: Select all

                <tr>
                  <td valign="top" align="right" nowrap="nowrap"><span class="gen">{L_THANKS_RECEIVED}:</span></td>
                  <td> <b><span class="gen">{THANKS_RECEIVED}</span></b></td>
                </tr>
After add

Code: Select all

                <!-- BEGIN thankslist -->
                <tr>
                  <td valign="top" align="right" nowrap="nowrap"><span class="gen">{thankslist.L_THANKS_LISTING}:</span></td>
                  <td> <span class="gen">{thankslist.THANKS_LISTING}</span></td>
                </tr>
                <!-- END thankslist -->

Open language/lang_english/lang_main.php

Find

Code: Select all

$lang['Thanks_thanks'] = 'Thanks';
$lang['Thanks_thanked_1'] = 'Thanked';
$lang['Thanks_thanked_2'] = 'Times in';
$lang['Thanks_thanked_3'] = 'Posts';
After add

Code: Select all

$lang['Thanks_listing'] = 'Thanked Listing'; 

alexi02
Registered User
Posts: 271
Joined: Fri Mar 05, 2004 2:15 am
Location: Australia
Contact:

Re: [BETA] Thank Post by User 0.2.5a

Post by alexi02 » Wed Oct 24, 2007 12:01 am

mahninphyu wrote:when i replace it, there is two place 'thank by' :D
the problem is the top post is reguler skin and the bottom post is expend.
Hm, try putting a <BR/> in my code (after <span class="gen"> part as seen below so it looks a little better:

Code: Select all

<!-- BEGIN thanks -->
<td style="padding-left:2px; padding-top:2px" valign="bottom" align="center"><span class="gen"><BR/>{postrow.thanks.L_THANKS_TEXT}: {postrow.thanks.THANKS_USERS}</span>
</td>
<!-- END thanks -->

Now we just need to remove the other Thanks. Replace this:

Code: Select all

<!-- bottom table setup -->
<table width="100%" class="thead" cellpadding="0" cellspacing="0">
<tr>
<td width="100%" height="5"><img src="templates/enlighten/images/trans.gif" height="5" alt=" " border="0" /></td>
</tr>
</table>
<!-- End bottom table setup -->
<!-- BEGIN thanks -->
<tr>
<td colspan="2" class="{postrow.ROW_CLASS}" width="100%" valign="bottom"><table cellspacing="0" cellpadding="0" border="0" height="18">
<tr>
<td valign="middle"><span class="gen">{postrow.thanks.L_THANKS_TEXT}: {postrow.thanks.THANKS_USERS}</span></td>
</tr>
</table></td>
</tr>
<!-- END thanks -->
<br />
<!-- END postrow -->
With this:

Code: Select all

<!-- bottom table setup -->
<table width="100%" class="thead" cellpadding="0" cellspacing="0">
<tr>
<td width="100%" height="5"><img src="templates/enlighten/images/trans.gif" height="5" alt=" " border="0" /></td>
</tr>
</table>
<!-- End bottom table setup -->
<br />
<!-- END postrow -->

cavallino
Registered User
Posts: 317
Joined: Thu Aug 04, 2005 7:06 am

Re: [BETA] Thank Post by User 0.2.5a

Post by cavallino » Wed Oct 24, 2007 8:31 pm

alexi02 wrote:To view all the users and the topics who have thanked a user in their profile follow the instructions below. In the profile you will firstly see a link on the "Thanked x times in x posts". This links back to the profile page and then displays the Thanked Listing which shows the users whom have thanked the post, the topic title and the post number (all with links of course).
Hi alexi, thanks for your help.
I have tried to apply all code changes you pointed but... when I click on the hyperlink in the view profile page, nothing happens, it just reload the profile page, what should appear? A popup? The hyperlink points to something like this: ../profile.php?mode=viewprofile&u=18&thankslist=1
I tried with the profile of users who already received and gave thanks... but in all of them the hyperlink doesnt open any page.

alexi02
Registered User
Posts: 271
Joined: Fri Mar 05, 2004 2:15 am
Location: Australia
Contact:

Re: [BETA] Thank Post by User 0.2.5a

Post by alexi02 » Thu Oct 25, 2007 7:40 am

What is supposed to happen is it links back to the profile page and then below the Thanked by x in x posts there is a Thanked List which shows each user who thanked the users profile, the topic and the post number.

I think I forgot to change something.
Find:
if ( isset($HTTP_GET_VARS['thankslist']) || $HTTP_GET_VARS['thankslist'] ) {

Replace with:
if ( isset($HTTP_GET_VARS['thankslist']) || isset ($HTTP_GET_VARS['thankslist']) ) {


If that doesn't work try removing the whole line as seen above and then remove the ending bracket which would be just below this part:
$template->assign_block_vars('thankslist', array(
'THANKS_LISTING' => $thanks_listing,
'L_THANKS_LISTING' => $lang['Thanks_listing'])
);

}

cavallino
Registered User
Posts: 317
Joined: Thu Aug 04, 2005 7:06 am

Re: [BETA] Thank Post by User 0.2.5a

Post by cavallino » Thu Oct 25, 2007 11:10 am

Thanks alexi,
the second solution (removing completely the line, along with the end braket) works, but I believe that in this way, the "Thanked Listing" are always showing up when you open a user's profile, and you can't hide them, am I correct? So if for example a user get 100 thanks in different posts, the profile page is gonna be very very long... hmmm maybe I will try to study if i can put somehow a toggle to hide/show the thanked listing field...

Anyway, would be possible to do the same way to show a "Given Thanks listing"?

Also I noticed that if for somewhat reason an admin/moderator deletes a post or topic in which a user gave or received a post thank, then the counters in the profile or viewtopic are not going back...

Post Reply

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