The Techjoomla Blog

Stay updated with all the latest happenings at Techjoomla. From news about the developments in your favourite extensions to Tips & Tricks about the Joomla CMS, Framework & Development.

Posted by on in Joomla Development

Today, its critical that your site is mobile friendly. More and more people are accessing the web via their mobile devices. The Joomla native Joomla modal popup is not responsive by default. Here’s how you can make it responsive.

 The Code to make it happen !

1. Import following library at the start of the page. Please make sure you embed this code in php start and end  tags.

JHTML::_('behavior.modal', 'a.modal');

 This simply ensures that the modal.js script and the modal.css style sheets are loaded, plus the mootools javascript framework which the script requires, and initialises the modal window. Note that from Joomla 3.3x onwards using JQuery might be a better idea. 

 

2. Add following function in javascript

$(document).ready(function() {
	var width = $(window).width();
	var height = $(window).height();

	//ID of container
	$('a#modal_info').attr('rel','{handler: "iframe", size: {x: '+(width-(width*0.10))+', y: '+(height-(height*0.10))+'}}');
});

If we give modal size directly in html then it will not make modal popup responsive. So for that we have used javascript to give size to the modal.

To give size to the popup window, first we dynamically calculated window size and gave that size to the modal window so this can make our modal popup responsive. 

3. Now you need to invoke the modal in your html with the code below.  Give same id to the javascript and container.

<a

	id="modal_info"
	href="#"
	class="modal"
	>
</a>

 To create a popup you simply give the css class 'modal' to the link <a> tag which links to the content you want to display just like you would normally do ! 

Hits: 1202 Comments
Rate this blog entry:
0

Posted by on in Joomla Development

This Blog is specially targeted for developers and people who use Jomsocial

b2ap3_thumbnail_download_20140710-115328_1.jpg

Jomsocial!
  Which turns Joomla CMS into a full-fledged social
networking website. While using your own component with jomsocial you need to make sure that your component is tightly integrated with it and most important is you are notified with the activities happening.

 

In Jomsocial, notifications are shown on the notification bar and if you use the following code provided by Jomsocial you’ll get email notifications as well. Use  Jomsocial’s Notifications API, to send  notifications to users we write following code


Code:

require_once JPATH_ROOT .'/components/com_community/libraries/core.php';

$user = CFactory::getUser();
$cmd = 'system_messaging'; // first param, type of activity
$actor = $user->id; //second param - get the id of $actor
$target = '965'; // third param. Who receive notification? In our dev environment, its admin user with id 965. At your environment, you will most likely want to get the ID from your object or from array of users.
$subject = 'Notification Subject'; // Subject of both, email and popup notifications
$body = 'This is the notification body message'; //Body message in emails.
$template = ''; // If you need to use specific jomsocial template file, you can define it here.
$params = new CParameter(''); // We want to create an additional params object, and assign data to it, without having to formally define a class
CNotificationLibrary::add( $cmd , $actor , $target , $subject , $body , $template , $params );

 

...
Continue reading
Hits: 1598 Comments
Rate this blog entry:
0

Posted by on in Joomla Development

Zoo is one of the best CCK extensions available for Joomla . It's a flexible and powerful application builder to manage your content. Especially if you are having huge data sets, Zoo can be a awesome way to manage & present it all. However with large data sets, manually adding all the data might not be practical. This is where the inbuilt Zoo import tool can help you in a big way.

In this blog we will show you how it works & also how we solve a problem that it presents if you have data with lots & lots of fields. When this happens during the import you need to manually Map the fields in your Import CSV/JSON file to the fields in Zoo so that the import can proceed. However when you have lots of fields it a huge chore to map them all manually. However with our solution you can do it in a single Click ! 

Lets how the existing Zoo Data Import Works ( Just in case you didn't know ! ) 

Data import done in following 3 stages.  Zoo allows you to import data in JSON or CSV format. 

1. Upload CSV/JSON file.

b2ap3_thumbnail_oie_2582216XM8f3drV.png

Continue reading
Tagged in: cck import zoo
Hits: 1767 Comments
Rate this blog entry:

Posted by on in Joomla Development

Are you building admin list-view in your Joomla Extension? Do you want to include Search Tools in your Joomla 3.x extension? Here is a quick guide to do so in easy steps.

First we will check the folder structure needed, and then we will see sample code.

A. Folder structure and files we will see in action here-

Folder structure -

/administrator/components/com_quick2cart/models/
/administrator/components/com_quick2cart/models/fields/
/administrator/components/com_quick2cart/models/forms/
/administrator/components/com_quick2cart/views/

Files that needs to be added / changed -

...
Continue reading
Hits: 25196 Comments
Rate this blog entry:
0

Posted by on in Joomla Development

The Bootstrap 2.3 vs Bootstrap 3 Problem

As of now Joomla uses Bootstrap 2.3 as the officially supported library. However template developers have started adopting Bootstrap 3 in their frameworks & templates. Originally it was hoped that Bootstrap would help get a unified user interface for Joomla. Currently Joomla extension developers are hard pressed to support both 2.3 & 3 in their extensions. 

Doing this means that either extension developers will need to provide alternative layouts for Bootstrap 2.3 as well as as for Bootstrap 3. This however might not always be practical. We need a better solution. 

Exploring for a Solution with the Community

Techjoomla is helping organize a Extension & Template developers group to bring a more sustainable solution to this problem. In an ideal world extension developers would be able to concentrate on the Business logic code & innovate in functionality while letting template developers be innovative in creating awesome designs. For now a solution is being sought on the group to have an unified & standard way for extension devs to offer both BS 2.3 & BS 3 to end users. 

What if i want Bootstrap 3 Now ?

Till that happens, we are recommending that you use the method suggested by Joostrap to convert Bootstrap 2.3 to Bootstrap 3.0 using No Number's ReReplacer plugin.  We have found this the most painless way to get Bootstrap 3 to work immediately with our templates. 

So if you want Bootstrap 3 now, this is the way to go.

Hits: 6770 Comments
Rate this blog entry: