Page 1 of 13

[RC] Hide BBcode

Posted: Sun Nov 30, 2014 10:34 am
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.

Re: [DEV] Hide BBcode

Posted: Sun Nov 30, 2014 5:45 pm
by whoknows9
Can we have a group rule on that? I mean a group of users to be able to use it?

Re: [DEV] Hide BBcode

Posted: Sun Nov 30, 2014 5:56 pm
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?

Re: [DEV] Hide BBcode

Posted: Mon Dec 01, 2014 4:22 am
by infinitiv
Yay!
Image
You can count on me to do reliable and complex testing of this extension. I'll be very meticulous.

Re: [DEV] Hide BBcode

Posted: Sun Dec 07, 2014 3:52 pm
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...

Re: [DEV] Hide BBcode

Posted: Sun Dec 07, 2014 7:10 pm
by infinitiv
How about Wolfsblvt? He mentioned that he could take a look into this extension, maybe he would help you?

Re: [DEV] Hide BBcode

Posted: Thu Dec 11, 2014 7:36 am
by omniError
For any missing events please make a request for it either on area51 or directly on the tracker. Thanks

Re: [DEV] Hide BBcode

Posted: Thu Dec 11, 2014 8:25 am
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...

Re: [DEV] Hide BBcode

Posted: Wed Dec 24, 2014 8:05 am
by infinitiv
So we're back online. Any progress?

Re: [DEV] Hide BBcode

Posted: Sun Dec 28, 2014 1:56 pm
by lknhan
How Long?
Slowly

Re: [DEV] Hide BBcode

Posted: Mon Dec 29, 2014 11:04 am
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 ;) .

Re: [DEV] Hide BBcode

Posted: Thu Jan 22, 2015 7:20 pm
by marcovo
I've updated the first post with an development link.

Re: [DEV] Hide BBcode

Posted: Fri Jan 23, 2015 3:25 am
by Ephemeraboy
how about adaptig this modification into this extention
it's very good modification..
https://www.phpbb.com/customise/db/mod/ ... e_bbcodes/

Re: [DEV] Hide BBcode

Posted: Fri Jan 23, 2015 8:57 am
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?

Re: [DEV] Hide BBcode

Posted: Fri Jan 23, 2015 11:13 am
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.