Dynadot Aftermarket: discover domain gems worth investing in. Visit our aftermarket.

[Resolved] Smarty questions

Namecheap AuctionsNamecheap Auctions
SpaceshipSpaceship
Spacemail by SpaceshipSpacemail by Spaceship
Watch

tansks

VIP Member
Impact
36
Smarty questions

Hello,

Question 1:
I just download a free css template from somewhere else, but I an having problem to code it in to smarty. My problem is all div's background image that specify url in css style file not loading.

example:

in css style file
PHP:
#header 
{
width: 922px;
height: 284px;
background-image: url(images/bg_header.jpg);
background-repeat: no-repeat;
}

in tpl file
PHP:
<div id="header"></div>

Anyone know how can I fix this problem. Thanks in advance.

Question 2:

Alternative ad does not load in FireFox 2, but work for IE7.

In tpl file have the following statement
PHP:
{include file="banner.tpl"}

In banner.tpl contain ad script, which is javascript and I have alternative ad url that also contain javascript (let say alt.htm).

Firstly, I use literal tag for banner.tpl - no problem for this.
Secondly, if I use literal tag in alt.htm then it will show the TEXT (in this case {literal}) in FireFox, but if I remove the tag then in FireFox show blank space (ad unit show in IE7).

Hope anyone can understand my questions. Thanks in advance.
 
0
Close
The views expressed on this page by users and staff are their own, not those of NamePros.
GoDaddyGoDaddy
i think theres something with having single quotes around background-image, so make it:

background-image('images/bg_header.jpg');

and see if it works.


i don't know much about smarty but you could see if your javascript has errors - sometimes IE and FF parse it differently.
 
1
Close
nasaboy007 said:
i think theres something with having single quotes around background-image, so make it:

background-image('images/bg_header.jpg');

and see if it works.


i don't know much about smarty but you could see if your javascript has errors - sometimes IE and FF parse it differently.

Thanks for you response, but the template work without any problem before I split into smarty. Anyway, rep added.

Anyone can help? Thanks.
 
0
Close
Detected the problem and fixed. Just an update for those may also having the same problem.

Question 1:
Just because I place in wrong folder :p

Question 2:
To solve the problem just need to include full html tag in alternative file like below.

PHP:
<html>
<head>
<title></title>
</head>
<body>
javascript here
</body>
</html>
 
0
Close
lol glad you figured that stuff out. too bad we really couldn't have answered that first question at all. XD
 
0
Close
DomainEasy: flexible LTO options. Close more domain deals with financing.

We're social

Escrow.com
Spaceship
Domain Recover
CryptoExchange.com

NamePros updates

Switch between accounts
You can now stay logged in to more than one NamePros account in the same browser. Click your avatar, then "Accounts in this browser", to...
AIVikings
Catchy
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back