×

Category Archive for ‘ joomla ’

Joomla Media Manager in Custom Components

To use the Joomla Media Manager in Custom Components <script> function useMediaManager(id) { if (!jQuery("#sbox-window").is(‘:visible’)) { setTimeout(function(){useMediaManager(id);}, 200); //wait return; } var f = jQuery(‘#sbox-window iframe’); var ocfns, btns; if(f[0] == undefined){ setTimeout(function(){useMediaManager(id);}, 200); //wait return; } else { f.load(function(){//wait var imageManager = f[0].contentWindow.ImageManager; imageManager.onok = function() { setMedia(this.fields.url.get(‘value’), id); }; }); } } function setMedia(url, id){ jQuery(‘#’+id).val(url); } </script> <input type="text" name="image_url" value="<?php echo $row->image_url;?>" /> <a class="modal-button" title="Image" href="index.php?option=com_media&view=images&tmpl=component&e_name=tempimage" onclick="useMediaManager(‘image_url’); return false;" rel="{handler: […]

Read more…

Add HTML Rich Text Editor Field in Joomla Module/Component

Let’s say that you are building a form in Joomla, but you need one of your fields to be an HTML text editor instead of a normal textarea, how do yo do that? Well, it’s very simple in Joomla – if you’re building the form using MVC (Model-View-Controller), and you want to add a field called Product Information then you will need to do is to add the following in your XML definition file located […]

Read more…