Naveeta Enterprise: Soft Club Hosting
Jun2

I have found web hosting company which is reasonable , affordable and qualitative in every manner. I am very statisfied with thier services and control panel.
Web Url : http://hosting.naveeta.com/
More Info : oftclub@naveeta.com
how to make custom module for my Mambo ??
Jun0
In my last post I have disscuss about simple theme creation for mambo. Today me and you [readers] get to know how we can develop custom module for mambo to work for any website. Now, before start a tutorial , we all know litle bit of xml. Because XML tells Mambo strcuture of file and data.
say our module display twitter updates …
Step 1: Make two files 1)mod_twitter.php 2)mod_twitter.xml . ok here we use mod as a prefix becuase we need to tell mambo what kind of installation we going to do when we install on mambo under administration area.
Step 2: First we ready our xml file before some php code … please go through each line of xml and undertsand whats going on …
<?xml version="1.0" encoding="iso-8859-1"?> // must specify ISO version to get valid xml format
<mosinstall type="module" version="4.5.2"> // this line tells about module version -- if you have update litle but in your module please allow version type so user can know abut the updates.
<name>Twitter</name> // gibe module name
<author>Umer Talha</author> // place an author name or authorized person name
<creationDate>July 2004</creationDate> // date of creation
<copyright>copyright (C) 2000 - 2007 Umer Talha .</copyright> // give copyrights to make sure no other can used precious data.
<license>http://www.gnu.org/copyleft/gpl.html GNU/GPL v.2</license>
<authorEmail>umer@umertalha.com</authorEmail>// place email here
<authorUrl>www.umertalha.com</authorUrl> // place module author url address
<version>4.5.2</version>
<description>simple twitter updates form mambo.</description> // add litle description to this so admin should know about this module.
Now, add file name which you just created for php code
<files>
<filename module="mod_twitter">mod_twitter.php</filename>
</files>
There is also param tags to give perameters to the module to give helo admin to set values to the module as per theme requirement .. Usually require when we need to use form element in module here we are not using any forms so we are not using param tags for now.
Step 3: Now open you mod_twitter.php and at very first line just after <?php ?>
defined( ‘_VALID_MOS’ ) or die( ‘Direct Access to this location is not allowed.’ ); // its check wheater it access from mambo boundries or out of it.
after this start coding just like you did in you last project in php. for twitter module you must know how to call search results againt your keyword from search box. It is very simple … Please go though each line of php code …
<?php
$q=$_POST['askme'];
$xmlDoc = new DOMDocument();
$xmlDoc->load("http://search.twitter.com/search.atom?q=" . urlencode($q));
$note = $xmlDoc->getElementsByTagName('entry');$note2 = $xmlDoc->getElementsByTagName('author');
// for each note tag, parse the document and get values for
// tasks and details tag.
foreach( $note as $value )
{
$ids = $value->getElementsByTagName("id");
$id = $ids->item(0)->nodeValue;
$titles = $value->getElementsByTagName("title");
$title = $titles->item(0)->nodeValue;
$updateds = $value->getElementsByTagName("updated");
$updated = $updateds->item(0)->nodeValue;
$names = $value->getElementsByTagName("name");
$name = $ids->item(0)->nodeValue;
$urls = $value->getElementsByTagName("uri");
$url = $urls->item(0)->nodeValue;
echo "<strong>$title</strong><br/>$updated<br>profile link : <a href='$url'>$url</a>";
?>
Step 4: Save mod_twitter.xml and mod_twitter.php files in folder called mod_twitter and zip it after this open your mambo with admin credentials and install the module.
Step 5: Go template module postion section and write new postition named “twitter”,After this on module setting define position of twitter module which you enter for twitter module.
Step 6: test the module .
——————————————–
if any question comments please feel free to wirte me at
umer[at]umertalha[dot]com
Thanks
xhtml/css template customization for Mambo cms
Jun0
Recently I learn about modification of existing chtml/css template for Mambo cms. So , It is my responsibility to post simple and short tutorial on css/xhtml theme modification for Mambo cms . I am prety much sure about you[readers] that you already have one good theme with css 2.0 and xhtml 2.0 valid.
Step 1: Make three folder with the names: [images] , [javascript] and [style] under parent folder which is usually template name suppose [mTemplate]
Step 2: Put all images which is using in template in [images] folder , if you use any javascript or jquery then put in [javascript] folder and put your css file in [style] folder.
Step 3. Create index.php [php file] and templateDetails.xml [xml file]. You may add more php file depanding on you creativity and theme structure.
Step 4. [essential part] In your xml file [templateDetails.xml] define your template author details and template details between smart tags and define your each file name in this xml file . Why we doing this ? because it tells Mambo what to do with the files contained within the template. Please look below a sample xml file to get quick idea.
<?xml version="1.0" encoding="iso-8859-1"?>
<mosinstall version="4.6.4" type="template">
<name>MyfirstTemplate</name>
<creationDate>16/04/2008</creationDate>
<version>1.0</version>
<author>Your name</author>
<authorEmail>mail@something.com</authorEmail>
<authorUrl>www.yourhomepage.com</authorUrl>
<copyright>2008 Your Name</copyright>
<license>GNU/GPL</license>
<description>A little description.</description>
<files>
<filename>index.php</filename>
<filename>template_thumbnail.png</filename>
</files>
<images>
<filename>images/image.gif</filename>
</images>
<css>
<filename>css/template_css.css</filename>
</css>
</mosinstall>
Thumbnail of template is importent file for mambo tempalate manager. It help to get quick view of template.
Step 5: Now the main work starts here we need to add some php {<?php ?>} code inbetween our exitisting xhtml/css template index file . Open index.php file and copy all the xhtml from existing theme and past to index.php. Now add top of the page below line between <?php ?> …
defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' );
// needed to seperate the ISO number from the language file constant _ISO
$iso = split( '=', _ISO );
// xml prolog
echo '<?xml version="1.0" encoding="'. $iso[1] .'"?' .'>';
and just after starting tag <head> add below code…
if ( $my->id ) {
initEditor();
}
?>
Step 6: In you theme there are several path defien like in src tag there is image source , in style tag there is css file source similar for javascript file source path :
Stylesheet/homestyle.css
change to your relative path :
<?php echo $mosConfig_live_site;?>/templates/mTemplate/Common/Stylesheet/homestyle.css
similar change all source path used in temaplate change to relative path just like I did in above line.
Step 7: Mambo provides many modules to used in website or you may also develop your own module as per requirement . Very soon I also post about custom module development tutorial.
Using mambo modules in website place litle line of php code :
<?php mosLoadModules('newsflash', '-3'); ?> // for newsflash module to place
for main body where all content will display from database place below line of php code.
<?php mosMainBody(); ?>
Now our basic index.php file ready to go.
Step 8: For installing your simple template in mambo make the parent folder [mTemplate] a zip file and install in Mambo by logging in as Admin in CMS.
————————————————————————————————————————————
If you need more clarification or question please do post or contact me direct .
Thanks
happy customization
Google Wave — live collaborative editing and communication tool
Jun2
Hello Folks,
I have very good news for those, who dont know much about Google Wave or havent heared this technology before. Imagine when email and communication go live while you witing your email your friend editing it or when upload images your friend get live update at his browser… now GWave can do this for make relationship between friends and rest of the world more prowerfull.
The next level of collabrotaion of information and media sharing is wiki which is first introduce by Wikipedia under mediawiki framework and now well known term in the world. Google also introduce wiki in their Wave technology along with email and IM services.
Google wave have various benefits like it is open social because google always welcome developers to contribute on technology. It have own apis and extensions to make wave more powerfull.
for further reading I must prefer to browse google wave official blog.
Facebook application and twitter search api
May3
Hello ..
last Week I have been assigned task from my management for facebook application which was new for me to work on. Before doing official task on facebook application , I have done reasrech and development on facebook application development under PHP and MYSQL language support.
I also love to integaration development using different social networks and website to communicate live services they provide for ease. I have select twitter search appi which is far more easy to integrate for beginners just like me. For my testing fb application i have used twitter search appi with php to work for me . I have select FBML for my ease during development.

Search Results

Ask Twitter window
Application access url : http://apps.facebook.com/twitter_app [not yet published officialy]
note: this application is under testing if bug found please drop me email at umer[at]umertalha[dot]com
Thanks

