1
wizanda
Is there a smarty code xoops_css and if not how to make one??
  • 2006/5/7 6:50

  • wizanda

  • Home away from home

  • Posts: 1585

  • Since: 2004/3/21


Ok I have one big error to fix with multimenu, yet to make an easy way, I need some way to point the style css out side of a File. So I was think smarty as I have tried many other options.

Now I did manage to get half of it done by adding it into my theme (which for anyone who doesn't know make multimenu theme adjustable as mine are now) ,yet I need to point to the xoops.css I think for the others bits, at least that is what I am going to try....If I can....

So is there a way to point smarty to xoops_css?

I haven't seen it, so is there a way to add it, if it doesn't exsist yet?

That way if in module you need to insert a style in the middle of something like, multimenu is at the moment, then you can instead of putting style in which should only be in a body, you have a XOOPS code which hopefully won't mess up W3C (or the way I am goig with W3CIANDAandaandaandaandaanda)?

2
wtravel
Re: Is there a smarty code xoops_css and if not how to make one??

If you mean you want to make a module specific css I can give you an example:

Step 1:
In the module header file (most modules have one) you can add:

$info =  dirname(__FILE__);
if (
ereg("[]"$info)) {
    
$split split("[]",$info);
} else {
    
$split split("[/]",$info);
}
$count count($split) - 1;
$moddir $split[$count];
$xoops_module_header '.XOOPS_URL.'/modules/'.$moddir.'/theme.css" />';

This will derive the module directory name from the file location.

Step2:
In the module header file you can add a line:
$xoopsOption['template_main'] = 'template_name.html';
$xoopsTpl->assign('xoops_module_header',$xoops_module_header);


I hope this is what you were looking for

3
wizanda
Re: Is there a smarty code xoops_css and if not how to make one??
  • 2006/5/7 8:14

  • wizanda

  • Home away from home

  • Posts: 1585

  • Since: 2004/3/21


Maybe, I am not sure on how that works, does it call the themes css.
Let me explain the problem, Multimeu at the moment uses a java popup for its drop down menu system. Just before this it defines its CSS, yet that is the problem as you are meant to have CSS at the start in the head.

So I took part of it out and added each time to my indervidual themes, yet it won't let me do the whole thing as it needs to be called by the file also.

So What I was trying is to find some way, to send it out of the file collect the CSS it needs and come back.

That way I can remove the style and be 100% W3C on my front page again.

So what does that code call, could you explain? or can you think of an easy way to do this?

4
wizanda
Re: Is there a smarty code xoops_css and if not how to make one??
  • 2006/5/7 8:18

  • wizanda

  • Home away from home

  • Posts: 1585

  • Since: 2004/3/21


thxz also for the help

5
wtravel
Re: Is there a smarty code xoops_css and if not how to make one??

I do not exactly know what you are trying to do. Is it that you are trying to use a css file for the pop up window?

6
wizanda
Re: Is there a smarty code xoops_css and if not how to make one??
  • 2006/5/7 9:06

  • wizanda

  • Home away from home

  • Posts: 1585

  • Since: 2004/3/21


To use multimeu in your theme, Solo put you can insert the code anywhere you want in your theme.....

Yet... the start of the code it then goes to mainly a java and would be ok; yet has the CSS and style at the begining of each file also used each diffrent for each templates.

Now I am on a spring cleaning mission and trying to get 100% w3c, so to do this as I had before, i need to remove the style or link refrence in each at the start of the template file, for the multimenu selected. As Style and link can't go in td table ect...

Now I thought and tried XOOPS module header, no luck and pointing instead to the xoops.css, so that all my 4 themes would then get the CSS they needed from there.
For some reason it doesn't seem to point to the css even though with my theme part, I have done it ok, which is for the background color and text grouping.
Yet I still need a big section of the Css moving, yet remaining intact for the menu selected....


I hope I am making sense?

So this is why I thought to point to the main XOOPS css as that way i could remove it out of each file and load it from there as it is still css, yes?

7
rowdie
Re: Is there a smarty code xoops_css and if not how to make one??
  • 2006/5/7 9:12

  • rowdie

  • Just can't stay away

  • Posts: 846

  • Since: 2004/7/21


Do you have :
<link rel="stylesheet" type="text/css" media="screen" href="<{$xoops_url}>/xoops.css" />


in your theme? That should always include the main xoops.css file...

8
wtravel
Re: Is there a smarty code xoops_css and if not how to make one??

Yes, I think for the multi-menu blocks the easiest way would indeed be to use the css from the main theme.css file in your theme or the main xoops.css file like you suggested.

9
wizanda
Re: Is there a smarty code xoops_css and if not how to make one??
  • 2006/5/7 9:32

  • wizanda

  • Home away from home

  • Posts: 1585

  • Since: 2004/3/21


No , I am missing xoops.css in my theme...... oh dear where is my sites

Sorry how can I stick link some where else, I may have a look through the index.php and see if I can use include once or include would that work?

As then it would be away from the problem and still loaded wouldn't it?

10
wtravel
Re: Is there a smarty code xoops_css and if not how to make one??

Why not put that line in the theme.html for the theme you use? That would be the best solution. Then edit the css in xoops.css and you will be done (if no other problems ).

Login

Who's Online

344 user(s) are online (281 user(s) are browsing Support Forums)


Members: 0


Guests: 344


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