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

Need help with a WYSIWYG-editor in Joomla! 1.0.x? This is the place to be.
Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
baljinder_singh88
Joomla! Apprentice
Joomla! Apprentice
Posts: 28
Joined: Fri Nov 17, 2006 11:45 am
Location: Hoshiarpur
Contact:

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

Postby baljinder_singh88 » Thu Aug 07, 2008 5:27 pm

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

intervencije
I've been banned!
Posts: 1
Joined: Mon Aug 11, 2008 3:33 pm

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

Postby intervencije » Mon Aug 25, 2008 12:46 pm

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! ;)

baljinder_singh88
Joomla! Apprentice
Joomla! Apprentice
Posts: 28
Joined: Fri Nov 17, 2006 11:45 am
Location: Hoshiarpur
Contact:

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

Postby baljinder_singh88 » Sat Sep 06, 2008 6:21 pm

Thanks.
Good idea.

redrings
Joomla! Apprentice
Joomla! Apprentice
Posts: 19
Joined: Sat Feb 16, 2008 6:53 pm

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

Postby redrings » Wed Sep 10, 2008 3:45 pm

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.

mouse
Joomla! Intern
Joomla! Intern
Posts: 77
Joined: Thu Oct 20, 2005 11:43 pm

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

Postby mouse » Mon Sep 22, 2008 4:22 pm

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

EddieM
Joomla! Apprentice
Joomla! Apprentice
Posts: 35
Joined: Tue Oct 11, 2005 7:03 pm
Location: Leicestershire
Contact:

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

Postby EddieM » Wed Oct 01, 2008 1:31 pm

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
www.freshwebservices.com Web Design Leicestershire

EddieM
Joomla! Apprentice
Joomla! Apprentice
Posts: 35
Joined: Tue Oct 11, 2005 7:03 pm
Location: Leicestershire
Contact:

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

Postby EddieM » Wed Oct 01, 2008 1:56 pm

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
www.freshwebservices.com Web Design Leicestershire

kadded
Joomla! Explorer
Joomla! Explorer
Posts: 306
Joined: Sun Mar 23, 2008 9:54 pm

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

Postby kadded » Thu Oct 02, 2008 7:39 am

@ 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?

EddieM
Joomla! Apprentice
Joomla! Apprentice
Posts: 35
Joined: Tue Oct 11, 2005 7:03 pm
Location: Leicestershire
Contact:

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

Postby EddieM » Thu Oct 02, 2008 9:03 am

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
www.freshwebservices.com Web Design Leicestershire

kadded
Joomla! Explorer
Joomla! Explorer
Posts: 306
Joined: Sun Mar 23, 2008 9:54 pm

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

Postby kadded » Thu Oct 02, 2008 9:24 am

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.

kadded
Joomla! Explorer
Joomla! Explorer
Posts: 306
Joined: Sun Mar 23, 2008 9:54 pm

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

Postby kadded » Thu Oct 02, 2008 9:29 am

BTW: you are aware of this component I suppose (it's free btw and works just fine):
http://extensions.joomla.org/component/option,com_mtree/task,viewlink/link_id,5178/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/option,com_mtree/task,viewlink/link_id,3115/Itemid,35/

EddieM
Joomla! Apprentice
Joomla! Apprentice
Posts: 35
Joined: Tue Oct 11, 2005 7:03 pm
Location: Leicestershire
Contact:

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

Postby EddieM » Thu Oct 02, 2008 9:57 am

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
www.freshwebservices.com Web Design Leicestershire

vineeth
Joomla! Apprentice
Joomla! Apprentice
Posts: 13
Joined: Mon Jul 27, 2009 1:13 pm

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

Postby vineeth » Mon Jul 27, 2009 1:24 pm

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...!!!!!!

User avatar
092098jvm
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 230
Joined: Wed Aug 09, 2006 5:59 pm
Contact:

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

Postby 092098jvm » Mon Jan 25, 2010 6:16 pm

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?
[url]KisMac.com[/url]

dakini2
Joomla! Apprentice
Joomla! Apprentice
Posts: 15
Joined: Tue May 08, 2007 11:53 pm

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

Postby dakini2 » Mon Feb 01, 2010 6:44 pm

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 :)

User avatar
092098jvm
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 230
Joined: Wed Aug 09, 2006 5:59 pm
Contact:

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

Postby 092098jvm » Mon Feb 01, 2010 11:51 pm

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.
[url]KisMac.com[/url]

dakini2
Joomla! Apprentice
Joomla! Apprentice
Posts: 15
Joined: Tue May 08, 2007 11:53 pm

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

Postby dakini2 » Tue Feb 02, 2010 5:11 am

Thank you - will try :)

vineeth
Joomla! Apprentice
Joomla! Apprentice
Posts: 13
Joined: Mon Jul 27, 2009 1:13 pm

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

Postby vineeth » Mon Feb 08, 2010 11:02 am

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...!!!!!!!!

User avatar
fdkid
Joomla! Apprentice
Joomla! Apprentice
Posts: 11
Joined: Thu Mar 06, 2008 5:30 pm

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

Postby fdkid » Tue Feb 23, 2010 1:12 am

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

dakini2
Joomla! Apprentice
Joomla! Apprentice
Posts: 15
Joined: Tue May 08, 2007 11:53 pm

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

Postby dakini2 » Tue Feb 23, 2010 1:21 am

Thanks so much FDKID - really helpful. Nice :) Regards. Kasia
Last edited by dakini2 on Tue Feb 23, 2010 1:31 am, edited 1 time in total.

User avatar
092098jvm
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 230
Joined: Wed Aug 09, 2006 5:59 pm
Contact:

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

Postby 092098jvm » Tue Feb 23, 2010 1:28 am

Interesting. I'm not familiar with ContentSubmit, but I just found it on Dioscouri.com. Do you know if it would work with K2?
[url]KisMac.com[/url]

manishsankari
Joomla! Fledgling
Joomla! Fledgling
Posts: 4
Joined: Mon May 25, 2009 9:16 am

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

Postby manishsankari » Fri Sep 23, 2011 2:35 am

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 ...

User avatar
altibel
Joomla! Apprentice
Joomla! Apprentice
Posts: 5
Joined: Fri Jan 21, 2011 4:08 pm
Location: The Netherlands

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

Postby altibel » Tue Nov 15, 2011 12:48 pm

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:
viewtopic.php?f=474&t=282764&p=2669820#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.

wizardjeje
Joomla! Apprentice
Joomla! Apprentice
Posts: 16
Joined: Thu Aug 30, 2007 10:10 am
Location: Belgium
Contact:

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

Postby wizardjeje » Thu Oct 10, 2013 2:29 pm

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.


Return to “WYSIWYG Editors - 1.0.x”

Who is online

Users browsing this forum: No registered users and 3 guests