11
snow77
Re: 1 block, 2 img (1 img in each theme): its possible?
  • 2006/11/9 20:03

  • snow77

  • Just can't stay away

  • Posts: 864

  • Since: 2003/7/23


great tip! thanks for sharing your solution. have added it to my library

mmm...well I'd like for custom blocks to ready smarty code too, maybe this will happen in the future
www.polymorphee.com
www.xoopsdesign.com

10
fbs777
Re: 1 block, 2 img (1 img in each theme): its possible?
  • 2006/11/9 19:45

  • fbs777

  • Just popping in

  • Posts: 48

  • Since: 2005/1/9 4


I found the solution thanks to Giba in XOOPS Brasil in this topic:
http://www.xoops.net.br/modules/newbb/viewtopic.php?topic_id=7436&forum=9&post_id=42401#forumpost42401

Is very simple with php custom block:

if(!defined('XOOPS_ROOT_PATH')) exit();
$myvar = $GLOBALS["xoTheme"];
echo ' <img src="'.$myvar->url.'/images/logo.gif" alt="Logo" />';

With this, if you change the theme, you will see the images/logo.gif from the other theme

But i still want to know:
Quote:
This is the point: i dont know the autoformat for this smarty.

In the block area show only the {X_SITEURL} (same as <{$xoops_url}> in theme/template).

So, i know:
<{$xoops_url}> = {X_SITEURL}

but:
<{$xoops_imageurl}> = ?
or
<{$xoTheme}> = ?

I think there's no {XOOPS_URL_THEME}, {X_THEMEURL}, {X_URL_THEME} or something...

9
snow77
Re: 1 block, 2 img (1 img in each theme): its possible?
  • 2006/11/9 19:05

  • snow77

  • Just can't stay away

  • Posts: 864

  • Since: 2003/7/23


it just ocurred to me, maybe creating the blocks with Boox module this one could read the smarty if you create the file with an .html extension?
www.polymorphee.com
www.xoopsdesign.com

8
snow77
Re: 1 block, 2 img (1 img in each theme): its possible?
  • 2006/11/9 18:53

  • snow77

  • Just can't stay away

  • Posts: 864

  • Since: 2003/7/23


custom blocks somehow don't read the smarty tags..


Ex:(of image in a theme.html)
< img src="<{xoImgUrl img/header-logo_small.gif} >"

OLD Ex: (of image in a theme.html)
< img src="<{$xoops_imageurl}>images/icon_edit_account.gif" width="23" height="24" / >

< {$xoops_imageurl} > has changed to < {xoImgUrl} >

(without the spaces after and before these signs < >)


and it takes you to the theme directory not the images directory inside the theme directory cause you still have to write down the path starting from the level from where you open the theme folder.

Writing the full normal path will let you render the image in the custom block.
www.polymorphee.com
www.xoopsdesign.com

7
fbs777
Re: 1 block, 2 img (1 img in each theme): its possible?
  • 2006/11/9 18:34

  • fbs777

  • Just popping in

  • Posts: 48

  • Since: 2005/1/9 4


Quote:

Biteronboard wrote:
<{$xoops_imageurl}> refers to the active_theme/images directory.

Are you actually putting this in a block? If so try the "autoformat" setting, instead of html.

This is the point: i dont know the autoformat for this smarty.

In the block area show only the {X_SITEURL} (same as <{$xoops_url}> in theme/template).

So, i know:
<{$xoops_url}> = {X_SITEURL}
but:
<{$xoops_imageurl}> = ?
or
<{$xoTheme}> = ?

I think there's no {XOOPS_URL_THEME}, {X_URL_THEME} or something...

6
Will_H
Re: 1 block, 2 img (1 img in each theme): its possible?
  • 2006/11/9 18:21

  • Will_H

  • Friend of XOOPS

  • Posts: 1786

  • Since: 2004/10/10


<{$xoops_imageurl}> refers to the active_theme/images directory.

Are you actually putting this in a block? If so try the "autoformat" setting, instead of html.

5
fbs777
Re: 1 block, 2 img (1 img in each theme): its possible?
  • 2006/11/9 17:46

  • fbs777

  • Just popping in

  • Posts: 48

  • Since: 2005/1/9 4


This show the same blank block...

In html source code:
<div class="blockContent"><img src="%3C%7B$xoops_imageurl%7D%3Elogo.gif"></div>

One question: this xoops_imageurl inst to display the www.site.com/images/ ?
If yes, so this will show the same logo.gif in all themes...

I make 2 different logo.gif for show each one in the right theme.

4
Will_H
Re: 1 block, 2 img (1 img in each theme): its possible?
  • 2006/11/9 17:16

  • Will_H

  • Friend of XOOPS

  • Posts: 1786

  • Since: 2004/10/10


<img src="<{$xoops_imageurl}>logo.gif" />

3
fbs777
Re: 1 block, 2 img (1 img in each theme): its possible?
  • 2006/11/9 17:15

  • fbs777

  • Just popping in

  • Posts: 48

  • Since: 2005/1/9 4


No, i want to make all in the block, without edit the themes.

I put the images in the same directory name and same image name:

/themes/themeA/images/logo.gif
/themes/themeB/images/logo.gif

Now i trying to call the image with img html tag, but isnt showing nothing in the site.

I tryed many ways:

<img src="<{$xoops_theme}>images/logo.gif">
<img src="<{$xoops_theme}>images/logo.gif" />
<img src="<{$xoops_theme}>/images/logo.gif" />
<img src="<{$xoops_theme}>/images/logo.gif">
<img src="<{$xoTheme}>images/logo.gif">
<img src="<{$xoTheme}>images/logo.gif" />
<img src="<{$xoTheme}>/images/logo.gif" />
<img src="<{$xoTheme}>/images/logo.gif">

2
Will_H
Re: 1 block, 2 img (1 img in each theme): its possible?
  • 2006/11/8 20:50

  • Will_H

  • Friend of XOOPS

  • Posts: 1786

  • Since: 2004/10/10


You could just hard code the block into your themes.

Login

Who's Online

215 user(s) are online (122 user(s) are browsing Support Forums)


Members: 0


Guests: 215


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