[CDB] Thanks for posts

A place for Extension Authors to post and receive feedback on Extensions still in development. No Extensions within this forum should be used within a live environment!
Scam Warning
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

IMPORTANT: Extensions Development rules

IMPORTANT FOR NEEDED EVENTS!!!
If you need an event for your extension please read this for the steps to follow to request the event(s)
Locked
Sepp71
Registered User
Posts: 78
Joined: Sat Sep 06, 2008 11:32 pm
Location: Germany

Stuck between Mod and Extension

Post by Sepp71 » Thu Nov 19, 2015 11:33 am

Hi,
I am trying to install this on a board that had the old mod (version not known) installed. Obviously I did not delete all the data connected to the mod when updating to 3.1.
Now the extension tries to somehow "update from the mod" where this is not what I want it to do (I only need a clean new installation of thank post extension).

So far I have deleted lots of SQL-data connected to the mod, especially:
table "phpbb_thanks"
"phpbb_config" entries containing "thanks"
phpbb_ext entry for a broken installation of the extension
phpbb_users with thanks_counters
but still my system seems not to be clean as the installation runs into errors because of table "thanks" missing oder thank_post_mod_version info missing.

What else can I do to get the installation to run (without regarding the old mod?)?

Edit: Got it to run finally
and the "thumbs up" shows.
But when clicking it, the board is running into php-errors now:
[phpBB Debug] PHP Warning: in file [ROOT]/ext/gfksx/ThanksForPosts/core/helper.php on line 665: round() expects parameter 2 to be long, string given
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 5277: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3903)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 5277: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3903)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 5277: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3903)

joe92
Registered User
Posts: 50
Joined: Sun Oct 04, 2015 1:04 pm

Re: [DEV] Thanks for posts

Post by joe92 » Thu Nov 19, 2015 1:39 pm

italian language here:

Code: Select all

https://tusfiles.net/0icgjwjw936t

rxu
Extensions Development Team
Posts: 3004
Joined: Wed Oct 25, 2006 12:46 pm
Location: Siberia, Russian Federation
Name: Ruslan
Contact:

Re: [DEV] Thanks for posts

Post by rxu » Thu Nov 19, 2015 3:39 pm

joe92 wrote:italian language here
Thanks. Something seems to be messed up there for the moment. Please make sure the language entries match the english ones here https://github.com/rxu/thanks_for_posts ... anguage/en
Sepp71 wrote:But when clicking it, the board is running into php-errors now
Thanks for the report. Could you try opening the file [ROOT]/ext/gfksx/ThanksForPosts/core/helper.php on line 665 and adding (int) in front of the $this->config['thanks_number_digits'] part?

Sepp71
Registered User
Posts: 78
Joined: Sat Sep 06, 2008 11:32 pm
Location: Germany

Re: [DEV] Thanks for posts

Post by Sepp71 » Thu Nov 19, 2015 4:00 pm

Thanks for your quick reply.
Meanwhile I have uninstalled and retried. The reason might be, that on the first install there had been set no values for the maximum displays etc, so the fields in the ACP were empty ("").
Now it seems to run in usual way except when you get as an admin on the X button left to the thanks lists. It asks "do you really want to delete thanks post lists" and if you select 'no' it doesn't continue.
What exactly do you mean with "in front of"? LIke this?

Code: Select all

'POST_REPUT'				=> ($this->get_thanks_number($row['post_id']) != 0) ? round($this->get_thanks_number($row['post_id']) / ($this->max_post_thanks / 100), (int)($this->config['thanks_number_digits']) . '%' : '',
Thanks!
Sepp

rxu
Extensions Development Team
Posts: 3004
Joined: Wed Oct 25, 2006 12:46 pm
Location: Siberia, Russian Federation
Name: Ruslan
Contact:

Re: [DEV] Thanks for posts

Post by rxu » Thu Nov 19, 2015 4:10 pm

Sepp71 wrote:What exactly do you mean with "in front of"? LIke this?
Yes. But if it works fine now, the fix is probably unneeded.

User avatar
Leinad4Mind
Translator
Posts: 852
Joined: Sun Jun 01, 2008 11:08 pm
Contact:

Re: [DEV] Thanks for posts

Post by Leinad4Mind » Thu Nov 19, 2015 7:38 pm

I guess the problem is on both sides... ask tapatalk for a solution!

Try this:

thanks_for_posts/notification/thanks.php

Code: Select all

public function get_url()
	{
		return append_sid($this->phpbb_root_path . 'viewtopic.' . $this->php_ext, "p={$this->item_id}#p{$this->item_id}");
	}
changes to

Code: Select all

public function get_url()
	{
		$server_url = generate_board_url();
		return append_sid($this->server_url . 'viewtopic.' . $this->php_ext, "p={$this->item_id}#p{$this->item_id}");
	}
Maybe it can work... not even tested :lol:
Want to access all my portuguese MOD and Extension translations?
Become my Patreon!
phpBB Portugal Translator and Moderator

bitsss
Registered User
Posts: 120
Joined: Fri Nov 09, 2012 11:04 am

Re: [DEV] Thanks for posts

Post by bitsss » Mon Nov 23, 2015 4:29 pm

Hi guys,
I wait eagerly for the RC-version. Who knows the date?
Is the DEV-Version only for test-areas?
bitsss wrote:The MOD allows to remove a thanks.
It would be a very nice feature, if this function (remove a thanks) will be blocked after x days.
@developer: is it possible to upgrade the MOD for this feature?
viewtopic.php?p=13945016#p13945016

Is it meanwhile implemented?

THX a LOT!!!

rxu
Extensions Development Team
Posts: 3004
Joined: Wed Oct 25, 2006 12:46 pm
Location: Siberia, Russian Federation
Name: Ruslan
Contact:

Re: [DEV] Thanks for posts

Post by rxu » Mon Nov 23, 2015 4:42 pm

bitsss wrote:I wait eagerly for the RC-version. Who knows the date?
Nobody knows, sorry. It's due to the lack of free time because of real life affairs.
bitsss wrote:Is the DEV-Version only for test-areas?
Yes. See the Precaution in the 1st post of this topic.
bitsss wrote:Is it meanwhile implemented?
It's not yet.

Sepp71
Registered User
Posts: 78
Joined: Sat Sep 06, 2008 11:32 pm
Location: Germany

Re: [DEV] Thanks for posts

Post by Sepp71 » Tue Nov 24, 2015 8:08 pm

bitsss wrote:I wait eagerly for the RC-version. Who knows the date?
rxu as the author won't answer anything else. But if he manages to import the old thanks post mod into the extension why should'nt he be able to import from one of his own versions into another. So Thumbs up for rxu and his extension!
If you backup your data from time to time worst thing to happen seems to me that you loose the old thanks when it becomes RC or even final - but until then your users will be happy ;)
Just my 2 cents...
Sepp

spello
Registered User
Posts: 121
Joined: Sat May 28, 2011 11:12 am
Contact:

Re: [DEV] Thanks for posts

Post by spello » Tue Jan 05, 2016 12:51 pm

Before updating to phpBB 3.1 I need to clean my database with Support Toolkit Database Cleaner. Will you give ability to export thanks and import them after update to phpBB 3.1?

rxu
Extensions Development Team
Posts: 3004
Joined: Wed Oct 25, 2006 12:46 pm
Location: Siberia, Russian Federation
Name: Ruslan
Contact:

Re: [DEV] Thanks for posts

Post by rxu » Tue Jan 05, 2016 1:56 pm

If you want to keep your "thanks for posts MOD" data, you have to keep related database tables at place. Extension should automatically pick them up.

polski_warez
Registered User
Posts: 8
Joined: Thu Dec 24, 2015 12:29 pm
Contact:

Re: [DEV] Thanks for posts

Post by polski_warez » Fri Jan 08, 2016 4:42 pm

I want add button "thank" , but must be visible only for TOPIC AUTHOR.
How Can do it?

Widmo696
Registered User
Posts: 57
Joined: Wed Nov 18, 2009 12:14 am

Re: [DEV] Thanks for posts

Post by Widmo696 » Sat Jan 09, 2016 2:42 am

polski_warez, you have this option in ACP, extensions settings.
Forgive me my English.

polski_warez
Registered User
Posts: 8
Joined: Thu Dec 24, 2015 12:29 pm
Contact:

Re: [DEV] Thanks for posts

Post by polski_warez » Sat Jan 09, 2016 9:13 am

In ACP have function "users Can thanks for Topic Author" but I want "Topic Author ONLY Can thanks for users who reply in topic"

rxu
Extensions Development Team
Posts: 3004
Joined: Wed Oct 25, 2006 12:46 pm
Location: Siberia, Russian Federation
Name: Ruslan
Contact:

Re: [DEV] Thanks for posts

Post by rxu » Sat Jan 09, 2016 9:18 am

That is impossible by default as phpBB permissions system is forum-based but is not topic-based.

Locked

Return to “Extensions in Development”