Results 1 to 10 of 2217

Threaded View

  1. #11
    Join Date
    Jan 2007
    Location
    Los Angeles, California, United States
    Posts
    10,021
    Plugin Contributions
    32

    Default Re: Tabbed Products Pro (TPP) Contrib - Official Thread

    Honestly I can't go through each one of these changes and tell you what changes to make and which ones to not make.. So I will say this instead.. When I say merge I mean merge.. If it's missing from your file ADD it, if it's different from what's in your file analyze those differences and CHANGE it.. Hopefully you are evaluating each change and have some sense of each the change means as you go through the files.. If you are using a merge program like Winmerge or Beyond Compare it makes seeing these differences and how to merge the files much easier to execute.. If you are not using one of these programs, it will make this entire merging exercise MUCH more difficult for you..

    Quote Originally Posted by beep View Post
    Thank you DivaVocals for your quick response...
    I have compared the files with winmerge and can identify the differences.. the problem is i don't know what they mean or which bits to change as PHP is rather new and alien to me.
    Here is what I discovered:

    • The following lines of code are missing from my current version of the file:
      Code:
      $jscript_files_to_load = $css_files_to_load = array();
    • Code:
      if (file_exists(DIR_WS_CLASSES . 'browser.php')) {
          include_once(DIR_WS_CLASSES . 'browser.php');
          $browser = new browser();
          $browser_name = strtolower($browser->Name);
          if (($browser_name == 'msie') && $browser->Version <= 6) {
            $directory_array = $template->get_template_part($template->get_template_dir('.css',DIR_WS_TEMPLATE, $current_page_base,'css'), '/^ie6-/', '.css');
            $js_directory_array = $template->get_template_part($template->get_template_dir('.js',DIR_WS_TEMPLATE, $current_page_base,'js'), '/^ie6-/', '.js');
          } if (($browser_name == 'msie') && $browser->Version >= 7) {
            $directory_array = $template->get_template_part($template->get_template_dir('.css',DIR_WS_TEMPLATE, $current_page_base,'css'), '/^ie7-/', '.css');
            $js_directory_array = $template->get_template_part($template->get_template_dir('.js',DIR_WS_TEMPLATE, $current_page_base,'js'), '/^ie7-/', '.js');
          } elseif ($browser_name == 'firefox') {
            $directory_array = $template->get_template_part($template->get_template_dir('.css',DIR_WS_TEMPLATE, $current_page_base,'css'), '/^ff-/', '.css');
            $js_directory_array = $template->get_template_part($template->get_template_dir('.js',DIR_WS_TEMPLATE, $current_page_base,'js'), '/^ff-/', '.js');
          } elseif ($browser_name == 'safari') {
            $directory_array = $template->get_template_part($template->get_template_dir('.css',DIR_WS_TEMPLATE, $current_page_base,'css'), '/^safari-/', '.css');
            $js_directory_array = $template->get_template_part($template->get_template_dir('.js',DIR_WS_TEMPLATE, $current_page_base,'js'), '/^safari-/', '.js');
          } elseif ($browser_name == 'chrome') {
            $directory_array = $template->get_template_part($template->get_template_dir('.css',DIR_WS_TEMPLATE, $current_page_base,'css'), '/^chrome-/', '.css');
            $js_directory_array = $template->get_template_part($template->get_template_dir('.js',DIR_WS_TEMPLATE, $current_page_base,'js'), '/^chrome-/', '.js');
          }
          while(list ($key, $value) = each($directory_array )) {
            $css_files_to_load[$value] = -100;                                    
          }
          while(list ($key, $value) = each($js_directory_array )) {
              $js_files_to_load[$value] = -500;                
          }    
        }
    • Code:
      $files = loadCssJsFiles($css_files_to_load, $jscript_files_to_load);
        foreach($files['css'] as $file)
            if($file['include']) include($file['string']);
            else echo $file['string'];
            
        foreach($files['js'] as $file)
            if($file['include']) include($file['string']);
            else echo $file['string'];


    and the following lines of code are different in each file:
    • line 48 says
      Code:
      echo '<link rel="stylesheet" type="text/css" href="' . $template->get_template_dir('.css',DIR_WS_TEMPLATE, $current_page_base,'css') . '/' . $value . '" />'."\n";
      instead of
      Code:
      $css_files_to_load[$value] = -300;
    • line 69 says
      Code:
      if (file_exists($perpagefile)) echo '<link rel="stylesheet" type="text/css" href="' . $perpagefile .'" />'."\n";
      instead of
      Code:
       if (file_exists($perpagefile)) $css_files_to_load[trim($value, '/').'.css'] = -200;
    • line 86 says
      Code:
      echo '<script type="text/javascript" src="' .  $template->get_template_dir('.js',DIR_WS_TEMPLATE, $current_page_base,'jscript') . '/' . $value . '"></script>'."\n";
        }
      instead of
      Code:
      $jscript_files_to_load[$value] = -400;
        }
    • line says
      Code:
      echo '<script type="text/javascript" src="' . $page_directory . '/' . $value . '"></script>' . "\n";
      instead of
      Code:
      $jscript_files_to_load[$value] = -300;
    • line 106 says
      Code:
       require($template->get_template_dir('.php',DIR_WS_TEMPLATE, $current_page_base,'jscript') . '/' . $value); echo "\n";
      instead of
      Code:
      $jscript_files_to_load[$value] = -200;
    • and line 117 says
      Code:
      require($page_directory . '/' . $value); echo "\n";
      instead of
      Code:
      $jscript_files_to_load[$value] = -100;


    I hope that sheds some light on the problem as I'm baffled.
    Last edited by DivaVocals; 17 Feb 2010 at 06:15 PM.

 

 

Similar Threads

  1. Main Image Replacer (MIR) Contrib - Official Thread
    By qhome in forum All Other Contributions/Addons
    Replies: 21
    Last Post: 5 Aug 2017, 02:47 AM
  2. v154 Tabbed Prod Pro (TPP): Adding Anchor Links
    By Feznizzle in forum All Other Contributions/Addons
    Replies: 10
    Last Post: 30 May 2016, 07:50 PM
  3. v139h Conflicts between Tabbed Home and Tabbed Products Pro v1.07
    By swdynamic in forum All Other Contributions/Addons
    Replies: 5
    Last Post: 14 Sep 2014, 06:29 PM
  4. Column Divider Pro (CDP) Contrib - Official Thread
    By qhome in forum All Other Contributions/Addons
    Replies: 275
    Last Post: 3 Nov 2013, 07:44 AM
  5. Tabbed Products Contrib [WIP]
    By qhome in forum All Other Contributions/Addons
    Replies: 22
    Last Post: 22 Sep 2008, 01:43 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR