Forums / Templates, Stylesheets, Page Layout / broken code in ezpage name

broken code in ezpage name

Views: 1,417

Results 1 to 13 of 13
1 Sep 2011, 12:09 AM
#1
contrive_it avatar

contrive_it

New Zenner

Join Date:
Jul 2011
Posts:
34
Plugin Contributions:
0

broken code in ezpage name

I'm just getting started on the rebirth of my site that includes the implementation of zen-cart as more of a showcase for my companies services.

The problem i'm having is the ezpages i'm making are broken. That is, when the page loads, I have a line of broken code at the top and i'm not sure where its coming from.

Now, i'll try to explain what I've done to my ezpage bar to see if that helps any: You'll notice I have used a button image for <a> and another for <a: hover> for my ezpage links. These images do not include the icon you see next to the link within. To display these icons, I included the code ```
<img src="images/imagename.png"> Page Name


The idea works for the existing category and contact us pages but when it loads an ezpage, I get the broken code on top of the page. Any ideas or suggestions are greatly appreciated.

<https://www.contriveitnow.com/Rebirth>

Thanks!
1 Sep 2011, 12:34 AM
#2
charmedbytina2 avatar

charmedbytina2

Totally Zenned

Join Date:
Mar 2007
Location:
AZ
Posts:
1,890
Plugin Contributions:
0

Re: broken code in ezpage name

I don't see any ezpages.

Tina

1 Sep 2011, 12:39 AM
#3
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: broken code in ezpage name

So you put the HTML for the icon into the ez-page name (not description). Wherever HTML is processed, that works, but the tab title (which I presume you mean by "top of the page") does not process HTML. It just displays the beginning of the page name, which is code.
You will have to come up with another way to get the button/icon images. Ezpages Improved Menus allows images to be substituted for text, but it does not handle different images for hover. The code that does the substitution could be modified to add instead of substitute.

Resources and Know Us are ez-pages.

1 Sep 2011, 12:40 AM
#4
contrive_it avatar

contrive_it

New Zenner

Join Date:
Jul 2011
Posts:
34
Plugin Contributions:
0

Re: broken code in ezpage name

charmedbytina2:

I don't see any ezpages.

Tina

Hi Tina,

The custom made ezpages are resources and know us. When you click on either link, look at the top of the page and you will see the broken code. The menu bar you see below the nav bar is actually my customized css version of the ezpages top div.

1 Sep 2011, 12:51 AM
#5
contrive_it avatar

contrive_it

New Zenner

Join Date:
Jul 2011
Posts:
34
Plugin Contributions:
0

Re: broken code in ezpage name

gjh42:

So you put the HTML for the icon into the ez-page name (not description). Wherever HTML is processed, that works, but the tab title (which I presume you mean by "top of the page") does not process HTML. It just displays the beginning of the page name, which is code.
You will have to come up with another way to get the button/icon images. Ezpages Improved Menus allows images to be substituted for text, but it does not handle different images for hover. The code that does the substitution could be modified to add instead of substitute.

Resources and Know Us are ez-pages.

Yes, I meant page name, not description, sorry. I get what you're saying but the :hover images are in css, not in the page name.

The icons next the the page name are coded into the page name. This seems to work for internal/preexisting pages such as categories and contact us, but when it loads a custom ezpage, i get what seems to be metatag description at the top. Its hard to see because its black against the dark green background, but its there.

Thanks for checking on this for me.

1 Sep 2011, 1:55 AM
#6
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: broken code in ezpage name

OK, I see that now. It is probably the HTML <img> code in the title breaking the metatag output.

I know the :hover images are in the CSS; that's why the mod I suggested doesn't affect them. I have actually just finished modifying the function that does the substitution in that mod so that it can be set to add an icon instead of swapping it for the text. It would allow you to do exactly what you want, using CSS as you have it now, plus automatically adding the individual icon to the text in that menu only.

1 Sep 2011, 2:02 AM
#7
contrive_it avatar

contrive_it

New Zenner

Join Date:
Jul 2011
Posts:
34
Plugin Contributions:
0

Re: broken code in ezpage name

Yea... I see now after downloading the page and taking a closer look that its not handling the img tags properly...

<title><img src="images/re.png">Resources   : Contrive 
I.T., Greater New Orleans Computer Service And Consulting Concierge</title>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<meta name="keywords" content="Services Products New Orleans Metairie Kenner Harahan River Ridge Westwego Gretna Marrero  <img src=" images="" re.png"=""></head><body abprocessed="1" id="pageBody">Resources  " />
<meta name="description" content="Contrive I.T. : <img src=" images="" re.png"="">Resources   - Services Products New Orleans Metairie Kenner Harahan River Ridge Westwego Gretna Marrero " />

Id surly appreciate your contribution as this seems to be a novel idea that noone I have seen has tried before. It opens up a new venue of customization to the ezpagestop menu. Just seems funny that it works on the preexisting pages and not the new customized pages.

1 Sep 2011, 2:53 AM
#8
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: broken code in ezpage name

Since the problem only occurs when the actual ez-page is displaying, non-ez-pages (whether preexisting or new) will not encounter it. The title used in the ez-pages menu is not the source of the non-ez-pages' actual titles.

Ezpages Improved Menus has been out since last December, but not many have used it yet. I will post the modified function file and the change to be made in the tpl_ file so you can test it. If it works as expected, I will update the mod with the added functionality.

1 Sep 2011, 2:58 AM
#9
contrive_it avatar

contrive_it

New Zenner

Join Date:
Jul 2011
Posts:
34
Plugin Contributions:
0

Re: broken code in ezpage name

Awesome, Rock On Bro!! Ill be glad to beta test for you.

Thanks!

1 Sep 2011, 5:14 AM
#11
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: broken code in ezpage name

For some reason, the system won't let me post the file, so I will try posting it in bits. Replace the content of the mod file
/includes/functions/extra_functions/image_titles_functions.php

  • Ezpages Improved Menus by Glenn Herbert (gjh42) 2010-09-24 - copied from master version in Images for Titles mod

with the code below:```php
//test 20110831
//call with $sub=='1' for image added before text, or '2' for image after text

function text_image_sub($title, $file, $ext='', $sub=''){
$ext = $ext? $ext: IMAGE_TITLES_EXT;
$image = file_exists(DIR_WS_TEMPLATE . 'buttons/' . $_SESSION['language'] . '/' . $file . $ext)? zen_image(DIR_WS_TEMPLATE . 'buttons/' . $_SESSION['language'] . '/' . $file . $ext, $title): '';
if ($sub and $image){
$title = ($sub == '2')? $title . $image: $image . $title;
}else{
$title = $image? $image: $title;
}
return $title;
}

1 Sep 2011, 5:23 AM
#12
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: broken code in ezpage name

Okay, that worked... now in the mod file /includes/templates/your_template/templates/tpl_ezpages_bar_header.php replace this ```php

<?php for ($i=1, $n=sizeof($var_linksList); $i<=$n; $i++) { echo '<li><a href="' . $var_linksList[$i]['link'] . '"' . active_page_class($var_linksList[$i]['id'],$var_linksList[$i]['altURL']) . '>' . title_image_exists($var_linksList[$i]['name'], 'ezphead' . $var_linksList[$i]['id']) . '</a>' . (($i < $n and EZPAGES_SEPARATOR_HEADER)? '<span class="separator">' . EZPAGES_SEPARATOR_HEADER . '</span>' : '') . '</li>' . "\n"; ```with this```php <?php //insert define here for testing define ('EZPAGES_TOP_ICONS', '1');//or '2' or '' ?> <?php for ($i=1, $n=sizeof($var_linksList); $i<=$n; $i++) { echo '<li><a href="' . $var_linksList[$i]['link'] . '"' . active_page_class($var_linksList[$i]['id'],$var_linksList[$i]['altURL']) . '>' . text_image_sub($var_linksList[$i]['name'], 'ezphead' . $var_linksList[$i]['id'], '', EZPAGES_TOP_ICONS) . '</a>' . (($i < $n and EZPAGES_SEPARATOR_HEADER)? '<span class="separator">' . EZPAGES_SEPARATOR_HEADER . '</span>' : '') . '</li>' . "\n"; ```
1 Sep 2011, 7:04 AM
#13
contrive_it avatar

contrive_it

New Zenner

Join Date:
Jul 2011
Posts:
34
Plugin Contributions:
0

Re: broken code in ezpage name

Copy dat... chhht... ill take a swing at it tomorrow, ive been staring at the screen too much tonight, lolzz.. much appreciated bro!