Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

  1. Index
  2. » Archives
  3. » [superseded] rah_css_embed

#1 2008-07-17 15:03:08

Gocom
Developer Emeritus
From: Helsinki, Finland
Registered: 2006-07-14
Posts: 4,533
Website

[superseded] rah_css_embed

This plugin has been superseded by rah_function and rah_external_output. Rah_function can easily be used to embed stylesheets from the database to your page template and produce same results. Alternative rah_external_output’s Form partial can be used to store and output CSS files.

Uses rah_function to call fetch() which then gets a stylesheet. “MyCSSName” would be the name of the stylesheet.

<style type="text/css">
	<txp:rah_function 
		call="fetch, htmlspecialchars" 
		get="css" 
		from="txp_css" 
		where="name" 
		is="MyCSSName" 
	/>
</style>

Last edited by Gocom (2012-07-24 23:58:32)

Offline

#2 2008-07-17 17:35:42

the_ghost
Plugin Author
From: Minsk, The Republic of Belarus
Registered: 2007-07-26
Posts: 907
Website

Re: [superseded] rah_css_embed

What about multi-css support?
<txp:rah_css_embed name="layout,fonts,imgs" />

It’s more semantic, than duplicating tag with different values of name attr.


Providing help in hacking ATM! Come to courses and don’t forget to bring us notebook and hammer! What for notebook? What a kind of hacker you are without notebok?

Offline

#3 2009-01-20 08:39:47

Pat64
Plugin Author
From: France
Registered: 2005-12-12
Posts: 1,634
GitHub Twitter

Re: [superseded] rah_css_embed

Hi Jukka ;)

I added “media” attribute within your plugin.
Default one is “screen, projection”.

YToxMDp7czo0OiJuYW1lIjtzOjEzOiJyYWhfY3NzX2VtYmVkIjtzOjY6ImF1dGhvciI7czoxMToiSnVra2EgU3ZhaG4iO3M6MTA6ImF1dGhvcl91cmkiO3M6MjY6Imh0dHA6Ly91cHJvYXItbi1yYXR0bGUuYml6IjtzOjc6InZlcnNpb24iO3M6MzoiMC4xIjtzOjExOiJkZXNjcmlwdGlvbiI7czo0NToiRW1iZWQgQ1NTLWZpbGVzIGRpcmVjdGx5IHRvIHRoZSBwYWdlIHRlbXBsYXRlIjtzOjQ6ImhlbHAiO3M6MjI3MjoiPGgxPnJhaF9jc3NfZ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h0cGF0dGVybg0KCSMJdmVyc2lvbiAwLjENCgkjCWJ5IEp1a2thIFN2YWhuDQoJIwlodHRwOi8vcmFoZm9ydW0uYml6DQoJIw0KCSMjIyMjIyMjIyMjIyMjIyMjIyMNCg0KCWZ1bmN0aW9uIHJhaF9jc3NfZW1iZWQoJGF0dHMpew0KCQlleHRyYWN0KGxBdHRzKGFycmF5KA0KCQkJJ25hbWUnID0+ICdkZWZhdWx0JywNCgkJCSdtZWRpYScgPT4gJ3NjcmVlbiwgcHJvamVjdGlvbicsDQoJCSksJGF0dHMpKTsNCgkJaWYoJG5hbWUpIHJldHVybiAnPHN0eWxlIHR5cGU9InRleHQvY3NzIiBtZWRpYT0iJy4kbWVkaWEuJyI+Jy5uLmJhc2U2NF9kZWNvZGUoZmV0Y2goJ2NzcycsJ3R4cF9jc3MnLCduYW1lJyxkb1NsYXNoKCRuYW1lKSkpLm4uJzwvc3R5bGU+JzsNCgl9DQoiO3M6NDoidHlwZSI7czoxOiIwIjtzOjU6Im9yZGVyIjtzOjE6IjUiO3M6MzoibWQ1IjtzOjMyOiI0MWJlMTAxZDYzYjc3OGUyNmIzOWQ0Y2YwOWM1YmFjZiI7fQ==

Patrick.

Github | CodePen | Codier | Simplr theme | Wait Me: a maintenance theme | [\a mi.ni.ma]: a “Low Tech” simple Blog theme.

Offline

#4 2009-12-20 13:37:29

Gocom
Developer Emeritus
From: Helsinki, Finland
Registered: 2006-07-14
Posts: 4,533
Website

Re: [superseded] rah_css_embed

Released version 0.2. Changelog:

  • Added support for list of multiple names.
  • Added type attribute.
  • Added media attribute.
  • Added title attribute.
  • Support for future TXP version that may not use base64 encoded style sheets.

More info and downloads

Offline

#5 2010-04-15 11:40:27

Gocom
Developer Emeritus
From: Helsinki, Finland
Registered: 2006-07-14
Posts: 4,533
Website

Re: [superseded] rah_css_embed

Released version 0.3. Changelog:

  • Added html attribute.

More info, a cake, and downloads

Offline

#6 2010-04-15 11:49:37

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,445
Website GitHub

Re: [superseded] rah_css_embed

Mmmm, cake.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Online

#7 2010-04-15 13:32:06

Gocom
Developer Emeritus
From: Helsinki, Finland
Registered: 2006-07-14
Posts: 4,533
Website

Re: [superseded] rah_css_embed

Bloke wrote:

Mmmm, cake.

Cake downloading service. Portal gun put to good use.

Now I really want cake printer.

Last edited by Gocom (2010-04-15 13:32:48)

Offline

  1. Index
  2. » Archives
  3. » [superseded] rah_css_embed

Board footer

Powered by FluxBB