1
cm2339
Theme Style Sheet & xoops_url
  • 2005/11/22 15:00

  • cm2339

  • Just popping in

  • Posts: 32

  • Since: 2005/2/21


We have a custom theme for our site. Everything is working great! Our question: Is there a way to have a smarty tag (xoops_url) inside the theme.css file?

Our real issue, we want to control the folder where our images are located. More specifically, we want to choose the location of the background images with the css code: background-image: url(/images/OneCoolImage.gif);

In XOOPS is it possible to have: background-image: url($xoops_url/images/rtcol_hdr_bkg.gif); or something similar?

Please let me know if this is possible or if we should simply scratch the whole idea and tackle the issue in a different manner.

Thanks!

2
m0nty
Re: Theme Style Sheet & xoops_url
  • 2005/11/22 15:05

  • m0nty

  • XOOPS is my life!

  • Posts: 3337

  • Since: 2003/10/24


each css is defined along with the theme location..

we were just discussing something similar in the other thread (changing XOOPS_IMAGEURL)

the concept is similar but would need to be looked at more and more on a test site b4 you go live with it just to be sure of the changes made..

it would also be different depending on which version of xoops..

but i don't think you can use the smarty tag in css.. so you would need to actually change the definition of the smarty tag before hand..

3
m0nty
Re: Theme Style Sheet & xoops_url
  • 2005/11/22 15:09

  • m0nty

  • XOOPS is my life!

  • Posts: 3337

  • Since: 2003/10/24


i was just thinking tho, if located on the same server.. you could possibly use >

in the css (if the background images folder is in a different path for example:

xoops_root/backgrounds/images........ etc

then in the CSS you could possibly use:

url(../../backgrounds/images/image.gif);

(i haven't tried it tho, but i see no reason for that method to not work)

4
cm2339
Re: Theme Style Sheet & xoops_url
  • 2005/11/22 15:40

  • cm2339

  • Just popping in

  • Posts: 32

  • Since: 2005/2/21


We get the idea that the css is defined along side the theme file and take full advantage of that! It may be beneficial for us to simply set the location of our custom image folder and move on.

After giving this a bit more thought, we can use an Apache alias and point that URL to any folder we choose on the server.

Our "trickery" will come into play when we launch our "sister" sites. Each sites XOOPS theme & Apache alias will need to match and will point to the same custom images folder. That way, when we change our logo, color scheme, etc. We will only have to update the images in one place for every XOOPS instance that is using that copied theme.

Thanks for the advise!

And by the way, we are using XOOPS 2.0.13.2.

5
m0nty
Re: Theme Style Sheet & xoops_url
  • 2005/11/22 15:57

  • m0nty

  • XOOPS is my life!

  • Posts: 3337

  • Since: 2003/10/24


ok yeah i see what you're trying now.

you could of course with a little modification, allow all sites to share the exact same theme folder.

if you have all your sites in sub directories of root.. etc

you could create a folder called themes in the root of your site..

and then modify xoops_root/include/common.php in each site

find these in the file >

define("XOOPS_THEME_PATH", XOOPS_ROOT_PATH."/themes");
define("XOOPS_THEME_URL", XOOPS_URL."/themes");

and then you can change the path & url accordingly to each site and make them all point to the same themes folder..

6
cm2339
Re: Theme Style Sheet & xoops_url
  • 2005/11/22 16:12

  • cm2339

  • Just popping in

  • Posts: 32

  • Since: 2005/2/21


Thanks mOnty!

That looks very slick and we will head that route.

The XOOPS CMS and community rocks!

Thanks again!

7
Lizardman
Re: Theme Style Sheet & xoops_url
  • 2006/1/10 4:45

  • Lizardman

  • Just popping in

  • Posts: 16

  • Since: 2004/11/18


CSS Style.css Question about the Date and Search Bar TD Cannot Fint it all I see is

td#date {color: #272727;width: 20%;text-align: left;vertical-align: middle;padding-left: 5px;font-weight: bold;font-size: 90%;}
td#search {width: 95%;text-align: right;vertical-align: middle;padding-right: 10px;}

in the style.css and in the Theme.html all I can find is this line:
<{include file="default/navigation/theme_usernav.html"}>

I cannot move this line down to get a bigger table.toptable background banner for my site any suggestions

8
snow77
Re: Theme Style Sheet & xoops_url
  • 2006/1/10 5:00

  • snow77

  • Just can't stay away

  • Posts: 864

  • Since: 2003/7/23


Where can I see the theme you are working on?

Login

Who's Online

262 user(s) are online (99 user(s) are browsing Support Forums)


Members: 0


Guests: 262


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