Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#25 2006-04-05 06:12:11

Lucanos
Member
From: Sydney, Australia
Registered: 2006-01-17
Posts: 23
Website

Re: Using TXP Tags within Stylesheets

OK.
Fixed.

Amendment to above is:
<code>define(“txpinterface”, “css”);
include $txpcfg[‘txpath’].’/publish.php’;
$s = gps(‘s’);
$n = gps(‘n’);
- output_css($s,$n);

+ if ($n) {
+ $cssname = $n;
+ } elseif ($s) {
+ $cssname = safe_field(‘css’,‘txp_section’,“name=’”.doSlash($s).”’”);
+ }</code>

So you keep the declarations setting $s & $n to gps(‘s’) & gps(‘n’) and you change the if/then/else condition after that so it looks at the $s & $n variables instead of the gps(.) results.

I will update the zipped version to reflect this fix. (Done)

Last edited by Lucanos (2006-04-06 00:46:27)

Offline

#26 2006-06-28 00:40:10

rloaderro
Archived Plugin Author
From: Costa Rica
Registered: 2006-01-05
Posts: 190
Website

Re: Using TXP Tags within Stylesheets

Lucanos wrote:

The above works like a charm when you use the ...css.php?s=XXX method to call it. Unfortunately, the ...css.php?n=XXX method… She no work so good…

hi Lucanos! I am using your hack and so far no problems – BUT – the css.php?n=xxx method still doesn’t seem to work!? I am using a simple <txp:section title="1" /> test – the s=xxx method works fine, but n=xxx returns no result. I haven’t figured out yet why this is. Any ideas?


Travel Atlas * Org | Start Somewhere

Offline

#27 2006-06-28 02:10:58

Lucanos
Member
From: Sydney, Australia
Registered: 2006-01-17
Posts: 23
Website

Re: Using TXP Tags within Stylesheets

Hmmm…
First I have heard of it.
I have a site here which uses this hack and operates fine with both n=xxx and s=xxx calls.
Sling me an email at lucanos@gmail.com and we’ll see what we can see.

Offline

#28 2006-06-28 03:06:16

net-carver
Archived Plugin Author
Registered: 2006-03-08
Posts: 1,648

Re: Using TXP Tags within Stylesheets

Did you folks try out Ako’s new plugin?


Steve

Offline

#29 2006-06-28 16:40:54

rloaderro
Archived Plugin Author
From: Costa Rica
Registered: 2006-01-05
Posts: 190
Website

Re: Using TXP Tags within Stylesheets

net-carver wrote:

Did you folks try out Ako’s new plugin?

You know i was looking for that plugin here and in textpattern.org but all I could find is this thread. Anyway it appears there is the same section problem with the plugin (which looks to be the same as this hack but in plugin form…).


Travel Atlas * Org | Start Somewhere

Offline

#30 2006-06-28 17:39:03

net-carver
Archived Plugin Author
Registered: 2006-03-08
Posts: 1,648

Re: Using TXP Tags within Stylesheets

Aeron,

would it be worth posting to Ako’s thread about this? (Just a thought)

PS> I didn’t post over there but I liked your work on the Del Oro site.


Steve

Offline

Board footer

Powered by FluxBB