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

  • mixmaster

  • Just popping in

  • Posts: 28

  • Since: 2005/1/21


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):
<!-- Start center-center blocks loop -->
    <{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}>
    <!-- 
End center-center blocks loop -->



12
mixmaster
Re: {$xoops_imageurl} Problem
  • 2005/1/24 4:10

  • mixmaster

  • Just popping in

  • Posts: 28

  • Since: 2005/1/21


Ok, here's the code for center theme block:
<!-- Start center-center blocks loop -->
    <{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]<{$xoops_imageurl}><{$block.title|replace:" ":"_"}>_image1.gif[/color]; background-repeat: [color=0000FF]no-repeat[/color];">&nbsp;</td>
      <
td height="37" style="background-image: url([color=0000FF]<{$xoops_imageurl}><{$block.title|replace:" ":"_"}>_image2.gif[/color]; background-repeat: [color=0000FF]repeat-x[/color];">&nbsp;</td>
      <
td width="114" height="37" style="background-image: url([color=0000FF]<{$xoops_imageurl}><{$block.title|replace:" ":"_"}>_image3.gif[/color]; background-repeat: [color=0000FF]no-repeat[/color];">&nbsp;</td>
    </
tr>
  </
table>
</
div>
<
div class="blockContent"><{$block.content}></div>

    </
div>
    <{/foreach}>
    <!-- 
End center-center blocks loop -->


I have 3 images in /mytheme/ folder:
Big_Story_image1.gif
Big_Story_image2.gif
Big_Story_image3.gif

e.g. url to image:
http://www.mysite.com/xoops/themes/mytheme/Big_Story_image1.gif

or

<{$xoops_imageurl}>Big_Story_image1.gif



13
mixmaster
Re: {$xoops_imageurl} Problem
  • 2005/1/24 3:41

  • mixmaster

  • Just popping in

  • Posts: 28

  • Since: 2005/1/21


Quote:

Draven wrote:
I use it all the time, it indeed does work provided you use it IN a template file parsed by smarty.


Shouldn't it also work in a theme file? I'm not sure I follow what you mean with using it in a template file.



14
mixmaster
Re: {$xoops_imageurl} Problem
  • 2005/1/24 3:30

  • mixmaster

  • Just popping in

  • Posts: 28

  • Since: 2005/1/21


Quote:

Draven wrote:
Can't tell from your last post if you figured out the problem or not, but one thing to note is that <{$xoops_imageurl}> only points to the themes root directory xoops/themes/mytheme/ and not a subfolder like /xoops/themes/mytheme/images. To do this you need to use:

background-image: url(<{$xoops_imageurl}>images/image.gif);


hope that helps


I have no problem with where {$xoops_imageurl} points to. 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!



15
mixmaster
Re: {$xoops_imageurl} Problem
  • 2005/1/24 3:26

  • mixmaster

  • Just popping in

  • Posts: 28

  • Since: 2005/1/21


Quote:

AAINC wrote:
Here is the code from the ArchSilver theme, for the left blocks. xoops_imageurl does work in td background using html.

...

try this

<td width="##" height="##" background="<{$xoops_imageurl}>images/image.jpg"nbsp;</td>


Thanks, I'll try this approach. However, background used in HTML and background-image: used in style sheet are not the same thing. {$xoops_imageurl} works fine in HTML, but my concern was using it within style sheet.



16
mixmaster
Re: {$xoops_imageurl} Problem
  • 2005/1/24 2:52

  • mixmaster

  • Just popping in

  • Posts: 28

  • Since: 2005/1/21


I just did as you suggested and got the same exact result as I had before. It made no difference. It seems that {$xoops_imageurl} doesn't work inside background-image: url(); . Can anyone confirm this? Or do you have any other suggestions? Thanks in advance.



17
mixmaster
{$xoops_imageurl} Problem
  • 2005/1/24 2:14

  • mixmaster

  • Just popping in

  • Posts: 28

  • Since: 2005/1/21


I have a simple question about using {$xoops_imageurl}

The following code works with no problem:
<td width="##" height="##" style="background-image: 
url(http://www.mysite.com/xoops/themes/mytheme/image.jpg); 
background-repeat: no-repeat;"
>&nbsp;</td>


But this won't work?

<td width="##" height="##" style="background-image: 
url([color=33CC33]<
{$xoops_imageurl}>image.jpg[/color]); 
background-repeat: no-repeat;"
>&nbsp;</td>


How do I get this to work????



18
mixmaster
Re: Images inside
  • 2005/1/23 23:31

  • mixmaster

  • Just popping in

  • Posts: 28

  • Since: 2005/1/21


I tried that, but it places the images beneath each other, not inline.



19
mixmaster
Images inside <div>
  • 2005/1/23 23:01

  • mixmaster

  • Just popping in

  • Posts: 28

  • Since: 2005/1/21


I have 3 images inside a <div> tag. I want the first to be fixed width, the second to be variable width (repeat-x), and the third to be fixed width. Any idea how to do this?

For example, this is what I have at the moment:
<div class="whatever"><img src="Image#1><img src="Image#2>
<img src="Image#3></div>


Any suggestions would be appreciated.



20
mixmaster
Block Image
  • 2005/1/23 12:35

  • mixmaster

  • Just popping in

  • Posts: 28

  • Since: 2005/1/21


I want to divide an image into three parts - a left, center and right - where the left is fixed width, the center is repeat-x, and the right is fixed width. I want to include this inside a block so that the image looks like it extends the entire width of the block for any given block size.
Take the center column block for example. My theme for this block is as follows:

<!-- Display center blocks if any -->
<{if 
$xoops_showcblock == 1}>

    <
table cellspacing="0">
    <
tr>
    <
td id="centerCcolumn" colspan="2">
    <!-- 
Start center-center blocks loop -->
    <{foreach 
item=block from=$xoops_ccblocks}>
    <
div style="padding: 5px;">
    <
div class="blockTitle"><img src="<{$xoops_imageurl}Image.gif"></div>
    <
div class="blockContent"><{$block.content}></div>
    </
div>
    <{/foreach}>
    <!-- 
End center-center blocks loop -->


Now, where I have the Image.gif, instead of a single image I want to be able to include three, as I described above. How would I implement this? Any pointers would be appreciated. Cheers.




TopTop
« 1 (2) 3 »



Login

Who's Online

256 user(s) are online (150 user(s) are browsing Support Forums)


Members: 0


Guests: 256


more...

Donat-O-Meter

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

Latest GitHub Commits