Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bbcodes template for forum plugin #3317

Closed
Jimmi08 opened this issue Jul 25, 2018 · 1 comment
Closed

bbcodes template for forum plugin #3317

Jimmi08 opened this issue Jul 25, 2018 · 1 comment
Labels
plugin: forum type: bug A problem that should not be happening
Milestone

Comments

@Jimmi08
Copy link
Contributor

Jimmi08 commented Jul 25, 2018

Forum post shortcode:

{FORUM_POST_TEXTAREA}

use this definition for rendering bbarea:

return e107::getForm()->bbarea('post',$text,'forum');

'forum' is template used for bbcodes. This template doesn't exist.

Only available templates are:

	  $temp['news'] 		= $BBCODE_TEMPLATE_NEWSPOST;
		$temp['submitnews']	= $BBCODE_TEMPLATE_SUBMITNEWS;
		$temp['extended']	= $BBCODE_TEMPLATE_NEWSPOST;
		$temp['admin']		= $BBCODE_TEMPLATE_ADMIN;
		$temp['mailout']	= $BBCODE_TEMPLATE_MAILOUT;
		$temp['page']		= $BBCODE_TEMPLATE_CPAGE;
		$temp['maintenance']= $BBCODE_TEMPLATE_ADMIN;
		$temp['comment'] 	= $BBCODE_TEMPLATE_COMMENT;
		$temp['signature'] 	= $BBCODE_TEMPLATE_SIGNATURE;

So for frontend default $BBCODE_TEMPLATE is used (the most restricted functionality).

For admins $BBCODE_TEMPLATE_ADMIN should be used, because you can't post forum topic in admin area and your options are the same as quest then. So check for ADMIN_AREA is useless for forum plugin.

For bbcodes there should be the same rules as for tinymce - separate template for mainadmin, admin, member, quest.

Because this is template, it's easy to customize this later if there is this need.

No idea how this worked in version 1, but now at least 'submitnews' template should be used for forum topic. OR add $BBCODE_TEMPLATE_FORUM to templates.

@Moc Moc added the type: bug A problem that should not be happening label Aug 7, 2018
@Moc Moc added this to the e107 2.1.9 milestone Aug 7, 2018
@SimSync
Copy link
Contributor

SimSync commented Aug 9, 2018

@Jimmi08 I think a forum template is a good idea.
But I don't think that an "admin switch" is needed, once the forum template has additional commands.

SimSync added a commit to SimSync/e107 that referenced this issue Aug 9, 2018
SimSync pushed a commit to SimSync/e107 that referenced this issue Aug 10, 2018
CaMer0n added a commit that referenced this issue Aug 10, 2018
fixes #3317 added bbcode template "forum"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
plugin: forum type: bug A problem that should not be happening
Projects
None yet
Development

No branches or pull requests

3 participants