Joomla! Q&A on Twitter - Part 2

Posted May 15, 2009

Today was round 2 of our little Twitter experiment to see what would happen when we gave anyone and everyone the opportunity to ask Rob Schley, JXtended Developer, Development Working Group Coordinator and Open Source Matters Board Member, any question they could imagine. Be sure to follow JXtended and RobSchley on Twitter to catch the next opportunity to get your questions answered by a Joomla expert. Without further ado, onto the questions!

PugetPro asks: Will Joomla provide core support for tags? WordPress does, and for most of my small sites, it is a key feature.

Rob Schley answers: I expect the Joomla core to provide tagging support in the future. The biggest issue with tagging in the core right now has to do with the data-model. Tagging could easily be added to com_content but addressing it for all of the core content types (contacts, web links, etc.) plus making it extensible for 3rd party extensions is a serious undertaking (I speak from experience). We've built Labels to address this problem and I think it does a great job considering all the obstacles with the data-model, the inconsistent handling of content, etc. I think Joomla 2.0 will have tags built in–if not sooner.

loyals asks: Why doesn't Joomla have a built-in core updater like Wordpress?

Rob Schley answers: Joomla 1.6 will have something like this. There are also a few 3rd party solutions that may or may not suit your needs.

joomlapraise asks: Is there a way to ensure that onAfterDispatch and onAfterRender are still fired even if a component redirects the user?

Rob Schley answers: The only way that I can imagine to do this would be to hijack the application object before the component is dispatched. This is a pretty serious undertaking and has the potential to create a lot of problems so I do not recommend this but if you absolutely had to do it, it could be done. Basically, you would create your own application class that extends JSite and/or JAdministrator and overrides the redirect() method. You would have to make sure you pull in all of the properties and state configuration of the real application before switching them.

PugetPro asks: What do you think of the Perishable Press 4G Blacklist as a protective layer for Joomla?

Rob Schley answers: I'm not very familiar with this system but it looks interesting. I wrote the first set of .htaccess attack protection rules that went into Joomla 1.0 and 1.5 so I can't knock the idea and from a quick glance it seems there are some Joomla/Mambo specific attacks built into it. If you're using a shared server without mod_security, this might be an easy way to add a little bit more protection but I think mod_security might be the better solution overall.

jlleblanc asks: What's the most unique thing you've built with Joomla or the Joomla Framework?

Rob Schley answers: I guess the most unique thing I've built with the Joomla Framework would be http://www.quizilla.com/ There are a lot of things about that site that make it unique but here are a couple aspects that I really dig: it has a very clever caching system designed to deal with millions of content items, the site has nearly as much JavaScript as it does PHP, it is built entirely on the Joomla framework (it does not use anything from the CMS), and, my favorite, it can dynamically convert content from the site's original data-model to the new data-model on the fly if it hasn't been converted yet.

jeffkinzer asks: Why doesn't Joomla 1.5 have an option to override a non-writable configuration file like Joomla 1.0?

Rob Schley answers: If I remember correctly, that feature of Joomla 1.0 only worked in one particular configuration which was not very common. Joomla 1.5 has the FTP layer built into it to make that type of feature irrelevant and unnecessary. We highly recommend using the FTP layer if your host does not use suexec or suphp.

ahujaankit asks: How do I check if the user is at the back-end or the front-end?

Rob Schley answers: This is actually very easy:

$app = &JFactory::getApplication();

if ($app->isAdmin()) {
	// I'm in the back-end.
} else {
	// I'm in the front-end.
}

jeffkinzer asks: Would you recommend protecting the config.php file with .htaccess or moving it out of public html path?

Rob Schley answers: It depends on what you're trying to protect yourself from. If you're on a shared server, both or neither may help you depending on how the server is configured. An .htaccess rule to protect people from accessing the configuration file might be worthwhile but it is extremely unlikely that anyone will ever have an opportunity to read the configuration file from the web. It would require the server to be misconfigured in a way that it did not interpret PHP files but rather just sent them out as regular text files. It is possible that could happen but if the server is misconfigured that badly, chances are good that it won't respect your .htaccess file either. Moving the configuration file out of the web root will theoretically protect you from something but I'm not so sure it is worth the hassle.

corywebb asks: Why isn't there a "trash" option in the Module Manager?

Rob Schley answers: We've been talking about building a generic trash system that could be used by all of the core as well as 3rd party extensions for years now but it just hasn't been built yet. As of right now, each component has to manage it's own trash which is a real pain because you end up building the same logic over and over. I'd love to see this solved in 1.7.

ahujaankit asks: The onAfterDisplayTitle trigger doesn't seem to display anything for me in Joomla 1.5 but onBeforeDisplayContent works. Why is that?

Rob Schley answers: This is one of the quirks that few people know about and I'm still not sure I really understand why it is the way it is. The onAfterDisplayTitle trigger output is only displayed when the summary text is configured to be hidden. The relevant code:

if (!$this->params->get('show_intro')) :
	echo $this->article->event->afterDisplayTitle;
endif;

Tohuw asks: What changes do you think should be made to Joomla to streamline the template creation/implementation process?

Rob Schley answers: I'd like to see a few changes that would ultimately help streamline template creation/implementation. Firstly, I'd like to see a set of best practices and standards documented for the Joomla core layouts and templates that includes naming conventions, stylistic guides, etc. Secondly, I'd like to see a light-weight, easy to understand example template. The example template could be used as a starting point for template developers to build from. I'd also like to see more knowledge sharing among the community. There is a very severe knowledge disparity among the community when it comes to development and the only way to really fix that is for the experts to share their knowledge. There's a great discussion happening on the Joomla CMS Development mailing list that you should check out.

Thanks to all the participants for their great questions. Feel free to discuss any of the answers in the comments!

Comments

Add Comment

Get involved in the conversation. Let us know what's on your mind.