Disable Front-end edit functionality?
Moderator: General Support Moderators
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.
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.
-
- Joomla! Apprentice
- Posts: 23
- Joined: Fri Oct 26, 2007 1:26 pm
Disable Front-end edit functionality?
Is there a way to disable the ability to edit content through the front-end interface? I only want the admin's to be able to edit content through the back-end.
Thanks,
Shannon
Thanks,
Shannon
Last edited by meisenheimer on Fri Feb 22, 2008 10:46 pm, edited 1 time in total.
- leahcim_dach
- Joomla! Ace
- Posts: 1148
- Joined: Sat Oct 14, 2006 9:37 am
- Location: Washington
Re: Disable Front-end edit functionality?
About the only way I know of is a hack to the content.html.php file. There maybe a component, such as JACL-plus that may give you the control you're looking for. I haven't used it myself, so not sure if it has the capability you're after.
My quick hack is If you go to line 631 of content.html.php and remove the following, the edit icon will no longer appear in the Front-end. After removing the link, no one should get the edit icon in the front-end. Thus not allowing them to edit any content items. It's a dirty hack, but works. Was tested at all group levels, Author, Editor, Publisher...so on and so forth. HTH!
*- As always...make sure you backup your copy, just in case something should go south on you.
joomla_root/components/com_content/content.html.php
<td class="contentheading<?php echo $params->get( 'pageclass_sfx' ); ?>" width="100%">
<?php echo $row->title;?>
<?php HTML_content::EditIcon( $row, $params, $access ); ?> <-- remove this line
</td>
Chad
My quick hack is If you go to line 631 of content.html.php and remove the following, the edit icon will no longer appear in the Front-end. After removing the link, no one should get the edit icon in the front-end. Thus not allowing them to edit any content items. It's a dirty hack, but works. Was tested at all group levels, Author, Editor, Publisher...so on and so forth. HTH!
*- As always...make sure you backup your copy, just in case something should go south on you.
joomla_root/components/com_content/content.html.php
<td class="contentheading<?php echo $params->get( 'pageclass_sfx' ); ?>" width="100%">
<?php echo $row->title;?>
<?php HTML_content::EditIcon( $row, $params, $access ); ?> <-- remove this line
</td>
Chad
-Chad
JTS- Post Assistant: http://forum.joomla.org/viewtopic.php?f=428&t=272481
Joomla! Documentation: http://docs.joomla.org/Main_Page
JTS- Post Assistant: http://forum.joomla.org/viewtopic.php?f=428&t=272481
Joomla! Documentation: http://docs.joomla.org/Main_Page
-
- Joomla! Apprentice
- Posts: 23
- Joined: Fri Oct 26, 2007 1:26 pm
Re: Disable Front-end edit functionality?
I ended up editing lines 88-90, 293-295, 490-493, 627, 634, and 641.
That removed all edit icons and new items icons from the front-end.
Thanks,
Shannon
That removed all edit icons and new items icons from the front-end.
Thanks,
Shannon
-
- Joomla! Intern
- Posts: 92
- Joined: Fri Aug 19, 2005 5:13 pm
Re: Disable Front-end edit functionality?
just wondering whether commenting out the following lines in includes/gacl.class.php would do the trick?
Code: Select all
// actions
#
$this->_mos_add_acl( 'action', 'add', 'users', 'author', 'content', 'all' );
#
$this->_mos_add_acl( 'action', 'add', 'users', 'editor', 'content', 'all' );
#
$this->_mos_add_acl( 'action', 'add', 'users', 'publisher', 'content', 'all' );
#
$this->_mos_add_acl( 'action', 'edit', 'users', 'author', 'content', 'own' );
#
$this->_mos_add_acl( 'action', 'edit', 'users', 'editor', 'content', 'all' );
#
$this->_mos_add_acl( 'action', 'edit', 'users', 'publisher', 'content', 'all' );
#
$this->_mos_add_acl( 'action', 'publish', 'users', 'publisher', 'content', 'all' );
- kimberlee
- Joomla! Apprentice
- Posts: 6
- Joined: Tue Mar 18, 2008 7:35 pm
Re: Disable Front-end edit functionality?
leahcim_dach wrote:About the only way I know of is a hack to the content.html.php file. There maybe a component, such as JACL-plus that may give you the control you're looking for. I haven't used it myself, so not sure if it has the capability you're after.
My quick hack is If you go to line 631 of content.html.php and remove the following, the edit icon will no longer appear in the Front-end. After removing the link, no one should get the edit icon in the front-end. Thus not allowing them to edit any content items. It's a dirty hack, but works. Was tested at all group levels, Author, Editor, Publisher...so on and so forth. HTH!
*- As always...make sure you backup your copy, just in case something should go south on you.
joomla_root/components/com_content/content.html.php
<td class="contentheading<?php echo $params->get( 'pageclass_sfx' ); ?>" width="100%">
<?php echo $row->title;?>
<?php HTML_content::EditIcon( $row, $params, $access ); ?> <-- remove this line
</td>
Chad
Thnaks that worked for my registered users.
- carsten888
- Joomla! Ace
- Posts: 1224
- Joined: Sat Feb 11, 2006 8:32 am
- Contact:
Re: Disable Front-end edit functionality?
is there a way to do this without a hack?
http://www.pages-and-items.com my extensions:
User-Private-Page, Redirect-on-Login, Admin-Help-Pages, Dynamic-Menu-Links, Admin-Menu-Manager, plugin load module in article, plugin pure css tooltip and more...
User-Private-Page, Redirect-on-Login, Admin-Help-Pages, Dynamic-Menu-Links, Admin-Menu-Manager, plugin load module in article, plugin pure css tooltip and more...
-
- Joomla! Fledgling
- Posts: 1
- Joined: Sun Aug 17, 2008 12:04 am
Re: Disable Front-end edit functionality?
The hack above doesn't work for me. I think the file structure may have changed in 1.5. I still can't find any config option to handle this, but there is a CSS hack I use. So far, it seems to work fine. Open the template.css file for your template and add this:
table.contentpaneopen tr td span.hasTip a img {
display: none;
}
That effectively hides the Article Edit icon. It might inadvertently hide something important, but the tag chain seems to be pretty unique.
table.contentpaneopen tr td span.hasTip a img {
display: none;
}
That effectively hides the Article Edit icon. It might inadvertently hide something important, but the tag chain seems to be pretty unique.
- carsten888
- Joomla! Ace
- Posts: 1224
- Joined: Sat Feb 11, 2006 8:32 am
- Contact:
Re: Disable Front-end edit functionality?
thats sweet.
thanks.
thanks.
http://www.pages-and-items.com my extensions:
User-Private-Page, Redirect-on-Login, Admin-Help-Pages, Dynamic-Menu-Links, Admin-Menu-Manager, plugin load module in article, plugin pure css tooltip and more...
User-Private-Page, Redirect-on-Login, Admin-Help-Pages, Dynamic-Menu-Links, Admin-Menu-Manager, plugin load module in article, plugin pure css tooltip and more...
-
- Joomla! Enthusiast
- Posts: 178
- Joined: Fri Apr 20, 2007 9:41 pm
- Location: Scotland
- Contact:
Re: Disable Front-end edit functionality?
Sometimes you don't see the wood for the trees! I was looking for a way to do this myself and the head was in coding mode so I started to hack... never even thought about a simple CSS display:none!!!
Great idea, thanks, saved me hours of heartache!
Great idea, thanks, saved me hours of heartache!
-
- Joomla! Apprentice
- Posts: 25
- Joined: Fri May 04, 2007 5:30 pm
Re: Disable Front-end edit functionality?
To make this change in Joomla 1.5, you can comment out the icon code in the view files. Find and edit the following files.
joomla_root/components/com_content/views/article/tmp/default.php
joomla_root/components/com_content/views/category/tmp/default.php
Find
Change to
---
joomla_root/components/com_content/views/category/tmp/default_items.php
Find
Change to
---
joomla_root/components/com_content/views/frontpage/tmp/default_item.php
joomla_root/components/com_content/views/section/tmp/blog_item.php
Find
Change to
This can also be done using template overrides http://developer.joomla.org/tutorials/1 ... oomla.html. This would be the best way because you will not lose these mods when upgrading Joomla.
joomla_root/components/com_content/views/article/tmp/default.php
joomla_root/components/com_content/views/category/tmp/default.php
Find
Code: Select all
<?php echo JHTML::_('icon.edit', $this->article, $this->params, $this->access); ?>
Code: Select all
<?php //echo JHTML::_('icon.edit', $this->article, $this->params, $this->access); ?>
joomla_root/components/com_content/views/category/tmp/default_items.php
Find
Code: Select all
<?php $this->item = $item; echo JHTML::_('icon.edit', $item, $this->params, $this->access) ?>
Code: Select all
<?php $this->item = $item; //echo JHTML::_('icon.edit', $item, $this->params, $this->access) ?>
joomla_root/components/com_content/views/frontpage/tmp/default_item.php
joomla_root/components/com_content/views/section/tmp/blog_item.php
Find
Code: Select all
<?php echo JHTML::_('icon.edit', $this->item, $this->item->params, $this->access); ?>
Code: Select all
<?php //echo JHTML::_('icon.edit', $this->item, $this->item->params, $this->access); ?>
-
- Joomla! Intern
- Posts: 55
- Joined: Fri May 09, 2008 8:22 pm
Re: Disable Front-end edit functionality?
That above doesn't work for me in J1.5.8.1.brianbush wrote:So far, it seems to work fine. Open the template.css file for your template and add this:
table.contentpaneopen tr td span.hasTip a img {
display: none;
}
But this works:
Code: Select all
div.contentpaneopen_edit span.hasTip a img {
display: none;
}
-
- Joomla! Fledgling
- Posts: 3
- Joined: Mon Jan 19, 2009 9:56 am
Re: Disable Front-end edit functionality?
Wow,asante sana! Thanks.
-
- Joomla! Fledgling
- Posts: 1
- Joined: Wed Feb 04, 2009 4:30 am
Re: Disable Front-end edit functionality?
For the new guy, where in the template.css file does this code get pasted?
Thanks
Thanks
-
- Joomla! Apprentice
- Posts: 43
- Joined: Wed Oct 24, 2007 8:49 pm
Re: Disable Front-end edit functionality?
I know this is quite an old thread but I had the same issue with J 1.5.10 on IE 7. The problem was a Twitter script I put in a module that allows my threads there to show. I unpublished this and everything works fine. FYI
- gosa7
- Joomla! Apprentice
- Posts: 19
- Joined: Mon Mar 16, 2009 11:26 pm
- Contact:
Re: Disable Front-end edit functionality?
lemur1 wrote:That above doesn't work for me in J1.5.8.1.brianbush wrote:So far, it seems to work fine. Open the template.css file for your template and add this:
table.contentpaneopen tr td span.hasTip a img {
display: none;
}
But this works:Code: Select all
div.contentpaneopen_edit span.hasTip a img { display: none; }
Please help. Where exactly to paste this code
Impossible is nothing
http://island.manukau.ac.nz/mitlive
http://island.manukau.ac.nz/mitlive
-
- Joomla! Apprentice
- Posts: 11
- Joined: Mon Nov 24, 2008 10:52 pm
- Location: Adelaide
Re: Disable Front-end edit functionality?
I've just come across this same problem with the Author permission. Surely this is a bug that needs to be fixed? What's the point in requiring approval for Author articles if Authors can simply edit their articles after they have been approved and type in anything they want?! There is no logic to this setup in my opinion.
I know there are hacks to get around this, but this shouldn't be required for such a basic thing. Until this gets fixed, I think the best (but awkward) thing to do is for admins to change the author of the article before publishing.
I know there are hacks to get around this, but this shouldn't be required for such a basic thing. Until this gets fixed, I think the best (but awkward) thing to do is for admins to change the author of the article before publishing.
-
- Joomla! Fledgling
- Posts: 2
- Joined: Mon Dec 29, 2008 7:41 pm
Re: Disable Front-end edit functionality?
Since this may hide something important, I suggest using the following. It will only hide the edit image that matched the other criteria.brianbush wrote:The hack above doesn't work for me. I think the file structure may have changed in 1.5. I still can't find any config option to handle this, but there is a CSS hack I use. So far, it seems to work fine. Open the template.css file for your template and add this:
table.contentpaneopen tr td span.hasTip a img {
display: none;
}
That effectively hides the Article Edit icon. It might inadvertently hide something important, but the tag chain seems to be pretty unique.
table.contentpaneopen td.buttonheading span.hasTip a img[src="/images/M_images/edit.png"] { display:none;}
-
- Joomla! Intern
- Posts: 55
- Joined: Fri May 09, 2008 8:22 pm
Re: Disable Front-end edit functionality?
Hi,
FOR J1.5 ONLY!!
I have completed the mission: you can don't delete the edit button, but only
restrict rights of "non-author" for editing (for example, of "editors").
So, only author of an article and >= Publisher see the button.
Here is the change of codes in file:
After the lines:
add these lines:
Gruß.
FOR J1.5 ONLY!!
I have completed the mission: you can don't delete the edit button, but only
restrict rights of "non-author" for editing (for example, of "editors").
So, only author of an article and >= Publisher see the button.
Here is the change of codes in file:
Code: Select all
[Joomla base path]/components/com_content/helpers/icon.php
Code: Select all
if (!$access->canEdit && !($access->canEditOwn && $article->created_by == $user->get('id'))) {
return;
}
Code: Select all
if ($article->created_by != $user->get('id') && ($user->usertype == "Editor")) {
return;
}
-
- Joomla! Apprentice
- Posts: 11
- Joined: Wed Jun 18, 2008 7:48 pm
Re: Disable Front-end edit functionality?
J 1.5.10 onward...it is in
\components\com_content\helpers\icon.php
$icon = $article->state ? 'edit.png' : 'edit_unpublished.png';
$text = JHTML::_('image.site', $icon, '/images/M_images/', NULL, NULL, JText::_('Edit'));
just comment out these two culprits
\components\com_content\helpers\icon.php
$icon = $article->state ? 'edit.png' : 'edit_unpublished.png';
$text = JHTML::_('image.site', $icon, '/images/M_images/', NULL, NULL, JText::_('Edit'));
just comment out these two culprits
-
- Joomla! Apprentice
- Posts: 45
- Joined: Tue Mar 03, 2009 1:44 am
Re: Disable Front-end edit functionality?
Also comment out this to eliminate the add new icon:ahmedsheeraz wrote:J 1.5.10 onward...it is in
\components\com_content\helpers\icon.php
$icon = $article->state ? 'edit.png' : 'edit_unpublished.png';
$text = JHTML::_('image.site', $icon, '/images/M_images/', NULL, NULL, JText::_('Edit'));
just comment out these two culprits
$text = JHTML::_('image.site', 'new.png', '/images/M_images/', NULL, NULL, JText::_('New') );
-
- Joomla! Apprentice
- Posts: 11
- Joined: Sat Jun 13, 2009 2:43 pm
- Location: Romania
- Contact:
Re: Disable Front-end edit functionality?
i'm using joomla 1.5.10 and i have found what "ahmedsheeraz" have wrote, it's working just fine. thanks!silentmercy wrote:Also comment out this to eliminate the add new icon:ahmedsheeraz wrote:J 1.5.10 onward...it is in
\components\com_content\helpers\icon.php
$icon = $article->state ? 'edit.png' : 'edit_unpublished.png';
$text = JHTML::_('image.site', $icon, '/images/M_images/', NULL, NULL, JText::_('Edit'));
just comment out these two culprits
$text = JHTML::_('image.site', 'new.png', '/images/M_images/', NULL, NULL, JText::_('New') );
but i cannot found this... it should be on the same icon.php?
$text = JHTML::_('image.site', 'new.png', '/images/M_images/', NULL, NULL, JText::_('New') );
-
- Joomla! Fledgling
- Posts: 4
- Joined: Sat Aug 08, 2009 10:51 pm
Re: Disable Front-end edit functionality?
If you want to restrict the icon to only certain sections.... you could do something like this (which is what I did so editors could front-end edit one section, but not sections I created for different reasons):
if ($article->sectionid == 1) {
$icon = $article->state ? 'edit.png' : 'edit_unpublished.png';
$text = JHTML::_('image.site', $icon, '/images/M_images/', NULL, NULL, JText::_('Edit'));
}
if ($article->sectionid == 1) {
$icon = $article->state ? 'edit.png' : 'edit_unpublished.png';
$text = JHTML::_('image.site', $icon, '/images/M_images/', NULL, NULL, JText::_('Edit'));
}
-
- Joomla! Intern
- Posts: 56
- Joined: Sat Jul 04, 2009 10:45 am
Re: Disable Front-end edit functionality?
\components\com_content\helpers\icon.php
//$icon = $article->state ? 'edit.png' : 'edit_unpublished.png'; line 110
//$text = JHTML::_('image.site', $icon, '/images/M_images/', NULL, NULL, JText::_('Edit')); line 111
//$text = JHTML::_('image.site', 'new.png', '/images/M_images/', NULL, NULL, JText::_('New') ); line 36
works fine but the gap between where the icon used to appear is still there. is it the end of the world, I'm not sure.
Many thanks for your help.
//$icon = $article->state ? 'edit.png' : 'edit_unpublished.png'; line 110
//$text = JHTML::_('image.site', $icon, '/images/M_images/', NULL, NULL, JText::_('Edit')); line 111
//$text = JHTML::_('image.site', 'new.png', '/images/M_images/', NULL, NULL, JText::_('New') ); line 36
works fine but the gap between where the icon used to appear is still there. is it the end of the world, I'm not sure.
Many thanks for your help.
-
- Joomla! Fledgling
- Posts: 1
- Joined: Sat Sep 12, 2009 7:48 pm
Re: Disable Front-end edit functionality?
To disable editing on the Frontpage in Joomla 1.5.11, all I had to do was change:
(Lines 64-65)
To:
(Lines 64-65)
In the following file:
Code: Select all
$access->canEdit = $user->authorize('com_content', 'edit', 'content', 'all');
$access->canEditOwn = $user->authorize('com_content', 'edit', 'content', 'own');
To:
Code: Select all
$access->canEdit = $user->authorize('com_content', 'edit', 'content', 'none');
$access->canEditOwn = $user->authorize('com_content', 'edit', 'content', 'none');
In the following file:
Code: Select all
<joomla install>\components\com_content\views\frontpage\view.html.php
-
- Joomla! Apprentice
- Posts: 10
- Joined: Mon Aug 10, 2009 10:04 pm
Re: Disable Front-end edit functionality?
that also solved my problem although I had to do the same in the <joomla install>\components\com_content\views\article\view.html.php file as well
-
- Joomla! Fledgling
- Posts: 1
- Joined: Sat Apr 17, 2010 3:39 pm
Re: Disable Front-end edit functionality?
Hello!
It's not enough to add in css:
table.contentpaneopen tr td span.hasTip a img {
display: none;
}
It helpes to hide an "Edit" icon, but you are making a backdoor for edition.
If you are open the page source, you can find a link for editing your content.
Everybody can use it to edit your site illegally.
It's not enough to add in css:
table.contentpaneopen tr td span.hasTip a img {
display: none;
}
It helpes to hide an "Edit" icon, but you are making a backdoor for edition.
If you are open the page source, you can find a link for editing your content.
Everybody can use it to edit your site illegally.
-
- Joomla! Apprentice
- Posts: 44
- Joined: Thu Jun 17, 2010 1:49 pm
Re: Disable Front-end edit functionality?
You rock! Using Joomla! 1.5.17 Stable and this totally did the job. In my particular case, I'm developing a brand new site which I very much want to keep offline, but when previewing, those edit article icons were everywhere, which would matter if they didn't affect the layout!ahmedsheeraz wrote:J 1.5.10 onward...it is in
\components\com_content\helpers\icon.php
$icon = $article->state ? 'edit.png' : 'edit_unpublished.png';
$text = JHTML::_('image.site', $icon, '/images/M_images/', NULL, NULL, JText::_('Edit'));
just comment out these two culprits
-
- Joomla! Fledgling
- Posts: 3
- Joined: Fri Nov 06, 2009 1:31 pm
Re: Disable Front-end edit functionality?
Ok works too for Joomla 1.5.15
- C0nw0nk
- Joomla! Enthusiast
- Posts: 248
- Joined: Tue Jun 15, 2010 1:12 am
- Location: United Kingdom, London
- Contact:
Re: Disable Front-end edit functionality?
thanks works great <3
-
- Joomla! Apprentice
- Posts: 17
- Joined: Wed Feb 17, 2010 10:24 pm
Re: Disable Front-end edit functionality?
I can't seem to get the front-end edit icons to show up!
Been scouring the net trying to find out how to enable this capability.
I have users in the publisher group, but no icons show up for them. I've turned on everything I could find in the back-end to try to enable the icons, but I must be missing a crucial click somewhere. Can anyone provide a clue to help me?
Been scouring the net trying to find out how to enable this capability.
I have users in the publisher group, but no icons show up for them. I've turned on everything I could find in the back-end to try to enable the icons, but I must be missing a crucial click somewhere. Can anyone provide a clue to help me?