[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!
Get Involved
User avatar
Mahoney
Registered User
Posts: 196
Joined: Sun Mar 16, 2008 4:07 pm
Contact:

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

Post by Mahoney » Mon Aug 11, 2008 4:42 pm

Hello
Professional wrote:sorry ,have this mod solved the problem as i said here?
http://www.phpbb.com/community/viewtopi ... &t=1125125
This mod here is totally different than geoffreaks Thank Post Mod 0.4.0.
It is not the same MOD. This MOD consumed very little RAM in comparison to geoffreaks Thank Post Mod.


Best regards: Mahoney

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.1.0

Post by usenet2you » Mon Aug 11, 2008 4:56 pm

I think you have see this over your head. :oops:
Mahoney wrote:Hello
Search and Delete in viewtopic_body.html

Code: Select all

code removed

Search

Code: Select all

code removed
Add after

Code: Select all

code removed

Best regards: Mahoney
^^ few messages ago.

And what about this? :o

Image

I want that the thank button left near the text comes.

Can you tell me how I can change that.

EDIT:
FIXED!

new code for the thanks button on the place of the remove button... :

Code: Select all

<!-- IF postrow.S_FIRST_POST -->
<tr class="row2">
	      <td valign="top" style="padding-left: 4px;">
	<p 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_PATH}/thankposts.gif" alt="{L_THANKS}" /></a><!-- ENDIF --></td>
		<td style="text-align: left;"><!-- IF postrow.THANKS_LIST -->{postrow.THANKS_FROM}:<br /> {postrow.THANKS_LIST}<!-- ENDIF --></td>
	</tr>
<!-- ENDIF -->
maybe no bot protection, but I can add it later. :)
Last edited by usenet2you on Tue Aug 12, 2008 11:27 am, edited 1 time in total.

User avatar
Nailz
Registered User
Posts: 125
Joined: Fri Nov 10, 2006 8:44 pm
Contact:

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

Post by Nailz » Mon Aug 11, 2008 5:12 pm

I've installed and nothing showing for me, I did get a bit confuzzed with install instructions though, I take it when I get to the prosilver edits, I ignore them and use the subsilver install instructions?

Using a subsilver based theme, so thats what I did and nothing coming up in forum or acp, refreshed everything and cleared cache.

User avatar
Nailz
Registered User
Posts: 125
Joined: Fri Nov 10, 2006 8:44 pm
Contact:

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

Post by Nailz » Mon Aug 11, 2008 5:53 pm

Well got that bit fixed, but instead of the remove thanks, can it just show who has thanked the poster?

User avatar
IPB_Refugee
Registered User
Posts: 1290
Joined: Fri Jul 07, 2006 2:25 pm
Location: Austria
Name: Wolfgang Weber

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

Post by IPB_Refugee » Mon Aug 11, 2008 6:30 pm

Yes. Please read page 2 of this topic.

Regards
Wolfgang

User avatar
Professional
Registered User
Posts: 187
Joined: Mon Jan 21, 2008 2:40 pm

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

Post by Professional » Tue Aug 12, 2008 12:18 pm

Mahoney wrote:Hello
Professional wrote:sorry ,have this mod solved the problem as i said here?
http://www.phpbb.com/community/viewtopi ... &t=1125125
This mod here is totally different than geoffreaks Thank Post Mod 0.4.0.
It is not the same MOD. This MOD consumed very little RAM in comparison to geoffreaks Thank Post Mod.


Best regards: Mahoney
tnx,so i want to install this mod but because of the sql i can not.
your mod sql is:

Code: Select all

CREATE TABLE `phpbb_thanks` (
  `thanks_id` mediumint(8) unsigned NOT NULL auto_increment,
  `thanks_from` mediumint(8) unsigned NOT NULL,
  `thanks_to` mediumint(8) unsigned NOT NULL,
  `post_id` mediumint(8) unsigned NOT NULL,
  PRIMARY KEY  (`thanks_id`)
);
ALTER TABLE `phpbb_posts` ADD `post_thanked` INT(11) UNSIGNED NOT NULL DEFAULT '0';
ALTER TABLE `phpbb_users` ADD `user_thanked` INT(11) UNSIGNED NOT NULL DEFAULT '0',
ADD `user_thanks` INT(11) UNSIGNED NOT NULL DEFAULT '0',
ADD `user_thanks_post` INT(11) UNSIGNED NOT NULL DEFAULT '0';
and the old thank mod was:

Code: Select all

CREATE TABLE `phpbb_thanks` (
  `post_id` mediumint(8) NOT NULL default '0',
  `user_id` mediumint(8) NOT NULL default '0'
);
and when i want to insert this mod's sql it says the phpbb_thanks table already exist.
so how can i remove this table completely?

Code: Select all

CREATE TABLE `phpbb_thanks` (
  `post_id` mediumint(8) NOT NULL default '0',
  `user_id` mediumint(8) NOT NULL default '0'
);
انجمن تخصصی نسل جدید موبایل ها
My Mobile Forum: M4P Forum
Every Thing That U Feel,Is Every Thing That I Feel.

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.1.0

Post by usenet2you » Tue Aug 12, 2008 12:34 pm

You may get more errors then only for the table phpbb_thanks.

Do this:

DROP TABLE phpbb_thanks;

and for others,

ALTER TABLE phpbb_whatever DROP whatever_field;

r4dsking
Registered User
Posts: 89
Joined: Tue Jun 17, 2008 3:56 am
Contact:

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

Post by r4dsking » Tue Aug 12, 2008 2:05 pm

Can bots thank in this version?

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.1.0

Post by usenet2you » Tue Aug 12, 2008 2:43 pm

r4dsking wrote:Can bots thank in this version?
no

User avatar
Professional
Registered User
Posts: 187
Joined: Mon Jan 21, 2008 2:40 pm

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

Post by Professional » Tue Aug 12, 2008 3:12 pm

usenet2you wrote:
ALTER TABLE phpbb_whatever DROP whatever_field;
sorry what do this ? :shock:
انجمن تخصصی نسل جدید موبایل ها
My Mobile Forum: M4P Forum
Every Thing That U Feel,Is Every Thing That I Feel.

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.1.0

Post by usenet2you » Tue Aug 12, 2008 3:35 pm

Professional wrote:
usenet2you wrote:
ALTER TABLE phpbb_whatever DROP whatever_field;
sorry what do this ? :shock:
If you dont remove the others fields what the sql have maked of the mod of geofreak.>> This mod don't work. ;)

.:: Chico ::.
Registered User
Posts: 463
Joined: Fri Aug 03, 2007 6:35 am
Location: Rio de Janeiro
Contact:

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

Post by .:: Chico ::. » Wed Aug 13, 2008 3:32 am

Mahoney wrote:Hello
usenet2you wrote:oke, btw; I can thank all post and not only the first one... I think its a bug?
No this is not a BUG. :evil: That's intention.

For the display only in the first post, you must do the following
Best regards: Mahoney
There is a little bug in thanks only first post way, i'm able to thanks every first post in each page (1, 2 ,3, 4, etc), not only the first post of the topic.

Thank you for this mod!

User avatar
Mahoney
Registered User
Posts: 196
Joined: Sun Mar 16, 2008 4:07 pm
Contact:

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

Post by Mahoney » Wed Aug 13, 2008 8:45 am

Hello .:: Chico ::.
There is a little bug in thanks only first post way, i'm able to thanks every first post in each page (1, 2 ,3, 4, etc), not only the first post of the topic.
Hm...O.K. You can try this

Open: thanks.php
FIND

Code: Select all

WHERE p.post_id = ' . $post_id;
REPLACE-WITH

Code: Select all

WHERE p.post_id = ' . $post_id . '
      AND p.post_id = t.topic_first_post_id';
FIND

Code: Select all

$sql = 'DELETE FROM ' . THANKS_TABLE . '
         WHERE thanks_from = ' . $user->data['user_id'] . ' AND post_id = ' . $post_id;
      $db->sql_query($sql);
Replace with

Code: Select all

$sql = 'DELETE FROM ' . THANKS_TABLE . '
         WHERE thanks_from = ' . $user->data['user_id'];
Open: viewtopic.php
FIND

Code: Select all

'S_FIRST_POST'      => true,
REPLACE-WITH

Code: Select all

'S_FIRST_POST'      => ($row['post_id'] == $topic_data['topic_first_post_id']) ? true : false,
Open: viewtopic_body.html (prosilver)
FIND

Code: Select all

<!-- IF postrow.S_FIRST_ROW == 2 -->
					<!-- IF postrow.S_FIRST_POST and not postrow.S_GIVE_THANKS and not postrow.S_IS_OWN_POST --><li class="thanks-icon"><a href="{postrow.U_THANKS}" title="{L_THANKS}"><span>{L_THANKS}</span></a></li><!-- ENDIF --><!-- ENDIF -->
REPLACE-WITH

Code: Select all

<!-- IF postrow.S_FIRST_POST and not postrow.S_GIVE_THANKS and not postrow.S_IS_OWN_POST --><li class="thanks-icon"><a href="{postrow.U_THANKS}" title="{L_THANKS}"><span>{L_THANKS}</span></a></li><!-- ENDIF -->
Open: viewtopic_body.html (for subsilver2)
FIND

Code: Select all

<!-- IF postrow.S_FIRST_ROW == 2 -->
<!-- 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_PATH}/thankposts.gif" alt="{L_THANKS}" /></a><!-- ENDIF --><!-- ENDIF -->
REPLACE-WITH

Code: Select all

<!-- 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_PATH}/thankposts.gif" alt="{L_THANKS}" /></a><!-- ENDIF -->
So always remove at the beginning

Code: Select all

<!-- IF postrow.S_FIRST_ROW == 2 -->
And and at the end

Code: Select all

<!-- ENDIF -->

Best regards: Mahoney
Last edited by Mahoney on Wed Aug 13, 2008 1:15 pm, edited 1 time in total.

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

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

Post by starwar » Wed Aug 13, 2008 11:35 am

thanks

it works perfect with phpbb 3.0.2

r4dsking
Registered User
Posts: 89
Joined: Tue Jun 17, 2008 3:56 am
Contact:

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

Post by r4dsking » Wed Aug 13, 2008 1:42 pm

If i install this mod, all thanks given from the other mod of geo's will be lost?

Locked

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