Forums / General Questions / CEON URI with custom sidebox , embedded links not "working" but did

CEON URI with custom sidebox , embedded links not "working" but did

Views: 1,240

Results 1 to 15 of 15
13 Nov 2013, 2:34 PM
#1
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

CEON URI with custom sidebox , embedded links not "working" but did

This thread was started to move conversation away from the originating thread as the issue does not apply specifically to the originating thread.

kitten091182:

Hi, thanks for all your suggestions. I'm not saying that there is anything wrong with the CEON module, just that because CEON is rewriting the URL it has caused me a problem with that line of code. I am fully aware that my code needs to be changed to suit how CEON works, but as I do not know that much about coding I thought this would be the best place to ask as somebody may know how CEON is interpreting the statement so I may find a solution. There is nothing wrong with the module it is referring to either, the code was placed there by myself. I have an editable sidebox which shows on all my category and product pages. I placed a link in that sidebox to point to a different page of my knowledgebase depending on which category/product is being shown. That link is in this line of code: elseif ($_GET['cPath'] == '30') {
$content = '<div class="adlink"><a href="[\http://www.drgreens.co.uk/index.php?...qs\_id=5">Odour](http://www.drgreens.co.uk/index.php?main_page=faq_info&fcPath=4&faqs_id=5">Odour) Control</a></div>'; One of my pages is here: http://www.drgreens.co.uk/Grow-Media/Coco You can see the sidebox on the right (advice centre) All i'm asking for is some help as to what the correct line of code would be now that the URL is being re-written? I'm not criticizing the CEON module, i'm just trying to figure out how to overcome its feature when it comes to calling up pages that have had the URL re-written. I'm not a coder, i'm not even sure how the code I have got used to worked, all I know is it used to work and now it doesn't.

mc12345678:

Where you have the text: href= "http://www drgreens co uk/index.php?main_page=faq_info&fcPath=4&faqs_id=5" (periods replaced with spaces for website formatting) replace with:
"<?php zen_href_link('faq_info', '&fcPath=4&faqs_id=5', $get_type); ?>"

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...

13 Nov 2013, 2:53 PM
#2
kitten091182 avatar

kitten091182

Zen Follower

Join Date:
May 2007
Posts:
110
Plugin Contributions:
0

Re: CEON URI with custom sidebox , embedded links not "working" but did

Hi, thanks for starting a new thread for me, appreciate it. I'm not sure now I'm going about my problem in the right way though :blink: I tried what you suggested but it didn't work. I need it to work in the same way as the code in the main page common template works, ie. if it is a certain page, don't display certain sidebox for example, so my instance would be: if it is odour control page (cpath 30) display following link. Would it be the use of the GET statement that is causing issues because of the URL rewrite?

13 Nov 2013, 3:04 PM
#3
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: CEON URI with custom sidebox , embedded links not "working" but did

kitten091182:

Hi, thanks for starting a new thread for me, appreciate it. I'm not sure now I'm going about my problem in the right way though :blink: I tried what you suggested but it didn't work. I need it to work in the same way as the code in the main page common template works, ie. if it is a certain page, don't display certain sidebox for example, so my instance would be: if it is odour control page (cpath 30) display following link. Would it be the use of the GET statement that is causing issues because of the URL rewrite?

So as posted by others in the originating thread, I was told that I was wrong in stating that the GET statement was an issue. The data associated with the GET is supposed to still present as part of the page. When I had followed the link to the page provided, the link that appeared in the right side box went to the faq; however, it did not go to the address that you have described above.

When you say that this is not working, what is it that you are getting that do not expect, or not getting that you do expect?

Is anything that is within the if statement shown and it is just that the link doesn't go to where you expect? Or is there nothing that appears? (Have only seen a portion of the sidebox code, and not sure that a specific/direct link has been provided to the area of trouble.)

Is an error generated as a result of the code (that I provided the wrong statement(s))? If so, what is the error?

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...

13 Nov 2013, 3:10 PM
#4
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: CEON URI with custom sidebox , embedded links not "working" but did

kitten091182:

Hi, thanks for starting a new thread for me, appreciate it. I'm not sure now I'm going about my problem in the right way though :blink: I tried what you suggested but it didn't work. I need it to work in the same way as the code in the main page common template works, ie. if it is a certain page, don't display certain sidebox for example, so my instance would be: if it is odour control page (cpath 30) display following link. Would it be the use of the GET statement that is causing issues because of the URL rewrite?

Ohh, maybe you did exactly as I said... :) Oops. The only portion of the line that should be replaced is everything that is in quotes not the href= part... should read:
elseif ($_GET['cPath'] == '30') {
$content = '<div class="adlink"><a href="<?php zen_href_link('faq_info', '&fcPath=4&faqs_id=5', $get_type); ?>">Odour Control</a></div>';

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...

13 Nov 2013, 3:18 PM
#5
kitten091182 avatar

kitten091182

Zen Follower

Join Date:
May 2007
Posts:
110
Plugin Contributions:
0

Re: CEON URI with custom sidebox , embedded links not "working" but did

Hi, Tried the code you gave me and the sidebox doesn't show at all with that. The full code from the editable sidebox is: ```php

<?php /** * editable sidebox - allows a sidebox editable with the define pages editor 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-08-10 kuroi $ */ $content .= '<div id="' . str_replace('_', '-', $box_id . 'Content') . '" class="sideBoxContent">'; if ($_GET['cPath'] == '75') { $content = '<div class="adlink"><a href="http://www.drgreens.co.uk/index.php?main_page=faq_info&fcPath=3&faqs_id=3">Summer Growing</a></div><div class="adlink"><a href="http://www.drgreens.co.uk/index.php?main_page=faq_info&fcPath=4&faqs_id=5">Odour Control</a></div>'; } elseif ($_GET['cPath'] == '30') { $content = '<div class="adlink"><a href="http://www.drgreens.co.uk/index.php?main_page=faq_info&fcPath=4&faqs_id=5">Odour Control</a></div>';} else { $content = file_get_contents($define_sidebox); } // this is where the content that you have via the Admin is pulled in. $content .= '</div>'; ?>
13 Nov 2013, 3:37 PM
#6
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: CEON URI with custom sidebox , embedded links not "working" but did

kitten091182:

Hi, Tried the code you gave me and the sidebox doesn't show at all with that. The full code from the editable sidebox is: ```php

<?php /** * editable sidebox - allows a sidebox editable with the define pages editor 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-08-10 kuroi $ */ $content .= '<div id="' . str_replace('_', '-', $box_id . 'Content') . '" class="sideBoxContent">'; if ($_GET['cPath'] == '75') { $content = '<div class="adlink"><a href="http://www.drgreens.co.uk/index.php?main_page=faq_info&fcPath=3&faqs_id=3">Summer Growing</a></div><div class="adlink"><a href="http://www.drgreens.co.uk/index.php?main_page=faq_info&fcPath=4&faqs_id=5">Odour Control</a></div>'; } elseif ($_GET['cPath'] == '30') { $content = '<div class="adlink"><a href="http://www.drgreens.co.uk/index.php?main_page=faq_info&fcPath=4&faqs_id=5">Odour Control</a></div>';} else { $content = file_get_contents($define_sidebox); } // this is where the content that you have via the Admin is pulled in. $content .= '</div>'; ?>

```php
<?php
/**
 * editable sidebox - allows a sidebox editable with the define pages editor 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-08-10 kuroi $
 */
$content .= '<div id="' . str_replace('_', '-', $box_id . 'Content') . '" class="sideBoxContent">';
if ($_POST['cPath'] == '75') {  
  $content = '<div class="adlink"><a href="' . zen_href_link('faq_info', '&fcPath=3&faqs_id=3', $get_type) . '">Summer Growing</a></div><div class="adlink"><a href="' . zen_href_link('faq_info', '&fcPath=4&faqs_id=5', $get_type) . '">Odour Control</a></div>';
} elseif ($_POST['cPath'] == '30') {
  $content = '<div class="adlink"><a href="' . zen_href_link('faq_info', '&fcPath=4&faqs_id=5', $get_type) . '">Odour Control</a></div>';
} else {
   $content = file_get_contents($define_sidebox);
}
  // this is where the content that you have via the Admin is pulled in.
$content .= '</div>';
?>

So, yet again I had made an error in the format of the statement; however... As you have stated, the "default" content is being shown and not replaced by the information within the if statements.

Try changing it to the above and see if the POST works, as well as the now (finally) properly formatted links..

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...

13 Nov 2013, 3:57 PM
#7
kitten091182 avatar

kitten091182

Zen Follower

Join Date:
May 2007
Posts:
110
Plugin Contributions:
0

Re: CEON URI with custom sidebox , embedded links not "working" but did

It doesn't work :( It's still showing the default link and not changing. I was thinking of maybe trying a different way to get it to display, by adding extra description fields to the products/categories in admin, then having the editable sidebox call the information in that field? I'm thinking that may be easier as it doesn't involve hard coding each statement into the sidebox. On this page I've added it under more information:http://www.drgreens.co.uk/Environment/Odour-Control/Ona-Block-Odour-Control And it is called in the product_info template with this statement: <?php if($extra_field!='') { echo '<li>'.$extra_field . '</li>'; } ?> Can't figure out how to get the sidebox to call it though. Do you think that way would work better? Still not sure what is going on with the URL rewrite not allowing me to call it though. My mind is boggled :dontgetit

13 Nov 2013, 5:06 PM
#8
lhungil avatar

lhungil

Totally Zenned

Join Date:
Feb 2012
Location:
mostly harmless
Posts:
1,818
Plugin Contributions:
4

Re: CEON URI with custom sidebox , embedded links not "working" but did

kitten091182:

It doesn't work :(
Let's start by checking variables. Let's output inside the sidebox the content of some variables (so you can visible see what is populated and what is in the actual variables when browsing your site). You will not want to use / leave these code changes on a production site.

Add the stuff in red to the START of the file:

<?php
/**
 * editable sidebox - allows a sidebox editable with the define pages editor 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-08-10 kuroi $
 */
$content .= '<div id="' . str_replace('_', '-', $box_id . 'Content') . '" class="sideBoxContent">';
// Let's see what is currently in $current_page and $cPath
?><div>Current Page: <?php echo $current_page; ?></div>
<div>Current cPath: <?php echo $cPath; ?></div><?php
// Let's see what is currently populated in $_GET
?><pre><?php var_dump($_GET); ?></pre><?php
if ($_POST['cPath'] == '75') { 

The glass is not half full. The glass is not half empty. The glass is simply too big!
Where are the Zen Cart Debug Logs? Where are the HTTP 500 / Server Error Logs?
Zen Cart related projects maintained by lhûngîl : Plugin / Module Tracker

14 Nov 2013, 10:21 PM
#9
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: CEON URI with custom sidebox , embedded links not "working" but did

lhungil:

Let's start by checking variables. Let's output inside the sidebox the content of some variables (so you can visible see what is populated and what is in the actual variables when browsing your site). You will not want to use / leave these code changes on a production site.

Add the stuff in red to the START of the file:

<?php /** * editable sidebox - allows a sidebox editable with the define pages editor 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-08-10 kuroi $ */ $content .= '<div id="' . str_replace('_', '-', $box_id . 'Content') . '" class="sideBoxContent">'; // Let's see what is currently in $current_page and $cPath ?><div>Current Page: <?php echo $current_page; ?></div> <div>Current cPath: <?php echo $cPath; ?></div><?php // Let's see what is currently populated in $_GET ?><pre><?php var_dump($_GET); ?></pre><?php if ($_POST['cPath'] == '75') { ```

And by the way, I used Super Globals on my own site, and saw that the $_GET is populated with cPath even though I too have the CEON URI installed... So the method recommended by lhungil should reveal the information necessary to get through this. Although I had started this response yesterday, I hadn't finished it until now... Any luck with getting your sidebox to work?

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...

14 Nov 2013, 10:40 PM
#10
kitten091182 avatar

kitten091182

Zen Follower

Join Date:
May 2007
Posts:
110
Plugin Contributions:
0

Re: CEON URI with custom sidebox , embedded links not "working" but did

I havent been in the office today so ill take a look in the morning. Thanks for your help so far

15 Nov 2013, 11:24 AM
#11
kitten091182 avatar

kitten091182

Zen Follower

Join Date:
May 2007
Posts:
110
Plugin Contributions:
0

Re: CEON URI with custom sidebox , embedded links not "working" but did

Hi, I changed the script in the sidebox to what you said to, and the sidebox just didn't show up. Here is the code so I know I did it right:```php

<?php /** * editable sidebox - allows a sidebox editable with the define pages editor 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-08-10 kuroi $ */ $content .= '<div id="' . str_replace('_', '-', $box_id . 'Content') . '" class="sideBoxContent">'; // Let's see what is currently in $current_page and $cPath ?><div>Current Page: <?php echo $current_page; ?></div> <div>Current cPath: <?php echo $cPath; ?></div><?php // Let's see what is currently populated in $_GET ?><pre><?php var_dump($_GET); ?></pre><?php if ($_POST['cPath'] == '75') {$content = file_get_contents($define_sidebox); ?> ```
15 Nov 2013, 11:55 AM
#12
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: CEON URI with custom sidebox , embedded links not "working" but did

kitten091182:

Hi, I changed the script in the sidebox to what you said to, and the sidebox just didn't show up. Here is the code so I know I did it right:```php

<?php /** * editable sidebox - allows a sidebox editable with the define pages editor 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-08-10 kuroi $ */ $content .= '<div id="' . str_replace('_', '-', $box_id . 'Content') . '" class="sideBoxContent">'; // Let's see what is currently in $current_page and $cPath ?><div>Current Page: <?php echo $current_page; ?></div> <div>Current cPath: <?php echo $cPath; ?></div><?php // Let's see what is currently populated in $_GET ?><pre><?php var_dump($_GET); ?></pre><?php if ($_POST['cPath'] == '75') {$content = file_get_contents($define_sidebox); ?> ```

Missing an end curly parenthesis on this line:
if ($_POST['cPath'] == '75') {$content = file_get_contents($define_sidebox);

Which should be:
if ($_POST['cPath'] == '75') {$content = file_get_contents($define_sidebox);}

Further the example provided I don't think was to entirely replace your existing code, but to show the code to add to the beginning of your sidebox code... So if the above is the code in it's entirety that was not the intention of ihungil to test this "problem".

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...

15 Nov 2013, 2:06 PM
#13
kitten091182 avatar

kitten091182

Zen Follower

Join Date:
May 2007
Posts:
110
Plugin Contributions:
0

Re: CEON URI with custom sidebox , embedded links not "working" but did

Hi guys, thanks for all your help with this. I have come up with a solution which doesn't involve any GET or POST statements (yay :D) And it's half working, but I'm pretty sure I have done something wrong as I am not a coder and have just tried different things. I installed the mod 'product extra fields' to give each of my products an extra field on the product page with a link to the article in the advice centre it corresponds with. I have pinched some of the code from that mod and entered it into the 'editable sidebox' mod, to show the link in the sidebox instead of the product page. However, I am pretty sure the code shouldn't just be copied as the code is different between template files and sidebox files, so it is not behaving how I want. This is the code I entered into my includes/modules/sideboxes/editable_sidebox.php file: ```php

<?php /** * editable sidebox - allows an admin-editable 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-08-10 kuroi $ */ // test if box should display $show_editable_sidebox = true; if (in_array($current_page_base,explode(",",'faqs_all')) ) { $show_editable_sidebox = false; } if (in_array($current_page_base,explode(",",'faq_info')) ) { $show_editable_sidebox = false; } $define_sidebox = zen_get_file_directory(DIR_WS_LANGUAGES . $_SESSION['language'] . '/html_includes/', DEFINE_EDITABLE_SIDEBOX_NAME, 'false'); if ($show_editable_sidebox == true) { require($template->get_template_dir('tpl_editable_sidebox.php',DIR_WS_TEMPLATE, $current_page_base,'sideboxes'). '/tpl_editable_sidebox.php'); $title = BOX_HEADING_EDITABLE_SIDEBOX; $title_link = false; $sql = "select * from " . TABLE_PRODUCT_EXTRA_FIELDS . " where products_id = '" . (int)$_GET['products_id'] . "'"; $files = $db->Execute($sql); /* * extract info from queries for use as template-variables: */ $extra_field = $files->fields['extra_field']; $products_file_1_title = $files->fields['file_1_title']; $products_file_2_title = $files->fields['file_2_title']; $products_file_3_title = $files->fields['file_3_title']; $products_file_4_title = $files->fields['file_4_title']; $products_file_1 = $files->fields['file_1']; $products_file_2 = $files->fields['file_2']; $products_file_3 = $files->fields['file_3']; $products_file_4 = $files->fields['file_4']; $products_video = $files->fields['video']; $products_video_title = $files->fields['video_title']; if (!empty($products_video)) $products_video_link = '<a href="javascript:popupWindow(\''.zen_href_link(FILENAME_FLASH).'&id='.$_GET[products_id]. '\') ">'. $products_video_title . '</a>'; if (!empty($products_file_1_title)) $products_file_1_link = '<a href="' . "product_extra_files/" . $products_file_1 . '">'. $products_file_1_title . '</a>'; if (!empty($products_file_2_title)) $products_file_2_link = '<a href="' . "product_extra_files/" . $products_file_2 . '">'. $products_file_2_title . '</a>'; if (!empty($products_file_3_title)) $products_file_3_link = '<a href="' . "product_extra_files/" . $products_file_3 . '">'. $products_file_3_title . '</a>'; if (!empty($products_file_4_title)) $products_file_4_link = '<a href="' . "product_extra_files/" . $products_file_4 . '">'. $products_file_4_title . '</a>'; require($template->get_template_dir($column_box_default, DIR_WS_TEMPLATE, $current_page_base,'common') . '/' . $column_box_default); } ?>

It should be bolded and red. Then this is the code I entered into my includes/templates/my_template/sideboxes/tpl_editable_sidebox.php file: php

<?php /** * editable sidebox - allows a sidebox editable with the define pages editor 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-08-10 kuroi $ */ $content .= '<div id="' . str_replace('_', '-', $box_id . 'Content') . '" class="sideBoxContent">'; $content = file_get_contents($define_sidebox); // this is where the content that you have via the Admin is pulled in. $content .= '</div>'; ?>

'<div class="adlink"><?php if($extra_field!='') { echo '<li>'.$extra_field . '</li>'; } ?></div>'

15 Nov 2013, 2:11 PM
#14
kitten091182 avatar

kitten091182

Zen Follower

Join Date:
May 2007
Posts:
110
Plugin Contributions:
0

Re: CEON URI with custom sidebox , embedded links not "working" but did

I couldn't get the red and bold working :dontgetit In the first file, the added code is ```php
$sql = "select * from " . TABLE_PRODUCT_EXTRA_FIELDS . "
where products_id = '" . (int)$_GET['products_id'] . "'";
$files = $db->Execute($sql);
/*

  • extract info from queries for use as template-variables:
    */
    $extra_field = $files->fields['extra_field'];
    $products_file_1_title = $files->fields['file_1_title'];
    $products_file_2_title = $files->fields['file_2_title'];
    $products_file_3_title = $files->fields['file_3_title'];
    $products_file_4_title = $files->fields['file_4_title'];
    $products_file_1 = $files->fields['file_1'];
    $products_file_2 = $files->fields['file_2'];
    $products_file_3 = $files->fields['file_3'];
    $products_file_4 = $files->fields['file_4'];
    $products_video = $files->fields['video'];
    $products_video_title = $files->fields['video_title'];
    if (!empty($products_video)) $products_video_link = '<a href="javascript:popupWindow(\''.zen_href_link(FILENAME_FLASH).'&id='.$_GET[products_id]. '\') ">'. $products_video_title . '</a>';

if (!empty($products_file_1_title)) $products_file_1_link = '<a href="' . "product_extra_files/" . $products_file_1 . '">'. $products_file_1_title . '</a>';
if (!empty($products_file_2_title)) $products_file_2_link = '<a href="' . "product_extra_files/" . $products_file_2 . '">'. $products_file_2_title . '</a>';
if (!empty($products_file_3_title)) $products_file_3_link = '<a href="' . "product_extra_files/" . $products_file_3 . '">'. $products_file_3_title . '</a>';
if (!empty($products_file_4_title)) $products_file_4_link = '<a href="' . "product_extra_files/" . $products_file_4 . '">'. $products_file_4_title . '</a>';
In the second file, the added code is:php
'<div class="adlink"><?php if($extra_field!='') { echo '<li>'.$extra_field . '</li>'; } ?></div>'

15 Nov 2013, 2:57 PM
#15
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: CEON URI with custom sidebox , embedded links not "working" but did

kitten091182:

I couldn't get the red and bold working :dontgetit In the first file, the added code is ```php
$sql = "select * from " . TABLE_PRODUCT_EXTRA_FIELDS . "
where products_id = '" . (int)$_GET['products_id'] . "'";
$files = $db->Execute($sql);
/*

  • extract info from queries for use as template-variables:
    */
    $extra_field = $files->fields['extra_field'];
    $products_file_1_title = $files->fields['file_1_title'];
    $products_file_2_title = $files->fields['file_2_title'];
    $products_file_3_title = $files->fields['file_3_title'];
    $products_file_4_title = $files->fields['file_4_title'];
    $products_file_1 = $files->fields['file_1'];
    $products_file_2 = $files->fields['file_2'];
    $products_file_3 = $files->fields['file_3'];
    $products_file_4 = $files->fields['file_4'];
    $products_video = $files->fields['video'];
    $products_video_title = $files->fields['video_title'];
    if (!empty($products_video)) $products_video_link = '<a href="javascript:popupWindow(\''.zen_href_link(FILENAME_FLASH).'&id='.$_GET[products_id]. '\') ">'. $products_video_title . '</a>';

if (!empty($products_file_1_title)) $products_file_1_link = '<a href="' . "product_extra_files/" . $products_file_1 . '">'. $products_file_1_title . '</a>';
if (!empty($products_file_2_title)) $products_file_2_link = '<a href="' . "product_extra_files/" . $products_file_2 . '">'. $products_file_2_title . '</a>';
if (!empty($products_file_3_title)) $products_file_3_link = '<a href="' . "product_extra_files/" . $products_file_3 . '">'. $products_file_3_title . '</a>';
if (!empty($products_file_4_title)) $products_file_4_link = '<a href="' . "product_extra_files/" . $products_file_4 . '">'. $products_file_4_title . '</a>';
In the second file, the added code is:php
'<div class="adlink"><?php if($extra_field!='') { echo '<li>'.$extra_field . '</li>'; } ?></div>'


So I don't see any escape codes to make anything a different color.  That should either be in html or as ZC is going should be controlled in your css file(s).  To do that you would need some class identifiers similar to what you had before.  If those class identifiers are actually in your new field(s), then I think you need to convert those fields back to html code instead of the escaped version of those items, for example they are probably stored as < for < and > for > etc...  Forgive me I forget which of the functions do that, but I think that's what you would need to do if you have html in your new field(s).

As for the location, I would think that is controlled by your side box controller and the associated sort id.  If I'm wrong there as well, I'm sorry... :)

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...