[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 » Sun Dec 27, 2015 2:15 pm

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: 500
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 » Sun Dec 27, 2015 2:33 pm

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 » Sun Dec 27, 2015 2:41 pm

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 » Sun Dec 27, 2015 2:42 pm

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 » Sun Dec 27, 2015 3:33 pm

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 » Sun Dec 27, 2015 3:58 pm

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 » Mon Dec 28, 2015 9:59 am

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 » Mon Dec 28, 2015 2:21 pm

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 » Tue Dec 29, 2015 8:24 am

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 » Tue Dec 29, 2015 10:08 am

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 » Tue Dec 29, 2015 2:15 pm

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 » Tue Dec 29, 2015 9:08 pm

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: 2413
Joined: Sun Oct 03, 2010 2:03 pm
Location: Lancashire, UK
Name: Neil
Contact:

Re: [BETA] Minimum posts to read topic

Post by Volksdevil » Tue Jan 12, 2016 3:19 am

This looks interesting 8-)
My phpBB Extensions
Finally found great Website Hosting from Image KUALO!
Do NOT use 123-reg.co.uk - Incapable of running phpBB!
My Volkswagen Corrado G60 | Opel Manta Owners Forum

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 » Fri Jun 02, 2017 4:41 pm

don't works in 3.2 :cry: :cry:
I speak spanish
Sorry for my bad english

User avatar
Paul
Infrastructure Team Leader
Infrastructure Team Leader
Posts: 23697
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 » Fri Jun 02, 2017 6:40 pm

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
Knock knock
Race condition
Who's there?

My BlogMy Photosmy phpBB Extensionscustom phpBB work & Development

Locked

Return to “Abandoned Extensions”

Who is online

Users browsing this forum: No registered users and 3 guests

cron