Results 1 to 10 of 38

Hybrid View

  1. #1
    Join Date
    May 2006
    Location
    Queensland, Australia
    Posts
    248
    Plugin Contributions
    0

    Default Re: Facebook/Twitter Module

    I was just looking at the site again and notice that it is importing the information from "Information" into the box for Social Networking..

    WTF ?

  2. #2
    Join Date
    May 2006
    Location
    Queensland, Australia
    Posts
    248
    Plugin Contributions
    0

    Default Re: Facebook/Twitter Module

    Okay, i just noticed that my coding seems to cause a bug where it copies the information from "Information" and puts it into the box listed Social....



    So reverting back to blank sidebox;

    tpl_social.php

    Code:
    <?php
    /**
     * Product Type - allows you to show a sidebox that will list Product Types.
     *
     * @package templateSystem
     * @copyright 2007 Kuroi Web Design
      * @copyright Portions Copyright 2003-2007 Zen Cart Development Team
     * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
     * @version $Id: product_type.php 2007-05-26 kuroi $
     */
    
      $content = '';
      $content .= '<div id="' . str_replace('_', '-', $box_id . 'Content') . '" class="sideBoxContent">';
    
      // Replace the text and HTML tags between the apostophes on lines 19 and 20.
      // Use as many or as few lines using this model as you need for your custom content.
      // If you have a multilingual site define your text in the languages/YOUR_LANGUAGE/extra_definitions/blank_sidebox_defines.php and include it as shown in line 19.
      // If your site is monolingual, you can put the text right here as shown on line 20 (and nobody will know!)
      $content .= '<p>' . TEXT_BLANK_SIDEBOX . '</p>';
      $content .= '<p>You can include text, links, images, HTML markup and even PHP code</p>';
    
      $content .= '</div>';
    ?>
    and

    social.php

    Code:
    <?php
    /**
     * blank sidebox - allows a blank sidebox to be added to your site
     *
     * @package templateSystem
     * @copyright 2007 Kuroi Web Design
      * @copyright Portions Copyright 2003-2007 Zen Cart Development Team
     * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
     * @version $Id: blank_sidebox.php 2007-05-26 kuroi $
     */
    
      // test if box should display
      $show_social = true;
    
      if ($show_social == true) {
          require($template->get_template_dir('tpl_social.php',DIR_WS_TEMPLATE, $current_page_base,'sideboxes'). '/tpl_social.php');
    	  $title =  BOX_HEADING_SOCIAL;
          $title_link = false;
          require($template->get_template_dir($column_box_default, DIR_WS_TEMPLATE, $current_page_base,'common') . '/' . $column_box_default);
     }
     ?>

  3. #3
    Join Date
    May 2006
    Location
    Queensland, Australia
    Posts
    248
    Plugin Contributions
    0

    Default Re: Facebook/Twitter Module

    Now i just need to change tpl_social.php to show the images... right ?

  4. #4
    Join Date
    May 2006
    Location
    Queensland, Australia
    Posts
    248
    Plugin Contributions
    0

    Default Re: Facebook/Twitter Module

    Bingo, i think i got it....


    Code:
    <?php
    /**
     * Product Type - allows you to show a sidebox that will list Product Types.
     *
     * @package templateSystem
     * @copyright 2007 Kuroi Web Design
      * @copyright Portions Copyright 2003-2007 Zen Cart Development Team
     * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
     * @version $Id: product_type.php 2007-05-26 kuroi $
     */
    
      $content = '';
      $content .= '<div id="' . str_replace('_', '-', $box_id . 'Content') . '" class="sideBoxContent centeredContent">';
      $content .= '<a href="http://www.facebook.com/pages/The-Esoteric-Emporium/145421388812693?sk=wall"><img src="images/fb.png" width="50" height="50" alt="Facebook" /></a>&nbsp;&nbsp;<a href="http://twitter.com/YOUR-TWITTER-HERE"><img src="images/tw.png" width="50" height="50" /></a>';
      $content .= '</div>';
    ?>

  5. #5
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Facebook/Twitter Module

    Glad it's working now! You'll notice that the functional difference between your original social.php module file and the final version is that the standard code layout calls the tpl_ file before the $column_box_default file, while you had $column_box_default before the content. I was remiss in not checking on that when I thought your coding was unusual.

  6. #6
    Join Date
    May 2006
    Location
    Queensland, Australia
    Posts
    248
    Plugin Contributions
    0

    Default Re: Facebook/Twitter Module

    Quote Originally Posted by gjh42 View Post
    Glad it's working now! You'll notice that the functional difference between your original social.php module file and the final version is that the standard code layout calls the tpl_ file before the $column_box_default file, while you had $column_box_default before the content. I was remiss in not checking on that when I thought your coding was unusual.
    Wasnt just that change either, it was also the coding in the TPL that was changed, however i will upload the mod to Zencart so everyone else can put it on their site if they wish.

  7. #7
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Facebook/Twitter Module

    The require for the tpl_ file has the same effect as putting the code right in the module file - it's the sequence that makes a real difference. You now have code executing in the right sequence.

    It will be good to have a packaged set of the right files for that... be sure to look at the mod submission guidelines when putting it together.
    Last edited by gjh42; 19 Apr 2011 at 02:36 AM.

 

 

Similar Threads

  1. v151 Facebook, Twitter, Youtube
    By missnura_com in forum General Questions
    Replies: 1
    Last Post: 14 Jan 2013, 06:56 AM
  2. v150 Facebook google plus twitter
    By oitem in forum General Questions
    Replies: 0
    Last Post: 4 Jun 2012, 06:56 PM
  3. facebook and twitter buttons
    By alfonso99 in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 19 Jul 2011, 02:23 PM
  4. facebook and twitter
    By deemurphy in forum General Questions
    Replies: 2
    Last Post: 9 Apr 2010, 09:20 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