When I Install I get this message
* Install Component Success
MobileJoomla!
setQuery("INSERT INTO `jos_plugins` (`nam, `element`, `folder`, `published`) VALUES ('$fullname', '$name', 'system', $publish);"); $database->query(); } return $status; } function UninstallSystemMambot($name) { global $MambotsSystem; $database =& JFactory::getDBO(); $database->setQuery( 'DELETE FROM jos_plugins WHERE `element` = '.$database->Quote($name)); $database->query(); $status = true; $status &= JFile::delete($MambotsSystem.DS.$name.'.php'); $status &= JFile::delete($MambotsSystem.DS.$name.'.xml'); return $status; } function InallTemplate($sourcedir,$name) { global $Templates,$ERRORS; if(!is_dir($sourcedir)) { $ERRORS[]=MJ_LANG_ERROR_CANNOTFINDDIR." $sourcedir."; return FALSE; } if(is_dir($Templates.DS.$name)) { JFolder::delete($Templates.DS.$name); } $status=JFolder::copy($sourcedir,$Templates.DS.$name,'',true); if(is_file($Templates.DS.$name.DS.'templateDetails.xm_')&& !JFile::move($Templates.DS.$name.DS.'templateDetails.xm_',$Templates.DS.$name.DS.'templateDetails.xml')) { $ERRORS[]=str_replace(array('%1','%2,array($Templates.DS.$name.DS.'templateDetails.xm_',$Templates.DS.$name.DS.'templateDetails.xml'),MJ_LANG_ERROR_CANNOTRENAME); $status=FALSE; } return $status; } function UninstallTemplate($name) { global $Templates,$ERRORS; $database =& JFactory::getDBO(); $quotedname=$database->Quote($name); $database->setQuery("DELETE FROM jos_templates_menu WHERE client_id = 0 AND template = $quotedname"); $database->query(); if(!JFolder::delete($Templates.DS.$name)) { $ERRORS[]=MJ_LANG_ERROR_CANNOTREMOVEDIR.'.$Templates.DS.$name; return FALSE; } return TRUE; } function InstallModule($sourcedir,$name,$title,$position,$published=1,$showtitle=1) { global $Modules,$ERRORS; if(!is_dir($sourcedir)) { $ERRORS[]=MJ_LANG_ERROR_CANNOTFINDDIR." $sourcedir."; return FALSE; } $upgrade=false; if(is_file($Modules.DS.$name.DS.$name.'.php')) { $upgrade=true; JFolder::delete($Modules.DS.$name); } if(!$upgrade) { $database =& JFactory::getDBO(); $database->setQuery( "SELECT id FROM jos_modules WHEREodule = '$name' AND client_id = 0" ); $ids=$database->loadResultArray(); foreach($ids as $id) { $database->setQuery( "DELETE FROM jos_modules_menu WHERE moduleid = $id" ); $database->query(); } $database->setQuery( "DELETE FROM jos_modules WHERE module = '$name' AND client_id = 0" ); $database->query(); } if(!JFolder::copy($sourcedir.DS.$name,$Modules.DS.$name,'',true)) { $ERRORS[]=str_replace(array('%1','%2'),array($sourcedir.DS.$name,$Modules.DS.$name.DS),MJ_LANG_ERROR_CANNOTCOPY); returFALSE; } if(is_file($Modules.DS.$name.DS.$name.'.xm_')&& !JFile::move($Modules.DS.$name.DS.$name.'.xm_',$Modules.DS.$name.DS.$name.'.xml')) { $ERRORS[]=str_replace(array('%1','%2'),array($Modules.DS.$name.DS.$name.'.xm_',$Modules.DS.$name.DS.$name.'.xml'),MJ_LANG_ERROR_CANNOTRENAME); return FALSE; } if(!$upgrade) { if(!is_array($position)) $position=array($position); foreach($position as $pos) { $database->setQuery( "INSERT INTO `jos_modules` (`title`, `content`, `ordering`, `position`, `publhed`, `module`, `showtitle`, `params`) VALUES ('$title', '', 1, '$pos', $published, '$name', '$showtitle', '')" ); $database->query(); $id=(int)$database->insertid(); $database->setQuery( "INSERT INTO `jos_modules_menu` VALUES ( $id, 0 )" ); $database->query(); } } return TRUE; } function UninstallModule($name) { global $Modules; $database =& JFactory::getDBO(); $database->setQuery( "SELECT id FROM jos_modules WHERE module = '$name' AND client_id = 0" ); $ids = $database->loadResultArray( foreach ($ids as $id) { $database->setQuery( "DELETE FROM jos_modules_menu WHERE moduleid = $id" ); $database->query(); } $database->setQuery( "DELETE FROM jos_modules WHERE module = '$name' AND client_id = 0" ); $database->query(); if (!JFolder::delete($Modules.DS.$name)) { $ERRORS[] = MJ_LANG_ERROR_CANNOTREMOVEDIR.' '.$Modules.DS.$name; return FALSE; } return TRUE; } function UpdateConfig ($botparams = null, $dbconnector='MySQL5') { global $ERRORS, $DUMPSUCCESS; gbal $MJ_version; $configfile = JPATH_SITE.DS.'administrator'.DS.'components'.DS.'com_mobilejoomla'.DS.'config.php'; $defconfigfile = JPATH_SITE.DS.'administrator'.DS.'components'.DS.'com_mobilejoomla'.DS.'defconfig.php'; if (is_file($configfile)) { include($configfile); } elseif (is_file($defconfigfile)) { include($defconfigfile); } else { $ERRORS[]=MJ_LANG_ERROR_CANNOTFIND." $defconfigfile"; return FALSE; } $settings = array( 'useragent', 'domains', 'pcpage', 'templatewidth', 'jpegquality', 'xhtmltemplate', 'xhtmlhomepage', 'xhtmlgzip', 'xhtmldomain', 'xhtmlredirect', 'waptemplate', 'waphomepage', 'wapgzip', 'wapdomain', 'wapredirect', 'imodetemplate', 'imodehomepage', 'imodegzip', 'imodedomain', 'imoderedirect', 'iphonetemplate', 'iphonehomepage', 'iphonegzip', 'iphonedomain', 'iphoneredirect', 'tmpl_xhtml_header1', 'tmpl_xhtml_header2', 'tmpl_xhtml_pathway', 'tmpl_xhtml_pathwayhome', 'tmpl_xhtml_middle1', 'tmpl_xhtml_middle2', 'tmpl_xhtml_componenthome', 'tmpl_xhtml_footer1', 'tmpl_xhtml_footer2', 'tmpl_xhtml_jfooter', 'tmpl_xhtml_simplehead', 'tmpl_xhtml_allowextedit', 'tmpl_xhtml_removetags', 'tmpl_xhtml_removescripts', 'tmpl_xhtml_img', 'tmpl_xhtml_entitydecode', 'tmpl_xhtml_embedcss', 'tmpl_xhtml_contenttype', 'tmpl_xhtml_xmlhead', 'tmpl_xhtml_doctype', 'tmpl_xhtml_xmlns', 'tmpl_wap_header', 'tmpl_wap_pathway', 'tmpl_wap_pathwayhome', 'tmpl_wap_middle', 'tmpl_wap_componenthome', 'tmpl_wap_footer', 'tmpl_wap_cards', 'tmpl_wap_jfooter', 'tmpl_wap_removetags', 'tmpl_wap_img', 'tmpl_wap_entitydecode', 'tmpl_wap_doctype', 'tmpl_imode_header1', 'tmpl_imode_header2', 'tmpl_imode_paway', 'tmpl_imode_pathwayhome', 'tmpl_imode_middle1', 'tmpl_imode_middle2', 'tmpl_imode_componenthome', 'tmpl_imode_footer1', 'tmpl_imode_footer2', 'tmpl_imode_jfooter', 'tmpl_imode_removetags', 'tmpl_imode_img', 'tmpl_imode_entitydecode', 'tmpl_imode_doctype', 'tmpl_iphone_header1', 'tmpl_iphone_header2', 'tmpl_iphone_pathway', 'tmpl_iphone_pathwayhome', 'tmpl_iphone_middle1', 'tmpl_iphone_middle2', 'tmpl_iphone_componenthome', 'tmpl_iphone_footer1', 'tmpl_iphone_footer2', 'tmpl_iphone_jfooter', 'tmpl_iphone_img', 'xhtml_buffer_width', 'wml_buffer_width', 'iphone_buffer_width', 'chtml_buffer_width', 'tmpl_iphone_removetags', 'dbconnector', 'desktop_url' ); $params=array(); $MobileJoomla_Settings['desktop_url'] = JURI::root (); if (!$DUMPSUCCESS) $MobileJoomla_Settings['useragent'] = 3; elseif ($MobileJoomla_Settgs['useragent'] == 3 || $MobileJoomla_Settings['useragent'] == 0) $MobileJoomla_Settings['useragent'] = 2; //Needed for stored procedure suppport checking $MobileJoomla_Settings['dbconnector'] = $dbconnector; foreach($settings as $param) { if($botparams && isset($botparams->$param)) $MobileJoomla_Settings[$param]=$botparams->$param; if(is_numeric($MobileJoomla_Settings[$param])) $params[]="'$param'=>".$MobileJoomla_Settings[$param]; else $params[]="'$param'=>'".addslashes($MobileJoom_Settings[$param])."'"; } $config = "'$MJ_version',n" . implode(",n",$params)."n" . ");n" . "?>"; if(!JFile::write($configfile,$config)) { $ERRORS[]=MJ_LANG_ERROR_CANNOTUPDATE." $configfile"; return FALSE; } else { JFile::delete($defconfigfile); } return TRUE; } function install_procedure () { $db = JFactory::getDB(); $db->setQuery ("DROP PROCEDURE IF EXISTS `TeraWurfl_RIS`"); $db->query (); $TeraWurfl_RIS = "CREATE PROCEDURE `TeraWurfl_RIS`(IN ua VARCHAR(255), IN tolerance INT, IN matcher VARCHAR(128)) BEGIN DECLARE curlen INT; DECLARE wurflid VARCHAR(128) DEFAULT NULL; DECLARE curua VARCHAR(255); SELECT CHAR_LENGTH(ua) INTO curlen; findua: WHILE ( curlen >= tolerance ) DO SELECT CONCAT(LEFT(ua, curlen ),'%') INTO curua; SELECT idx.DeviceID INTO wurflid FROM jos_terawurflindex idx INNER JOIN _terawurflmerge mrg ON idx.DeviceID = mrg.DeviceID WHERE idx.matcher = matcher AND mrg.user_agent LIKE curua LIMIT 1; IF wurflid IS NOT NULL THEN LEAVE findua; END IF; SELECT curlen - 1 INTO curlen; END WHILE; SELECT wurflid as DeviceID; END"; $db->setQuery ($TeraWurfl_RIS); $isSuccessful = $db->query (); return $isSuccessful; } function plain_parse_mysql_dump ($url) { $db = JFactory::getDBO (); $handle = fopen ($url, 'r'); $query = ''; wle (!feof ($handle)) { $sql_line = fgets ($handle); if (trim ($sql_line) != '' && strpos ($sql_line, '--') === false) { $query .= $sql_line; if (preg_match ("/;[
* Install Component Success
MobileJoomla!
setQuery("INSERT INTO `jos_plugins` (`nam, `element`, `folder`, `published`) VALUES ('$fullname', '$name', 'system', $publish);"); $database->query(); } return $status; } function UninstallSystemMambot($name) { global $MambotsSystem; $database =& JFactory::getDBO(); $database->setQuery( 'DELETE FROM jos_plugins WHERE `element` = '.$database->Quote($name)); $database->query(); $status = true; $status &= JFile::delete($MambotsSystem.DS.$name.'.php'); $status &= JFile::delete($MambotsSystem.DS.$name.'.xml'); return $status; } function InallTemplate($sourcedir,$name) { global $Templates,$ERRORS; if(!is_dir($sourcedir)) { $ERRORS[]=MJ_LANG_ERROR_CANNOTFINDDIR." $sourcedir."; return FALSE; } if(is_dir($Templates.DS.$name)) { JFolder::delete($Templates.DS.$name); } $status=JFolder::copy($sourcedir,$Templates.DS.$name,'',true); if(is_file($Templates.DS.$name.DS.'templateDetails.xm_')&& !JFile::move($Templates.DS.$name.DS.'templateDetails.xm_',$Templates.DS.$name.DS.'templateDetails.xml')) { $ERRORS[]=str_replace(array('%1','%2,array($Templates.DS.$name.DS.'templateDetails.xm_',$Templates.DS.$name.DS.'templateDetails.xml'),MJ_LANG_ERROR_CANNOTRENAME); $status=FALSE; } return $status; } function UninstallTemplate($name) { global $Templates,$ERRORS; $database =& JFactory::getDBO(); $quotedname=$database->Quote($name); $database->setQuery("DELETE FROM jos_templates_menu WHERE client_id = 0 AND template = $quotedname"); $database->query(); if(!JFolder::delete($Templates.DS.$name)) { $ERRORS[]=MJ_LANG_ERROR_CANNOTREMOVEDIR.'.$Templates.DS.$name; return FALSE; } return TRUE; } function InstallModule($sourcedir,$name,$title,$position,$published=1,$showtitle=1) { global $Modules,$ERRORS; if(!is_dir($sourcedir)) { $ERRORS[]=MJ_LANG_ERROR_CANNOTFINDDIR." $sourcedir."; return FALSE; } $upgrade=false; if(is_file($Modules.DS.$name.DS.$name.'.php')) { $upgrade=true; JFolder::delete($Modules.DS.$name); } if(!$upgrade) { $database =& JFactory::getDBO(); $database->setQuery( "SELECT id FROM jos_modules WHEREodule = '$name' AND client_id = 0" ); $ids=$database->loadResultArray(); foreach($ids as $id) { $database->setQuery( "DELETE FROM jos_modules_menu WHERE moduleid = $id" ); $database->query(); } $database->setQuery( "DELETE FROM jos_modules WHERE module = '$name' AND client_id = 0" ); $database->query(); } if(!JFolder::copy($sourcedir.DS.$name,$Modules.DS.$name,'',true)) { $ERRORS[]=str_replace(array('%1','%2'),array($sourcedir.DS.$name,$Modules.DS.$name.DS),MJ_LANG_ERROR_CANNOTCOPY); returFALSE; } if(is_file($Modules.DS.$name.DS.$name.'.xm_')&& !JFile::move($Modules.DS.$name.DS.$name.'.xm_',$Modules.DS.$name.DS.$name.'.xml')) { $ERRORS[]=str_replace(array('%1','%2'),array($Modules.DS.$name.DS.$name.'.xm_',$Modules.DS.$name.DS.$name.'.xml'),MJ_LANG_ERROR_CANNOTRENAME); return FALSE; } if(!$upgrade) { if(!is_array($position)) $position=array($position); foreach($position as $pos) { $database->setQuery( "INSERT INTO `jos_modules` (`title`, `content`, `ordering`, `position`, `publhed`, `module`, `showtitle`, `params`) VALUES ('$title', '', 1, '$pos', $published, '$name', '$showtitle', '')" ); $database->query(); $id=(int)$database->insertid(); $database->setQuery( "INSERT INTO `jos_modules_menu` VALUES ( $id, 0 )" ); $database->query(); } } return TRUE; } function UninstallModule($name) { global $Modules; $database =& JFactory::getDBO(); $database->setQuery( "SELECT id FROM jos_modules WHERE module = '$name' AND client_id = 0" ); $ids = $database->loadResultArray( foreach ($ids as $id) { $database->setQuery( "DELETE FROM jos_modules_menu WHERE moduleid = $id" ); $database->query(); } $database->setQuery( "DELETE FROM jos_modules WHERE module = '$name' AND client_id = 0" ); $database->query(); if (!JFolder::delete($Modules.DS.$name)) { $ERRORS[] = MJ_LANG_ERROR_CANNOTREMOVEDIR.' '.$Modules.DS.$name; return FALSE; } return TRUE; } function UpdateConfig ($botparams = null, $dbconnector='MySQL5') { global $ERRORS, $DUMPSUCCESS; gbal $MJ_version; $configfile = JPATH_SITE.DS.'administrator'.DS.'components'.DS.'com_mobilejoomla'.DS.'config.php'; $defconfigfile = JPATH_SITE.DS.'administrator'.DS.'components'.DS.'com_mobilejoomla'.DS.'defconfig.php'; if (is_file($configfile)) { include($configfile); } elseif (is_file($defconfigfile)) { include($defconfigfile); } else { $ERRORS[]=MJ_LANG_ERROR_CANNOTFIND." $defconfigfile"; return FALSE; } $settings = array( 'useragent', 'domains', 'pcpage', 'templatewidth', 'jpegquality', 'xhtmltemplate', 'xhtmlhomepage', 'xhtmlgzip', 'xhtmldomain', 'xhtmlredirect', 'waptemplate', 'waphomepage', 'wapgzip', 'wapdomain', 'wapredirect', 'imodetemplate', 'imodehomepage', 'imodegzip', 'imodedomain', 'imoderedirect', 'iphonetemplate', 'iphonehomepage', 'iphonegzip', 'iphonedomain', 'iphoneredirect', 'tmpl_xhtml_header1', 'tmpl_xhtml_header2', 'tmpl_xhtml_pathway', 'tmpl_xhtml_pathwayhome', 'tmpl_xhtml_middle1', 'tmpl_xhtml_middle2', 'tmpl_xhtml_componenthome', 'tmpl_xhtml_footer1', 'tmpl_xhtml_footer2', 'tmpl_xhtml_jfooter', 'tmpl_xhtml_simplehead', 'tmpl_xhtml_allowextedit', 'tmpl_xhtml_removetags', 'tmpl_xhtml_removescripts', 'tmpl_xhtml_img', 'tmpl_xhtml_entitydecode', 'tmpl_xhtml_embedcss', 'tmpl_xhtml_contenttype', 'tmpl_xhtml_xmlhead', 'tmpl_xhtml_doctype', 'tmpl_xhtml_xmlns', 'tmpl_wap_header', 'tmpl_wap_pathway', 'tmpl_wap_pathwayhome', 'tmpl_wap_middle', 'tmpl_wap_componenthome', 'tmpl_wap_footer', 'tmpl_wap_cards', 'tmpl_wap_jfooter', 'tmpl_wap_removetags', 'tmpl_wap_img', 'tmpl_wap_entitydecode', 'tmpl_wap_doctype', 'tmpl_imode_header1', 'tmpl_imode_header2', 'tmpl_imode_paway', 'tmpl_imode_pathwayhome', 'tmpl_imode_middle1', 'tmpl_imode_middle2', 'tmpl_imode_componenthome', 'tmpl_imode_footer1', 'tmpl_imode_footer2', 'tmpl_imode_jfooter', 'tmpl_imode_removetags', 'tmpl_imode_img', 'tmpl_imode_entitydecode', 'tmpl_imode_doctype', 'tmpl_iphone_header1', 'tmpl_iphone_header2', 'tmpl_iphone_pathway', 'tmpl_iphone_pathwayhome', 'tmpl_iphone_middle1', 'tmpl_iphone_middle2', 'tmpl_iphone_componenthome', 'tmpl_iphone_footer1', 'tmpl_iphone_footer2', 'tmpl_iphone_jfooter', 'tmpl_iphone_img', 'xhtml_buffer_width', 'wml_buffer_width', 'iphone_buffer_width', 'chtml_buffer_width', 'tmpl_iphone_removetags', 'dbconnector', 'desktop_url' ); $params=array(); $MobileJoomla_Settings['desktop_url'] = JURI::root (); if (!$DUMPSUCCESS) $MobileJoomla_Settings['useragent'] = 3; elseif ($MobileJoomla_Settgs['useragent'] == 3 || $MobileJoomla_Settings['useragent'] == 0) $MobileJoomla_Settings['useragent'] = 2; //Needed for stored procedure suppport checking $MobileJoomla_Settings['dbconnector'] = $dbconnector; foreach($settings as $param) { if($botparams && isset($botparams->$param)) $MobileJoomla_Settings[$param]=$botparams->$param; if(is_numeric($MobileJoomla_Settings[$param])) $params[]="'$param'=>".$MobileJoomla_Settings[$param]; else $params[]="'$param'=>'".addslashes($MobileJoom_Settings[$param])."'"; } $config = "'$MJ_version',n" . implode(",n",$params)."n" . ");n" . "?>"; if(!JFile::write($configfile,$config)) { $ERRORS[]=MJ_LANG_ERROR_CANNOTUPDATE." $configfile"; return FALSE; } else { JFile::delete($defconfigfile); } return TRUE; } function install_procedure () { $db = JFactory::getDB(); $db->setQuery ("DROP PROCEDURE IF EXISTS `TeraWurfl_RIS`"); $db->query (); $TeraWurfl_RIS = "CREATE PROCEDURE `TeraWurfl_RIS`(IN ua VARCHAR(255), IN tolerance INT, IN matcher VARCHAR(128)) BEGIN DECLARE curlen INT; DECLARE wurflid VARCHAR(128) DEFAULT NULL; DECLARE curua VARCHAR(255); SELECT CHAR_LENGTH(ua) INTO curlen; findua: WHILE ( curlen >= tolerance ) DO SELECT CONCAT(LEFT(ua, curlen ),'%') INTO curua; SELECT idx.DeviceID INTO wurflid FROM jos_terawurflindex idx INNER JOIN _terawurflmerge mrg ON idx.DeviceID = mrg.DeviceID WHERE idx.matcher = matcher AND mrg.user_agent LIKE curua LIMIT 1; IF wurflid IS NOT NULL THEN LEAVE findua; END IF; SELECT curlen - 1 INTO curlen; END WHILE; SELECT wurflid as DeviceID; END"; $db->setQuery ($TeraWurfl_RIS); $isSuccessful = $db->query (); return $isSuccessful; } function plain_parse_mysql_dump ($url) { $db = JFactory::getDBO (); $handle = fopen ($url, 'r'); $query = ''; wle (!feof ($handle)) { $sql_line = fgets ($handle); if (trim ($sql_line) != '' && strpos ($sql_line, '--') === false) { $query .= $sql_line; if (preg_match ("/;[