[RC] Thanks for post by Палыч

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!
Suggested Hosts
Paulo França Lacerda
Registered User
Posts: 109
Joined: Wed Jun 03, 2009 9:17 am

Re: [RC] Thanks for post by Палыч

Post by Paulo França Lacerda »

Палыч wrote:
Paulo França Lacerda wrote:This would be very handy when user wants to see who is "best thanked" and who is "best grateful".
I think about it. But to use the built-in sorting can not be - for that you need to add the fields in the phpbb_users or very heavy code. While I have no solutions.
I understand. Unfortunatelly, I know nothing about PHP programming (I'm Delphi programmer), so I can not help you code. :cry:
Paulo França Lacerda
Registered User
Posts: 109
Joined: Wed Jun 03, 2009 9:17 am

Re: [RC] Thanks for post by Палыч

Post by Paulo França Lacerda »

Done! Notepad++ does the complete job: it can save in UNIX format using UTF8 with no BOM.
Next PTBR Edition I'll use UNIX/UTF8-noBOM for PHP files and UNIX/ANSI for TXT files. :)

Interesting that using UTF8 WITH BOM for PHP files in Windows 2003 makes no problem at all. :shock:

IN TIME: It would be nice if you included a text file with Advices for translators. ;)
User avatar
Палыч
Registered User
Posts: 1543
Joined: Sun Jul 01, 2007 7:59 pm
Location: St. Petersburg
Name: Сергей
Contact:

Re: [RC] Thanks for post by Палыч

Post by Палыч »

Labeled BOM operates under Windows, no BOM mark is everywhere.
In each language file can be read:

Code: Select all

// DEVELOPERS PLEASE NOTE
//
// All language files should use UTF-8 as their encoding and the files must not contain a BOM.
//
;)
Sorry for my bad english
Paulo França Lacerda
Registered User
Posts: 109
Joined: Wed Jun 03, 2009 9:17 am

Re: [RC] Thanks for post by Палыч

Post by Paulo França Lacerda »

Палыч wrote:

Code: Select all

//
// All language files should use UTF-8 as their encoding and the files must not contain a BOM.
//
;)
Yes, I came across such rule heading PHP files.
Paulo França Lacerda
Registered User
Posts: 109
Joined: Wed Jun 03, 2009 9:17 am

Idea: Gratefulness/Usefulness Level

Post by Paulo França Lacerda »

Here I am again, monopolizing your forum. :mrgreen:
Well, today I felt even worse for being a mere Delphi programmer and thus unable to help with PHP coding.

:idea: I was thinking of an automatic rate system of users by their Grateful Level (or score) and, additionally, graduate users by thanks received (Usefulness Level).

USER GRATEFULNESS LEVEL (how grateful user is):
This could be automatically calculated every time user opens up a topic (not a category or forum), but topic, and also when user moves out to another page in the same topic being read. This counter would be incremented no matter which the topic was and despite user had read it before.

USER USEFULNESS LEVEL (how useful user is to others):
This could be automatically calculated every time user posts something. This counter would be incremented no matter which topic was posted in and despite user had posted in it before.

APPEARANCE OF RATES:
This kind of rate would be very cool for knowing who is proortionally best usefull and who is best grateful, and both could show up below user avatar, as currently occurs to other Thank4Post info.

Example:

Code: Select all

(This is My Avatar)
Got Thanked: 30 times  -->> (in 60 messages posted)
Has Thanked: 10 times  -->> (in 40 topic pages readen)
Gratefulness Level: 5.0  -->> (30/60*10)
Usefulness Level: 2.5  -->> (10/40*10)
As currently (as fas as I know) theres no such built-in counter in database scheme, a new table would be needed: phpBB_THANKS_TOPIC_VIEWS, with 2 fields: user_id (the topic reader) and view_count (read count for all topics, no matter which).

The New Table (for Firebird):

Code: Select all

CREATE TABLE phpBB_THANKS_TOPIC_VIEWS (
  USER_ID INTEGER DEFAULT 0 NOT NULL,
  VIEW_COUNT INTEGER DEFAULT 0 NOT NULL);

ALTER TABLE phpBB_THANKS ADD CONSTRAINT CPK_THANKS_TOPIC_VIEWS KEY (USER_ID);
New Fields in Table THANKS (for Firebird):

Code: Select all

ALTER TABLE phpBB_THANKS 
ADD "GRATEFULNESS_LEVEL" DOUBLE PRECISION,
ADD "USEFULNESS_LEVEL" DOUBLE PRECISION;
The formulas would be simple:

Code: Select all

gratefulness_level = (thanks_given    / view_count) * 10;
usefulness_level   = (thanks_received / post_count) * 10;
The "*10" is for normalizing the result, so that users that thanked 1 time for each 10 topic pages viewed are rated as 1 (not 0.1); users that thanked 5 times in 10 topic views are rated 5 (not 0.5). This ratio criteria could up to administrators to define.

The values of thanks_given and thanks_received are already known by Thanks4Post MOD. They're found by count(*).

What do you think about this idea, Палыч?[/color]
Last edited by Paulo França Lacerda on Tue Jun 16, 2009 3:45 am, edited 2 times in total.
User avatar
Палыч
Registered User
Posts: 1543
Joined: Sun Jul 01, 2007 7:59 pm
Location: St. Petersburg
Name: Сергей
Contact:

Re: [RC] Thanks for post by Палыч

Post by Палыч »

Paulo França Lacerda wrote:What do you think about this idea, Палыч?
In general - the idea is feasible. But ...

1. The levels are tied to the user (not the post), so there is no point in additional fields in the table phpbb_thanks (rather phpbb_users)

2. As part of the functions of the MOD do not, the MOD works with the posts from the array post_list (with those on the current page excretive viewtopic, but not all the posts of the topic if it is multiple. If this change - to grow much load).

3. Perhaps I did not quite understand your idea, but the first user who has the post with thanks to the popular theme, would have a greater rating than the second user who has five posts with thanks to the less popular topic. Although in terms of the usefulness of the second user, in my opinion, more useful.

The only indisputable indicator is the number of acknowledgments. You can use their relationship to the total number of posts, for example.
Sorry for my bad english
Paulo França Lacerda
Registered User
Posts: 109
Joined: Wed Jun 03, 2009 9:17 am

Re: [RC] Thanks for post by Палыч

Post by Paulo França Lacerda »

Палыч wrote:1. The levels are tied to the user (not the post), so there is no point in additional fields in the table phpbb_thanks (rather phpbb_users)
Ok, I just thought of something to avoid messing up USERS table, but you're right.
Палыч wrote:2. As part of the functions of the MOD do not, the MOD works with the posts from the array post_list (with those on the current page excretive viewtopic, but not all the posts of the topic if it is multiple. If this change - to grow much load).
There's no need to count the number of post views, only topic page views, because it would be more fair if the calc was based on the numbers of pages viewed by user, since every time user reads a page (no matter how many posts there are in the topic page), it means he's grabbing info and should be glad for 1 post on the page at least (by thanking).

No only the first post of a topic is worth a "thank press". Many times other users post something useful in topics from other authors.

Палыч wrote:3. Perhaps I did not quite understand your idea, but the first user who has the post with thanks to the popular theme, would have a greater rating than the second user who has five posts with thanks to the less popular topic. Although in terms of the usefulness of the second user, in my opinion, more useful.
The results of the simulated calculation were completly aleatory. I fixed it now, as follows:

Code: Select all

(This is My Avatar)
Got Thanked: 30 times  -->> (in 60 messages posted)
Has Thanked: 10 times  -->> (in 40 topic pages readen)
Gratefulness Level: 5.0  -->> (30/60*10)
Usefulness Level: 2.5  -->> (10/40*10)
Палыч wrote:The only indisputable indicator is the number of acknowledgments. You can use their relationship to the total number of posts, for example.
Basing the rate calc on the total amount of topics in the board would not be fair, as a given user could have readen all topics already, nor all pages in the topics. By considering only the number of topic pages readen, the gratefulness level would be quite fair.

Let's figure the scenario...
- Board has 100 topics in 100 topic pages (10 posts por page, 1 page each topic).
- User #1 is old in the community and has readen 10 topics (in 10 pages), and he has thanked 10 times.
- User #2 is newbie in the community and has readen just 1 topic (in 1 page), and he has thanked only 1 time.

Calc methods:

1) By calculating the rates based on the total amount ot topics in the board:
User #1 -> 10 thanks given / 100 topics-in-the-board * 10 -> gratefulness = 1.0
User #2 -> 1 thank given / 100 topics-in-the-board * 10 -> gratefulness = 0.1

RESULT: Not fair, as User #2 hasn't read 100 topics yet, but has thanked 100% of what he read.

2) By calculating the rates based on the topic pages readen only:
User #1 -> 10 thanks given / 10 topic pages readen * 10 -> gratefulness = 10.0
User #2 -> 1 thank given / 1 topic page readen * 10 -> gratefulness = 10.0

RESULT: Very fair, as User #1 has thanked 10% of a HUGE number of topic pages readen, while User #2 has thanked 100% of a FEW number (1) of what he has readen.

The same applies to the poster. Calculating his usefulness based on the total number of messages posted by him would be better than using the total number of topics in the board.

DONE EDITING!. :D
User avatar
Палыч
Registered User
Posts: 1543
Joined: Sun Jul 01, 2007 7:59 pm
Location: St. Petersburg
Name: Сергей
Contact:

Re: [RC] Thanks for post by Палыч

Post by Палыч »

Paulo França Lacerda wrote:The same applies to the poster. Calculating his usefulness based on the total number of messages posted by him would be better than using the total number of topics in the board.
That is what I had in mind:
1 user has 100 posts and 10 received a thank you (10/100 * 10 = 1)
User 2 has 200 posts and 10 received a thank you (10/200 * 10 = 0,5)
total post = all his posts, of course

Rating on the number to say thanks, I think, very conditions :?

However, most of all, I do not understand because of my poor knowledge of English :mrgreen:
Sorry for my bad english
Paulo França Lacerda
Registered User
Posts: 109
Joined: Wed Jun 03, 2009 9:17 am

Re: [RC] Thanks for post by Палыч

Post by Paulo França Lacerda »

Палыч wrote:However, most of all, I do not understand because of my poor knowledge of English :mrgreen:
:D
sandpiper_flyer
Registered User
Posts: 27
Joined: Tue Jun 24, 2008 1:09 am

Re: [RC] Thanks for post by Палыч

Post by sandpiper_flyer »

Hello Палыч,

May I ask whether it is possible to preset all the permissions using a php/sql script during installation so that everyone can use the thanks feature by default?

I have installed your thanks mod successfully as an upgrade to the Geoffreak mod I had already installed.
However I now need to manually set the forums' permissions. I have hundreds of forums and would like a more efficient solution to the task. How can I do that please?

Many thanks.
User avatar
Палыч
Registered User
Posts: 1543
Joined: Sun Jul 01, 2007 7:59 pm
Location: St. Petersburg
Name: Сергей
Contact:

Re: [RC] Thanks for post by Палыч

Post by Палыч »

sandpiper_flyer wrote:it is possible to preset all the permissions using a php/sql script during installation
http://www.phpbb.com/kb/article/permission-system-overview-for-mod-authors-part-two wrote:As we learnt above when phpBB updates permissions for users/groups/roles it works out the complete permissions and updates as a multi-insert. This approach is just too much for a MOD to try do. Please note this is not standard phpBB.
and I believe that the board administrator itself should determine in what forums and what users permissions would be resolved. :?
sandpiper_flyer wrote:How can I do that please?
2 steps:
1. Go to ACP - Permissions - Groups’ forum permissions - Look up usergroup:Registered Users - chekbox All forums - Advanced Permissions the first forum (not category!) - Misc - Can thanks for posts - Yes - Mark all - Apply permissions
2. Go to ACP - Permissions - Groups’ permissions - Look up usergroup:Registered Users - Advanced Permissions - Misc - Can view list of thanks - Apply permissions
Sorry for my bad english
sandpiper_flyer
Registered User
Posts: 27
Joined: Tue Jun 24, 2008 1:09 am

Re: [RC] Thanks for post by Палыч

Post by sandpiper_flyer »

Палыч wrote:and I believe that the board administrator itself should determine in what forums and what users permissions would be resolved. :?
You are right, I agree. I wanted to know if there was a possibility of coding an option to pre-set everything during installation for those with very large boards. Thank you for looking into it.
User avatar
Frogmen
Registered User
Posts: 133
Joined: Fri Dec 28, 2007 11:48 pm
Location: Palma De Mallorca. Spain

Re: [RC] Thanks for post by Палыч

Post by Frogmen »

Hello, How can I download this MOD, The links in the first msg doesn't work anymore.

Nice MOD. ;)

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

Re: [RC] Thanks for post by Палыч

Post by IPB_Refugee »

Hi Frogmen,

I downloaded the MOD a few hours ago and I'm sure that it is just a temporary problem. So please be patient. :)

(If the site stays down until Friday, I will provide a temporary alternative download source.)

Regards
Wolfgang
User avatar
Frogmen
Registered User
Posts: 133
Joined: Fri Dec 28, 2007 11:48 pm
Location: Palma De Mallorca. Spain

Re: [RC] Thanks for post by Палыч

Post by Frogmen »

Thks, I'll try later.

rgds
Frogmen
Locked

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