|
Cookbook /
CSSInWikiPages-TalkSummary: Talk page for CSSInWikiPages.
Maintainer: DaveG
This space is for User-contributed commentary and notes. Please include your name and a date along with your comment. No matter how I configure the stylepage.php file and the SDV($EnableStylePage, 1); This above works; none other. I suspect that a cacheing defect may be occurring serverside. Any help? Jagtig Here's an alternative markup that's a bit more concise & robust and doesn't need to be surrounded in a Markup('css', '<[=',
"/\\(:css:\\)(.*?)\\(:cssend:\\)/sei",
"PZZ(NoCache( \$GLOBALS['HTMLStylesFmt'][] = PSS('$1') ))" );
What's different here is that the tags surrounding the CSS are Request: Try this on a page. If it does not work check your page's HTML source. The style should have been added in the <style> section underneath <!--HTMLHeader--> (~HansB) (:stylesheet:)
#wikitext table td {color:red; background:yellow; }
(:stylesheetend:)
I haven't been able to get the wiki engine to actually apply the stylesheet using the markup method yet. As for the link in the template, that worked in IE but not Firefox, which (probably for security reasons) didn't let me apply the CSS to the page prior to viewing it, apparently(?). It seems like there must be a better way to incorporate the text of a wiki page directly without having to browse to the page and use the page action. How could we do that? Can the engine apply something directly from the unmarked-up text of a wiki page before rendering the page? -- JonHaupt The issue with Firefox is that it looks at the Content-type: header of a result to decide if it's a valid CSS page or not. PmWiki's ?action=source returns the source as "text/plain" (and not "text/css"), so Firefox ignores it. --Pm
I fixed the markup problem (missing colon). Now the markup works, except that the text inside $EnableStylePage = 1; should be put before include_once(" Note, if you can't get that to work (as I can't), you can enable the Site.AllGroupHeader and add the (:stylepage:) there to enable the CSSInWikiPages for the entire site.Pico August 27, 2006, at 02:17 PM
The $EnableStylePage = 1; isn't going to work in most cases as the IF statement if ($EnableStylePage == 1) { LoadStylePage($DefaultStylePage); } is contained within the function itself and therefore will only be encountered on a page in which the function gets called anyway. How could this problem be fixed? - JonHaupt
I fixed this now, and improved the caching routine, as it failed sometime to cache a file. HansB August 29, 2006, at 04:31 AM
This is so cool. But I'm having trouble tring to use a style in PageTopMenu on your skins (FixFlow). All works fine when I'm on that page, but on other pages, the text from PageTopMenu appears without the style included. I tried placing the enable line in config.php, and the style directive in Site.AllGroupHeader, but nothing works for this particular use. Pico August 26, 2006, at 09:23 PM What css styling are you trying to use? HansB
List styling. I've been trying out different navigational menu systems. Specifically, the CSS I am using to test this out is located here http://exploding-boy.com/images/cssmenus/menus.html (I downloaded the gifs to the pub/cache). On the PageTopMenu I am using (:stylepage:) (:div1 id=tabsF:) *[[GroupName.|%anything%DisplayedName%%]] *etc As I mentioned, it works fine when I am on that page: it displays namvigational menu above the #tabnav .lnav and .rnav frim FixFlow, but on other pages, the list is unstyled. Pico August 27, 2006, at 07:46 AM
Put markup (:stylepage Site.FixflowStyle:) on Site.AllGroupHeader, not Site.PageTopMenu. You still may get some interference from .nav class styling and also colors from a color css file at #topnav hover. The whole PageTopMenu is in a div topmenu with class .nav. If you just want those image tabs it may be better to edit the fixflow template as well.
Yes AllGroupHeader works. Note to others who read this: See AllGroupHeader for instructions on enabling it in config.php.
To open up the PageTopMenu for other menu systems it may be best to do the following:
For me, I have to use div directives: (:div id=tabs:) and [[SomePage|%tabs%Link text%%]]. I can't get >>tabs<< to work (and it doesn't matter what I call the style (%tabsnot%Link text%%) because I just need a span for many cool approaches, e.g. pure css popups(offsite) Pico August 27, 2006, at 06:41 PM
I quite like those tabs and may facilitate easier adaption in the above manner in a future skin release. HansB Thanks for the help and responsiveness. Pico August 27, 2006, at 01:39 PM
I find that using this recipe and AuthUser causes me to have to login 2 times.
If I comment this out It seems like it's probably asking you to login because the stylesheet page might not be read-accessible without a login. I think I have it after authuser in mine. You might want to make sure the stylesheet page is read-accessible though. - JonHaupt
Talk page for the CSSInWikiPages recipe (users?). |