Kunena Crypsis B3 template - 2

8 years 1 month ago - 8 years 1 month ago #1 by chrisc
A little while ago we posted a topic on the kunena-crypsis-b3-template . We decided that there were just a few too many problems with it to make it a default for the site. With the release of Kunena 4.0.10 we decided to take another look at it but discovered that not a lot had changed and found a few other problems.

Apart from the continued layout concerns we also found that the ability to use file or image attachments was not working.

What we were observing was a Javascript error
Error: TypeError: $(...).modal is not a function
Source File: http://sitename.co.uk/forum/newtopic
Line: 73

This redirects one to the following piece of code:
(function($){
	$('#modal').modal({"backdrop": true,"keyboard": true,"show": true,"remote": ""});
	})(jQuery);

This would cause the error since there was not an identifier named 'modal' in the template.

Investigating the cause revealed that the template was including a javascript file named 'bootstrap.modal'. Removing the calling line resolved the problem and enabled attachments to work.

File template.php line 93:
JHtml::_('bootstrap.modal');

Quite why the file was included is not something we completely understand since the standard bootstrap include files, which are usually added as part of the site Bootstrap (3) based template would include any required Bootstrap files, and the modal code is usually included in the main include file anyway.

One also observes a few other includes as well:
JHtml::_('bootstrap.framework');
 JHtml::_('bootstrap.tooltip', '[data-toggle="tooltip"]');
 JHtml::_('jquery.framework');

One wonders whether these are necessary as well, since if the site is using a Bootstrap version 3 template these frameworks would presumably have been included already, so there would be no need to include them a second time. Preliminary tests seem to confirm that these can also be commented out, although more testing is required.

One other minor annoyance which we observed was also not resolved, was that the back end configuration language strings are not being picked up correctly by the Crypsisb3 template. To resolve this we simply copied (one could alternatively create a symbolic link) the file en-GB.kunena_tmpl_crypsis.ini to en-GB.kunena_tmpl_crypsisb3.ini which resolved all the strings correctly.

With the number of 'opportunities' we have discovered with the Crypsis template and the knowledge that Kunena 5.x is only intended to run with the Crypsis template this makes one realise that there is still some way to go for this template before it is generally useful, which is a great pity since it has a lot of potential.

Regards

If you are using our extensions please leave a review at the JED: IP Mapping | Issue Tracker | JAudit | Password Control

Please Log in or Create an account to join the conversation.

Time to create page: 0.135 seconds
Go To Top

Joomla! Debug Console

Session

Profile Information

Memory Usage

Database Queries