Jump to content

schnauzer

Members
  • Content count

    81
  • Joined

  • Last visited

Posts posted by schnauzer


  1. Anyone know how to get the "check links" function in the admin to work?

     

    I just checked mine and it worked fine. The page went white for a few seconds while it tested the links.

     

    Considering you don't really tamper with this file in the installation it's odd that it doesn't work. Perhaps you should compare the admin/links.php file in your store vs. the the stock file to see if there are any irregularies using a program like beyond compare or something. I bet if you removed it and reinstalled it you'd get it working.


  2. The links.php file, as well as the links_sbumit.php and the links_submit_success.php files, need to be edited to fit your site if you don't have a standard format. To do that, make a copy of a page that works (usually privacy.php is a good choice). Replace everything in the copy between the
      require('includes/application_top.php');

    and the

    first ?>

    with the same section of code from the links.php file. Then replace everyting between the

    <!-- body_text //-->

    and the

    <!-- body_text_eof //-->

    Rename the file to links.php and it should work fine. Do the same for the other two files.

     

    Jack

     

     

    Jack-

    It worked like a charm! Thanks for all your help.


  3. Jack-I've been messing around with the alignment all afternoon. I removed the left and right columns but they left a blank phantom space because I don't know which tables to remove for each one. They're aren't many options but I can't seem to figure it out. Using my file on the previous page can you isolate the code I should remove to get rid of the phantom columns so I can adjust my alignment. Thanks!


  4. It's set up the way it needs to be on their site. So the problem must be with something your client is doing. I don't claim to be an expert so aside from checking to make sure you have the exact link that you posted in your message in the reciprocal link field on your clients admin panel I'm not sure what else you could do. based upon the error messages you also said you were getting perhaps it wasn't installed correctly.


  5. Hi,

     

    We still cannot get the "check links" section in the admin to work. My client adds the link on his site with the Reciprocal Page: url listed. He approves the listing in the admin and then clicks on check links and it says the link is not there on the reciprocal site which it is very clearly there.

     

    The first time he check the links he got a page of these listings but neither one of us can duplicate them again:

    Warning: fgets(): supplied argument is not a valid stream resource in /home/httpd/vhosts/shadenthings.com/httpdocs/admin/links.php on line 531

     

    and

     

    Warning: fgets(): supplied argument is not a valid stream resource in /home/httpd/vhosts/shadenthings.com/httpdocs/admin/links.php on line 530

     

    These two lines in the admin/links.php page are these:

    while (!feof($file)) {

    $page_line = trim(fgets($file, 4096));

    Now when either he or I click the check links we get:

    Link Check Result: Not Found

     

    Can someone please help?

     

    Thanks!

     

    Sometimes you will get the "red x" indicating that the recip link doesn't exist if that site uses a database to manage it's link page. This is why it's a good idea to disable the click counter because some people make be reluctant to trade links with you because it doesn't help their serp too much. I would go to the site that you are sure has your recip link displayed and simply put your cursor over your link and see if it points to your site or a database. If it points to a datbase then that is why you get the x.


  6. From the readme file

     

    Jack

     

    Jack-

    how the links are displayed are fine. But on the links pages I now have all of the original stock osc info boxes appearing and well as my category column is displyed twice. Where would I comment out all of the boxes that are appearing so that just my template appears?


  7. As I mentioned, the template designers do that, probably because they don't know the correct way to do it. It won't hurt to have them renamed that way since the code on that page is self-contained. The original function still exists where it should and will work as expected. To switch the display for links manager, see the instructions. The explain what you need to do.

     

    Jack

     

    Jack-

     

    What instructions? The readme file only includes installation instructions and the configuration section in teh admin panel doesn't address the appearance of the columns. Thanks for getting me this far I appreciate it.


  8. The function is named with the
    function tep_show_category($counter)

    and then the function is called with the

    tep_show_category($first_element);

    You need to change them both (any other occurrences on that page).

     

    Jack

     

     

    It worked...I actually found a 3rd occurrance and change that as well. The only thing is that the links pages are a mess format wise. now the osc stock left and right columns are showing up. Also i'm kind of concerned that by doing this I may have changed something elsewhere that i shouldn't have. Don't the functions have a reason for being there to begin with?

     

    So how can I remove the stock columns?


  9. I didn't rename it because I thought I was looking for 2 instances of the statement and couldn't find both of them. So then I should try the following change?

     

    From:

    function tep_show_category($counter) {
    global $tree, $categories_string, $cPath_array;

     

    To:

    function my_tep_show_category($counter) {
    global $tree, $categories_string, $cPath_array;

     

    Well I tried this change and I recieved the following error on the home page:

     

    Fatal error: Call to undefined function: tep_show_category() in 
    /includes/header.php on line 328

     

    Did I do what you were suggesting? Any other help would be much appreciated. I really need to make this contrib work! Thanks


  10. What happened when you renamed the function as I suggested?

     

    Jack

     

     

    I didn't rename it because I thought I was looking for 2 instances of the statement and couldn't find both of them. So then I should try the following change?

     

    From:

    function tep_show_category($counter) {
    global $tree, $categories_string, $cPath_array;

     

    To:

    function my_tep_show_category($counter) {
    global $tree, $categories_string, $cPath_array;


  11. A common trend with the template makers is to pull the function from the function directory and place it in the header file. What I do for a quick fix, if that is the case here, is to find the two occurrences of it in the header file and rename it to something else (like my_tep_show_category).

     

    Jack

     

    I can't make it work. I attached my header file hoping you could help me out. But how come my site works normally in every other way except with this contrib added? I added other contribs. And will this change alter the look of my site that I'm trying to achieve with the template? here's the file...

    <?php
    /*
     $Id: header.php,v 1.42 2003/06/10 18:20:38 hpdl Exp $
    
     osCommerce, Open Source E-Commerce Solutions
     http://www.oscommerce.com
    
     Copyright (c) 2003 osCommerce
    
     Released under the GNU General Public License
    */
    
    // check if the 'install' directory exists, and warn of its existence
     if (WARN_INSTALL_EXISTENCE == 'true') {
    if (file_exists(dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']) . '/install')) {
      $messageStack->add('header', WARNING_INSTALL_DIRECTORY_EXISTS, 'warning');
    }
     }
    
    // check if the configure.php file is writeable
     if (WARN_CONFIG_WRITEABLE == 'true') {
    if ( (file_exists(dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']) . '/includes/configure.php')) && (is_writeable(dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']) . '/includes/configure.php')) ) {
      $messageStack->add('header', WARNING_CONFIG_FILE_WRITEABLE, 'warning');
    }
     }
    
    // check if the session folder is writeable
     if (WARN_SESSION_DIRECTORY_NOT_WRITEABLE == 'true') {
    if (STORE_SESSIONS == '') {
      if (!is_dir(tep_session_save_path())) {
    	$messageStack->add('header', WARNING_SESSION_DIRECTORY_NON_EXISTENT, 'warning');
      } elseif (!is_writeable(tep_session_save_path())) {
    	$messageStack->add('header', WARNING_SESSION_DIRECTORY_NOT_WRITEABLE, 'warning');
      }
    }
     }
    
    // check session.auto_start is disabled
     if ( (function_exists('ini_get')) && (WARN_SESSION_AUTO_START == 'true') ) {
    if (ini_get('session.auto_start') == '1') {
      $messageStack->add('header', WARNING_SESSION_AUTO_START, 'warning');
    }
     }
    
     if ( (WARN_DOWNLOAD_DIRECTORY_NOT_READABLE == 'true') && (DOWNLOAD_ENABLED == 'true') ) {
    if (!is_dir(DIR_FS_DOWNLOAD)) {
      $messageStack->add('header', WARNING_DOWNLOAD_DIRECTORY_NON_EXISTENT, 'warning');
    }
     }
    
     if ($messageStack->size('header') > 0) {
    echo $messageStack->output('header');
     }
    ?>
    <!--
    
    
    
    
    <?   // ---- MANUFACTURERS
    
    
     $manufacturers_query = tep_db_query("select manufacturers_id, manufacturers_name from " . TABLE_MANUFACTURERS . " order by manufacturers_name");
     if ($number_of_rows = tep_db_num_rows($manufacturers_query)) {
    
      echo '<table cellspacing=0 cellpadding=0 width=177 align=center> '.
    		  tep_draw_form('manufacturers', tep_href_link(FILENAME_DEFAULT, '', 'NONSSL', false), 'get')
    		 .' <tr><td colspan=2><b>Search by manufacturers:</b></td></tr>
    			<tr><td height=2 colspan=2></td></tr>
    			<tr><td colspan=2>
    	   ';	  
    
      $manufacturers_array = array();
      while ($manufacturers = tep_db_fetch_array($manufacturers_query)) {
    	$manufacturers_name = ((strlen($manufacturers['manufacturers_name']) > MAX_DISPLAY_MANUFACTURER_NAME_LEN) ? substr($manufacturers['manufacturers_name'], 0, MAX_DISPLAY_MANUFACTURER_NAME_LEN) . '..' : $manufacturers['manufacturers_name']);
    	$manufacturers_array[] = array('id' => $manufacturers['manufacturers_id'],
    								   'text' => $manufacturers_name);
      }
    
      echo tep_draw_pull_down_menu('manufacturers_id', $manufacturers_array, (isset($HTTP_GET_VARS['manufacturers_id']) ? $HTTP_GET_VARS['manufacturers_id'] : ''), 'onChange="this.form.submit();" size="' . MAX_MANUFACTURERS_LIST . '" class=se1') . tep_hide_session_id();
      echo ' </td>
    	  </form>
    	 </table>
    	   ';
     }
    
    ?>
    
    
    -->
    
     <table cellspacing=0 cellpadding=0 align=center>
     <tr><td height=10></td></tr>
     <tr><td>
    
     <table cellspacing=0 cellpadding=0 width=757 align=center bgcolor=#ffffff>   
     <tr><td>
    <table cellspacing=0 cellpadding=0 width=715 align=center>
    <tr><td>
    
    	<table cellspacing=0 cellpadding=0
    	 <tr><td height=33 colspan=2></td></tr>
    	 <tr><td><a href=<?tep_href_link('index.php')?>><img src=images/m01.jpg width=173 height=62 border=0></a></td>
    		 <td background=images/m05.gif width=542 height=62>
    		  <table cellspacing=0 cellpadding=0>
    		   <tr><td width=173>
    				<table cellspacing=0 cellpadding=0 width=137 align=center>
    				 <tr><td height=12></td></tr>
    				 <tr><td class=ch>Order by Phone:</td></tr>
    				 <tr><td height=7></td></tr>
    				 <tr><td style="padding-right:20px">
     <font face="arial" color="#A9A954" size="1">? (888) 512-6759</font>
    			   </td></tr>
    				 <tr><td height=7></td></tr>
    				</table>
    			   </td>
    			   <td width=170>
    				<table cellspacing=0 cellpadding=0 width=137 align=center>
    				 <tr><td height=13></td></tr>
    				 <tr><td class=ch>Shop by Price:</td></tr>
    				 <tr><td height=4></td></tr>
    				 <tr><td>
    <? // CURRENCIES
    
    echo tep_draw_form('currencies', tep_href_link(basename($PHP_SELF), '', $request_type, false), 'get');
    
    reset($currencies->currencies);
    $currencies_array = array();
    while (list($key, $value) = each($currencies->currencies)) {
      $currencies_array[] = array('id' => $key, 'text' => $value['title']);
    }
    
    $hidden_get_variables = '';
    reset($HTTP_GET_VARS);
    while (list($key, $value) = each($HTTP_GET_VARS)) {
      if ( ($key != 'currency') && ($key != tep_session_name()) && ($key != 'x') && ($key != 'y') ) {
    	$hidden_get_variables .= tep_draw_hidden_field($key, $value);
      }
    }
    
    echo tep_draw_pull_down_menu('manufacturers_id', $manufacturers_array, (isset($HTTP_GET_VARS['manufacturers_id']) ? $HTTP_GET_VARS['manufacturers_id'] : ''), 'onChange="this.form.submit();" size="' . MAX_MANUFACTURERS_LIST . '" class=se1') . tep_hide_session_id();
      echo '</form>';
    
    ?>			   
    			  </td></tr>
    				 <tr><td height=9></td></tr>
    				</table>
    			   </td>
    			   <td width=199>
    				<table cellspacing=0 cellpadding=0 width=175 align=center>
    				 <tr><td height=13></td></tr>
    				 <tr><td class=ch>Shopping Cart:</td></tr>
    				 <tr><td height=6></td></tr>
    
    				 <tr><td class=tx>now in your shopping cart <b><a class=ml href=<?=tep_href_link('shopping_cart.php')?>><font color=#999943><?=$cart->count_contents()?> items</font></a></b></td></tr>
    				 <tr><td height=9></td></tr>
    				</table>
    		   </td></tr>
    		  </table>
    	 </td></tr>
    	 <tr><td height=4 colspan=2></td></tr>
    	</table>
    	<table cellspacing=0 cellpadding=0>
    	 <tr><td>
    		  <table cellspacing=0 cellpadding=0>
    		  <tr><td><a href=<?=tep_href_link('index.php')?>><img src=images/m06.gif width=169 height=39 border=0></a></td></tr>
    		   <tr><td><a href=<?=tep_href_link('products_new.php')?>><img src=images/m07.gif width=169 height=39 border=0></a></td></tr>
    		   <tr><td><a href=<?=tep_href_link('account.php')?>><img src=images/m08.gif width=169 height=39 border=0></a></td></tr>
    		   <tr><td><a href=<?=tep_href_link('shopping_cart.php')?>><img src=images/m09.gif width=169 height=39 border=0></a></td></tr>
    		   <tr><td><a href=<?=tep_href_link('checkout_shipping.php')?>><img src=images/m10.gif width=169 height=39 border=0></a></td></tr>
    		  </table>
    		 </td>
    		 <td width=4></td>
    		 <td><a href="http://www.pinevalleygiftbaskets.com/spa-bath-c-66.html"><img border="0" src="images/m11.jpg" alt="Spa Gift Baskets" width="173" height="195" ><img border="0" src="images/m12.jpg" alt="Spa Gift Baskets" width="184" height="195"></a></td>
    	 <td width=4></td>
    		 <td>
    		  <table cellspacing=0 cellpadding=0>
    		  <tr><td><a href=<?=tep_href_link('specials.php')?>><img src=images/m13.gif width=181 height=22 border=0></a></td></tr>
    		   <tr><td><a href=<?=tep_href_link('advanced_search.php')?>><img src=images/m14.gif width=181 height=21 border=0></a></td></tr>
    		   <tr><td><a href=<?=tep_href_link('contact_us.php')?>><img src=images/m15.gif width=181 height=19 border=0></a></td></tr>
    		   <tr><td><a href=<?=tep_href_link('create_account.php')?>><img src=images/m16.gif width=181 height=20 border=0></a></td></tr>
    		   <tr><td><a href=<?=tep_href_link('login.php')?>><img src=images/m17.gif width=181 height=20 border=0></a></td></tr>
    		   <tr><td><img src=images/m18.gif width=181 height=13></td></tr>
    		   <tr><td><img src=images/m21.gif width=181 height=3></td></tr>
    		   <tr><td background=images/m20.gif width=181 height=77>
    
    
    
    <? // SEARCH ?>
    				<table cellspacing=0 cellpadding=0 width=147 align=center>
    				 <?=tep_draw_form('quick_find', tep_href_link(FILENAME_ADVANCED_SEARCH_RESULT, '', 'NONSSL', false), 'get')?>
    				 <tr><td height=10></td></tr>
    				 <tr><td class=ch><font color=#ffffff>Quick Search:</a></td></tr>
    				 <tr><td height=5></td></tr>
    				 <tr><td><?=tep_draw_input_field('keywords', '', 'size="20" maxlength="30" class=go onclick="this.value=\'\'"  value="- Enter keyword - "') . '?' . tep_hide_session_id()?></td></tr>
    				 <tr><td height=7></td></tr>
    				 <tr><td align=right><input type=image src=images/m19.gif width=32 height=12 border=0> ? </td></tr>
    				 </form>
    				</table>
    <? // END SEARCH ?>
    		   </td></tr>
    		  </table>
    	 </td></tr>
    	 <tr><td colspan=5 width=715 height=2></td></tr>
    	 <tr><td colspan=5 width=715 height=4 bgcolor=#ACAC53></td></tr>
    	 <tr><td colspan=5 width=715 height=2></td></tr>
    	</table>
    	<table cellspacing=0 cellpadding=0>
    	 <tr><td width=2 bgcolor=#B0B05A></td>
    		 <td width=2></td>
    		 <td width=165 valign=top>
    		  <table cellspacing=0 cellpadding=0>
    		   <tr><td><img src=images/m22.gif width=165 height=36></td></tr>
    		   <tr><td height=3></td></tr>
    		   <tr><td><img src=images/m23.gif width=165 height=5></td></tr>
    		   <tr><td width=165 class=bg>
    				<table cellspacing=0 cellpadding=0 width=135 align=center>
    				 <tr><td height=9></td></tr>
    <?   // ---- CATEGORIES
    
      function tep_show_category($counter) {
    global $tree, $categories_string, $cPath_array;
    
      if(!$tree[$counter]['level']){			   
    
    $categories_string .= $categories_string ? '<tr><td><img src=images/m26.gif width=135 height=1></td></tr><tr><td height=4></td></tr>' : '';			 
    
    $categories_string .= ' <tr><td><img src=images/m25.gif width=4 height=4 align=absmiddle> ?<a class=ml1 href=';
    
    if ($tree[$counter]['parent'] == 0) {
      $cPath_new = 'cPath=' . $counter;
    } else {
      $cPath_new = 'cPath=' . $tree[$counter]['path'];
    }
    $categories_string .= tep_href_link('index.php', $cPath_new) . '>';
    // display categry name
    $categories_string .= $tree[$counter]['name'];
    $categories_string .= '</a></td></tr><tr><td height=3></td></tr>';
    
      }else{  // SUBCATEGORY
    
    $categories_string .= '<tr><td>? ? ';
    
    for($i=0;$i<$tree[$counter]['le vel'];$i++)
     $categories_string .= '???';
    
    $categories_string .= ' - <a class=ml1 style="font-weight:normal;" href=';   
    if ($tree[$counter]['parent'] == 0) {
      $cPath_new = 'cPath=' . $counter;
    } else {
      $cPath_new = 'cPath=' . $tree[$counter]['path'];
    }
    $categories_string .= tep_href_link('index.php', $cPath_new) . '>';
    // display category name
    $categories_string .= $tree[$counter]['name'];
    $categories_string .= '</a></td></tr><tr><td height=3></td></tr>';
      }  
    
    if ($tree[$counter]['next_id'] != false) {
      tep_show_category($tree[$counter]['next_id']);
    }  
    // }
    
    
    
     define(TABLE_CATEGORIES, "categories");
     define(TABLE_CATEGORIES_DESCRIPTION, "categories_description");
     $categories_string = '';
     $tree = array();
    
     $categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.parent_id from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '0' and c.categories_id = cd.categories_id and cd.language_id='" . (int)$languages_id ."' order by sort_order, cd.categories_name");
     while ($categories = tep_db_fetch_array($categories_query))  {
    $tree[$categories['categories_id']] = array('name' => $categories['categories_name'],
    											'parent' => $categories['parent_id'],
    											'level' => 0,
    											'path' => $categories['categories_id'],
    											'next_id' => false);
    
    if (isset($parent_id)) {
      $tree[$parent_id]['next_id'] = $categories['categories_id'];
    }
    
    $parent_id = $categories['categories_id'];
    
    if (!isset($first_element)) {
      $first_element = $categories['categories_id'];
    }
     }
    
     //------------------------
     if ($cPath) {
    $new_path = '';
    reset($cPath_array);
    while (list($key, $value) = each($cPath_array)) {
      unset($parent_id);
      unset($first_id);
      $categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.parent_id from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '" . (int)$value . "' and c.categories_id = cd.categories_id and cd.language_id='" . (int)$languages_id ."' order by sort_order, cd.categories_name");
      if (tep_db_num_rows($categories_query)) {
    	$new_path .= $value;
    	while ($row = tep_db_fetch_array($categories_query)) {
    	  $tree[$row['categories_id']] = array('name' => $row['categories_name'],
    										   'parent' => $row['parent_id'],
    										   'level' => $key+1,
    										   'path' => $new_path . '_' . $row['categories_id'],
    										   'next_id' => false);
    
    	  if (isset($parent_id)) {
    		$tree[$parent_id]['next_id'] = $row['categories_id'];
    	  }
    
    	  $parent_id = $row['categories_id'];
    
    	  if (!isset($first_id)) {
    		$first_id = $row['categories_id'];
    	  }
    
    	  $last_id = $row['categories_id'];
    	}
    	$tree[$last_id]['next_id'] = $tree[$value]['next_id'];
    	$tree[$value]['next_id'] = $first_id;
    	$new_path .= '_';
      } else {
    	break;
      }
    }
     }
    $categories_string .=  '';
    tep_show_category($first_element); 
    $categories_string .=  '';
    
    echo $categories_string;
    ?>
    
    
    
    				<tr><td height=7></td></tr>					
    				</table>
    		   </tr></tr>
    		   <tr><td><img src=images/m27.gif width=165 height=7></td></tr>
    		  </table>		
    		 </td>
    		 <td width=4></td>
    		 <td width=537 valign=top>


  12. Hi,

     

    I have another problem with the "check link" feature in the admin.

     

    What is this suppose to do?

     

    Each time I click to check the link it says it is not there but it is clearly there on the website.

     

    Thanks!

     

     

    I can answer this one....it's testing the location of the reciprocal link on the website where you are trading links. It is verifying that your link exists on their website.


  13. That function isn't used by Links Manager. You have some code that is calling it twice. You will need to isolate which file is causing the problem.

     

    Jack

     

    I'm using a template. A few pages back a guy was having the same problem but I can't understand how he fixed it. If I understand the problem it looks like the template is conflicting with the links manager files because they are both trying to display the categories, right? If so how where would I comment out the code in the links manager program so that my site calls up the format I want and at the same time eliminating the duplicate calling?


  14. Can anyone help with this error I've received after installing this contrib for the first time:

     

    Fatal error: Cannot redeclare tep_show_category() (previously declared 
    in /includes/header.php:221)
    in /includes/boxes/categories.php on line 13

     

    Would really like to go live after i figure this out. Any help would be much appreciated.

     

    Thank you.


  15. Hi-

     

    I'm receiving two errors after installing this contrib. Here they are:

     

    1) On the Category page the following code is printing out instead of the Header:

    $category_query = tep_db_query("select cd.categories_htc_title_tag, cd.categories_htc_description from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.categories_id = '" . (int)$current_category_id . "' and cd.categories_id = '" . (int)$current_category_id . "' and cd.language_id = '" . (int)$languages_id . "'"); $category = tep_db_fetch_array($category_query); ?>

     

    2) On the Product page I am receiving this error:

    Fatal error: Call to undefined function: clean_html_comments() catalog/includes/header_tags.php on line 187

     

    If you need more info to diagnose let me know.

     

    Thanks!

×