Wednesday, July 25, 2012

Smartpost for joomla virtuemart 1.1.8

Smartpost for joomla virtuemart 1.1.8


After some research in fedex smart post .I released this plugin.This plugin requires FEDEX v2

http://www.lowmips.com/joomla/free-software/category/5-fedexv2



Step 1: First extract this zip .

Step 2: Paste the files to  "administrator\components\com_virtuemart\classes\shipping"

Step 4: Now goto the backend Enable Fedex Smart post


Thats !AAllll ...Now you will see the fedex smart post option in your virtuemart

You will find the discussion in virtuemart forum

https://forum.virtuemart.net/index.php?topic=105685.msg352256#msg352256







Wednesday, May 2, 2012

Mootool Validation for Form Field

To Display a label if field value doesn't exists on submit the form we can use mootool validation as follows.

//Example Form Field

<input type="text" size="30" class="required invalid" value="" id="jform_contact_name" name="jform[contact_name]" aria-required="true" required="required">
<span style="display:none;color:#993300;margin-left: 111px;" id="jform_contact_name-lbl_id">Enter Name</span>


How To Limit Your Text’s Characters using PHP

Limiting a text characters is displaying a limit number a characters from a text ( not to show all the text )

The function we will use for that is substr and the syntax is:

substr($message, start, length) ;

$message : we put the text into that variable.

Start : Where you want to start dislaying text from ( put the number of character starting by 0 ).

Length : Define how many character you want to display.

( be sure that the Length is less than the text character’s number !)

Example1

< ?php

$length = 12 ;
$text = "Learn PHP With MistreX" ;
$display = substr($text, 0, $length) ;
echo $display;
echo "..." ;

?>

Hello,

To change this? <meta name="Generator" content="Joomla 1.5">
from joomla tempalte.

Goto your template and add the following:

 
$document = &JFactory::getDocument();
/* @var $document JDocument */
$document->setGenerator('');

Show a particular joomla module in external file

Show a particular joomla module in external file

Show a particular module in external file



define( '_JEXEC', 1 );
define('JPATH_BASE', dirname(__FILE__));
define( 'DS', DIRECTORY_SEPARATOR );
require_once ( JPATH_BASE .DS.'includes'.DS.'defines.php' );
require_once ( JPATH_BASE .DS.'includes'.DS.'framework.php' );
$mainframe =& JFactory::getApplication('site');
$mainframe->initialise();
jimport( 'joomla.application.module.helper' );
$module = JModuleHelper::getModule('banners');
$document = &JFactory::getDocument();
$renderer = $document->loadRenderer('module');
echo $renderer->render($module);

how to add custom registration field in joomla extend joomla registration in com_users

Once in a life, everybody needs something extra and when it comes to Joomla, it is really easy as there are many extensions available for Joomla but when it comes to extend Joomla registration in frontend and managing the same way in backend then it gets difficult and I faced this when I was working today over a Joomla project so I thought to prepare a note for future use as well as to share with rest of the community. (may be there are similar solutions already but this is how I solved it.)

My example shows how to add an extra field called company in Joomla registration:

---------------------------------------------------------------------------
Step 1. Add DB field variable to user.php

Please open file as below:

YOUR_SITE/libraries/joomla/database/table/user.php

and declare the variable as below to connect with the relevant field in database table for users i.e. jos_users

How to Add CSS/Javascript to Your Joomla Extension

This article applies to Joomla! 1.5 development. This information is subject to change in Joomla! 2.5

When writing your custom component or module, more often than not, you will want to include your own CSS or Javascript code. If Joomla! did not provide an easy way to do this, you would be forced to use script tags throughout your code. While this approach would technically work, the best practice is to put all scripts inside the head tag of your page. How is that possible when the of your page is only seen on your template index.php file and you're developing a new module or component? The JDocument class is the answer. Let's look at the easiest way to go about doing this.

First we need to grab the JDocument object:

$document = JFactory::getDocument();

Now let's add a stylesheet: