[ABD] Trader extension

Any abandoned Extensions will be moved to this forum.

WARNING: Extensions in this forum are not currently being supported or maintained by the original Extension author. Proceed at your own risk.
Forum rules
IMPORTANT: Extension Development Forum rules

WARNING: Extensions in this forum are not currently being supported nor updated by the original Extension author. Proceed at your own risk.
User avatar
Galixte de EzCom
Registered User
Posts: 1041
Joined: Mon Oct 04, 2004 11:14 pm
Location: France
Name: Raphaël M.
Contact:

Re: [BETA] Trader extension

Post by Galixte de EzCom » Wed Apr 15, 2015 11:34 pm

Hi,
leschek wrote:Nice improvement over last few months. I tested it and found some issues:

1./ After sending a feedback I can see message:

Code: Select all

[phpBB Debug] PHP Notice: in file [ROOT]/ext/rfd/trader/Controller/Trader.php on line 154: Undefined index: short
[phpBB Debug] PHP Notice: in file [ROOT]/ext/rfd/trader/Controller/Trader.php on line 154: Undefined index: long
*Have you try the last version on GitHub ?
Because i think it's OK now, my PR were merged yesterday in particular for this file (last update of Trader.php) except this PR submitted today, you have to modify manually.
leschek wrote:2./ If in feedback are some non English characters, they are shown as question marks in feedback - I think this was reported before.
It's already fixed since the last update (see my previous answer above*).
leschek wrote:3./ In miniprofile (in topic) when I hover over "Trader Score" link it shows counts of positive/neutral/negative feedback. Neutral feedback is 0 even if user has a few neutral feedbacks.
I agree with you, it's not fixed. Issue submitted here: https://github.com/rfdy/trader/issues/17
leschek wrote:4.a/ Language file:
  • 'PAST' => 'Past',
    '6_MONTHS' => '6 Months',
    '12_MONTHS' => '12 Months',
In some languages can form of word before number depend on number after it. For example we say: Poslední měsíc (past month) and posledních 6 měsíců (past 6 months).
I have solved this problem by arranging differently the terms.
  • From ENGLISH language:
    'PAST' => 'Past',
    '6_MONTHS' => '6 Months',
    '12_MONTHS' => '12 Months',
  • And for me in FRENCH i have translated with:
    'PAST' => 'Durant le(s)',: During the
    ''6_MONTHS' => '6 derniers mois',: 6 past months
    ''12_MONTHS' => '12 derniers mois',: 12 past months
The word Month come from the common.php file from the language pack used.
  • In ENGLISH:
    'MONTH' => 'Month',
  • In French:
    'MONTH' => 'Mois',
it is invariable in French.
In your language pack you have this language key.
leschek wrote:4.b/ Language file:From in feedback table (column name) - it seems it is word from core phpBB. In my language the word From could be translated as a few diferent words, so it would be better to add it to extension's language file and not use core language variable.
Why ? If you use the language pack of your language, this language key will be present and it's not "From" that will be display.
leschek wrote:4.c/ Language file:Date in feedback table (column name) - Word Date is missing in language file
It's the same situation, all common words like "Month", "From", "Date" are presents in common.php from your language pack.
leschek wrote:4.d/ Language file:
'X_FEEDBACK' => 'feedback',
'X_FEEDBACKS' => 'feedbacks',

I believe those should be written as array plural.
It's OK, two situations are possibles:
  • 'X_FEEDBACK' => 'feedback': for 0 or 1 feedback, also we can say: equal or less than 1 feedback
  • 'X_FEEDBACKS' => 'feedbacks',: for 2 or greater feedbacks, also we can say: greater than 1 feedback
Communau EzCom
📖 « Traductions d’extensions & styles pour phpBB 3.1.x & 3.2.x ».
📋 Lists of all extensions identified for phpBB 3.1.x & 3.2.x.
📋 Lists of all styles identified for phpBB 3.1.x & 3.2.x.
Image Tu as un forum et tu veux aussi un site web ? Regarde par ici.

leschek
Registered User
Posts: 789
Joined: Tue Jul 18, 2006 12:49 pm
Contact:

Re: [BETA] Trader extension

Post by leschek » Thu Apr 16, 2015 11:20 am

Thank you for your comments.
Galixte de EzCom wrote:Hi,
leschek wrote:Nice improvement over last few months. I tested it and found some issues:

1./ After sending a feedback I can see message:

Code: Select all

[phpBB Debug] PHP Notice: in file [ROOT]/ext/rfd/trader/Controller/Trader.php on line 154: Undefined index: short
[phpBB Debug] PHP Notice: in file [ROOT]/ext/rfd/trader/Controller/Trader.php on line 154: Undefined index: long
*Have you try the last version on GitHub ?
Because i think it's OK now, my PR were merged yesterday in particular for this file (last update of Trader.php) except this PR submitted today, you have to modify manually.
leschek wrote:2./ If in feedback are some non English characters, they are shown as question marks in feedback - I think this was reported before.
It's already fixed since the last update (see my previous answer above*).
I have the last version, downloaded just before this reply, and I still have the issues. I guess it's because the PR wasn't merged yet and I'm testing it only on testing localhost board, so I didn't change files manually (I can wait for next version, because I don't use it on live board).
Galixte de EzCom wrote:
leschek wrote:4.a/ Language file:
  • 'PAST' => 'Past',
    '6_MONTHS' => '6 Months',
    '12_MONTHS' => '12 Months',
In some languages can form of word before number depend on number after it. For example we say: Poslední měsíc (past month) and posledních 6 měsíců (past 6 months).
I have solved this problem by arranging differently the terms.
  • From ENGLISH language:
    'PAST' => 'Past',
    '6_MONTHS' => '6 Months',
    '12_MONTHS' => '12 Months',
  • And for me in FRENCH i have translated with:
    'PAST' => 'Durant le(s)',: During the
    ''6_MONTHS' => '6 derniers mois',: 6 past months
    ''12_MONTHS' => '12 derniers mois',: 12 past months
The word Month come from the common.php file from the language pack used.
  • In ENGLISH:
    'MONTH' => 'Month',
  • In French:
    'MONTH' => 'Mois',
it is invariable in French.
In your language pack you have this language key.
Thanks, but if I change it like you did I would end with very long phrases (for those columns) and in case of 1 month it wouldn't be as good as it can (should) be.

I believe it would be better to change the language file (and template) to something like this:
'PAST_MONTH' => 'Past month',
'PAST_6_MONTHS' => 'Past 6 Months',
'PAST_12_MONTHS' => 'Past 12 Months',

Galixte de EzCom wrote:
leschek wrote:4.b/ Language file:From in feedback table (column name) - it seems it is word from core phpBB. In my language the word From could be translated as a few diferent words, so it would be better to add it to extension's language file and not use core language variable.
Why ? If you use the language pack of your language, this language key will be present and it's not "From" that will be display.
The word from is translated but in my language we use different words for word from. For example if it is from forum, board, shelf we use word Z (only 1 letter) and if it is from person we use the word Od. And in board translation is used the first example (Z) which is incorrect for using as this column name.
Galixte de EzCom wrote:
leschek wrote:4.c/ Language file:Date in feedback table (column name) - Word Date is missing in language file
It's the same situation, all common words like "Month", "From", "Date" are presents in common.php from your language pack.
Are you sure?
Here is part of common.php file from English language pack (phpBB 3.1.3). Just entries beginning with "D"

Code: Select all

'DAY'					=> 'Day',
	'DAYS'					=> 'Days',
	'DELETE'				=> 'Delete',
	'DELETE_ALL'			=> 'Delete all',
	'DELETE_COOKIES'		=> 'Delete all board cookies',
	'DELETE_MARKED'			=> 'Delete marked',
	'DELETE_POST'			=> 'Delete post',
	'DELIMITER'				=> 'Delimiter',
	'DESCENDING'			=> 'Descending',
	'DISABLED'				=> 'Disabled',
	'DISPLAY'				=> 'Display',
	'DISPLAY_GUESTS'		=> 'Display guests',
	'DISPLAY_MESSAGES'		=> 'Display messages from previous',
	'DISPLAY_POSTS'			=> 'Display posts from previous',
	'DISPLAY_TOPICS'		=> 'Display topics from previous',
	'DOWNLOADED'			=> 'Downloaded',
	'DOWNLOADING_FILE'		=> 'Downloading file',
	'DOWNLOAD_COUNTS'		=> array(
		0	=> 'Not downloaded yet',
		1	=> 'Downloaded %d time',
		2	=> 'Downloaded %d times',
	),
Galixte de EzCom wrote:
leschek wrote:4.d/ Language file:
'X_FEEDBACK' => 'feedback',
'X_FEEDBACKS' => 'feedbacks',

I believe those should be written as array plural.
It's OK, two situations are possibles:
  • 'X_FEEDBACK' => 'feedback': for 0 or 1 feedback, also we can say: equal or less than 1 feedback
  • 'X_FEEDBACKS' => 'feedbacks',: for 2 or greater feedbacks, also we can say: greater than 1 feedback
But there is more plurals in some languages. In my case we use 1 singular and two plurals - for 2-4 and for greater than 5. It's used quite a lot in core phpBB language files.

User avatar
Galixte de EzCom
Registered User
Posts: 1041
Joined: Mon Oct 04, 2004 11:14 pm
Location: France
Name: Raphaël M.
Contact:

Re: [BETA] Trader extension

Post by Galixte de EzCom » Thu Apr 16, 2015 1:25 pm

Hi,
leschek wrote: Thanks, but if I change it like you did I would end with very long phrases (for those columns) and in case of 1 month it wouldn't be as good as it can (should) be.

I believe it would be better to change the language file (and template) to something like this:
'PAST_MONTH' => 'Past month',
'PAST_6_MONTHS' => 'Past 6 Months',
'PAST_12_MONTHS' => 'Past 12 Months',
OK, issue and PR submitted here: https://github.com/rfdy/trader/pull/19
leschek wrote: The word from is translated but in my language we use different words for word from. For example if it is from forum, board, shelf we use word Z (only 1 letter) and if it is from person we use the word Od. And in board translation is used the first example (Z) which is incorrect for using as this column name.
OK, it's also submitted in my previous PR here: https://github.com/rfdy/trader/pull/19
leschek wrote: Are you sure?
Here is part of common.php file from English language pack (phpBB 3.1.3). Just entries beginning with "D"
OK, sorry it's a mistake i have already submitted this change {L_DATE} with {L_TIME}, it's in awaitting to merge here: https://github.com/rfdy/trader/pull/11# ... t-92956831
leschek wrote:But there is more plurals in some languages. In my case we use 1 singular and two plurals - for 2-4 and for greater than 5. It's used quite a lot in core phpBB language files.
Sorry but i guess it's not "possible" to take in consideration three possible situations (of course yes it's possible, but to complicate to dissociate what language needs two situations while others need three). Maybe you can put between () the word for the case with 2/4 persons.
Communau EzCom
📖 « Traductions d’extensions & styles pour phpBB 3.1.x & 3.2.x ».
📋 Lists of all extensions identified for phpBB 3.1.x & 3.2.x.
📋 Lists of all styles identified for phpBB 3.1.x & 3.2.x.
Image Tu as un forum et tu veux aussi un site web ? Regarde par ici.

leschek
Registered User
Posts: 789
Joined: Tue Jul 18, 2006 12:49 pm
Contact:

Re: [BETA] Trader extension

Post by leschek » Thu Apr 16, 2015 1:46 pm

Thank you for reply.
Galixte de EzCom wrote:
leschek wrote:But there is more plurals in some languages. In my case we use 1 singular and two plurals - for 2-4 and for greater than 5. It's used quite a lot in core phpBB language files.
Sorry but i guess it's not possible to take in consideration three possible situations. Maybe you can put between () the word for the case with 2/4 persons.
Well, there are multiple plurals in core phpBB language files and in some extensions too.
Example from common.php file:

Code: Select all

'MESSAGES_COUNT'		=> array(
		1	=> '%d message',
		2	=> '%d messages',
	),
In my language it is translated as:

Code: Select all

'MESSAGES_COUNT'		=> array(
		1	=> '%d zpráva',
		2	=> '%d zprávy',
		3	=> '%d zpráv',
	),
In some languages is more than one plural form (it could be up to 4 or 5 different plurals). Here is more informations: wiki.phpbb.com and Coding Guidelines.

User avatar
rfdy
Registered User
Posts: 55
Joined: Wed Apr 16, 2014 1:37 pm

Re: [BETA] Trader extension

Post by rfdy » Thu Apr 16, 2015 1:49 pm

Hi guys,

Thanks for all the great feedback, but please try to keep the comments about github issues on github, as it's becoming difficult to collect all the details needed.

Galixte was nice enough to add them to github here: https://github.com/rfdy/trader/issues

cools
Registered User
Posts: 20
Joined: Wed Dec 24, 2008 6:20 pm

Re: [BETA] Trader extension

Post by cools » Sun Apr 19, 2015 12:08 pm

rfdy wrote:
cools wrote:Fixed it. The replacement path in styles/all/template/event/navbar_header_profile_list_after.html is bad.

It should read:

Code: Select all

'./app.php/trader/view-feedback/?u=' 
Thank you! Do you mind creating a pull request and we will merge it in?
This is broken again. Added a github issue.

cools
Registered User
Posts: 20
Joined: Wed Dec 24, 2008 6:20 pm

Re: [BETA] Trader extension

Post by cools » Sun Apr 19, 2015 12:39 pm

Tested, working MYSQL code below for porting feedback scores and comments between SHMK and Trader.

Code: Select all

truncate table phpbb_trader_feedback;
truncate table phpbb_trader_comments;
alter table phpbb_trader_feedback modify column feedback_id mediumint(8) unsigned;

insert into
 phpbb_trader_feedback
 (feedback_id, to_user_id, from_user_id, feedback_score, date_created, topic_type)
select
  fb_id, fb_to, fb_from,      
  case fb_vote
   when 2 then 0
   when 0 then -1
   when 1 then 1
  end,
  fb_date,
  case fb_role
   when 0 then 4
   when 1 then 1
   when 2 then 2
  end 
from
 phpbb_shmk_feedback;

insert into
 phpbb_trader_comments
 (feedback_id, short_comment, long_comment, date_created)
select
  fb_id, fb_comment, fb_comment, fb_date
from
 phpbb_shmk_feedback;

alter table phpbb_trader_feedback modify column feedback_id mediumint(8) unsigned auto_increment;
drop table phpbb_shmk_feedback;
drop table phpbb_shmk_feedback_config;
drop table phpbb_shmk_feedback_tot;

update phpbb_users inner join
(select to_user_id, count(*) as user_feedback from phpbb_trader_feedback where feedback_score = 1 group by to_user_id) feedback
on phpbb_users.user_id = feedback.to_user_id
set phpbb_users.user_trader_positive = feedback.user_feedback; 

update phpbb_users inner join
(select to_user_id, count(*) as user_feedback from phpbb_trader_feedback where feedback_score = 0 group by to_user_id) feedback
on phpbb_users.user_id = feedback.to_user_id
set phpbb_users.user_trader_neutral = feedback.user_feedback; 

update phpbb_users inner join
(select to_user_id, count(*) as user_feedback from phpbb_trader_feedback where feedback_score = -1 group by to_user_id) feedback
on phpbb_users.user_id = feedback.to_user_id
set phpbb_users.user_trader_negative = feedback.user_feedback; 
Any idea when the code to navigate pages will be done ? It'd also be really nice if the numbers in "Recent Ratings" were clickable as filters, so negatives/neutrals could be easily found.

User avatar
Fors4k3n
Registered User
Posts: 1
Joined: Fri May 01, 2015 6:22 am

Re: [BETA] Trader extension

Post by Fors4k3n » Fri May 01, 2015 6:23 am

cools wrote:
rfdy wrote:
cools wrote:Fixed it. The replacement path in styles/all/template/event/navbar_header_profile_list_after.html is bad.

It should read:

Code: Select all

'./app.php/trader/view-feedback/?u=' 
Thank you! Do you mind creating a pull request and we will merge it in?
This is broken again. Added a github issue.
I have the same problem,

KnownSyntax
Registered User
Posts: 37
Joined: Mon Sep 22, 2014 8:47 pm
Location: Arizona, United States

Re: [BETA] Trader extension

Post by KnownSyntax » Fri May 08, 2015 3:57 am

I can't wait for this to hit RC and be released! It looks good so far, I'm loving the idea and what features you are looking to implement.

duckdog
Registered User
Posts: 21
Joined: Tue Nov 05, 2013 4:49 pm

Re: [BETA] Trader extension

Post by duckdog » Wed May 13, 2015 3:35 pm

Is there an easy way to add extra categories besides buy,sell,trade ie auction? Thank you ahead of time for the great extension

User avatar
rfdy
Registered User
Posts: 55
Joined: Wed Apr 16, 2014 1:37 pm

Re: [BETA] Trader extension

Post by rfdy » Wed May 13, 2015 6:25 pm

duckdog wrote:Is there an easy way to add extra categories besides buy,sell,trade ie auction? Thank you ahead of time for the great extension
I believe this question was asked previously, and our initial answer was no. There is no easy way to add new types, but if you have coding knowledge you should be able to add it fairly easily, but I don't know if I'd recommend that.

Sorry!

duckdog
Registered User
Posts: 21
Joined: Tue Nov 05, 2013 4:49 pm

Re: [BETA] Trader extension

Post by duckdog » Thu May 14, 2015 11:48 am

Already done, thank you, it was fairly easy to add the categorize that I required

Nelson

User avatar
rfdy
Registered User
Posts: 55
Joined: Wed Apr 16, 2014 1:37 pm

Re: [BETA] Trader extension

Post by rfdy » Thu May 14, 2015 3:51 pm

That's great to hear!

Thanks.

cools
Registered User
Posts: 20
Joined: Wed Dec 24, 2008 6:20 pm

Re: [BETA] Trader extension

Post by cools » Sun May 17, 2015 6:09 pm

Using this in production now on http://forum.arcadeotaku.com

User avatar
nero
Registered User
Posts: 321
Joined: Fri Mar 13, 2015 8:18 am

Re: [BETA] Trader extension

Post by nero » Mon May 18, 2015 4:07 am

Can you possibly make it so it is ONLY people who post in the trade can leave the feedback.

Also if possible, once the user has made the trade, they can close the topic?

Locked

Return to “Abandoned Extensions”