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.

Using custom field of jform create textcounter

Joomla already has powerful form management libraries - jform, supported by jfield. There is plenty of built-in field types (text, textarea, integer, file, calendar and several more). However, once in a while you come across a special field that is not present. Or maybe extending the existing field types to add more features.

These are perfect candidates for creating your own JFields. The JField class is very easy to understand, and using the same you can create any kind of simple or complex fields. Bear in mind that while the JField class will render your field, it's up to your model to save the data.

In a recent project, I had to create a text field with a character limit and a  character counter. My earlier thought was to include a piece of javascript, but I soon realised that  this was a good opportunity to create a reusable field which supports the above. So today I will be explaining how to create your own JFields through an example of the character counter field.

Continue reading
Rate this blog entry:
420 Hits
0 Comments

Using sub-forms to create repeatable fields

Forms are everywhere on the web. From a simple sign up form to complicated application forms you’ve seen various forms with varying validation and fields. A very popular way to ask users to input multiple values for similar data is to use the “Add More” type field where the user can add any number of entries. Examples are Educational Qualification, Previous Employment History etc.

Joomla too supported the add more fields natively, by use of the repeatable element. However it had a few limitations

The sub fields show up in a popup, and not inlineIt’s not easy to customise the layout of the popup

We’d tried to overcome these in a recent project by improving the repeatable field, but while we were doing that we realised that Joomla 3.6 has solved this in a much better way! Welcome “sub forms”. This provides a way to use JForm XML inside existing forms, by way of including another XML in lieu of a field in the parent XML. With sub-forms you can -

Continue reading
Rate this blog entry:
15752 Hits
0 Comments

How to make a URL SEF when triggered from Joomla backend?

How to make a URL SEF when triggered from Joomla backend?

Any Joomla developer worth his salt knows to use JRoute::_() to ensure he produces SEF URLs. This is an important SEO thing! However, if you’re writing code that does things from the Joomla Admin, the URLs turn out to be non-SEF. No I’m not talking about the URLs of the Joomla Admin itself.

For Instance,

Shika sends a notification email with a link to the course when a user enrolls for a course. When the user enrolls from the frontend, the email contains the shiny SEF URL. But if the admin enrolls the user, the email contains a non-SEF link in spite of correctly using JRoute::_() Don’t believe us ? Try for yourself :) Depending on the type of link you are creating the link might even have the part /administrator in it.

Continue reading
Rate this blog entry:
3642 Hits
0 Comments

Send Joomla email via Amazon SES

Reliable email delivery is key in web applications, you don't want your customers to miss that order confirmation email or skip that very important Social Network notification. When using a service like Amazon SES, that additionally helps you improve your email sending quota if your web host gives you a rather small quota. It's fairly easy to get up and running with Amazon SES. You'll need to have an account with Amazon AWS (of course!)

Then, just follow these steps to get going -

Set up your Amazon SES account for sending

Continue reading
Rate this blog entry:
2902 Hits
0 Comments

Supporting custom module positions in your Joomla extension

Supporting custom module positions in your Joomla extension

Note: This Blog is targeted to developers!

Sometimes the module positions that come with your template are just not enough, or if you’re a developer you might want to allow your users to load modules inside various parts of your component.

A good example is if you want to publish Ads coming from SocialAds on your EasySocial stream without changing any default functionalities of the stream. You'd do this by loading the Social Ads module in one of the various positions that Easysocial has already set up on their stream. 

Continue reading
Rate this blog entry:
1949 Hits
0 Comments

A developer's guide to Use Dates in the right way in Joomla!

A developer's guide to Use Dates in the right way in Joomla!

When you are handling date and time, its likely that a developer might get confused on what is the right way to handle multiple timezones.

Let’s make this Crystal Clear!

As you can see in the Image below, the date selected is 2015-08-26 05:30:00, This is the user’s timezone date and time.

If we save the same date in our database it would mismatch for the person who is sitting on the other corner of the world.

Continue reading
Rate this blog entry:
4123 Hits
0 Comments

How to develop JMailAlerts Plugin for any component?

How to develop JMailAlerts Plugin for any component?

Note: This Blog is targeted towards Developers!

We will be going through a detailed step by step process of writing a JMailAlerts Plugin.

Extending JMailAlerts needs you to create special plugins of the type 'emailalerts'

Continue reading
Rate this blog entry:
6744 Hits
0 Comments

Searching zoo items with field values

Searching zoo items with field values

Note: This Blog is targeted to developers!

As Joomla developers, you might have come across an issue wherein you need zoo items which have specific value under specific field?

Let's say you have a site where there are some discount offers on some books under different categories. For such books to show up under offers module, you need to have one zoo field saying ‘Have offer?’ with value ‘yes’. Also, you might be aware that the way zoo stores its field values is very tricky and it will be a huge task to get such items using database query.

Continue reading
Tags:
Rate this blog entry:
1820 Hits
0 Comments

Some useful custom validators for Client-side form validation in Joomla!

Some useful custom validators for Client-side form validation in Joomla!

Note: This blog is targeted for Joomla! Developers

Doing validation on client side, before form is submitted to server is always recommended. If you have developed a Joomla! extension you might have used some of the validators that Joomla! provides, which are listed below. Joomla! provides these basic form validators which you can use in your Joomla! form, although, there can be situations where the form fields you are using need different validations than what Joomla! validators offer. In this blog we will see how to add custom validators in Joomla!.

Validators that are provided by Joomla!

required

Continue reading
Rate this blog entry:
4260 Hits
0 Comments

How to access Module parameters anywhere inside Joomla code?

How to access Module parameters anywhere inside Joomla code?

In Joomla, Module configurations are stored as Module parameters. Typically you only need to use parameters in the module itself. However, sometimes you might need to access them from other places like your component or a plugin. And this can get especially tricky when you have multiple copies of the module. 

A live case example for this is SocialAds Modules. In this case we need to know in places other than the module itself what parameters each copy of the SocialAds module is configured with.

This blog will show you how you can do this. 

Continue reading
Rate this blog entry:
1907 Hits
0 Comments

Make "Yoonique’s Zoo Element Anywhere" extension syntax work with text field!

Make "Yoonique’s Zoo Element Anywhere" extension syntax work with text field!

In case you hadn't heard about it yet, the guys at Yoonique have a nice plugin called  Zoo Element Anywhere that lets you insert elements from ZOO items into content anywhere in Joomla.

While using this in one of the projects our services team works on, we discovered that this had some limitations which we needed to get around.

The name of the plugin suggests that this plugin "Zoo Element Anywhere" will as the name says, work everywhere. However, we found that  it doesn't work "everywhere"; to be more specific, inside text fields. The syntax of this plugin only works inside text-area field and not in simple text field.

Continue reading
Rate this blog entry:
1340 Hits
0 Comments

How to provide live updates for extensions in Joomla?

How to provide live updates for extensions in Joomla?

As a Joomla extension provider, we are always rolling out updates for our extensions. Whether they are minor bug fixes or major feature releases, its always recommended that customers stay up-to-date so that they get the best of features, bug fixes as well as security fixes.

Normally the only way to notify them would be via Blogs and Newsletters. However this needs the customer to do the process of updation manually. 

With Joomla however, there is a much easier and smarter way of doing this using the Updates system. This is already baked into the core of Joomla and can be used by any Joomla extension. There is a core way to achieve both notifications and automatic updates which you can read about here. It works pretty well for free extensions but needs you to manually maintain the updates manifest. We have updated the blog with some inputs from weebler to also demonstrate how you can do this with core Joomla. 

The Akeeba Release System from the awesome Akeeba team however can give this system a major shot in the arm by completely automating Manifest generation and maintenance and also support updates for commercial extensions

Here’s a quick tutorial on how you can use ARS to automate extension update notifications and live updates in your extensions.

In fact since Joomla 3x has become the standard, your end users might be completely missing your updates if you are not using the Joomla 3x notification system and rely on your own ‘In extension notifications’ Read more about this in our earlier blog.

Note: This Blog is purely targeted to developers!

Continue reading
Rate this blog entry:
5410 Hits
0 Comments

How to access Joomla menu parameters anywhere inside Joomla code?

How to access Joomla menu parameters anywhere inside Joomla code?

 

Screenshot shows menu item parameters for Joomla - Content - Featured Articles Menu

 

Continue reading
Rate this blog entry:
3234 Hits
0 Comments

Passing filter values via the url to Joomla Admin List Views

Passing filter values via the url to Joomla Admin List Views

We have already seen how you can introduce filters to list views in the Joomla admin & collate them under the Search tools menu previously in our Blog  last year. 

The Search tools filters are extremely useful to admins especially if your extension manages a lot of data. As a usability feature, Joomla retains the state of the filters to the ones last used by the user. 

In most cases, manually setting the filters will work just great for Admins. However there are some cases when knowing how to set filter parameters via the URL can be very useful. 

Continue reading
Rate this blog entry:
1811 Hits
0 Comments

Joomla Extension Devs ! Not using Joomla Update can cost you and your users !

Joomla Extension Devs ! Not using Joomla Update can cost you and your users !

 Not using the native Joomla Update mechanism could be a Major security issue as newer Joomla users are seen to be relying more and more on the active method to keep track of updates. Not having the latest version of extensions can be a major security issue as users might keep using old insecure versions without knowing that a new update has been released.

We did a survey and this is what we found out:Newer Joomla users are very much a Joomla 3 generation.They have become one with the usability in Joomla 3 and expect consistency across extensions in the sameThey trust the update mechanism to tell them about all new updates in Joomla core as well as extensions.

With Joomla 2.5 EOL happening months ago, this throws some really good insight into new user behavior and Joomla extension developers need to adapt quickly to risk of being left behind.

 

Tags:
Rate this blog entry:
6790 Hits
0 Comments

How to access Joomla plugin parameters anywhere inside Joomla code?

How to access Joomla plugin parameters anywhere inside Joomla code?

When developing a new Joomla extension or making changes to existing extension, you might need to access plugin parameters of a Joomla plugin outside the plugin code. There can be cases where you want to access plugin parameters in some Joomla module or component. Now the question is - How to get plugin parameters outside the plugin code?

Here is a snippet of a Joomla code in PHP that let's you access plugin parameters anywhere inside Joomla.// Get plugin 'my_plugin' of plugin type 'my_plugin_type'$plugin = JPluginHelper::getPlugin('my_plugin_type', 'my_plugin');// Check if plugin is enabledif ($plugin){ // Get plugin params $pluginParams = new JRegistry($plugin->params); $param1 = $pluginParams->get('param1'); $param2 = $pluginParams->get('param2'); $param3 = $pluginParams->get('param3');}

 

Wasn’t that easy?I hope this helps! Thanks for reading!Feel free to add your comments.

Continue reading
Rate this blog entry:
3623 Hits
0 Comments

Our experiments with quality

Our experiments with quality

Last year was quite fruitful for us in terms of setting up several systems and processes to make sure our releases are more sharp and our code is much better. After several great suggestions and some oops! moments, we decided to pull up our socks and kicked off the slow but disciplined process of code review and infusing good quality into our products and projects. These are experiments and we are of course measuring what works best and will continue to tweak our quality process to further strengthen it

We've taken some great steps and implemented several automated checks which will reject bad code. We also thought of sharing them with everyone so everyone can benefit. Here's a list of things that are already implemented or are in the process of being implemented

Continue reading
Rate this blog entry:
1833 Hits
0 Comments

Extend your Zoo's functionality using some awesome applications!

Extend your Zoo's functionality using some awesome applications!
Joomla - CMS

AS we already know Joomla is one of the most widely used content management system. We can easily manage the content of the site using Joomla's Article manager, ACL etc features.

Content management extensions

Third party extensions makes Joomla even more powerful. There are many widely used extensions like K2, Zoo, etc. These makes the content management very easy. In this list Yootheme's Zoo extension stands at the top of the list. Zoo helps you to handle the content related to movies, applications, downloads data in very efficient way.

Zoo limitations

Few cases Zoo lacks the much needed features like Zoo Export/Import feature doesn't allow you to import large CSV files.

Continue reading
Rate this blog entry:
2739 Hits
0 Comments

Location tracking made easy with Google Maps APIs

Location tracking made easy with Google Maps APIs

Hey Guys,

We come across situations where locating a place becomes imperative; whether it's a venue for an event, site office or anything. Just to make sure that this  problem is overcomed, you need to add google maps support in your extensions, website and applications wherever necessary. This can be achieved with the help of certain information like the IP addess, Latitudes and Longitudes.

In this blog we are going to see how to use  Google maps APIs to show map (based on location)

 

Continue reading
Rate this blog entry:
7285 Hits
0 Comments

Adding a parameter to Joomla component's menu item is as easy as pie!

Adding a parameter to Joomla component's menu item is as easy as pie!

Hey Guys, In this blog we are going to see how to add a parameter to a Joomla component's menu item. This parameter can be used while referring view level in Joomla 2.5.x or 3.x.Following are the steps to achieve this.

Step 1:

You have to specify parameter / option in your_layout.xml file in your component.Lets say, you have to add “pageLimit” parameter to default layout of a view named 'products'. For menu item, you have to create add default.xml for this layout and have to add parameter entry as given below.

a. Add a xml file at location

Continue reading
Rate this blog entry:
10114 Hits
0 Comments