Installing the Front End Editor extension on Joomla 1.5

October 1, 2009 33 comments

Many of you already know that I created the “Front End Editor” aka “Enhanced Front End Editing” extension for Joomla! as part of Google Summer of Code 2009. The extension only works in 1.5.x right now. Even though I tried to make it easy to adopt the extension by making it easy to setup, the extension does rely on the template quite a bit. I thought if I explain the installation process, all the hacks the extension makes and the underlying dependencies in a blogpost, it should help in getting rid of confusion to some degree.

You can download the extension from JED.

Installation

  1. Install ‘com_frontendeditor’, ‘plg_frontendeditor’ and ‘plg_articleeditor’ from here.
  2. Enable the plugins “System – Frontend Editor” and “Content – Frontend Article Editor”.
  3. Go to “Components->Enhanced Frontend Editor” at the backend and click on “Apply Changes”. You can modify the settings there to suit your template and needs.

Hacks ( applied when you click on “Apply Changes”)

  1. Adds the module chrome “modChromefreditor” to the “html/modules.php” file of the current template. Before doing this, it creates a backup file ‘html/modules.php.backup’.
  2. After creating a backup of “index.php” as “index.php.backup”, it modifies the following statements in the “index.php” of the current template:
    • All the jdoc statements get the style “freditor”. Eg.:
      <jdoc:include type="modules" name="top">

      gets changed into

      <jdoc:include type="modules" name="top" style="freditor" />
    • Surrounds the jdoc statements with a DIV that has class in the format
      frpos.position-name

      Eg.:

      <jdoc:include type="modules" name="user3" style=" freditor" >

      gets changed into

      <div class="frpos.user3">
      <jdoc:include type="modules" name="user3" style=" freditor" />
      </div>
  3. Replaces the existing “/html/com_content/article/form.php” file with a custom “form.php” ( after creating a backup file i.e. “form.php.backup”)

The backup files are created so that you can undo the changes anytime by clicking on “Revert Changes”. You would probably want to revert the hack if you choose to uninstall the extension.

You’ll also need to apply the hack separately for each template you want to use.

Dependencies & Limitations

  1. Mootools 1.2
    Perhaps the biggest limitation of this extension is that it uses mootools 1.2 instead of 1.1 which is used in Joomla! 1.5. Consequently, some of your javascript that uses mootools 1.1 may not work properly when you’re logged in. Mootools 1.2 will only replace 1.1 when you’re logged in at the front-end and have the plugins enabled. The reason I chose 1.2 is that Joomla! 1.6 will use mootools 1.2.
  2. Menu-item title editing
    The menu-item titles must be enclosed in LI elements with the class in format item<menu-id> Eg.:

    <li class="item13">
    <span>Joomla! Documentation</span>
    </li>

    If your template uses a different layout, you may want to modify it a little to support menu-item title editing. In case you don’t, you need not worry as each of these features degrade gracefully, without affecting the functionality or presentation of your site.

  3. Default article edit icons are hidden
    The default edit icons are hidden and the extension displays its own edit icons. You can specify their selector in the admin component. In case your template uses a different selector than the default one and you don’t specify it, a pair of edit icons can appear for each article which will lead to confusion.
  4. Selectors for article and page titles
    If they are not the default, you can modify them in the admin so that editing of article and page titles works.

Future Versions

You can report any bugs here. Since my college semester has now begun, any updates to the extension will probably come slowly. I plan to remove any trivial withstanding bugs, add new features with time and improve the extension in general. I would love to spend any free time in fixing bugs of the overall Joomla! project as well.

As far as Joomla! 1.6 is concerned, I did create a patch for 1.6 but due to time constraints, it wasn’t included in the feature-set for 1.6. So, when a stable version of 1.6 is released, I’ll port this extension to support 1.6.

I will love to know if the extension worked for you and any suggestions or feedback you want to give. You can either contact me via the Contact page or send me an @reply on twitter.

Update:

This is a common recurring problem for version 0.3.7 of the extension. If you’re getting the following error:

Parse error: syntax error, unexpected ‘&’, expecting T_VARIABLE or ‘$’
in your-install/administrator/components/com_frontendeditor/controller.php
on line 99

it means you’re probably using a version of PHP earlier than 5. Unfortunately, this piece of code only works in PHP 5. You’ll either need to update to PHP 5 or get the patch from here. You’ll need to apply the patch to your-install/administrator/components/com_frontendeditor/controller.php

In case you’re not familiar with applying a patch, you’ll have to execute the following command from the shell:

patch -p1 -i 99line.patch controller.php

Update 2:
If you would like to promote the development of this extension and make a contribution, please go to the project page.

I’m in! #GSoC

April 27, 2009 1 comment

Yes, I’m in (yay!) and I will be participating in Google Summer of Code this year with Joomla! For those of you who don’t know what Joomla! is, it is a Content Management System ( CMS ) used widely to create and manage websites. I will be working on an Enhanced front-end editor for Joomla! Ashwin will be mentoring me for the summer.

I am thankful to Sameer for inspiring me to take part in GSoC. I also thank Elin, Sam, Toni and all the other mentors and community of Joomla! for helping me better my application into something practical and at the same time useful. It has been a great experience interacting with the Joomla! community for the past 1 – 2 months and that is something that has really inspired me to work on the project.

Things have been moving very quickly since I got to know that I got selected on 21st April at 12:30 am. But, the journey has just begun. I will be coding this coming summer to complete my project and to validate my selection. At present, I have been getting myself familier with the Joomla! framework, finalizing the implementation details of my project as well as sorting out a few issues in my mind. I plan to give my best effort to the project so that it becomes a useful feature for all Joomla! users.

I see this as a terrific opportunity to work in collaboration with talented people from all over the world. I see now why people love open source so much. It feels great to be a part of the Joomla! as well as the opensource community and to contribute to a project that is used by so many users.

My heartiest congratulations to everyone who got selected for Summer of Code. You can have a look at the list of students who got selected for Joomla! here: http://socghop.appspot.com/org/home/google/gsoc2009/joomla

This post’s title makes my obsession with use of hash-tags in twitter updates pretty clear ;)