1
RJ-45
Change image with the module
  • 2007/3/19 18:25

  • RJ-45

  • Just popping in

  • Posts: 53

  • Since: 2005/1/30


Hi

I want to divide the site in 2. In the first the data (text, images, buttons) and in the other, a image, but this image is different to each module

I think there are som PHP code that check the module we are, and then change de image, and insert it in the theme html file. However, I don't know PHP :(

The other way I think is to edit the template of each module, but It is a hard work

Thanks ;)
My Blog about Xoops: http://blog.eme3design.es

2
fooups
Re: Change image with the module
  • 2007/3/19 19:11

  • fooups

  • Just popping in

  • Posts: 82

  • Since: 2004/1/12


Hi,

the third option is to use the PictureURL module.

Bye.

3
RJ-45
Re: Change image with the module
  • 2007/3/27 15:08

  • RJ-45

  • Just popping in

  • Posts: 53

  • Since: 2005/1/30


Thanks you very much

This module is what I'm looking for. However, It doesn't work.

I'm trying with all version, and when I enter in the module and upload some images, the Create image section is empty:

http://img399.imageshack.us/img399/7039/xoopdssstp5.gif

And when I insert the xoops_imageurl variable, then Smarty display an error because this variable is not recognised.

I'm hack the header.php file like help of the module

Can you help me?

Thanks
My Blog about Xoops: http://blog.eme3design.es

4
rowdie
Re: Change image with the module
  • 2007/3/27 18:55

  • rowdie

  • Just can't stay away

  • Posts: 846

  • Since: 2004/7/21


You don't need to hack php files, or to use a module With XOOPS 2.0.16 you can do this using Smarty tags in your theme.html file.

e.g. you could use something like this:
<img class="<{$xoops_dirname}>" src="<{$xoops_imageurl}>modules/<{$xoops_dirname}>/logo.png" alt="" />


The <{$xoops_dirname}> tag contains the name of the current module, or 'system' if you are on a non-module page.

So the example above expects to find the image in:

http://yoursite.com/themes/yourtheme/modules/system/logo.png
http://yoursite.com/themes/yourtheme/modules/newbb/logo.png

depending on which modules you have installed and which page you are viewing.

The example also assigns a separate css class for each module, so you can use different style rules for each image if you want to. Just add some css code to an included .css file, something like this:
img.system {
    
put css rules here
}

img.newbb {
    
put css rules here
}

This is just an example to get you started, play with the example until you find the best solution for you

Rowd

Login

Username:
Password:

Lost Password? Register now!

Who's Online

70 user(s) are online (41 user(s) are browsing Support Forums)


Members: 0


Guests: 70


more...

Donat-O-Meter

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

Latest GitHub Commits