osCmax v2.5 User Manual
Results 1 to 8 of 8

stupid bit of easy code

This is a discussion on stupid bit of easy code within the osCmax v1.7 Discussion forums, part of the osCmax v1.7 Forums category; I just don't know why when I click on the links I'm making, it doesn't take me to the answers. ...

      
  1. #1
    Active Member
    Join Date
    Oct 2004
    Posts
    215
    Rep Power
    8


    Default stupid bit of easy code

    I just don't know why when I click on the links I'm making, it doesn't take me to the answers. I got this format from the Gift Voucher FAQ, and I'm just stripping it down and modifying it. Please oh please tell me why this stupid bit of apparently easy (but none the less diabolic) code won't work right for me.

    Thanks

    Code:
    <?php
    define('NAVBAR_TITLE', 'Product FAQ');
    define('HEADING_TITLE', 'Product FAQ');
    
    define('TEXT_INFORMATION', '
      <a href="'.tep_href_link(FILENAME_FAQ,'faq_item=1','NONSSL').'">How do I attach a flag bracket in stucco?</a><br>
      <a href="'.tep_href_link(FILENAME_FAQ,'faq_item=2','NONSSL').'">Can I wash my flag?</a><br>
      <a href="'.tep_href_link(FILENAME_FAQ,'faq_item=3','NONSSL').'">Can I attach grommetted flags onto a sleeve style pole?</a><br>
    ');
    switch ($HTTP_GET_VARS['faq_item']) {
      case '1':
    define('SUB_HEADING_TITLE','How do I attach a flag bracket in stucco?');
    define('SUB_HEADING_TEXT','test');
      break;
      case '2':
    define('SUB_HEADING_TITLE','Can I wash my flag?');
    define('SUB_HEADING_TEXT','We recommend that you do not wash your flag, but if you must
    then we recommend gentle handwashing.');
      break;
      case '3':
      define('SUB_HEADING_TITLE','Can I attach grommetted flags onto a sleeve style pole?');
      define('SUB_HEADING_TEXT','test3');
      break;
      }
    ?>
    The implimentation can be found on my site here...
    http://www.upupandawaykites.com/catalogmax/faq.php

    Thanks!

  2. #2
    Member andyy15's Avatar
    Join Date
    Aug 2004
    Posts
    63
    Rep Power
    0


    Default

    I can help you get it to work check your PM.
    Check out my homepage.. It\'s my jewelry website.

  3. #3
    osCMax Developer

    michael_s's Avatar
    Join Date
    Jul 2002
    Location
    Phoenix, AZ
    Posts
    19,907
    Rep Power
    568


    Default

    andy,

    I appreciate your attempt to help.

    For future reference, please keep the discussion in the public forums. There is no need to take this to PM. If you have help to offer, post it, I am sure others will benefit if you do. That is the point of these forums. Also, as a rule of thumb, you should not PM somebody unless they ask you to.
    Michael Sasek
    osCMax Developer


    osCmax Installation Service
    - Have our professionals install osCmax on your server - same day service!
    osCmax 2.5 User Manual - the must have beginners guide to osCmax v2.5

    Stay Up To Date with everything osCMax:
    Free osCmax Newsletters - Security notices, New Releases, osCMax News
    osCmax on Twitter - Up to the minute info as it happens. Know it first.

    osCmax Documentation

  4. #4
    Member andyy15's Avatar
    Join Date
    Aug 2004
    Posts
    63
    Rep Power
    0


    Default

    Msasek,
    The reason why I did not post the answer to his question is I have to look into his files therefore he needs to provide me with more information as I need to see the whole file to get the full picture. This is why I PM'ed him if he wants to provide me with more info it is up to him. If he does I will help him out. Just looking at the post I can't solve his problem and will need more time to look into it. If he want's me to spend more time looking into it I will. I am sorry if this is a problem and will try to keep answers posted in the community.
    Andrew
    Check out my homepage.. It\'s my jewelry website.

  5. #5
    Active Member
    Join Date
    Oct 2004
    Posts
    215
    Rep Power
    8


    Default

    I thought I posted enough code for it to be looked at, but I'll include everything I can think might relate to it....

    First, I followed Adding New Static Content Pages made by msasek.

    /faq.php
    Code:
    <?php
    /*
      $Id: faq.php,v 1.0 2004/11/24 01:16:23 hpdl Exp $
    
      osCommerce, Open Source E-Commerce Solutions
      http://www.oscommerce.com
    
      Copyright (c) 2003 osCommerce
    
      Released under the GNU General Public License
    */
    
      require('includes/application_top.php');
    
      require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_FAQ);
    
      $breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_FAQ));
    
      $content = CONTENT_FAQ;
      $content_template = TEMPLATENAME_STATIC;
    
      require(DIR_WS_TEMPLATES . TEMPLATENAME_MAIN_PAGE);
    
      require(DIR_WS_INCLUDES . 'application_bottom.php');
    ?>
    This is the important file!
    /includes/languages/english/faq.php
    Code:
    <?php
    define('NAVBAR_TITLE', 'Product FAQ');
    define('HEADING_TITLE', 'Product FAQ');
    
    define('TEXT_INFORMATION', '
      <a href="'.tep_href_link(FILENAME_FAQ,'faq_item=1','NONSSL').'">How do I attach a flag bracket in stucco?</a><br>
      <a href="'.tep_href_link(FILENAME_FAQ,'faq_item=2','NONSSL').'">Can I wash my flag?</a><br>
      <a href="'.tep_href_link(FILENAME_FAQ,'faq_item=3','NONSSL').'">Can I attach grommetted flags onto a sleeve style pole?</a><br>
    ');
    switch ($HTTP_GET_VARS['faq_item']) {
      case '1':
    define('SUB_HEADING_TITLE','How do I attach a flag bracket in stucco?');
    define('SUB_HEADING_TEXT','test');
      break;
      case '2':
    define('SUB_HEADING_TITLE','Can I wash my flag?');
    define('SUB_HEADING_TEXT','We recommend that you do not wash your flag, but if you must
    then we recommend gentle handwashing.');
      break;
      case '3':
      define('SUB_HEADING_TITLE','Can I attach grommetted flags onto a sleeve style pole?');
      define('SUB_HEADING_TEXT','test3');
      break;
      }
    ?>
    /includes/boxes/information.php
    Code:
    <?php
    /*
      $Id: information.php,v 1.6 2003/02/10 22:31:00 hpdl Exp $
      modified by paulm_nl 2003/12/23
      osCommerce, Open Source E-Commerce Solutions
      http://www.oscommerce.com
    
      Copyright (c) 2003 osCommerce
    
      Released under the GNU General Public License
    */
    
      $boxHeading = BOX_HEADING_INFORMATION;
      $corner_left = 'square';
      $corner_right = 'square';
      $box_base_name = 'information'; // for easy unique box template setup (added BTSv1.2)
    
      $box_id = $box_base_name . 'Box';  // for CSS styling paulm (editted BTSv1.2)
    
      $boxContent = '<a href="' . tep_href_link(FILENAME_SHIPPING) . '"> ' . BOX_INFORMATION_SHIPPING . '</a><br>' .
                    '<a href="' . tep_href_link(FILENAME_PRIVACY) . '"> ' . BOX_INFORMATION_PRIVACY . '</a><br>' .
                    '<a href="' . tep_href_link(FILENAME_CONDITIONS) . '"> ' . BOX_INFORMATION_CONDITIONS . '</a><br>' .
                    '<a href="' . tep_href_link(FILENAME_CONTACT_US) . '"> ' . BOX_INFORMATION_CONTACT . '</a><br>'.
                    '<a href="' . tep_href_link(FILENAME_CATALOG_PRODUCTS_WITH_IMAGES, '', 'NONSSL') . '">' . BOX_CATALOG_PRODUCTS_WITH_IMAGES . '</a><br>' .
                    '<a href="' . tep_href_link(FILENAME_FAQ) . '"> ' . BOX_INFORMATION_FAQ . '</a><br>'.
                    '<a href="' . tep_href_link(FILENAME_GV_FAQ, '', 'NONSSL') . '"> ' . BOX_INFORMATION_GV . '</a>';//ICW ORDER TOTAL CREDIT CLASS/GV
    
    
    // bof BTSv1.2
      if(file_exists(DIR_WS_BOX_TEMPLATES . $box_base_name . '.tpl.php')) {
      // if exists, load unique box template for this box from templates/boxes/
          require(DIR_WS_BOX_TEMPLATES . $box_base_name . '.tpl.php');
      }
      else {
      // load default box template: templates/boxes/box.tpl.php
          require(DIR_WS_BOX_TEMPLATES . TEMPLATENAME_BOX);
      }
    // eof BTSv1.2
    ?>
    Those should be the only files that make a difference here. I'm going to put alot more into the FAQ, but I stripped it down to a minimum so that I could debug it. This code seems so simple, yet just isn't functioning properly. If anyone can just look through this code and find my error, I would be very grateful.

    Thanks

    Greg

  6. #6
    Active Member
    Join Date
    Oct 2004
    Posts
    215
    Rep Power
    8


    Default

    just a friendly bump...maybe someone knows how to fix this.

  7. #7
    Member
    Join Date
    Nov 2004
    Posts
    89
    Rep Power
    0

  8. #8
    Active Member
    Join Date
    Oct 2004
    Posts
    215
    Rep Power
    8


    Default

    Quote Originally Posted by vinces
    Alright, I tried installing it, but when I access that FAQ it kinda breaks up my template. I'm still learning PHP so I probaly didn't take into account the BTS system. Any chance you could help me out in installing it properly. I followed the directions to a T, so basically I just need to know what to do differently.

    On a sidenote....I started up a new section in the Wiki for tutorials on how to install various contributions. If we solve this I'll post all the changes in the wiki for this contrib.

    THANKS!

    The implimentation can be found at
    http://www.upupandawaykites.com/catalogmax/faq.php
    I removed the link to it in my information infobox just so my testers for the site won't get all on me for it.

Similar Threads

  1. This might be a stupid question, but...
    By akisok2 in forum osCommerce 2.2 Discussion
    Replies: 3
    Last Post: 05-05-2006, 10:27 AM
  2. Stupid question on OSC Version
    By Melissa in forum osCmax v1.7 Discussion
    Replies: 1
    Last Post: 12-26-2004, 02:32 PM
  3. Maybe Stupid Question? Where to Download 1.5?
    By ryanmhubbard in forum osCmax v1.7 Discussion
    Replies: 2
    Last Post: 09-05-2004, 05:16 AM
  4. A stupid questio, sorry but i don't find...
    By Anonymous in forum osCMax v1.7 Installation
    Replies: 1
    Last Post: 03-29-2004, 02:46 AM
  5. I must be stupid!
    By Kristine in forum osCMax v1.7 Installation
    Replies: 5
    Last Post: 03-13-2004, 08:44 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
  •