Page 1 of 1

How to remove "insert image" "insert page break"

Posted: Thu Aug 07, 2008 5:27 pm
by baljinder_singh88
Hello Sir,
Iam working on a joomla component and have a problem with the WYSIWYG editor.I want to remove the "insert image" and "insert page break" controls from the bottom of the editor.Kindly suggest me how to remove these controls.

Thanks
Baljinder Singh

Re: How to remove "insert image" "insert page break"

Posted: Mon Aug 25, 2008 12:46 pm
by intervencije
i replaced images mosimage.gif and mospage.gif in folder ../mambots/editors-xtd/. with the gifs that have 1px width and height and it works! ;)

Re: How to remove "insert image" "insert page break"

Posted: Sat Sep 06, 2008 6:21 pm
by baljinder_singh88
Thanks.
Good idea.

Re: How to remove "insert image" "insert page break"

Posted: Wed Sep 10, 2008 3:45 pm
by redrings
An easier way to do this would be to unpublish the plugins for these:

Go to Extensions->Plugin Manager.
Scroll down until you see "Editor Button - Pagebreak" and "Editor Button - Image".
Unpublish those two plugins.

Re: How to remove "insert image" "insert page break"

Posted: Mon Sep 22, 2008 4:22 pm
by mouse
I have done that, I am wondering if I can remove it for just 1 page where I have the RTE... is that possible?

Thanks,
Mouse

Re: How to remove "insert image" "insert page break"

Posted: Wed Oct 01, 2008 1:31 pm
by EddieM
Hi,
I'm looking for something similar. Within my setup, registered users are defined as 'authors', which allows them to create news items.
I've overridden components/com_content/views/article/form.php within my template to remove their ability to set section/category/front page/publishing dates ,etc.

Now I want to disable upload images functionality for these front end authors. Unfortunately this is not (afaik) done within form.php but must be coming in from somewhere else.

It would be great if there was some global setting within user management that enabled admin to set user privileges such as file/image uploads, etc.

So, does anyone know where the image/pagebreak etc links can be disabled for front end authors?

Thanks,
Eddie

Re: How to remove "insert image" "insert page break"

Posted: Wed Oct 01, 2008 1:56 pm
by EddieM
Ha!,
You can turn off the insert image (readmore + page break) links w/o the need for code hacks!

Go to administration screen & then Extentions => Plugin Manager & there you'll see:
Editor Button - Image,
Editor Button - Pagebreak,
Editor Button - Readmore

Just unpublish the one(s) you don't want & they won't be available to front end editors.

Well done Joomla guys/gals,
Eddie

Re: How to remove "insert image" "insert page break"

Posted: Thu Oct 02, 2008 7:39 am
by kadded
@ EddieM:

You said you override the form.php to disable users to choose the section, category. Does that mean that in your case the all are automatically stored in the uncategorised section/category? Or did you find a way to set the section/category to a specific one?

Re: How to remove "insert image" "insert page break"

Posted: Thu Oct 02, 2008 9:03 am
by EddieM
Hi,
Yes. I only ever want these users to enter articles into a certain category, so I've hard coded the section & category ids, see below:

Code: Select all

<input type="hidden" name="option" value="com_content" />
<input type="hidden" name="id" value="<?php echo $this->article->id; ?>" />
<input type="hidden" name="version" value="<?php echo $this->article->version; ?>" />
<input type="hidden" name="created_by" value="<?php echo $this->article->created_by; ?>" />
<input type="hidden" name="referer" value="<?php echo @$_SERVER['HTTP_REFERER']; ?>" />
<input type="hidden" name="sectionid" value="2" />
<input type="hidden" name="catid" value="2" />
The final 2 lines of code set the section & category.

As all entries must be vetted by a publisher before publication, I don't need to set other things such as front page, start/end date, etc, from the front end. Hence I took all that code out as well. In effect, I'm left with only a title field and content text area left.

Cheers,
Eddie

Re: How to remove "insert image" "insert page break"

Posted: Thu Oct 02, 2008 9:24 am
by kadded
Than that's very close to my form. But, I need to allow users to submit to multiple categories within 1 particular section. In other words: all articles are stored in 1 specific section, yet the user must choose his/her category.

I've been breaking my head on this, but being not a coder does not really help. I do hide (display: none) all unnecessary fields, but have no idea on how to call the categories of the specific section. Thanks for the reply though.

If you have any thought, I would be more than happy to hear them.

Re: How to remove "insert image" "insert page break"

Posted: Thu Oct 02, 2008 9:29 am
by kadded
BTW: you are aware of this component I suppose (it's free btw and works just fine):
http://extensions.joomla.org/component/ ... Itemid,35/

It does what you seem to be doing, but without doing the overrides yourself and use the component instead. I can't use it since it is not integrated with attachments:
http://extensions.joomla.org/component/ ... Itemid,35/

Re: How to remove "insert image" "insert page break"

Posted: Thu Oct 02, 2008 9:57 am
by EddieM
Hi,
I wasn't aware of this extension but I note from the reviews that it doesn't limit users from publishing to the front page or elsewhere (unless I've misunderstood that), so that wouldn't fit my particular requirement. As for attachments, I don't want my users uploading anything - the less they can do the less harm they can do (well, I hope anyway)!

As a general rule of thumb however, I'd always feel more comfortable using an extension over overrides - just feel these people probably know Joomla better than I do!

Thanks for pointing these out tho'
Eddie

Re: How to remove "insert image" "insert page break"

Posted: Mon Jul 27, 2009 1:24 pm
by vineeth
hi everybody.............. when we use the editor in the front end, it shows the buttons 'insert image', 'insert pagebreak' and 'read more'. and when we click on this button, it shows our home page in the pop up,
there are 2 methods to hide it,
1: goto administrator -> plugin manager, find 'insert image', 'insert pagebreak' and 'read more' plugins and disable them. but there 1 problem, the plugin no more available in the back end too...

So it is very easy to hide those buttons(image, page break, read more) if u are using the editor in front end,

use the parameter 'false' in ur code....

echo $editor->display( 'content', $row->content, '100%', '150', '40', '5',false ) ;


:eek: happy coding...!!!!!!

Re: How to remove "insert image" "insert page break"

Posted: Mon Jan 25, 2010 6:16 pm
by 092098jvm
I would also like to remove these buttons from the editor, but only in the front-end. Which file contains the code where I would add false?

Re: How to remove "insert image" "insert page break"

Posted: Mon Feb 01, 2010 6:44 pm
by dakini2
Hi vineeth

I would be also very thankfull for advicing us where to find the source file in which we should add the parameter "false" in this line:

echo $editor->display( 'content', $row->content, '100%', '150', '40', '5',false ) ;

so we can remove the "insert image" button from the editor, but only in the front-end.

Thank you and kind regards
Kasia :)

Re: How to remove "insert image" "insert page break"

Posted: Mon Feb 01, 2010 11:51 pm
by 092098jvm
Kasia,

Depending on who is using your editor, you may be able to accomplish this by going to the Plugin Manager and setting the access level for all of the editor-xtd plugins to Special. This hides the buttons for everyone with less than Author status.

It wouldn't work for me though, because I need to hide the buttons from Authors in the front end also.

Re: How to remove "insert image" "insert page break"

Posted: Tue Feb 02, 2010 5:11 am
by dakini2
Thank you - will try :)

Re: How to remove "insert image" "insert page break"

Posted: Mon Feb 08, 2010 11:02 am
by vineeth
i used the "false" parameter on my custom created component....., if u are using the article submit menu item it is better to configure the editor plugin, otherwise u need to hack the code.... regards...!!!!!!!!

Re: How to remove "insert image" "insert page break"

Posted: Tue Feb 23, 2010 1:12 am
by fdkid
Hi guys

If you have ContentSubmit Component installed:

Create a new folder under /templates/yourtemplate/html/. Name it "com_contentsubmit".

Create another folder under /templates/yourtemplate/html/com_contentsubmit/. Name it "article".

Copy the contents of the folder /components/com_contentsubmit/views/article/tmpl/ into the "article" folder you just created.

This way, next time ContentSubmit is called up by a menu item, Joomla will get the files from the "html" folder under the "templates" folder instead of from the components folder. This will allow to hack the component code without compromising the original files, or future upgrades. Copying a Component's template files under the "html" folder is Joomla principle and can be applied to any component, module or plugin.

Once you've successfully accomplished the steps above, you can freely edit the file

/templates/yourtemplate/html/com_contentsubmit/article/bycategory.php

or

/templates/yourtemplate/html/com_contentsubmit/article/bysection.php

depending on your case.

The structure is table based, so removing rows tags will clean up the Submission form that your users will see from the front-end.

Administrator will still be able to submit content using the core Content Component with full capabilities and privileges.

Ultimately, find the following code on the file you are editing:

echo $this->editor->display('text', $this->article->text, '100%', '400', '70', '15');

and change it to:

echo $this->editor->display('text', $this->article->text, '100%', '400', '70', '15',false);

It will hide the "image", "page break" and "read more" buttons.

Hope it will help. cheers

Re: How to remove "insert image" "insert page break"

Posted: Tue Feb 23, 2010 1:21 am
by dakini2
Thanks so much FDKID - really helpful. Nice :) Regards. Kasia

Re: How to remove "insert image" "insert page break"

Posted: Tue Feb 23, 2010 1:28 am
by 092098jvm
Interesting. I'm not familiar with ContentSubmit, but I just found it on Dioscouri.com. Do you know if it would work with K2?

Re: How to remove "insert image" "insert page break"

Posted: Fri Sep 23, 2011 2:35 am
by manishsankari
Please help me .. when i logged in as an administration in backend the little image button (bottom of article ) is visible. but when i loged in as a manager it's not visible .. how can i visible in a manager mode. sorry for my English .... pleaasseee help me ...

Re: How to remove "insert image" "insert page break"

Posted: Tue Nov 15, 2011 12:48 pm
by altibel
092098jvm and dakini2,

The 'Insert image', 'Pagebreak', 'Read more...' and 'Toggle editor' buttons are part of the XTD editor plugin.

I found a very useful topic elsewhere in the forum that helps you to remove them from the frontend while leaving them in the backend:
http://forum.joomla.org/viewtopic.php?f ... 0#p2669820

The php files can be found under the plugins folder on your server. Before making any changes on these files make a backup of them. Also you can try to comment the original code and add the new one.

Re: How to remove "insert image" "insert page break"

Posted: Thu Oct 10, 2013 2:29 pm
by wizardjeje
Nice idea from 092098jvm !!
I tried and it worked for me. Without any code hack or override !

Simple use of Joomla Access controls.

I had the same problem :
- hide these "article", "pagebreak", "readmore"... buttons to my front-end editors/authors (yes I'm a little maniac about what people can do in the front-end)
- but keep full control to admins !


I achieved this by simply creating a new access level in : Backend > users > access levels.
I configured it to target only the Super Users and Administrators user groups, but you could do it otherwise depending on your needs. E.g. you could target just a special user group you've created for your front-end editors. Or the 'Authors' user group.

This way my Super Users and Administrators can have full option, and my front-end editors just have basic options.

Note : it could be that you need to re-login as an admin to see changes correctly.