Results 1 to 10 of 10
  1. #1
    Join Date
    Apr 2010
    Location
    County Down, Northern Ireland
    Posts
    302
    Plugin Contributions
    0

    Default code for WebRing?

    Re www.irishshopper.com WE have just joinded a webring and put the code for this on our links page but now been told this must go in our homepage. We could include this at the end of the text in the Admin Panel Editor but want to put it instead of above the products to the very bottom of the page BELOW the products and just above the footer.

    How can this be achieved ?

  2. #2
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,755
    Plugin Contributions
    9

    Default Re: code for WebRing

    For only home page or all pages?
    Can add a named div to a custom copy of tpl_main_page.php and add code

  3. #3
    Join Date
    Apr 2010
    Location
    County Down, Northern Ireland
    Posts
    302
    Plugin Contributions
    0

    Default Re: code for WebRing?

    Just for homepage. I gave wrong ZenCart URL in first post, (we have 6). It is http://www.RMSTitanic100.com and the code is already working at bottom of the Links Page there but needs put in Home Page. It would go at the very bottom ie BELOW the section NEW PRODUCTS FOR OCTOBER.

  4. #4
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,755
    Plugin Contributions
    9

    Default Re: code for WebRing?

    To do only home page you will need one or more custom files
    Have a look at a copy of tpl_main_page.php and the comments
    You will want a case/if for
    Code:
      if ($this_is_home_page) {
         $do something;
      }
    page BELOW the products and just above the footer.
    Towards the bottom of the file but before the footer call create a named div with your code

  5. #5
    Join Date
    Oct 2006
    Location
    Alberta, Canada
    Posts
    4,571
    Plugin Contributions
    1

    Default Re: code for WebRing?

    open:

    includes/templates/YOUR_TEMPLATE/common/tpl_main_page.php


    look for this code:

    <?php
    /**
    * prepares and displays center column
    *
    */
    require($body_code); ?>

    <?php
    if (SHOW_BANNERS_GROUP_SET4 != '' && $banner = zen_banner_exists('dynamic', SHOW_BANNERS_GROUP_SET4)) {
    if ($banner->RecordCount() > 0) {
    ?>
    <div id="bannerFour" class="banners"><?php echo zen_display_banner('static', $banner); ?></div>
    <?php
    }
    }
    ?></td>



    change the last line of the above to look like:

    ?>

    <?php if ($this_is_home_page) { ?>
    <div id="webringcode"> ... add code here ... </div>
    <?php } ?>

    </td>

  6. #6
    Join Date
    Apr 2010
    Location
    County Down, Northern Ireland
    Posts
    302
    Plugin Contributions
    0

    Default Re: code for WebRing?

    Many thanks for this. Have tried this but just get a blank page.

    See below.

    VERY MANY THANKS.

    * prepares and displays center column

    *

    */

    require($body_code); ?>
    <?php

    if (SHOW_BANNERS_GROUP_SET4 != '' && $banner = zen_banner_exists('dynamic', SHOW_BANNERS_GROUP_SET4)) {

    if ($banner->RecordCount() > 0) {

    ?>
    </div>

    ?>

    <?php if ($this_is_home_page) { ?>
    <div id="webringcode"><script language=javascript type="text/javascript" src="http://ss.webring.com/navbar?f=j;y=rmstitanic100;u=defurl1">
    </script>
    <center>Powered by <a href="http://dir.webring.com/rw" target=_top>WebRing</a>.</center>

    <!--optional-->
    <noscript><center><table bgcolor=gray cellspacing=0 border=2><tr>
    <td><table cellpadding=2 cellspacing=0 border=0><tr><td align=center>
    <font face=arial size=-1>This site is a member of WebRing.
    <br>To browse visit <a href="http://ss.webring.com/navbar?f=l;y=rmstitanic100;u=defurl1">
    Here</a>.</font></td></tr></table></td></tr></table>
    </center></noscript></div>
    <?php } ?>

    </td>





    </tr>
    </table></td>
    <?php

    if (COLUMN_RIGHT_STATUS == 0 or (CUSTOMERS_APPROVAL == '1' and $_SESSION['customer_id'] == '')) {

    // global disable of column_right

    $flag_disable_right = true;

    }

    if (!isset($flag_disable_right) || !$flag_disable_right) {

    ?>
    <td width="146" valign="top" bgcolor="#BBB39C"><table width="100%" border="0" cellspacing="0" cellpadding="0">
    <tr>
    <td bgcolor="#BBB39C"><div align="center">
    <?php require(DIR_WS_TEMPLATE .('modules/column_right.php')); ?>
    </div></td>
    </tr>
    </table></td>
    <?php

    }

    ?>
    </tr>
    </table>
    <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
    <tr>
    <td width="58%" bgcolor="#0B162A" class="txt_content06"><a href="index.php?main_page=shippinginfo"><?php echo BOX_INFORMATION_SHIPPING ?></a> | <a href="index.php?main_page=privacy"><?php echo BOX_INFORMATION_PRIVACY ?></a> | <a href="index.php?main_page=conditions"><?php echo BOX_INFORMATION_CONDITIONS ?></a> | <a href="index.php?main_page=contact_us"><?php echo BOX_INFORMATION_CONTACT ?></a> | <a href="index.php?main_page=specials"><?php echo BOX_HEADING_SPECIALS ?></a> | <a href="index.php?main_page=reviews"><?php echo BOX_HEADING_REVIEWS ?></a> | <a href="index.php?main_page=logoff">Logoff</a></td>
    <td width="20%" bgcolor="#0B162A"><div align="right" class="txt_content06">
    <div align="center"><a href="http://www.##########################################" target="_blank"><img src="<? echo DIR_WS_TEMPLATE; ?>images/visa.jpg" alt="Logo" border="0" /></a></div>
    </div></td>
    <td width="22%" bgcolor="#0B162A" class="txt_content06"><div align="right">
    <div align="right"><a href="http://www.##########################################" target="_blank">www.##########################################</a></div>
    </div></td>
    </tr>
    </table>
    </body>

  7. #7
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,755
    Plugin Contributions
    9

    Default Re: code for WebRing?

    Use the code tag...
    I do not see a php open at the top
    Code:
    <?php

  8. #8
    Join Date
    Apr 2010
    Location
    County Down, Northern Ireland
    Posts
    302
    Plugin Contributions
    0

    Default Re: code for WebRing?

    Thank you for message. That was only part of the file. Full file below.

    <?php
    /**
    * Page Template
    *
    * Loaded automatically by index.php?main_page=create_account.<br />
    * Displays Create Account form.
    *
    * @package templateSystem
    * @copyright Copyright 2003-2006 Zen Cart Development Team
    * @copyright Portions Copyright 2003 osCommerce
    * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
    * @version $Id: tpl_modules_create_account.php 4822 2006-10-23 11:11:36Z drbyte $
    */
    ?>

    <?php if ($messageStack->size('create_account') > 0) echo $messageStack->output('create_account'); ?>
    <div class="alert forward"><?php echo FORM_REQUIRED_INFORMATION; ?></div>
    <br class="clearBoth" />

    <?php
    if (DISPLAY_PRIVACY_CONDITIONS == 'true') {
    ?>
    <fieldset>
    <legend><?php echo TABLE_HEADING_PRIVACY_CONDITIONS; ?></legend>
    <div class="information"><?php echo TEXT_PRIVACY_CONDITIONS_DESCRIPTION;?></div>
    <?php echo zen_draw_checkbox_field('privacy_conditions', '1', false, 'id="privacy"');?>
    <label class="checkboxLabel" for="privacy"><?php echo TEXT_PRIVACY_CONDITIONS_CONFIRM;?></label>
    </fieldset>
    <?php
    }
    ?>

    <?php
    if (ACCOUNT_COMPANY == 'true') {
    ?>
    <fieldset>
    <legend><?php echo CATEGORY_COMPANY; ?></legend>
    <label class="inputLabel" for="company"><?php echo ENTRY_COMPANY; ?></label>
    <?php echo zen_draw_input_field('company', '', zen_set_field_length(TABLE_ADDRESS_BOOK, 'entry_company', '40') . ' id="company"') . (zen_not_null(ENTRY_COMPANY_TEXT) ? '<span class="alert">' . ENTRY_COMPANY_TEXT . '</span>': ''); ?>
    </fieldset>
    <?php
    }
    ?>

    <fieldset>
    <legend><?php echo TABLE_HEADING_ADDRESS_DETAILS; ?></legend>
    <?php
    if (ACCOUNT_GENDER == 'true') {
    ?>
    <?php echo zen_draw_radio_field('gender', 'm', '', 'id="gender-male"') . '<label class="radioButtonLabel" for="gender-male">' . MALE . '</label>' . zen_draw_radio_field('gender', 'f', '', 'id="gender-female"') . '<label class="radioButtonLabel" for="gender-female">' . FEMALE . '</label>' . (zen_not_null(ENTRY_GENDER_TEXT) ? '<span class="alert">' . ENTRY_GENDER_TEXT . '</span>': ''); ?>
    <br class="clearBoth" />
    <?php
    }
    ?>

    <label class="inputLabel" for="firstname"><?php echo ENTRY_FIRST_NAME; ?></label>
    <?php echo zen_draw_input_field('firstname', '', zen_set_field_length(TABLE_CUSTOMERS, 'customers_firstname', '40') . ' id="firstname"') . (zen_not_null(ENTRY_FIRST_NAME_TEXT) ? '<span class="alert">' . ENTRY_FIRST_NAME_TEXT . '</span>': ''); ?>
    <br class="clearBoth" />

    <label class="inputLabel" for="lastname"><?php echo ENTRY_LAST_NAME; ?></label>
    <?php echo zen_draw_input_field('lastname', '', zen_set_field_length(TABLE_CUSTOMERS, 'customers_lastname', '40') . ' id="lastname"') . (zen_not_null(ENTRY_LAST_NAME_TEXT) ? '<span class="alert">' . ENTRY_LAST_NAME_TEXT . '</span>': ''); ?>
    <br class="clearBoth" />

    <label class="inputLabel" for="street-address"><?php echo ENTRY_STREET_ADDRESS; ?></label>
    <?php echo zen_draw_input_field('street_address', '', zen_set_field_length(TABLE_ADDRESS_BOOK, 'entry_street_address', '40') . ' id="street-address"') . (zen_not_null(ENTRY_STREET_ADDRESS_TEXT) ? '<span class="alert">' . ENTRY_STREET_ADDRESS_TEXT . '</span>': ''); ?>
    <br class="clearBoth" />

    <?php
    if (ACCOUNT_SUBURB == 'true') {
    ?>
    <label class="inputLabel" for="suburb"><?php echo ENTRY_SUBURB; ?></label>
    <?php echo zen_draw_input_field('suburb', '', zen_set_field_length(TABLE_ADDRESS_BOOK, 'entry_suburb', '40') . ' id="suburb"') . (zen_not_null(ENTRY_SUBURB_TEXT) ? '<span class="alert">' . ENTRY_SUBURB_TEXT . '</span>': ''); ?>
    <br class="clearBoth" />
    <?php
    }
    ?>

    <label class="inputLabel" for="city"><?php echo ENTRY_CITY; ?></label>
    <?php echo zen_draw_input_field('city', '', zen_set_field_length(TABLE_ADDRESS_BOOK, 'entry_city', '40') . ' id="city"') . (zen_not_null(ENTRY_CITY_TEXT) ? '<span class="alert">' . ENTRY_CITY_TEXT . '</span>': ''); ?>
    <br class="clearBoth" />

    <?php
    if (ACCOUNT_STATE == 'true') {
    if ($flag_show_pulldown_states == true) {
    ?>
    <label class="inputLabel" for="stateZone" id="zoneLabel"><?php echo ENTRY_STATE; ?></label>
    <?php
    echo zen_draw_pull_down_menu('zone_id', zen_prepare_country_zones_pull_down($selected_country), $zone_id, 'id="stateZone"');
    if (zen_not_null(ENTRY_STATE_TEXT)) echo '&nbsp;<span class="alert">' . ENTRY_STATE_TEXT . '</span>';
    }
    ?>

    <?php if ($flag_show_pulldown_states == true) { ?>
    <br class="clearBoth" id="stBreak" />
    <?php } ?>
    <label class="inputLabel" for="state" id="stateLabel"><?php echo $state_field_label; ?></label>
    <?php
    echo zen_draw_input_field('state', '', zen_set_field_length(TABLE_ADDRESS_BOOK, 'entry_state', '40') . ' id="state"');
    if (zen_not_null(ENTRY_STATE_TEXT)) echo '&nbsp;<span class="alert" id="stText">' . ENTRY_STATE_TEXT . '</span>';
    if ($flag_show_pulldown_states == false) {
    echo zen_draw_hidden_field('zone_id', $zone_name, ' ');
    }
    ?>
    <br class="clearBoth" />
    <?php
    }
    ?>

    <label class="inputLabel" for="postcode"><?php echo ENTRY_POST_CODE; ?></label>
    <?php echo zen_draw_input_field('postcode', '', zen_set_field_length(TABLE_ADDRESS_BOOK, 'entry_postcode', '40') . ' id="postcode"') . (zen_not_null(ENTRY_POST_CODE_TEXT) ? '<span class="alert">' . ENTRY_POST_CODE_TEXT . '</span>': ''); ?>
    <br class="clearBoth" />

    <label class="inputLabel" for="country"><?php echo ENTRY_COUNTRY; ?></label>
    <?php echo zen_get_country_list('zone_country_id', $selected_country, 'id="country" ' . ($flag_show_pulldown_states == true ? 'onchange="update_zone(this.form);"' : '')) . (zen_not_null(ENTRY_COUNTRY_TEXT) ? '<span class="alert">' . ENTRY_COUNTRY_TEXT . '</span>': ''); ?>
    <br class="clearBoth" />
    </fieldset>

    <fieldset>
    <legend><?php echo TABLE_HEADING_PHONE_FAX_DETAILS; ?></legend>
    <label class="inputLabel" for="telephone"><?php echo ENTRY_TELEPHONE_NUMBER; ?></label>
    <?php echo zen_draw_input_field('telephone', '', zen_set_field_length(TABLE_CUSTOMERS, 'customers_telephone', '40') . ' id="telephone"') . (zen_not_null(ENTRY_TELEPHONE_NUMBER_TEXT) ? '<span class="alert">' . ENTRY_TELEPHONE_NUMBER_TEXT . '</span>': ''); ?>

    <?php
    if (ACCOUNT_FAX_NUMBER == 'true') {
    ?>
    <br class="clearBoth" />
    <label class="inputLabel" for="fax"><?php echo ENTRY_FAX_NUMBER; ?></label>
    <?php echo zen_draw_input_field('fax', '', 'id="fax"') . (zen_not_null(ENTRY_FAX_NUMBER_TEXT) ? '<span class="alert">' . ENTRY_FAX_NUMBER_TEXT . '</span>': ''); ?>
    <?php
    }
    ?>
    </fieldset>

    <?php
    if (ACCOUNT_DOB == 'true') {
    ?>
    <fieldset>
    <legend><?php echo TABLE_HEADING_DATE_OF_BIRTH; ?></legend>
    <label class="inputLabel" for="dob"><?php echo ENTRY_DATE_OF_BIRTH; ?></label>
    <?php echo zen_draw_input_field('dob','', 'id="dob"') . (zen_not_null(ENTRY_DATE_OF_BIRTH_TEXT) ? '<span class="alert">' . ENTRY_DATE_OF_BIRTH_TEXT . '</span>': ''); ?>
    <br class="clearBoth" />
    </fieldset>
    <?php
    }
    ?>

    <fieldset>
    <legend><?php echo TABLE_HEADING_LOGIN_DETAILS; ?></legend>
    <label class="inputLabel" for="email-address"><?php echo ENTRY_EMAIL_ADDRESS; ?></label>
    <?php echo zen_draw_input_field('email_address', '', zen_set_field_length(TABLE_CUSTOMERS, 'customers_email_address', '40') . ' id="email-address"') . (zen_not_null(ENTRY_EMAIL_ADDRESS_TEXT) ? '<span class="alert">' . ENTRY_EMAIL_ADDRESS_TEXT . '</span>': ''); ?>
    <br class="clearBoth" />

    <?php
    if ($phpBB->phpBB['installed'] == true) {
    ?>
    <label class="inputLabel" for="nickname"><?php echo ENTRY_NICK; ?></label>
    <?php echo zen_draw_input_field('nick','','id="nickname"') . (zen_not_null(ENTRY_NICK_TEXT) ? '<span class="alert">' . ENTRY_NICK_TEXT . '</span>': ''); ?>
    <br class="clearBoth" />
    <?php
    }
    ?>

    <label class="inputLabel" for="password-new"><?php echo ENTRY_PASSWORD; ?></label>
    <?php echo zen_draw_password_field('password', '', zen_set_field_length(TABLE_CUSTOMERS, 'customers_password', '20') . ' id="password-new"') . (zen_not_null(ENTRY_PASSWORD_TEXT) ? '<span class="alert">' . ENTRY_PASSWORD_TEXT . '</span>': ''); ?>
    <br class="clearBoth" />

    <label class="inputLabel" for="password-confirm"><?php echo ENTRY_PASSWORD_CONFIRMATION; ?></label>
    <?php echo zen_draw_password_field('confirmation', '', zen_set_field_length(TABLE_CUSTOMERS, 'customers_password', '20') . ' id="password-confirm"') . (zen_not_null(ENTRY_PASSWORD_CONFIRMATION_TEXT) ? '<span class="alert">' . ENTRY_PASSWORD_CONFIRMATION_TEXT . '</span>': ''); ?>
    <br class="clearBoth" />
    </fieldset>

    <fieldset>
    <legend><?php echo ENTRY_EMAIL_PREFERENCE; ?></legend>
    <?php
    if (ACCOUNT_NEWSLETTER_STATUS != 0) {
    ?>
    <?php echo zen_draw_checkbox_field('newsletter', '1', $newsletter, 'id="newsletter-checkbox"') . '<label class="checkboxLabel" for="newsletter-checkbox">' . ENTRY_NEWSLETTER . '</label>' . (zen_not_null(ENTRY_NEWSLETTER_TEXT) ? '<span class="alert">' . ENTRY_NEWSLETTER_TEXT . '</span>': ''); ?>
    <br class="clearBoth" />
    <?php } ?>

    <?php echo zen_draw_radio_field('email_format', 'HTML', ($email_format == 'HTML' ? true : false),'id="email-format-html"') . '<label class="radioButtonLabel" for="email-format-html">' . ENTRY_EMAIL_HTML_DISPLAY . '</label>' . zen_draw_radio_field('email_format', 'TEXT', ($email_format == 'TEXT' ? true : false), 'id="email-format-text"') . '<label class="radioButtonLabel" for="email-format-text">' . ENTRY_EMAIL_TEXT_DISPLAY . '</label>'; ?>
    <br class="clearBoth" />
    </fieldset>

    <?php
    if (CUSTOMERS_REFERRAL_STATUS == 2) {
    ?>
    <fieldset>

    <legend><?php echo TABLE_HEADING_REFERRAL_DETAILS; ?></legend>
    <label class="inputLabel" for="customers_referral"><?php echo ENTRY_CUSTOMERS_REFERRAL; ?></label>
    <?php echo zen_draw_input_field('customers_referral', '', zen_set_field_length(TABLE_CUSTOMERS, 'customers_referral', '15') . ' id="customers_referral"'); ?>
    <br class="clearBoth" />
    </fieldset>
    <?php } ?>

  9. #9
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,755
    Plugin Contributions
    9

    Default Re: code for WebRing?

    Have tried this but just get a blank page.
    https://www.zen-cart.com/tutorials/index.php?article=82

  10. #10
    Join Date
    Oct 2006
    Location
    Alberta, Canada
    Posts
    4,571
    Plugin Contributions
    1

    Default Re: code for WebRing?

    When having coding problems it is always advisable to fix errors; of which your site has a few.

    http://validator.w3.org/ will help you to find them.

 

 

Similar Threads

  1. Webring code at bottom on home page
    By irishshopper in forum Basic Configuration
    Replies: 2
    Last Post: 20 Oct 2010, 08:06 PM
  2. Substituting mod code for core code in v2.0
    By gjh42 in forum Contribution-Writing Guidelines
    Replies: 7
    Last Post: 9 Sep 2009, 11:48 PM

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