vimalm4u Posted August 28, 2010 Share Posted August 28, 2010 '); $s = preg_replace('/]*>([^<]+)<\/th>/',"\\1",$s); $s = preg_replace('/]*>([^<]+)<\/td>/',"\\1",$s); $vTmp = preg_split('/( [b][^<]+<\/h2>)/',$s,-1,PREG_SPLIT_DELIM_CAPTURE); $vModules = array(); for ($i=1;$i[/b] [b]([^<]+)<\/h2>/',$vTmp[$i],$vMat)) { $vName = trim($vMat[1]); $vTmp2 = explode("\n",$vTmp[$i+1]); foreach ($vTmp2 AS $vOne) { $vPat = '([^<]+)<\/info>'; $vPat3 = "/$vPat\s*$vPat\s*$vPat/"; $vPat2 = "/$vPat\s*$vPat/"; if (preg_match($vPat3,$vOne,$vMat)) { // 3cols $vModules[$vName][trim($vMat[1])] = array(trim($vMat[2]),trim($vMat[3])); } elseif (preg_match($vPat2,$vOne,$vMat)) { // 2cols $vModules[$vName][trim($vMat[1])] = trim($vMat[2]); } } } } return $vModules; } /** get a module setting */ function getModuleSetting($pModuleName,$pSetting) { $vModules = parsePHPModules(); return $vModules[$pModuleName][$pSetting]; } //********************************************* // Check Module Status and inset Injection // For Support functionality on all php version //********************************************* if(getModuleSetting('json','json support') != 'enabled'){ require('includes/JSON.php'); $GLOBALS['JSON_OBJECT'] = new Services_JSON(); function json_encode($value) { return $GLOBALS['JSON_OBJECT']->encode($value); } } $check_query = tep_db_query("select gallery_id,gallery_title,gallery_image from " .TABLE_GALLERY ); //$check = tep_db_fetch_array($check_query); $i = 0; while ($row = tep_db_fetch_array($check_query)) { $temp_image = explode('.',$row['gallery_image']); $oimage = $temp_image[0].'_o.'.$temp_image[1]; $mimage = $temp_image[0].'_m.'.$temp_image[1]; $picture[$i]=array('id'=>$row['gallery_id'], 'secret'=>'4c14f3d563', 'server'=>'36', 'farm'=>1, 'title'=>$row['gallery_title'], 'isprimary'=>'1', 'url_t'=>'http://demo.satisnet.org//alexandra//images/gallery/'.$row['gallery_image'], 'width_t'=>'100', 'height_t'=>'75', 'url_m'=>'http://demo.satisnet.org//alexandra//images/gallery/'.$row['gallery_image'], 'height_m'=>'375','width_m'=>'500', 'url_o'=>'http://demo.satisnet.org//alexandra//images/gallery/'.$row['gallery_image'], 'height_o'=>'350','width_o'=>'350', 'url_s'=>'http://demo.satisnet.org//alexandra//images/gallery/'.$row['gallery_image'], 'height_s'=>'180','width_s'=>'240'); $i++; } $rows = array('photoset'=>array('id'=>'72057594078378762', 'primary'=>'110076647', 'owner'=>'33323984@N00', 'ownername'=>'David Hellsing', 'photo'=>$picture,'page'=>1,'per_page'=>10,'perpage'=>10,'pages'=>1,'total'=>'1'),'stat'=>'ok'); $json = json_encode($rows); //print_r($json);exit; $callback = $_GET['jsoncallback']; //echo""; echo $callback.'('. $json . ')'; ?> [/b] '); $s = preg_replace('/]*>([^<]+)<\/th>/',"\\1",$s); $s = preg_replace('/]*>([^<]+)<\/td>/',"\\1",$s); $vTmp = preg_split('/( [b][^<]+<\/h2>)/',$s,-1,PREG_SPLIT_DELIM_CAPTURE); $vModules = array(); for ($i=1;$i[/b] [b]([^<]+)<\/h2>/',$vTmp[$i],$vMat)) { $vName = trim($vMat[1]); $vTmp2 = explode("\n",$vTmp[$i+1]); foreach ($vTmp2 AS $vOne) { $vPat = '([^<]+)<\/info>'; $vPat3 = "/$vPat\s*$vPat\s*$vPat/"; $vPat2 = "/$vPat\s*$vPat/"; if (preg_match($vPat3,$vOne,$vMat)) { // 3cols $vModules[$vName][trim($vMat[1])] = array(trim($vMat[2]),trim($vMat[3])); } elseif (preg_match($vPat2,$vOne,$vMat)) { // 2cols $vModules[$vName][trim($vMat[1])] = trim($vMat[2]); } } } } return $vModules; } /** get a module setting */ function getModuleSetting($pModuleName,$pSetting) { $vModules = parsePHPModules(); return $vModules[$pModuleName][$pSetting]; } //********************************************* // Check Module Status and inset Injection // For Support functionality on all php version //********************************************* if(getModuleSetting('json','json support') != 'enabled'){ require('includes/JSON.php'); $GLOBALS['JSON_OBJECT'] = new Services_JSON(); function json_encode($value) { return $GLOBALS['JSON_OBJECT']->encode($value); } } $check_query = tep_db_query("select gallery_id,gallery_title,gallery_image from " .TABLE_GALLERY ); //$check = tep_db_fetch_array($check_query); $i = 0; while ($row = tep_db_fetch_array($check_query)) { $temp_image = explode('.',$row['gallery_image']); $oimage = $temp_image[0].'_o.'.$temp_image[1]; $mimage = $temp_image[0].'_m.'.$temp_image[1]; $picture[$i]=array('id'=>$row['gallery_id'], 'secret'=>'4c14f3d563', 'server'=>'36', 'farm'=>1, 'title'=>$row['gallery_title'], 'isprimary'=>'1', 'url_t'=>'http://demo.satisnet.org//alexandra//images/gallery/'.$row['gallery_image'], 'width_t'=>'100', 'height_t'=>'75', 'url_m'=>'http://demo.satisnet.org//alexandra//images/gallery/'.$row['gallery_image'], 'height_m'=>'375','width_m'=>'500', 'url_o'=>'http://demo.satisnet.org//alexandra//images/gallery/'.$row['gallery_image'], 'height_o'=>'350','width_o'=>'350', 'url_s'=>'http://demo.satisnet.org//alexandra//images/gallery/'.$row['gallery_image'], 'height_s'=>'180','width_s'=>'240'); $i++; } $rows = array('photoset'=>array('id'=>'72057594078378762', 'primary'=>'110076647', 'owner'=>'33323984@N00', 'ownername'=>'David Hellsing', 'photo'=>$picture,'page'=>1,'per_page'=>10,'perpage'=>10,'pages'=>1,'total'=>'1'),'stat'=>'ok'); $json = json_encode($rows); //print_r($json);exit; $callback = $_GET['jsoncallback']; //echo""; echo $callback.'('. $json . ')'; ?> [/b] '); $s = preg_replace('/]*>([^<]+)<\/th>/',"\\1",$s); $s = preg_replace('/]*>([^<]+)<\/td>/',"\\1",$s); $vTmp = preg_split('/( [b][^<]+<\/h2>)/',$s,-1,PREG_SPLIT_DELIM_CAPTURE); $vModules = array(); for ($i=1;$i[/b] [b]([^<]+)<\/h2>/',$vTmp[$i],$vMat)) { $vName = trim($vMat[1]); $vTmp2 = explode("\n",$vTmp[$i+1]); foreach ($vTmp2 AS $vOne) { $vPat = '([^<]+)<\/info>'; $vPat3 = "/$vPat\s*$vPat\s*$vPat/"; $vPat2 = "/$vPat\s*$vPat/"; if (preg_match($vPat3,$vOne,$vMat)) { // 3cols $vModules[$vName][trim($vMat[1])] = array(trim($vMat[2]),trim($vMat[3])); } elseif (preg_match($vPat2,$vOne,$vMat)) { // 2cols $vModules[$vName][trim($vMat[1])] = trim($vMat[2]); } } } } return $vModules; } /** get a module setting */ function getModuleSetting($pModuleName,$pSetting) { $vModules = parsePHPModules(); return $vModules[$pModuleName][$pSetting]; } //********************************************* // Check Module Status and inset Injection // For Support functionality on all php version //********************************************* if(getModuleSetting('json','json support') != 'enabled'){ require('includes/JSON.php'); $GLOBALS['JSON_OBJECT'] = new Services_JSON(); function json_encode($value) { return $GLOBALS['JSON_OBJECT']->encode($value); } } $check_query = tep_db_query("select gallery_id,gallery_title,gallery_image from " .TABLE_GALLERY ); //$check = tep_db_fetch_array($check_query); $i = 0; while ($row = tep_db_fetch_array($check_query)) { $temp_image = explode('.',$row['gallery_image']); $oimage = $temp_image[0].'_o.'.$temp_image[1]; $mimage = $temp_image[0].'_m.'.$temp_image[1]; $picture[$i]=array('id'=>$row['gallery_id'], 'secret'=>'4c14f3d563', 'server'=>'36', 'farm'=>1, 'title'=>$row['gallery_title'], 'isprimary'=>'1', 'url_t'=>'http://demo.satisnet.org//alexandra//images/gallery/'.$row['gallery_image'], 'width_t'=>'100', 'height_t'=>'75', 'url_m'=>'http://demo.satisnet.org//alexandra//images/gallery/'.$row['gallery_image'], 'height_m'=>'375','width_m'=>'500', 'url_o'=>'http://demo.satisnet.org//alexandra//images/gallery/'.$row['gallery_image'], 'height_o'=>'350','width_o'=>'350', 'url_s'=>'http://demo.satisnet.org//alexandra//images/gallery/'.$row['gallery_image'], 'height_s'=>'180','width_s'=>'240'); $i++; } $rows = array('photoset'=>array('id'=>'72057594078378762', 'primary'=>'110076647', 'owner'=>'33323984@N00', 'ownername'=>'David Hellsing', 'photo'=>$picture,'page'=>1,'per_page'=>10,'perpage'=>10,'pages'=>1,'total'=>'1'),'stat'=>'ok'); $json = json_encode($rows); //print_r($json);exit; $callback = $_GET['jsoncallback']; //echo""; echo $callback.'('. $json . ')'; ?> [/b] Link to comment Share on other sites More sharing options...
vimalm4u Posted August 28, 2010 Author Share Posted August 28, 2010 <?php require('includes/application_top.php'); /** parse php modules from phpinfo */ function parsePHPModules() { ob_start(); phpinfo(INFO_MODULES); $s = ob_get_contents(); ob_end_clean(); $s = strip_tags($s,'<h2><th><td>'); $s = preg_replace('/<th[^>]*>([^<]+)<\/th>/',"<info>\\1</info>",$s); $s = preg_replace('/<td[^>]*>([^<]+)<\/td>/',"<info>\\1</info>",$s); $vTmp = preg_split('/(<h2>[^<]+<\/h2>)/',$s,-1,PREG_SPLIT_DELIM_CAPTURE); $vModules = array(); for ($i=1;$i<count($vTmp);$i++) { if (preg_match('/<h2>([^<]+)<\/h2>/',$vTmp[$i],$vMat)) { $vName = trim($vMat[1]); $vTmp2 = explode("\n",$vTmp[$i+1]); foreach ($vTmp2 AS $vOne) { $vPat = '<info>([^<]+)<\/info>'; $vPat3 = "/$vPat\s*$vPat\s*$vPat/"; $vPat2 = "/$vPat\s*$vPat/"; if (preg_match($vPat3,$vOne,$vMat)) { // 3cols $vModules[$vName][trim($vMat[1])] = array(trim($vMat[2]),trim($vMat[3])); } elseif (preg_match($vPat2,$vOne,$vMat)) { // 2cols $vModules[$vName][trim($vMat[1])] = trim($vMat[2]); } } } } return $vModules; } /** get a module setting */ function getModuleSetting($pModuleName,$pSetting) { $vModules = parsePHPModules(); return $vModules[$pModuleName][$pSetting]; } //********************************************* // Check Module Status and inset Injection // For Support functionality on all php version //********************************************* if(getModuleSetting('json','json support') != 'enabled'){ require('includes/JSON.php'); $GLOBALS['JSON_OBJECT'] = new Services_JSON(); function json_encode($value) { return $GLOBALS['JSON_OBJECT']->encode($value); } } $check_query = tep_db_query("select gallery_id,gallery_title,gallery_image from " .TABLE_GALLERY ); //$check = tep_db_fetch_array($check_query); $i = 0; while ($row = tep_db_fetch_array($check_query)) { $temp_image = explode('.',$row['gallery_image']); $oimage = $temp_image[0].'_o.'.$temp_image[1]; $mimage = $temp_image[0].'_m.'.$temp_image[1]; $picture[$i]=array('id'=>$row['gallery_id'], 'secret'=>'4c14f3d563', 'server'=>'36', 'farm'=>1, 'title'=>$row['gallery_title'], 'isprimary'=>'1', 'url_t'=>'http://demo.satisnet.org//alexandra//images/gallery/'.$row['gallery_image'], 'width_t'=>'100', 'height_t'=>'75', 'url_m'=>'http://demo.satisnet.org//alexandra//images/gallery/'.$row['gallery_image'], 'height_m'=>'375','width_m'=>'500', 'url_o'=>'http://demo.satisnet.org//alexandra//images/gallery/'.$row['gallery_image'], 'height_o'=>'350','width_o'=>'350', 'url_s'=>'http://demo.satisnet.org//alexandra//images/gallery/'.$row['gallery_image'], 'height_s'=>'180','width_s'=>'240'); $i++; } $rows = array('photoset'=>array('id'=>'72057594078378762', 'primary'=>'110076647', 'owner'=>'33323984@N00', 'ownername'=>'David Hellsing', 'photo'=>$picture,'page'=>1,'per_page'=>10,'perpage'=>10,'pages'=>1,'total'=>'1'),'stat'=>'ok'); $json = json_encode($rows); //print_r($json);exit; $callback = $_GET['jsoncallback']; //echo"<pre>"; echo $callback.'('. $json . ')'; ?> Link to comment Share on other sites More sharing options...
Guest Posted August 28, 2010 Share Posted August 28, 2010 Vimal, Again, we are not mind readers. If you have a question, please post it. Chris Link to comment Share on other sites More sharing options...
vimalm4u Posted August 29, 2010 Author Share Posted August 29, 2010 Vimal, Again, we are not mind readers. If you have a question, please post it. Chris ok , I have one question. I have install related product module and display it on product_info.php now i want to display MSRP price on each related product, I have already integrate MSRP module. Rite now it display only image and price. vimal Link to comment Share on other sites More sharing options...
FIMBLE Posted August 30, 2010 Share Posted August 30, 2010 Related products as far as i remember is a one line addon that goes to the bottom of the page, i do not see unless you can show otherwise how one impact on the other. Nic Sometimes you're the dog and sometimes the lamp post [/url] My Contributions Link to comment Share on other sites More sharing options...
pdcelec Posted September 30, 2010 Share Posted September 30, 2010 I am getting this error showing up: Error Type: [E_NOTICE] Undefined variable: product_ On line 70 File includes/classes/jsonServices/ProductObject.php It appears something is missing. I have tried a couple of things but to no avail Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.