Module doesn't work on a few browsers

Discussion regarding Joomla! 2.5 Performance issues.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Locked
Zyggmunt
Joomla! Apprentice
Joomla! Apprentice
Posts: 10
Joined: Thu Jun 09, 2011 10:51 am

Module doesn't work on a few browsers

Post by Zyggmunt » Thu Jun 09, 2011 11:18 am

Hello. I have a problem with module which I've written. It displays a few things from DJ Catalog 2 component (image, name, link). It work good on my computer, but my customer said he had a problem and when he turned browser and typed website where is the module, then he saw only white screen without any bugs.

Below is code of helper:

Code: Select all

<?php defined('_JEXEC') or die('Restricted access'); 

class get_records
{
var $result, $numberofr;

function get_datas()
{     
$query="SELECT * FROM jos_djc2_items"; 
$this->result = mysql_query($query);
$this->numberofr = mysql_numrows($this->result);  //number of rows 
$this->numberofr--;

   $randomnumber = $this->losuj();
   for($i = 0 ; $i < 3 ; $i++)
   {   
   //$randomnumber[$i] = $i;
   $data[$i]["image"] = mysql_result($this->result, $randomnumber[$i], "image_url");
   $data[$i]["name"] = mysql_result($this->result, $randomnumber[$i], "name");   
   $cat_id = mysql_result($this->result, $randomnumber[$i], "cat_id");   
   $id = $randomnumber[$i] + 3;
   //$cat_id++;
   $data[$i]["link"] = 'index.php?option=com_djcatalog2&view=item&id='.$id.'&cid='.$cat_id.'&Itemid=568';   
   $cat_id = $cat_id - 3;
   $query = "SELECT * FROM jos_djc2_categories";
   $result2 = mysql_query($query);  
   $data[$i]["cat_name"] = mysql_result($result2, $cat_id, "name");
   }
   
return $data;

}

function losuj()
{   
      $numbers = range(3, $this->numberofr); 
shuffle($numbers); 
return array_slice ($numbers,0,3);  

}

}
?>
Where is the problem ? I can send the rest of module files if you want.
Greetings.

 
User avatar
alikon
Joomla! Champion
Joomla! Champion
Posts: 5941
Joined: Fri Aug 19, 2005 10:46 am
Location: Roma
Contact:

Re: Module doesn't work on a few browsers

Post by alikon » Thu Jun 09, 2011 3:26 pm

if the problem arise in different browwer may the problem is not in the php code but in your javascript code ie jquery vs mootools
Nicola Galgano
i know that i don't know
www.alikonweb.it

Zyggmunt
Joomla! Apprentice
Joomla! Apprentice
Posts: 10
Joined: Thu Jun 09, 2011 10:51 am

Re: Module doesn't work on a few browsers

Post by Zyggmunt » Thu Jun 09, 2011 9:48 pm

But there is no javascript (or jquery) in this code. It seems that there is no bug, but it something wrong in their browsers (beacause he said that him friend have the same problem - nobody more - he and him friend, it's strange).

User avatar
alikon
Joomla! Champion
Joomla! Champion
Posts: 5941
Joined: Fri Aug 19, 2005 10:46 am
Location: Roma
Contact:

Re: Module doesn't work on a few browsers

Post by alikon » Fri Jun 10, 2011 6:17 am

the posted code is not all the module code isn't it ?
Nicola Galgano
i know that i don't know
www.alikonweb.it

Zyggmunt
Joomla! Apprentice
Joomla! Apprentice
Posts: 10
Joined: Thu Jun 09, 2011 10:51 am

Re: Module doesn't work on a few browsers

Post by Zyggmunt » Fri Jun 10, 2011 10:03 am

Second file:

Code: Select all

<?php defined('_JEXEC') or die('Restricted access');
  
require_once (dirname(__FILE__).DS.'helper.php'); 

$records = new get_records();
$dane = $records->get_datas();
$nazwa_obr = array();
$link = array();

for($i=0 ; $i < 3 ; $i++) {
$image = explode(".", $dane[$i]["image"]);
  $nazwa_obr[$i] = $image[0].'_m.'.$image[1];  
  $link[$i] = $dane[$i]["link"];
}

require(JModuleHelper::getLayoutPath('mod_katalogfirm')); ?>
Third file:

Code: Select all

<?php defined('_JEXEC') or die('Restricted access'); ?>
<div id="catalog_module">

<?php for($i=0 ; $i < 3 ; $i++) {?>
<div class="blocks">
  <div class="image">
  <?php 
  echo '<a href="'.$link[$i].'"><img src="http://oldtimery.com/images/djcatalog/'.$nazwa_obr[$i].'" /></a>';  
  ?>   
  </div>

  <div class="name">
  <?php $name = $dane[$i]["name"] ;   
  echo '<a href="'.$link[$i].'"><p>'.$name.'</p></a>'; 
  ?>
  </div>

  <div class="category">
  <?php $category = $dane[$i]["cat_name"] ;   
  echo '<p>('.$category.')</p>';  
  ?>
  </div>
</div>

<?php } ?>

</div>

User avatar
alikon
Joomla! Champion
Joomla! Champion
Posts: 5941
Joined: Fri Aug 19, 2005 10:46 am
Location: Roma
Contact:

Re: Module doesn't work on a few browsers

Post by alikon » Fri Jun 10, 2011 11:54 am

for short what module is it ?
a 3dp or a self-developed one ?
Nicola Galgano
i know that i don't know
www.alikonweb.it

Zyggmunt
Joomla! Apprentice
Joomla! Apprentice
Posts: 10
Joined: Thu Jun 09, 2011 10:51 am

Re: Module doesn't work on a few browsers

Post by Zyggmunt » Fri Jun 10, 2011 11:59 am

It displays 3 pictures, names and categories which are loaded from mysql database of Dj Catalog 2.

It's a self-developed.

Zyggmunt
Joomla! Apprentice
Joomla! Apprentice
Posts: 10
Joined: Thu Jun 09, 2011 10:51 am

Re: Module doesn't work on a few browsers

Post by Zyggmunt » Tue Jun 14, 2011 1:10 pm

So is there a bug ? Maybe there is something bad with their browsers ?

 

Locked

Return to “Performance - Joomla! 2.5”