[RC] Hide BBcode

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
marcovo
Registered User
Posts: 239
Joined: Fri Nov 16, 2012 12:19 pm
Location: The Netherlands
Name: Marco

[RC] Hide BBcode

Post by marcovo »

In reaction to this extension request, this extension will be a port of the Simple Hide BBcode MOD.

Extension Name: Hide BBcode
Author: marcovo (original author for the phpBB 3.0 mod: ycl6 )

Extension Description: With the [hide] bbcode, members can hide their message content from people that hasn't posted in their topic.
Extension Version: 1.0.1

Extension Development: https://github.com/marcovo/phpbb_hidebbcode

Extension Download:
- Github: https://github.com/marcovo/phpbb_hidebb ... /1.0.1.zip
- CDB: https://www.phpbb.com/customise/db/exte ... idebbcode/ (Once validated)
Place the extension in ext/marcovo/hideBBcode

Warning: Some extensions may work against this extension. For example, see this post telling the Topic Preview extension shows contents from the [hide]-tag, while the contents should not be shown. No extensions are currently checked for this, so please check yourself whether your combination of extensions breaks anything. If it does, please report it and I'll look whether I can fix it. If it doesn't, please report it and I can make a list of compatible extensions ;) .

------
Note [22 jan]: For now, you'll have to add one event yourself before the extension will work. In includes/functions_content.php, add the following on line 414, at the very end of decode_message():

Code: Select all

	$vars = array(
		'message'
	);
	global $phpbb_dispatcher;
	extract($phpbb_dispatcher->trigger_event('test.decode_message_after', compact($vars)));
Note [26 jan]: The event above is not used any more in this extension. Instead, the following two edits will have to be done to make everything work correctly. These edits are not needed for the main functionalities, but they are required for a solidly working extension.

In functions_posting.php, on line 1178, add the following lines, just before $template->assign_block_vars($mode . '_row', array(:

Code: Select all

		$vars = array(
			'decoded_message'
		);
		global $phpbb_dispatcher;
		extract($phpbb_dispatcher->trigger_event('test.topic_review_modify_template_vars', compact($vars)));
In posting.php, on line 1795, add the following variable-name to the array (of event core.posting_modify_template_vars):

Code: Select all

	'draft_id',
Note [26 jun]: The former of the two edits above isn't needed any more with the latest commit. The latter ( the draft_id ) is still needed if you want to make sure drafts will load untouched when loading them. Without the edit, any hide-tags will censor the text from the author.

Note [30 jun]: I made a change that enables the usage of this extension with phpBB 3.1.4 . This fix does break if any other extension edits the $draft_id on posting.php, but I guess not many extensions will do so. Because of this, this extension is now completely core-edit-free.

Note [9 aug]: Release version 1.0.0 . Works with phpBB 3.1.4; works best with phpBB 3.1.6 .

Note [1 sept]: Release version 1.0.1 . Fixes an incompatibility with the ABBC extension.

Note [2 sept]: Development has continued, some extra features have been implemented. For more information see this post. Currently there is a feature-freeze until 1.0.2 is released.

Note [11 sept]: Development on version 2.0 has started, aimed at providing compatibility with phpBB 3.2 . Also see the v2.0 github branch.
Last edited by marcovo on Wed Sep 30, 2015 5:13 pm, edited 15 times in total.
whoknows9
Registered User
Posts: 10
Joined: Sat Nov 01, 2014 12:13 pm

Re: [DEV] Hide BBcode

Post by whoknows9 »

Can we have a group rule on that? I mean a group of users to be able to use it?
marcovo
Registered User
Posts: 239
Joined: Fri Nov 16, 2012 12:19 pm
Location: The Netherlands
Name: Marco

Re: [DEV] Hide BBcode

Post by marcovo »

First I´ll focus on porting the existing functionality. Any ideas and additional features are welcome however, I´ll have a look into implementing them if the actual porting is done.

As per your request, doesn´t this extension provide that functionality? Or does that extension only provide it for it's own bbcodes?
infinitiv
Registered User
Posts: 166
Joined: Sat Nov 15, 2014 3:47 pm
Location: PL
Name: Ficjusz

Re: [DEV] Hide BBcode

Post by infinitiv »

Yay!
Image
You can count on me to do reliable and complex testing of this extension. I'll be very meticulous.
marcovo
Registered User
Posts: 239
Joined: Fri Nov 16, 2012 12:19 pm
Location: The Netherlands
Name: Marco

Re: [DEV] Hide BBcode

Post by marcovo »

After some investigation I've come to the conclusion that a direct port might not be possible. What would be possible is an extension shipped with a converter from the hide mod, so an upgrade is possible. However, many of the existing functionality will be lost anyways. This is because a few crucial php-events are missing. I'll look into making an event request later, I'll first have to see whether the extension would then be possible at all. It requires a lot of changes where no events are present whatsoever... unfortunately...
infinitiv
Registered User
Posts: 166
Joined: Sat Nov 15, 2014 3:47 pm
Location: PL
Name: Ficjusz

Re: [DEV] Hide BBcode

Post by infinitiv »

How about Wolfsblvt? He mentioned that he could take a look into this extension, maybe he would help you?
omniError
Registered User
Posts: 15
Joined: Sat Jul 05, 2014 6:41 pm

Re: [DEV] Hide BBcode

Post by omniError »

For any missing events please make a request for it either on area51 or directly on the tracker. Thanks
marcovo
Registered User
Posts: 239
Joined: Fri Nov 16, 2012 12:19 pm
Location: The Netherlands
Name: Marco

Re: [DEV] Hide BBcode

Post by marcovo »

I will, but before that I'll have to figure out what events would be best to request. That will take some time unfortunately because I'll have to sort out multiple approaches, keeping in mind to keep the overhead as low as possible...
infinitiv
Registered User
Posts: 166
Joined: Sat Nov 15, 2014 3:47 pm
Location: PL
Name: Ficjusz

Re: [DEV] Hide BBcode

Post by infinitiv »

So we're back online. Any progress?
lknhan
Registered User
Posts: 400
Joined: Mon Dec 15, 2003 1:15 am

Re: [DEV] Hide BBcode

Post by lknhan »

How Long?
Slowly
marcovo
Registered User
Posts: 239
Joined: Fri Nov 16, 2012 12:19 pm
Location: The Netherlands
Name: Marco

Re: [DEV] Hide BBcode

Post by marcovo »

As the documentation was also offline, I found it hard to make any progress. As such, there isn't any yet. It will come sometime in the near future; but if anyone feels the urge to take development in own hands; do not hesitate ;) .
marcovo
Registered User
Posts: 239
Joined: Fri Nov 16, 2012 12:19 pm
Location: The Netherlands
Name: Marco

Re: [DEV] Hide BBcode

Post by marcovo »

I've updated the first post with an development link.
User avatar
Ephemeraboy
Registered User
Posts: 333
Joined: Tue Dec 29, 2009 4:25 pm
Location: Bandung Kota Hujan
Name: Bernando Bona Tius Sianipar
Contact:

Re: [DEV] Hide BBcode

Post by Ephemeraboy »

how about adaptig this modification into this extention
it's very good modification..
https://www.phpbb.com/customise/db/mod/ ... e_bbcodes/
My diary, my notepad, and my life on
http://www.bonatius.com
marcovo
Registered User
Posts: 239
Joined: Fri Nov 16, 2012 12:19 pm
Location: The Netherlands
Name: Marco

Re: [DEV] Hide BBcode

Post by marcovo »

I personally don't see any use in providing a [ghide] which hides content from groups. That's like a permanent hide, as opposed to the [hide] provided here, which can be circumvented by user action. A [hide=30] which hides posts from users that have less than 30 posts is somewhat more acceptable in my opinion, but I don't know whether it's a good idea to provide that option by default. Is there more interest in these options? Any thoughts?
FomenkoAndrey
Registered User
Posts: 369
Joined: Thu Aug 19, 2010 10:44 am

Re: [DEV] Hide BBcode

Post by FomenkoAndrey »

hide=post ... it's a good idea
it is best idea.
this is the only right decision.
hide their message content from people that hasn't posted in their topic
this is dead idea.
Locked

Return to “Abandoned Extensions”