no editor xtd on frontend

This forum is for general questions about extensions for Joomla! version 1.5.x.

Moderators: General Support Moderators, 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.
Locked
User avatar
sandy malteser
Joomla! Intern
Joomla! Intern
Posts: 87
Joined: Thu May 11, 2006 4:23 pm

no editor xtd on frontend

Post by sandy malteser » Wed Apr 09, 2008 1:54 pm

Hi,

I want the editor-xtd plugins not to work on the front end how do i do that? :)
Programming is like sex! ...one mistake and you have to support it for the rest of your life.

User avatar
sandy malteser
Joomla! Intern
Joomla! Intern
Posts: 87
Joined: Thu May 11, 2006 4:23 pm

Re: no editor xtd on frontend

Post by sandy malteser » Fri Apr 11, 2008 3:48 pm

any idea? anyone?
Programming is like sex! ...one mistake and you have to support it for the rest of your life.

User avatar
sandy malteser
Joomla! Intern
Joomla! Intern
Posts: 87
Joined: Thu May 11, 2006 4:23 pm

solved it

Post by sandy malteser » Tue Apr 15, 2008 12:41 am

done it but its not a nice, i hate core hacks.

i hacked every editor-xtd pph file. underneath is the image.php but its the same for every other xtd

Code: Select all

function onDisplay($name)
	{
		global $mainframe;
		$user = &JFactory::getUser();

		$doc 		=& JFactory::getDocument();
		$template 	= $mainframe->getTemplate();

		$link = 'index.php?option=com_media&view=images&tmpl=component&e_name='.$name;

		JHTML::_('behavior.modal');
		if ( $user->get('gid') > 23 ) {
		$button = new JObject();
		$button->set('modal', true);
		$button->set('link', $link);
		$button->set('text', JText::_('Image'));
		$button->set('name', 'image');
		$button->set('options', "{handler: 'iframe', size: {x: 570, y: 400}}");
		} else {
		$button = new JObject();
		$button->set('modal', false);
		$button->set('link', '');
		$button->set('text', '');
		$button->set('name', '');
		$button->set('options', "{handler: 'iframe', size: {x: 570, y: 400}}");
		}
		return $button;
	}
the reason for giving it an else statement is that the editor still expects a button and without it, the page crashes
Programming is like sex! ...one mistake and you have to support it for the rest of your life.

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

Re: no editor xtd on frontend

Post by altibel » Tue Nov 15, 2011 12:40 pm

Thanks for posting this! I needed to remove only the Image button from the frontend editor and this solved it.


Locked

Return to “Extensions for Joomla! 1.5”