Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2006-08-29 17:33:45

d60eba
New Member
Registered: 2006-08-29
Posts: 2

Apply attribute to a span - what am I doing wrong?

Hi,

This code at the bottom of classTextile.php:

$textile = new Textile; echo $textile->TextileThis("%{color:red}the fourth the fifth%");

Produces: <p><span>{color:red}the fourth the fifth</span></p>

However, if I paste %{color:red}the fourth the fifth% into the form on the textism page http://textism.com/tools/textile/index.php it works fine, colouring the text red.

What am I doing wrong?

Cheers,

Leon

Offline

#2 2006-08-29 19:57:01

Dragan
Member
From: Novi Sad, Serbia
Registered: 2005-10-26
Posts: 100
Website

Re: Apply attribute to a span - what am I doing wrong?

I had the exact same problem just earlier today.

Offline

#3 2006-09-04 06:48:13

mattw
New Member
From: United States
Registered: 2004-12-03
Posts: 4
Website

Re: Apply attribute to a span - what am I doing wrong?

While trying out some of the nifty Textile abilities that were shown on this great reference site, I ran into a problem with assigning a class name to a span in my Textpattern install. I tried to write:

<blockquote><pre><code> %(photodescription)hot, humid day%</code></pre></blockquote>

to achieve this HTML:

%(photodescription)hot, humid day%

but instead, get this:

<blockquote><pre><code>
< span >(photodescription)hot, humid day< /span >
</code></pre></blockquote>

with the class still in parentheses. Yet it works fine on Dean’s Textile demo page. I have Textpattern 4.0.3. Is it possible I don’t have an up-to-date Textile or something?

Offline

#4 2006-09-04 07:01:18

zem
Developer Emeritus
From: Melbourne, Australia
Registered: 2004-04-08
Posts: 2,579

Re: Apply attribute to a span - what am I doing wrong?

FAQ.


Alex

Offline

#5 2006-09-04 07:11:31

d60eba
New Member
Registered: 2006-08-29
Posts: 2

Re: Apply attribute to a span - what am I doing wrong?

OK, to elaborate on zem’s statment, this works with a version of Textile stored here:
http://svn.textpattern.com/development/4.0/textpattern/lib/classTextile.php

Perhaps the classes and style part should be removed from the USAGE text at the top of the Textile that comes with Textpattern 4.0.3? It’s pretty confusing to have a USAGE statement that doesn’t actually work … ;-)

Last edited by d60eba (2006-09-04 07:12:42)

Offline

#6 2006-09-04 17:42:28

mattw
New Member
From: United States
Registered: 2004-12-03
Posts: 4
Website

Re: Apply attribute to a span - what am I doing wrong?

Ah, FAQ strikes again. Thanks for the help and direction.

Offline

#7 2006-09-04 23:23:19

zem
Developer Emeritus
From: Melbourne, Australia
Registered: 2004-04-08
Posts: 2,579

Re: Apply attribute to a span - what am I doing wrong?

Perhaps the classes and style part should be removed from the USAGE text at the top of the Textile that comes with Textpattern 4.0.3?

We can’t change the contents of a release without also changing the version number.


Alex

Offline

#8 2006-09-09 15:25:01

uli
Moderator
From: Cologne
Registered: 2006-08-15
Posts: 4,316

Re: Apply attribute to a span - what am I doing wrong?

from the very beginning i’m working with textile v.2.0beta (and txp v.4.0.3) and i continually get the same outcome as mattw in #3. i obviously had no typos in my tests, as i copied the examples from the textpattern help, but got the same results as before. so, “what am i doing wrong” literally enticed me into this thread! ;)


In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links

Offline

Board footer

Powered by FluxBB