1
wizanda
Could we make a smarty or php(CSS), to link from anywhere; to the head?
  • 2006/5/18 13:24

  • wizanda

  • Home away from home

  • Posts: 1585

  • Since: 2004/3/21


Would that be possible I am sick of running into you can't stick a style sheet in a page, it must be in the head..

some one else just mentioned something along these lines also.

So while I have just redoing the ol_bible which I release in about an hour or so when i am happy...

I was going to link its exsiting theme to run in Xoops.... yet why not as they need the CSS to run mid-way down the page.

So unless each time I add it by hand with a style or link ref in the head and ask other people to, it is a bit of pain.

This would also fix multimenu and many others to com.... also it would be amazing for blocks....

As if we could pull it off some how, I think you could don't know about smarty yet another system we have ie php also.

Can't we make it that in XOOPS theme at the head where the Css link sheet is defined this is also pointing to a new php file.....oO (it would have to be wouldn't it).....
As i was just reading you can link CSS files via one PHP and coordinate them...I am not sure how or where to start yet this would be a great feature for all of xoops

As then you could add CSS to any block allowing text effects and so much more, it would make XOOPS well snazzy.... to those who play around....

Any ideas on wether something along those lines is possible?

just how would you loop the files adresses would need admin...

unless anyone can think how it could just be directed to it...?

2
iHackCode
Re: Could we make a smarty or php(CSS), to link from anywhere; to the head?

Wizanda and I were chatting on yahoo..

many themes have the <{$xoops_module_header}> in it. it is placed in the <head> tags. by specifying what $xoops_module_header equals to you can set you own css file for your module. like how newbb/cbb has its own css file. i could not find any info on this and could only use the example from teh newbb/header.php file

$newbb_module_header '';
$newbb_module_header .= '<link rel="alternate" type="application/xml+rss" title="'.$xoopsModule->getVar('name').'" href="'.XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname').'/rss.php" />';
if(!empty(
$xoopsModuleConfig['pngforie_enabled'])){
    
$newbb_module_header .= '<style type="text/css">img {behavior:url("include/pngbehavior.htc");}</style>';
}
$newbb_module_header .= '
    <link rel="stylesheet" type="text/css" href="templates/newbb.css" />
    <script type="text/javascript">var toggle_cookie="'
.$forumCookie['prefix'].'G'.'";</script>
    <script src="include/js/newbb_toggle.js" type="text/javascript"></script>
    '
;
if(
$menumode==2){
    
$newbb_module_header .= '
    <link rel="stylesheet" type="text/css" href="templates/newbb_menu_hover.css" />
    <style type="text/css">body {behavior:url("include/newbb.htc");}</style>
    '
;
}
if(
$menumode==1){
    
$newbb_module_header .= '
    <link rel="stylesheet" type="text/css" href="templates/newbb_menu_click.css" />
    <script src="include/js/newbb_menu_click.js" type="text/javascript"></script>
    '
;
}
$xoops_module_header $newbb_module_header// for cache hack
$xoopsOption['xoops_module_header'] = $xoops_module_header;
CBB / LatestNews / Publisher / XM-Spotlight

(ノ◕ヮ◕)ノ*:・゚✧

3
wizanda
Re: Could we make a smarty or php(CSS), to link from anywhere; to the head?
  • 2006/5/18 15:37

  • wizanda

  • Home away from home

  • Posts: 1585

  • Since: 2004/3/21


thxz for the refrence on here also, then i can check back

4
wizanda
Re: Could we make a smarty or php(CSS), to link from anywhere; to the head?
  • 2006/5/18 17:56

  • wizanda

  • Home away from home

  • Posts: 1585

  • Since: 2004/3/21


Isn't that for the RSS feed, so making it a second page and so allowing the second header?

Ok second thoughts maybe not, can someone explain
moudle_header and if it means you can insert a style at your modules header like this...

I have two modules that I could use this before release if someone can explain?

5
Will_H
Re: Could we make a smarty or php(CSS), to link from anywhere; to the head?
  • 2006/5/18 19:03

  • Will_H

  • Friend of XOOPS

  • Posts: 1786

  • Since: 2004/10/10


thats exactly what the newbb module does, I always assumed you could assign anything a class_id.

This can be somewhat of a nuisance.

Perhaps developing a module.css and include it in the module developer package.

Of course you would need to brainstorm a group of default classes so that all new modules would have a guide.

It would be a huge pain to have to "play" with even more stylesheets.

Persoanlly I enjoy uniform design across my domain. If it came down to needing to add a new class, each user could append it to the end of their own module.css.

I am sure this feature would add a great interest to many users.

The ability to flare up the module output has been a long desired feature. Its nice to see some talk about it.

6
wizanda
Re: Could we make a smarty or php(CSS), to link from anywhere; to the head?
  • 2006/5/18 19:13

  • wizanda

  • Home away from home

  • Posts: 1585

  • Since: 2004/3/21


well saying that the Bible module I have just made from PHPbible.org has a built in CSS changer, it use fopen write to rewrite your CSS file.
This i linked from the top of the themes, where the XOOPS and theme one is called.

now if we built a full xoop admin around this then we would be talking...
it is with the zbible already, why i have left default templates that are colour interchangable...

You could have a full stytems layout for CSS, as there are not that bigger list of things you can use for all browsers, using topstyle lite on lowest setting for all browsers shows you what we can use..

Oh by the way before you worry about security given to people within sites admin, the bible module does have a added password system that is case sensitive...
I have built into the admin as well..

So...anyone up for an idea a long these lines can you imagine it, XOOPS would be then multidynamic colours as the webmaster choose.

Haven't tried CSS admin system I saw created, how does it work anyone know?

7
Will_H
Re: Could we make a smarty or php(CSS), to link from anywhere; to the head?
  • 2006/5/18 19:18

  • Will_H

  • Friend of XOOPS

  • Posts: 1786

  • Since: 2004/10/10


It would be amazing to see style manipulation through admin panel.

Currently I know that VBB comes with this feature.

8
wizanda
Re: Could we make a smarty or php(CSS), to link from anywhere; to the head?
  • 2006/5/18 20:50

  • wizanda

  • Home away from home

  • Posts: 1585

  • Since: 2004/3/21


and the zbible now.... yet still i need to get people to add a line in the theme not messy, yet still i would prefer if it can be directed its self as here.

The thing I want to achieve with the new Bible modules is they function for sheep... as sheep are daft.... so we have to make sure they are cared for so they don't run off as sheep do...giving them simple path to follow

So if I can find a way to add a link ref point before release it would be nice.. may go beta first, and see as it may be a bit tempermental

Anyways still a solution on how this works anyone?

9
tripmon
Re: Could we make a smarty or php(CSS), to link from anywhere; to the head?
  • 2006/5/18 22:00

  • tripmon

  • Module Developer

  • Posts: 462

  • Since: 2004/2/28


Here's the deal (as I see it)...
2.0 & 2.2 both share this issue...

In the calling PHP page, if you assign:
Quote:

$myTemplate->assign('xoops_module_header', $xoops_module_header);

to the template (I assign the value in my module specific header), that value will be passed to the .html template without you needing to do anything. The value will appear in the head section of the generated .html file.

That part is great. Straight forward and simple.
Now the icky part.

Cache....

If you enable module wide cache, the information which was being passed via $xoops_module_header no longer gets passed (automagically).

By including:
Quote:
<{$xoops_module_header}>

in the html template, the value will be passed, but WILL NOT appear in the header.

In 2.2 a custom smarty post-filter (example below) can be used to write to the head, but this will not work under 2.0.

function (above call to XOOPS header.php)
function add_header($tpl_source, &$myTemplate)
{
    return "<?php echo $xoops_module_header?>n".$tpl_source;
}
$xoopsTpl->register_postfilter('add_header');



Hope that helps.

10
xpider
Re: Could we make a smarty or php(CSS), to link from anywhere; to the head?
  • 2006/5/18 22:25

  • xpider

  • Not too shy to talk

  • Posts: 150

  • Since: 2004/5/9 2


running newbb (cbb) in the generated header view source says...

<!-- RMVadded module header -->
<
style type="text/css">img {behavior:url("include/pngbehavior.htc");}</style>
<
link rel="stylesheet" type="text/css" href="newbb.css" />
    <
script src="include/js/newbb_toggle.js" type="text/javascript"></script>


What is RMV and how is this done?

What I would like to see as a website designer is the ability within each module to select different themes and image packs per individual module.

Objective would be to have a skins and image pack folder that you could just upload new skins folders and image packs folders to and then from within the admin of the module have a drop box for each.... capable of reading the directory and letting you choose different ones and saving to db your choice. Just like preferences in XOOPS core admin...

Just a thought...
Some of the best things in life truly are FREE

Xpider

XpidersWeb
XtremeFreeware
...........................................

Login

Who's Online

230 user(s) are online (153 user(s) are browsing Support Forums)


Members: 0


Guests: 230


more...

Donat-O-Meter

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

Latest GitHub Commits