[ABD] Minimum posts to read topic

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.
Locked
User avatar
LordOfFlies
Registered User
Posts: 63
Joined: Tue Jul 14, 2015 6:55 am
Name: Matěj Štágl
Contact:

[ABD] Minimum posts to read topic

Post by LordOfFlies »

This extension adds a new BBCode [minPosts=n] which hides it's content from readers with less posts than required by parametr n.

My thanks to Bruninoit, I based my code on his awesome extension "Minimum topics to read message"

Version: 0.1.2
TODO: Nothing.
Tested on: 3.1.6

Example of message splashed when user doesn't have enough posts to read content of [minPosts]:
Image

Download: https://github.com/kocourmatej/PHPBB3.1 ... read-topic

Feel free to give me any suggestions, I will do what I can. :)

Update 0.1.1
- Reduced query usage, thanks to Bruninoit
- Solved collision between this ext and "Minimum topics to read message" extension.
- Message now displays number of remaining posts needed to read content.

Update 0.1.2
- Fixed bug with quotation.
Last edited by LordOfFlies on Tue Dec 29, 2015 8:24 am, edited 2 times in total.
Bruninoit
Registered User
Posts: 499
Joined: Thu Jun 13, 2013 2:34 pm
Location: Florence (Italy)
Name: Bruno Andrew
Contact:

Re: [BETA] Minimum posts to read topic

Post by Bruninoit »

You can simply replace this part

Code: Select all

$uid = $this->user->data['user_id'];
$query = $this->db->sql_query("SELECT count(post_id) as count FROM ".POSTS_TABLE." WHERE poster_id=$uid");
$result = $this->db->sql_fetchrow($query);
$ut = $result['count'];
With

Code: Select all

$ut = $this->user->data['user_posts'];
To remove a query...
And also change the language variable, because if a user have both extension there are problems.
User avatar
LordOfFlies
Registered User
Posts: 63
Joined: Tue Jul 14, 2015 6:55 am
Name: Matěj Štágl
Contact:

Re: [BETA] Minimum posts to read topic

Post by LordOfFlies »

Thanks Bruninoit, that simplification is nice. Reducing query is always nice.
I will repair both ASAP.
User avatar
ForoXL
Registered User
Posts: 48
Joined: Wed Feb 04, 2015 4:57 pm
Contact:

Re: [BETA] Minimum posts to read topic

Post by ForoXL »

Very well. I need this ext in my board.

Good work man!

fav
http://www.ForoXL.com - Foro dedicado a temas generales
User avatar
LordOfFlies
Registered User
Posts: 63
Joined: Tue Jul 14, 2015 6:55 am
Name: Matěj Štágl
Contact:

Re: [BETA] Minimum posts to read topic

Post by LordOfFlies »

ForoXL wrote:Very well. I need this ext in my board.

Good work man!

fav
Thanks bro. You are welcome. :)
User avatar
LordOfFlies
Registered User
Posts: 63
Joined: Tue Jul 14, 2015 6:55 am
Name: Matěj Štágl
Contact:

Re: [BETA] Minimum posts to read topic

Post by LordOfFlies »

First post updated - 0.1.1
User avatar
Shurtalk
Registered User
Posts: 3
Joined: Wed May 13, 2015 8:03 pm
Location: Spain
Contact:

Re: [BETA] Minimum posts to read topic

Post by Shurtalk »

Good job ;)

A little issue. If user quotes the message can read the hidden content in [minPosts=n]
User avatar
LordOfFlies
Registered User
Posts: 63
Joined: Tue Jul 14, 2015 6:55 am
Name: Matěj Štágl
Contact:

Re: [BETA] Minimum posts to read topic

Post by LordOfFlies »

Shurtalk wrote:Good job ;)

A little issue. If user quotes the message can read the hidden content in [minPosts=n]
Thanks, I will look into this.
User avatar
LordOfFlies
Registered User
Posts: 63
Joined: Tue Jul 14, 2015 6:55 am
Name: Matěj Štágl
Contact:

Re: [BETA] Minimum posts to read topic

Post by LordOfFlies »

Shurtalk wrote:Good job ;)

A little issue. If user quotes the message can read the hidden content in [minPosts=n]
First post updated, solved.
User avatar
Shurtalk
Registered User
Posts: 3
Joined: Wed May 13, 2015 8:03 pm
Location: Spain
Contact:

Re: [BETA] Minimum posts to read topic

Post by Shurtalk »

Thanks! 8-)
User avatar
uruguayito
Registered User
Posts: 266
Joined: Mon Dec 13, 2010 2:46 pm
Location: Montevideo - Uruguay

Re: [BETA] Minimum posts to read topic

Post by uruguayito »

Great idea....
Works perfect

a small suggestion: Is it possible to highlight the message if you have the number of posts needed?
I speak spanish
Sorry for my bad english
User avatar
LordOfFlies
Registered User
Posts: 63
Joined: Tue Jul 14, 2015 6:55 am
Name: Matěj Štágl
Contact:

Re: [BETA] Minimum posts to read topic

Post by LordOfFlies »

uruguayito wrote:Great idea....
Works perfect

a small suggestion: Is it possible to highlight the message if you have the number of posts needed?

Hi,
yes it is. You can simply surround content of [minPosts=n] with [yourBBCode]. Fe:

Code: Select all

[minPosts=8000][b]Test[/b][/minPosts]
If you want to highlight it, then use adecvate BBCode.

If you do't have one, here it's for you:

Usage:

Code: Select all

[highlight={COLOR}]{TEXT}[/highlight]
HTML replacement:

Code: Select all

<span style="background-color: {COLOR};">{TEXT}</span>

And, thanks bro. :)
User avatar
Volksdevil
Registered User
Posts: 2415
Joined: Sun Oct 03, 2010 2:03 pm
Location: Lancashire, UK
Name: Neil
Contact:

Re: [BETA] Minimum posts to read topic

Post by Volksdevil »

This looks interesting 8-)
My phpBB Extensions
Finally found great Website Hosting from :arrow: KUALO!
Do NOT use 123-reg.co.uk - Incapable of running phpBB!
:ugeek: TekNeil - Streamer on Twitch | My Volkswagen Corrado G60
User avatar
uruguayito
Registered User
Posts: 266
Joined: Mon Dec 13, 2010 2:46 pm
Location: Montevideo - Uruguay

Re: [BETA] Minimum posts to read topic

Post by uruguayito »

don't works in 3.2 :cry: :cry:
I speak spanish
Sorry for my bad english
Paul
Infrastructure Team Leader
Infrastructure Team Leader
Posts: 28619
Joined: Sat Dec 04, 2004 3:44 pm
Location: The netherlands.
Name: Paul Sohier
Contact:

Re: [ABD] Minimum posts to read topic

Post by Paul »

This topic has been marked as [ABD] - Abandoned as the extension author has not been active recently. If the extension author wishes to continue development, please PM anyone on the Extension Customisations Team to request this topic be unlocked.

Notice!
We do not recommend that a user of the phpBB software install this extension, or any other extension that is marked as “abandoned” or “in development”, on a live forum. Doing so may cause your forum to not perform in the manner it should.


Thank you,
The phpBB Extension Customisations Team
Locked

Return to “Abandoned Extensions”