1
fbs777
1 block, 2 img (1 img in each theme): its possible?
  • 2006/11/8 16:32

  • fbs777

  • Just popping in

  • Posts: 48

  • Since: 2005/1/9 4


I think the title is a bit confuse, but what i want is make a custom block to show an image. But in theme A, must display the image A, and in theme B, the image B.

Like this:

Name:
Custom block X
Content:
Image A if choose Theme A or Image B if choose Theme B.


Its possible?

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.

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:









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



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:


One question: this xoops_imageurl inst to display the http://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.

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.

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...

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.

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?

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 ' 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...

Login

Who's Online

301 user(s) are online (272 user(s) are browsing Support Forums)


Members: 0


Guests: 301


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