[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
User avatar
1234homie
Registered User
Posts: 439
Joined: Fri Sep 26, 2008 3:17 pm

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

Post by 1234homie » Fri Jan 09, 2009 12:01 pm

Hi, I have new suggest for future this mod... I suggest to add in users profiles table "Who thanked user:" I think its good idea and else I suggest to add a page Top thanks

starwar
Registered User
Posts: 99
Joined: Tue Nov 21, 2006 7:22 pm

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

Post by starwar » Sat Jan 10, 2009 7:45 am

hi I get this error only when I crate new forum in Administrator Control panel.

anyway to solve?
pls

[phpBB Debug] PHP Notice: in file /includes/acp/acp_forums.php on line 686: Undefined index: enable_thanks
[phpBB Debug] PHP Notice: in file /adm/index.php on line 150: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3208)
[phpBB Debug] PHP Notice: in file /adm/index.php on line 152: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3208)
[phpBB Debug] PHP Notice: in file /adm/index.php on line 153: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3208)
[phpBB Debug] PHP Notice: in file /adm/index.php on line 154: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3208)

ValorSolo
Registered User
Posts: 84
Joined: Mon Nov 13, 2006 9:54 am
Contact:

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

Post by ValorSolo » Sun Jan 11, 2009 6:02 am

ValorSolo wrote:Any chance of getting a top 5 (or 10) thanked users add-on.
This would display on the index page.
Maybe modeled after this Mod.
http://www.phpbb.com/community/viewtopi ... s+on+Index

If I could code well enough, I'd do it.
But the mysql stuff is out of my realm of knowledge.
Still waiting for a reply on this.

ValorSolo
Registered User
Posts: 84
Joined: Mon Nov 13, 2006 9:54 am
Contact:

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

Post by ValorSolo » Tue Jan 13, 2009 5:57 am

I've taken it upon myself to code the 'top x thanked members' add-on.
I am about half way finished. Edit: 100%
So far it populates the list of user, but not the number of thanks for each user.Edit: Fixed


Features include ACP config of X number of thanked members. Working.
Display list on index.php. Working.
Shows total number of thanks received for members on index page. Working.
Well it's a pretty small add-on, so that's all the features.

Install instructions are provided in the zip.
Download it HERE

I'm also looking into making a default on/off module for the ACP.
Just to give admins the chose of it being defaulted to on or off.

User avatar
DoYouSpeakWak
Registered User
Posts: 2307
Joined: Fri Jul 25, 2008 1:32 pm
Location: Island of Wak-Wak
Name: Hans Lassen
Contact:

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

Post by DoYouSpeakWak » Sun Jan 18, 2009 7:09 pm

Thx for that small mod. Very handy if the thanks mod are widely used on a board.

Subsilver2 edits here. Tested and working.

Code: Select all

<table class="tablebg" width="100%" cellspacing="1">
<tr>
	<td class="cat" colspan="2"><h4>{L_TOP_THANKED}</h4></td>
</tr>
<tr>
	<td class="row1"><img src="{T_THEME_PATH}/images/whosonline.gif" alt="{L_TOP_THANKED}" /></td>
	<td class="row1" width="100%" valign="middle"><p class="genmed">{TOP_THANKED_LIST}</p></td>
</tr>
</table>
If you add something like this to your mod, just to put in index and hide if the thanks mod are turned off in acp or if you make a button in the section your mod allready uses. On and off switch.

Code: Select all

<!-- IF THANKS_ADDON_MOD_ENABLE -->
For some strange reason i cant get the viewtopic code for this (not ValorSolo`s mod) to work. So i changed it a bit and now it works perfect and the images are no longer in imageset, but in imageset/(your language). So if you test this out remember to move your thanks and remove thanks images to each imageset language folder first. Ohh yes and guest cannot see any of this. You can easily change this, but for our board its fitting.

Prosilver

Code: Select all

	<!-- IF postrow.S_IS_OWN_POST -->
	<!-- IF THANKS_ENABLE and S_USER_LOGGED_IN -->
	<!-- IF postrow.THANKS_LIST -->
	<div class="post bg3">
		<div class="inner"><span class="corners-top"><span></span></span>
			<dl class="postbody">
				<dd> 
					<!-- IF postrow.THANKS_LIST and S_USER_LOGGED_IN-->
					<strong>{postrow.THANKS_FROM}</strong>: {postrow.THANKS_LIST}
					<!-- ENDIF -->	
				</dd>
			</dl>  
		<span class="corners-bottom"><span></span></span></div>
	</div>
	<hr class="divider" />
	<!-- ENDIF -->
	<!-- ENDIF -->
	<!-- ELSE -->
	<!-- IF THANKS_ENABLE and S_USER_LOGGED_IN -->
	<div class="post bg3">
		<div class="inner"><span class="corners-top"><span></span></span>
			<dl class="postbody">
				<dd> 
					<!-- IF postrow.THANKS_LIST and S_USER_LOGGED_IN-->
					<strong>{postrow.THANKS_FROM}</strong>: {postrow.THANKS_LIST}
					<!-- ENDIF -->	
				</dd>
			</dl>  
			<dl>
				<dt style="text-align: center">
					<!-- IF postrow.S_FIRST_POST and not postrow.S_GIVE_THANKS and not postrow.S_IS_OWN_POST --><a href="{postrow.U_THANKS}"><img src="{T_IMAGESET_LANG_PATH}/thanks_posts.gif" alt="{L_THANKS1}"/></a><!-- ENDIF -->
					<!-- IF postrow.S_GIVE_THANKS -->  
					<dl>
						<dt style="text-align: center">
							<a href="{postrow.U_THANKS}"><img src="{T_IMAGESET_LANG_PATH}/thanks_remove.gif" alt="{L_THANKS_REMOVE}"/></a>
						</dt>
					</dl><!-- ENDIF -->
				</dt>
			</dl>
		<span class="corners-bottom"><span></span></span></div>
	</div>
	<hr class="divider" />
	<!-- ENDIF -->
	<!-- ENDIF -->
Subsilver

Code: Select all

<!-- IF postrow.S_IS_OWN_POST -->
<!-- IF THANKS_ENABLE and S_USER_LOGGED_IN -->
<!-- IF postrow.THANKS_LIST -->
<table class="tablebg" width="100%" cellspacing="0">
  <!-- IF postrow.S_ROW_COUNT is even -->
  <tr class="row1">
    <!-- ELSE -->
  <tr class="row2">
    <!-- ENDIF -->
    <td valign="top" style="padding-left: 4px;">
      <!-- IF postrow.THANKS_LIST and S_USER_LOGGED_IN-->
      {postrow.THANKS_FROM}: {postrow.THANKS_LIST}
      <!-- ENDIF -->
    </td>
  </tr>
  <tr>
    <td class="spacer" colspan="2" height="1"><img src="images/spacer.gif" alt="" width="1" height="1" /></td>
  </tr>
</table>
<!-- ENDIF -->
<!-- ENDIF -->
<!-- ELSE -->
<!-- IF THANKS_ENABLE and S_USER_LOGGED_IN -->
<table class="tablebg" width="100%" cellspacing="0">
  <!-- IF postrow.S_ROW_COUNT is even -->
  <tr class="row1">
    <!-- ELSE -->
  <tr class="row2">
    <!-- ENDIF -->
    <td style="text-align: center;" width="155">
	  <!-- IF THANKS_ENABLE -->
	  <!-- IF postrow.S_FIRST_POST and not postrow.S_GIVE_THANKS and not postrow.S_IS_OWN_POST --><a href="{postrow.U_THANKS}"><img style="align: center;" src="{T_IMAGESET_LANG_PATH}/thankposts.gif" alt="{L_THANKS1}" /></a><!-- ENDIF --><!-- ENDIF -->	
      <!-- IF postrow.S_GIVE_THANKS -->
      <a href="{postrow.U_THANKS}"><img src="{T_IMAGESET_LANG_PATH}/removethanks.gif" alt="{L_THANKS_REMOVE}"/></a>
      <!-- ENDIF -->
    </td>
    <td valign="top" style="padding-left: 4px;">
      <!-- IF postrow.THANKS_LIST and S_USER_LOGGED_IN-->
      {postrow.THANKS_FROM}: {postrow.THANKS_LIST}
      <!-- ENDIF -->
    </td>
  </tr>
  <tr>
    <td class="spacer" colspan="2" height="1"><img src="images/spacer.gif" alt="" width="1" height="1" /></td>
  </tr>
</table>
<!-- ENDIF -->
<!-- ENDIF -->
Whatever you share comes back. Support the phpBB Communities
My Validated and Released Modifications
Offering paid phpBB help and System administrator services.

zaio
Registered User
Posts: 14
Joined: Wed Jan 30, 2008 5:11 pm

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

Post by zaio » Mon Jan 26, 2009 4:58 pm

i can't daownload the mod

User avatar
mehdi2224
Registered User
Posts: 43
Joined: Wed Jan 30, 2008 11:19 am

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

Post by mehdi2224 » Mon Jan 26, 2009 5:06 pm

thank for this nice mod ;) ;)

i have more than 500 forum in my board . how can i enable thanks on every of them with one query

best regard 8-)

User avatar
knmt
Registered User
Posts: 110
Joined: Fri Aug 29, 2008 10:13 am
Contact:

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

Post by knmt » Tue Jan 27, 2009 9:16 am

Code: Select all

UPDATE `phpbb_forums` SET enable_thanks = 1
Change phpbb to your forum's prefix.

zaio
Registered User
Posts: 14
Joined: Wed Jan 30, 2008 5:11 pm

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

Post by zaio » Tue Jan 27, 2009 3:39 pm

can you uploald the mode im megauplold

User avatar
DoYouSpeakWak
Registered User
Posts: 2307
Joined: Fri Jul 25, 2008 1:32 pm
Location: Island of Wak-Wak
Name: Hans Lassen
Contact:

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

Post by DoYouSpeakWak » Tue Jan 27, 2009 3:44 pm

Whatever you share comes back. Support the phpBB Communities
My Validated and Released Modifications
Offering paid phpBB help and System administrator services.

User avatar
mehdi2224
Registered User
Posts: 43
Joined: Wed Jan 30, 2008 11:19 am

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

Post by mehdi2224 » Tue Jan 27, 2009 8:01 pm

knmt wrote:

Code: Select all

UPDATE `phpbb_forums` SET enable_thanks = 1
Change phpbb to your forum's prefix.
thanks . it works great

NTH08
Registered User
Posts: 50
Joined: Sat Dec 13, 2008 11:31 am
Location: Vietnam
Contact:

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

Post by NTH08 » Thu Jan 29, 2009 5:28 am

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:

tzar
Registered User
Posts: 73
Joined: Mon Nov 03, 2008 1:11 pm

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

Post by tzar » Thu Jan 29, 2009 8:08 pm

Topic Thanks Posto Mod 0.4.0 lock

Can someone help me with this. Thanks mod work on first thanks, when thanks post second time a get this error.

General Error
SQL ERROR [ mysqli ]

Duplicate entry '26' for key 1 [1062]

SQL

INSERT INTO phpbb_thanks (user_id, post_id) VALUES ('2', 26)

BACKTRACE

FILE: includes/db/mysqli.php
LINE: 163
CALL: dbal->sql_error()

FILE: thanks.php
LINE: 203
CALL: dbal_mysqli->sql_query()

FILE: thanks.php
LINE: 46
CALL: insert_thanks()

FILE: viewtopic.php
LINE: 24
CALL: include('thanks.php')

disASM
Registered User
Posts: 1
Joined: Thu Feb 12, 2009 5:56 am

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

Post by disASM » Thu Feb 12, 2009 5:58 am

knmt wrote:

Code: Select all

UPDATE `phpbb_forums` SET enable_thanks = 1
Change phpbb to your forum's prefix.

What exactly do i do with this? I also have many forums to update...

NTH08
Registered User
Posts: 50
Joined: Sat Dec 13, 2008 11:31 am
Location: Vietnam
Contact:

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

Post by NTH08 » Thu Feb 12, 2009 6:52 am


Locked

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