The Joomla! Forum ™



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.



Post new topic Reply to topic  [ 24 posts ] 
Author Message
PostPosted: Thu Aug 07, 2008 5:27 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Fri Nov 17, 2006 11:45 am
Posts: 28
Location: Hoshiarpur
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


Top
 Profile  
 
PostPosted: Mon Aug 25, 2008 12:46 pm 
I've been banned!

Joined: Mon Aug 11, 2008 3:33 pm
Posts: 1
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! ;)


Top
 Profile  
 
PostPosted: Sat Sep 06, 2008 6:21 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Fri Nov 17, 2006 11:45 am
Posts: 28
Location: Hoshiarpur
Thanks.
Good idea.


Top
 Profile  
 
PostPosted: Wed Sep 10, 2008 3:45 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Sat Feb 16, 2008 6:53 pm
Posts: 19
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.


Top
 Profile  
 
PostPosted: Mon Sep 22, 2008 4:22 pm 
Joomla! Intern
Joomla! Intern

Joined: Thu Oct 20, 2005 11:43 pm
Posts: 77
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


Top
 Profile  
 
PostPosted: Wed Oct 01, 2008 1:31 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Tue Oct 11, 2005 7:03 pm
Posts: 35
Location: Leicestershire
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


Top
 Profile  
 
PostPosted: Wed Oct 01, 2008 1:56 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Tue Oct 11, 2005 7:03 pm
Posts: 35
Location: Leicestershire
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


Top
 Profile  
 
PostPosted: Thu Oct 02, 2008 7:39 am 
Joomla! Explorer
Joomla! Explorer

Joined: Sun Mar 23, 2008 9:54 pm
Posts: 306
@ 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?


Top
 Profile  
 
PostPosted: Thu Oct 02, 2008 9:03 am 
Joomla! Apprentice
Joomla! Apprentice

Joined: Tue Oct 11, 2005 7:03 pm
Posts: 35
Location: Leicestershire
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:
<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


Top
 Profile  
 
PostPosted: Thu Oct 02, 2008 9:24 am 
Joomla! Explorer
Joomla! Explorer

Joined: Sun Mar 23, 2008 9:54 pm
Posts: 306
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.


Top
 Profile  
 
PostPosted: Thu Oct 02, 2008 9:29 am 
Joomla! Explorer
Joomla! Explorer

Joined: Sun Mar 23, 2008 9:54 pm
Posts: 306
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/


Top
 Profile  
 
PostPosted: Thu Oct 02, 2008 9:57 am 
Joomla! Apprentice
Joomla! Apprentice

Joined: Tue Oct 11, 2005 7:03 pm
Posts: 35
Location: Leicestershire
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


Top
 Profile  
 
PostPosted: Mon Jul 27, 2009 1:24 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Mon Jul 27, 2009 1:13 pm
Posts: 13
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...!!!!!!


Top
 Profile  
 
PostPosted: Mon Jan 25, 2010 6:16 pm 
User avatar
Joomla! Enthusiast
Joomla! Enthusiast

Joined: Wed Aug 09, 2006 5:59 pm
Posts: 230
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]


Top
 Profile  
 
PostPosted: Mon Feb 01, 2010 6:44 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Tue May 08, 2007 11:53 pm
Posts: 14
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 :)


Top
 Profile  
 
PostPosted: Mon Feb 01, 2010 11:51 pm 
User avatar
Joomla! Enthusiast
Joomla! Enthusiast

Joined: Wed Aug 09, 2006 5:59 pm
Posts: 230
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]


Top
 Profile  
 
PostPosted: Tue Feb 02, 2010 5:11 am 
Joomla! Apprentice
Joomla! Apprentice

Joined: Tue May 08, 2007 11:53 pm
Posts: 14
Thank you - will try :)


Top
 Profile  
 
PostPosted: Mon Feb 08, 2010 11:02 am 
Joomla! Apprentice
Joomla! Apprentice

Joined: Mon Jul 27, 2009 1:13 pm
Posts: 13
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...!!!!!!!!


Top
 Profile  
 
PostPosted: Tue Feb 23, 2010 1:12 am 
User avatar
Joomla! Apprentice
Joomla! Apprentice

Joined: Thu Mar 06, 2008 5:30 pm
Posts: 11
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


Top
 Profile  
 
PostPosted: Tue Feb 23, 2010 1:21 am 
Joomla! Apprentice
Joomla! Apprentice

Joined: Tue May 08, 2007 11:53 pm
Posts: 14
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.

Top
 Profile  
 
PostPosted: Tue Feb 23, 2010 1:28 am 
User avatar
Joomla! Enthusiast
Joomla! Enthusiast

Joined: Wed Aug 09, 2006 5:59 pm
Posts: 230
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]


Top
 Profile  
 
PostPosted: Fri Sep 23, 2011 2:35 am 
Joomla! Fledgling
Joomla! Fledgling

Joined: Mon May 25, 2009 9:16 am
Posts: 4
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 ...


Top
 Profile  
 
PostPosted: Tue Nov 15, 2011 12:48 pm 
User avatar
Joomla! Apprentice
Joomla! Apprentice

Joined: Fri Jan 21, 2011 4:08 pm
Posts: 5
Location: The Netherlands
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.


Top
 Profile  
 
PostPosted: Thu Oct 10, 2013 2:29 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Thu Aug 30, 2007 10:10 am
Posts: 16
Location: Belgium
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.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 24 posts ] 



Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group