21
Draven
Re: {$xoops_imageurl} Problem
  • 2005/1/24 4:32

  • Draven

  • Module Developer

  • Posts: 337

  • Since: 2003/5/28


Quote:

mixmaster wrote:
Yes, it produces the correct file name.

The main difference I want to reiterate is this:

The following works (whereas the one I provided before doesn't):

    <{foreach 
item=block from=$xoops_ccblocks}>
    <
div style="padding: 5px;">
    <
div class="blockTitle"
  <
table width="100%" border="0" cellspacing="0" cellpadding="0">
    <
tr
      <
td width="101" height="37" style="background-image: url([color=0000FF]http://www.mysite.com/xoops/themes/mytheme/Big_Story_image1.gif[/color]); background-repeat: no-repeat;">&nbsp;td>
      <
td height="37" style="background-image: url([color=0000FF]http://www.mysite.com/xoops/themes/mytheme/Big_Story_image2.gif[/color]); background-repeat: repeat-x;">&nbsp;td>
      <
td width="114" height="37" style="background-image: url([color=0000FF]http://www.mysite.com/xoops/themes/mytheme/Big_Story_image3.gif[/color]); background-repeat: no-repeat;">&nbsp;td>
    tr>
  table>
div>
<
div class="blockContent"><{$block.content}>div>
    div>
    <{/foreach}>
    


ok, what URL is produced by smarty using the following code?

<{$xoops_imageurl}><{$block.title|replace:" ":"_"}>_image3.gif

22
mixmaster
Re: {$xoops_imageurl} Problem
  • 2005/1/24 4:42

  • mixmaster

  • Just popping in

  • Posts: 28

  • Since: 2005/1/21


It will produce (for every Block Title) a URL like this:

http://www.mysite.com/xoops/themes/mytheme/Block_Title_image#.gif

In my example, I used the Block Title "Big Story". I'm using three images for that block. So for each it will produce

http://www.mysite.com/xoops/themes/mytheme/Big_Story_image1.gif
http://www.mysite.com/xoops/themes/mytheme/Big_Story_image2.gif
http://www.mysite.com/xoops/themes/mytheme/Big_Story_image3.gif

so, <{$xoops_imageurl}><{$block.title|replace:" ":"_"}>_image3.gif produces http://www.mysite.com/xoops/themes/mytheme/Big_Story_image3.gif

23
LazyBadger
Re: {$xoops_imageurl} Problem

Quote:

mixmaster wrote:
What I'm saying is that you can't even use <{$xoops_imageurl}> inside background-image: url( );, meaning this

background-image: url(<{$xoops_imageurl}>images/image.gif);
won't work. That's the whole problem!

My God, why you don't want use

background-image: url(images/image.gif);

it works, it always works
. dir is folder with this processed css-file (theme folder most time)

24
mixmaster
Re: {$xoops_imageurl} Problem
  • 2005/1/24 5:19

  • mixmaster

  • Just popping in

  • Posts: 28

  • Since: 2005/1/21


If you were following the previous posts you would understand why. Yes, what you're suggesting works (if I were using the same images(s) for all block titles) but not in this case where each block title has its own associated image files. I think the only person who's on track is Draven.

25
Draven
Re: {$xoops_imageurl} Problem
  • 2005/1/24 17:28

  • Draven

  • Module Developer

  • Posts: 337

  • Since: 2003/5/28


Ok, so the URL produced indeed leads to the image then? Strange?!?! To be honest, unless I can actually get into the page and fiddle with it, it will be difficult to determine what the problem is exactly.

If you are willing, send me your info through PM. I'll login and review the files and see if I can fix the problem for you.

Login

Who's Online

257 user(s) are online (213 user(s) are browsing Support Forums)


Members: 0


Guests: 257


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits