Support Forums


Go Back   68 Classifieds Forums > General > HTML, CSS, and Design Help

 
LinkBack Thread Tools Display Modes
Old 10-11-2006, 11:45 AM   #1
Junior Member
 
Join Date: Oct 2006
Location: Dallas, Texas
Posts: 16
Rep Power: 12
MSeven is on a distinguished road
Default Header Changer v3.0.15 - v3.1.5

In "http://www.68classifieds.com/forums/showthread.php?t=401",
Lhotch wrote:
Quote:
{foreach from=$breadcrumb item=section}
{/foreach}
{if $section==""}
<!-- // Header // -->
<div id="header"><a href="index.php"><img src="templates/{$smarty.const.MAIN_TEMPLATE}/images/header.gif" width="633" height="93" border="0" alt="{$title}" /></a></div>
<!-- // Header // -->
{else}
<!-- // Header // -->
<div id="header"><a href="index.php"><img src="templates/{$smarty.const.MAIN_TEMPLATE}/images/{$section}.gif" width="633" height="93" border="0" alt="{$title}" /></a></div>
<!-- // Header // -->
{/if}
{assign var=section value=""}
The above, is a modification to change the header, for each category page, in v3.0.15.
And it Worked, up to v3.1.4.

Problem: From v3.1.4, to 3.1.5, the breadcrumb var, in the functions.php file, changed so that this code no longer works.

Question: "How do I modify the code above to work with v3.1.5?"
(note: have tried {$section|strip}.gif, to no avail.)
__________________
M7
v.3.1.5 Developer

Last edited by MSeven; 10-11-2006 at 11:50 AM.
MSeven is offline   Reply With Quote
Old 10-11-2006, 12:39 PM   #2
68 Classifieds Staff
 
 
Join Date: Mar 2006
Location: Belmont, NC
Posts: 5,150
Rep Power: 119
Eric Barnes is a jewel in the rough
Default

How about changing it to this:
HTML Code:
{if $smarty.get.sec==""}
<!-- // Header // -->
 <div id="header"><a href="index.php"><img src="templates/{$smarty.const.MAIN_TEMPLATE}/images/header.gif" width="633" height="93" border="0" alt="{$title}" /></a></div>
        <!-- // Header // -->
{else}
<!-- // Header // -->
<div id="header"><a href="index.php"><img src="templates/{$smarty.const.MAIN_TEMPLATE}/images/{$section}.gif" width="633" height="93" border="0" alt="{$title}" /></a></div>
        <!-- // Header // -->
{/if}
__________________
Eric Barnes
68 Classifieds Developer
Please do not send me a private message asking for support. Instead use these open forums or our ticket system.

Customer Area | Issue Tracker | Documentation | 68C Mods | Submit a Ticket | 68 @ Twitter | My Modules
Eric Barnes is offline   Reply With Quote
Old 10-11-2006, 01:27 PM   #3
Junior Member
 
Join Date: Oct 2006
Location: Dallas, Texas
Posts: 16
Rep Power: 12
MSeven is on a distinguished road
Default

Quote:
Originally Posted by suzkaw View Post
How about changing it to this:
HTML Code:
{if $smarty.get.sec==""}
<!-- // Header // -->
 <div id="header"><a href="index.php"><img src="templates/{$smarty.const.MAIN_TEMPLATE}/images/header.gif" width="633" height="93" border="0" alt="{$title}" /></a></div>
        <!-- // Header // -->
{else}
<!-- // Header // -->
<div id="header"><a href="index.php"><img src="templates/{$smarty.const.MAIN_TEMPLATE}/images/{$section}.gif" width="633" height="93" border="0" alt="{$title}" /></a></div>
        <!-- // Header // -->
{/if}
Checking... seems to display the same "header.gif", no matter which page you are viewing. Will need to do some more testing but, just to make sure I'm on the right track, "how should I name the $section.gif, that it would then be calling?" The same as the category name? i.e. "cars.gif"?
__________________
M7
v.3.1.5 Developer
MSeven is offline   Reply With Quote
Old 10-11-2006, 02:19 PM   #4
Coder
 
Join Date: Mar 2006
Posts: 4,585
Rep Power: 111
Lhotch is just really niceLhotch is just really nice
Default

I beleive the problem is somewhere along the line the last peice of the breadcrumb was made into a link where in the past it wasnt. The original code from your post should still work you just need to strip the tags from the final variable, something like this...

PHP Code:
{foreach from=$breadcrumb item=section}
{/foreach}
{if 
$section==""}
<!-- 
// Header // -->
<div id="header"><a href="index.php"><img src="templates/{$smarty.const.MAIN_TEMPLATE}/images/header.gif" width="633" height="93" border="0" alt="{$title}" /></a></div>
<!-- 
// Header // -->
{else}
<!-- 
// Header // -->
<div id="header"><a href="index.php"><img src="templates/{$smarty.const.MAIN_TEMPLATE}/images/{$section|strip_tags}.gif" width="633" height="93" border="0" alt="{$title}" /></a></div>
<!-- 
// Header // -->
{/if}
{
assign var=section value=""
Notice where the $section variable is used for the name I use the built in smarty function to strip html tags which should leave you with just the name of the category and it should work again.
__________________
Larry.
Lhotch is offline   Reply With Quote
Old 10-11-2006, 03:11 PM   #5
Junior Member
 
Join Date: Oct 2006
Location: Dallas, Texas
Posts: 16
Rep Power: 12
MSeven is on a distinguished road
Default

Quote:
Originally Posted by Lhotch View Post
Notice where the $section variable is used for the name I use the built in smarty function to strip html tags which should leave you with just the name of the category and it should work again.
Acknowledge the notice. But nope, it didn't work. Will run some more test, but, just so you'll know exactly what the new "functions.php" file is doing to the $breadcrumb variable; it is changing it from this:
Quote:
(functions.php v3.0.15)

{$breadcrumb}
Array (2)
0 => <a href='category.php?type=34' class=...
1 => Camper_Trailers
to this:

Quote:
(functions.php v3.1.5)

{$breadcrumb}
Array (1)
0 => <a href='category.php?type=34' class=...
Hope that helps. If not, I can send you the the code change to the $breadcrumb var in the functions.php file v3.1.5, along with the $breadcrumb coding from v3.1.4, so that you can compare the two.


Otherwise I guess, I will need to know if the change to the $breadcrumb was for security reasons? or for function reasons? so that I will then know how much further I should persue this. Meaning; "if the $breadcrumb change is not Critical to anything, then I may keep the 3.1.4version, if I knew what I would be losing by not using the 3.1.5version.

(Naturally I would prefer to use the new version, but...)
__________________
M7
v.3.1.5 Developer
MSeven is offline   Reply With Quote
Old 10-11-2006, 03:31 PM   #6
68 Classifieds Staff
 
 
Join Date: Mar 2006
Location: Belmont, NC
Posts: 5,150
Rep Power: 119
Eric Barnes is a jewel in the rough
Default

This is going from memory but I believe the breadcrumb was changed so it would display the full category path and the last one is clickable where before the last one was just text.
__________________
Eric Barnes
68 Classifieds Developer
Please do not send me a private message asking for support. Instead use these open forums or our ticket system.

Customer Area | Issue Tracker | Documentation | 68C Mods | Submit a Ticket | 68 @ Twitter | My Modules
Eric Barnes is offline   Reply With Quote
Old 10-11-2006, 03:41 PM   #7
Coder
 
Join Date: Mar 2006
Posts: 4,585
Rep Power: 111
Lhotch is just really niceLhotch is just really nice
Default

Quote:
Originally Posted by MSeven View Post
Acknowledge the notice. But nope, it didn't work.
Ok, try this.....

PHP Code:
{foreach name=outer item=section from=$breadcrumb}
{foreach 
item=item from=$section}
{
assign var=section value=$item|strip_tags}
{/foreach}
{/foreach}
{if 
$section==""}
<!-- 
// Header // -->
<div id="header"><a href="index.php"><img src="templates/{$smarty.const.MAIN_TEMPLATE}/images/header.gif" width="633" height="93" border="0" alt="{$title}" /></a></div>
<!-- 
// Header // -->
{else}
<!-- 
// Header // -->
<div id="header"><a href="index.php"><img src="templates/{$smarty.const.MAIN_TEMPLATE}/images/{$item}.gif" width="633" height="93" border="0" alt="{$title}" /></a></div>
<!-- 
// Header // -->
{/if}
{
assign var=item value=""
__________________
Larry.
Lhotch is offline   Reply With Quote
Old 10-11-2006, 05:12 PM   #8
Junior Member
 
Join Date: Oct 2006
Location: Dallas, Texas
Posts: 16
Rep Power: 12
MSeven is on a distinguished road
Default

Quote:
Originally Posted by suzkaw View Post
This is going from memory but I believe the breadcrumb was changed so it would display the full category path and the last one is clickable where before the last one was just text.
Thanks Eric! And it appears that your memory has not failed you. As in deed when I compare old to new, the last one does become clickable. And I figure, this was done so that, if you were viewing a listing, you could return to, or go to, the category in which the listing, is listed. (trying desparately to keep this from becoming confusing)

But again, Thanks for the info as it will help. I Love your script by the way. I find it's structure and design to be "Firefox" quality. (Hoping that means as much to you as it does me.) Par Excellence!!!
__________________
M7
v.3.1.5 Developer
MSeven is offline   Reply With Quote
Old 10-11-2006, 05:29 PM   #9
68 Classifieds Staff
 
 
Join Date: Mar 2006
Location: Belmont, NC
Posts: 5,150
Rep Power: 119
Eric Barnes is a jewel in the rough
Default

Thanks for the compliments! It does mean a lot.
__________________
Eric Barnes
68 Classifieds Developer
Please do not send me a private message asking for support. Instead use these open forums or our ticket system.

Customer Area | Issue Tracker | Documentation | 68C Mods | Submit a Ticket | 68 @ Twitter | My Modules
Eric Barnes is offline   Reply With Quote
Old 10-11-2006, 05:48 PM   #10
Junior Member
 
Join Date: Oct 2006
Location: Dallas, Texas
Posts: 16
Rep Power: 12
MSeven is on a distinguished road
Default

Quote:
Originally Posted by Lhotch View Post
Ok, try this.....

PHP Code:
{foreach name=outer item=section from=$breadcrumb}
{foreach 
item=item from=$section}
{
assign var=section value=$item|strip_tags}
{/foreach}
{/foreach}
{if 
$section==""}
<!-- 
// Header // -->
<div id="header"><a href="index.php"><img src="templates/{$smarty.const.MAIN_TEMPLATE}/images/header.gif" width="633" height="93" border="0" alt="{$title}" /></a></div>
<!-- 
// Header // -->
{else}
<!-- 
// Header // -->
<div id="header"><a href="index.php"><img src="templates/{$smarty.const.MAIN_TEMPLATE}/images/{$item}.gif" width="633" height="93" border="0" alt="{$title}" /></a></div>
<!-- 
// Header // -->
{/if}
{
assign var=item value=""

Larry, will take me awhile to integrate and check this out and I didn't want to leave you hanging. The initial test was a dud. But will keep trying, and see if I can find out why. Will let you know ASAP, (probably tomorrow), but as I said, I didn't want to leave you hanging in the meantime.

p.s. Thanks Larry! I knew you would come to the rescue.
And if I may blow some smoke your way, ...I have read many of your post and find your explanations to be clear and concise, detailed yet specific. And you show a willingness to help that makes a person feel as though everything is gonna be ok. Glad your on the 68 team.
__________________
M7
v.3.1.5 Developer
MSeven is offline   Reply With Quote

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Header on Featured Ads lbrown13 HTML, CSS, and Design Help 10 05-23-2006 04:09 PM
Header V3.0.15 newone HTML, CSS, and Design Help 17 05-05-2006 09:44 AM
header change newone v3.0 Questions & Support 0 04-28-2006 11:25 PM


All times are GMT -4. The time now is 10:48 AM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0