21
technigrafa
Re: Apply extra stylesheet if no module is being used

But if you do this, the CSS inclusion will be outside of the HEAD of the document, thus rendering the page not W3C compliant, won't it? You have to somehow get that line inside the HEAD which is in the theme file.

The above method I posted works great for me, but many thanks for your help!



22
technigrafa
Re: Apply extra stylesheet if no module is being used

Thanks to marcan from Inbox International, I have the solution:

Change the top XOOPS wrap code in my index.php file from

include("mainfile.php");
include(
"header.php");
$xoopsOption['show_rblock'] = 1;
?>



to:

 include("mainfile.php");
 include(
"header.php");
 
$xoopsTpl->assign('index_css''XOOPS_THEME_URL.'/'.$xoopsConfig['theme_set'].'/home.css" type="text/css" />');
 
$xoopsOption['show_rblock'] = 1;
 
?>


And in my theme file put in <{$index_css}> where I want the home.css file to be loaded.

Hope this helps someone out there. I'm enjoying my new 100% HTML W3C compliant home page!



23
technigrafa
Re: Apply extra stylesheet if no module is being used

Thanks,

I took a look at the Wraps module and it appears to just wrap XOOPS around HTML pages. I am already doing that in my php page though - that's not my problem. I just need to get the extra CSS call into the IF the wrapped page is being displayed and use the regular CSS on all other pages.

And TinyD is just a content module, if I remember right, and we're already using the Content module. Even if we put the code from our wrap into a content editor, we still won't be able to reassign the margin width of the content area and still be W3C compliant.

Any other ideas?



24
technigrafa
Re: Apply extra stylesheet if no module is being used

This should do the trick, but the XOOPS theme doesn't seem to be running this code for some reason:

<{php}> 
 if (
$_SERVER['PHP_SELF'] == 'index.php') { 
  echo 
'home.css" type="text/css" />'
 } 
<{/
php}>



Anyone have any ideas?



25
technigrafa
Apply extra stylesheet if no module is being used

I'm redesigning the our website:

http://www.technigrafa.com

And I am trying to get it to validate by W3C and there is one problem I can't overcome. I am wrapping XOOPS around a PHP page for the home page and I have to include this stylesheet below in the PHP home page because I don't want to load it on every other page if it's not necessary:

<link rel="stylesheet" media="screen" href="/themes/technigrafa2/home.css" type="text/css" />


The problem is since this is in the PHP page that is being wrapped with the XOOPS header, this puts that line outside of the head of the document, which W3C doesn't like. Is there some code I can use in the XOOPS theme page that will check to see if any module is being loaded and if not, use this style sheet above?



26
technigrafa
Re: CSS100 [Holy Grail CSS Wireframe Theme]

Okay,

@Chappy

I've modified the fixed theme to use pixels instead of ems. Pixels won't adjust according the the font sizes. That may fix some of your resize issues. Also, note that if you have content in the center column that is too wide (tables sometimes), the right column will expand and look funny. To avoid this, don't put any blocks in the right column for modules who need more room in the content area. Maybe not the best solution, but since the theme is restricted to 780 pixels width total, with a right and left column, not much is left for the center column anyway. Another possibility is to adjust .outer in style.css to include width:90%. That may or may not do anything for you.



27
technigrafa
Re: CSS100 [Holy Grail CSS Wireframe Theme]

Chappy,

I think what's causing that is your advanced search box table on the bottom of the results page, because I don't have that problem. But I think it's because I don't have as many modules installed on my dev site, meaning the table isn't as wide:

http://dev.technigrafa.com/xoops/

I'm not sure why it's not wrapping for you - do you have the most recent version of the fixed theme?

Perhaps something like this in style.css would fix it:

#content table {width:400px}

You may have to play with the actual pixel width amount.

*EDIT: I reposted the fixed and skidoo2 themes with some color changes and some fixes for the Content module menus.



28
technigrafa
Re: CSS100 [Holy Grail CSS Wireframe Theme]

Hmm,

I thought I had already fixed this, but I guess I only fixed it in skidoo2. Move this section below to right before the line:

<{if !$xoops_rblocks}>
        <
style type="text/css">style>
    <{/if}>
    
    <{if !
$xoops_lblocks}>
        <
style type="text/css">style>
    <{/if}>


I think that should work. You're not supposed to declare CSS changes like that outside the head. I had a note about that in the changelog, but I think this will fix it. I'll update the themes again.



29
technigrafa
Re: CSS100 [Holy Grail CSS Wireframe Theme]

@javelin

Your masthead ID in theme.html is being declared twice - IDs can only be used once per page - classes can be used several times (Same reason for mainmenu error below):

<div id="pageWrapper">
<
div id="masthead" class="inside">
div>

<
div id="masthead" class="inside" align="center">


I checked the file I have and it is correct there:

<div id="pageWrapper">
<
div id="masthead" class="inside">



<
div id="logo"><a href="<{$xoops_url}>/"><img src="<{$xoops_imageurl}>images/logo.gif" alt="<{$xoops_sitename}>" />a>div>
<
h2 id="title"><a href="<{$xoops_url}>"><{$xoops_slogan}>a>h2>
<
div id="banner"><{$xoops_banner}>div>
<
div style="clear:both;">div>
        



Your mainmenu problem is because both the "Main Menu" and the "SVAPC" blocks are declaring the id="mainmenu" . Since you have two blocks needing that tag, you should use classes instead of ID. The "id=" should be changed to "class=" in your block templates and in your style.css change all the occurances of #mainmenu to .mainmenu.

I'm going to go ahead and change the replacement main menu block in the theme to use a class instead of an id. This will mean that any other module looking for the mainmenu "ID" won't find it though until it is modified to look for the class instead.

And you're right, the other errors are from your other blocks. Just read through the errors from W3C - often it will tell you exactly what the problem is.



30
technigrafa
Re: CSS100 [Holy Grail CSS Wireframe Theme]

That should be fairly easy.

Edit in style.css:

.itemFoot {margin-bottom:10px}




TopTop
« 1 2 (3) 4 5 6 ... 13 »



Login

Who's Online

1000 user(s) are online (300 user(s) are browsing Support Forums)


Members: 0


Guests: 1000


more...

Donat-O-Meter

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

Latest GitHub Commits