Forums / Addon Sideboxes / Totally stumped: sidebox in root, store in subdirectory

Totally stumped: sidebox in root, store in subdirectory

Locked

Views: 1,612

Results 1 to 2 of 2
This thread is locked. New replies are disabled.
5 Jun 2007, 8:00 PM
#1
lisk avatar

lisk

Zen Follower

Join Date:
Jun 2006
Posts:
118
Plugin Contributions:
0

Totally stumped: sidebox in root, store in subdirectory

Hi - I'm trying to display the featured product sidebox in the root of my site. My store is in a subdirectory (root: http://dichroicjewelry.net and store: http://dichroicjewelry.net/glass).

I'm using 1.3.7. I renamed application_top.php and config.php as was suggested in another thread. I'm attempting to call the following file (which is located in my store's base directory, /glass) from the root directory, and I'm getting a blank page.

Without any error messages, I don't know what to search for, and I'm really stumped. Can someone please help me?

<? 
  require('blogfiles/application_topb.php'); 
// Return a random row from a database query 
  function zen_random_select($query) { 
    global $db; 
      if (!is_object($db)) { 
        //PHP 5.2.0 bug workaround ...  
        $db = new queryFactory(); 
        $db->connect(DB_SERVER, DB_SERVER_USERNAME, DB_SERVER_PASSWORD, DB_DATABASE, USE_PCONNECT, false); 
    $random_product = ''; 
    $random_query = $db->Execute($query); 
    $num_rows = $random_query->RecordCount(); 
    if ($num_rows > 1) { 
      $random_row = zen_rand(0, ($num_rows - 1)); 
      $random_query->Move($random_row); 
    } 
    } 
    } 
    return $random_query; 
 $sidebox_name = 'featured.php';  
//which sidebox template to use:  
$column_box_default='tpl_box_default_left.php';  
$column_width = BOX_WIDTH_LEFT;  
/**  
 * Load required functions and processing to generate the sidebox:  
 */  
  $language_page_directory = DIR_WS_LANGUAGES . $_SESSION['language'] . '/';  
  $box_id = zen_get_box_id($sidebox_name);  
  if ( file_exists(DIR_WS_MODULES . 'sideboxes/' . $template_dir . '/' . $sidebox_name) ) {  
    require(DIR_WS_MODULES . 'sideboxes/' . $template_dir . '/' . $sidebox_name);  
  } else {  
    require(DIR_WS_MODULES . 'sideboxes/' . $sidebox_name);  
  }   
  ?> 
10 Jun 2007, 8:20 AM
#2
lisk avatar

lisk

Zen Follower

Join Date:
Jun 2006
Posts:
118
Plugin Contributions:
0

Re: Totally stumped: sidebox in root, store in subdirectory

Anyone? Please?