|
List Info
Thread: Editing the Text_Wiki parser/renderer
|
|
| Editing the Text_Wiki parser/renderer |

|
2007-02-06 12:43:00 |
Hi, I hope that I'm not committing a cardinal sin by posting
here, I
couldn't find any instructions or faq, so sorry if this is
the wrong place.
I'm just trying to incorporate the Text_Wiki parser into my
site, and I
would like to change some of the outputs. For example, how
can I get it
to follow my style sheet rather than creating its own on the
fly? I've
looked in both the Parser and Renderer folders, but neither
seems to
have much in the way of info that I can understand! Could
someone help
me please?
Thanks,
LOI Kratong
------------------------------------------------------------
---------
To unsubscribe, e-mail: users-unsubscribe textwiki.tigris.org
For additional commands, e-mail: users-help textwiki.tigris.org
|
|
| Re: Editing the Text_Wiki
parser/renderer |

|
2007-02-07 02:57:27 |
Hi Josh,
I'm not directly involved in the XHTML renderer, but I know
it doesn't
have any default css or style associated with it.
In some of the output the "class" attribute is
set, in other places
(more common) the style is inlined - just because no css
files are
supposed to exist by default.
Anyway, you can change the generated output quite easily.
For example, open Render/Xhtml/Center.phph and change the
following text:
style="text-align: center;"
with the html you prefer, for example the following one:
class="center"
Then you can set the style of elements in your custom css
file.
Please note that most elements don't have classes or style
at all, which
is correct from my point of view.
I hope this helps. Ciao. Mic
Josh Sephton wrote:
> Hi, I hope that I'm not committing a cardinal sin by
posting here, I
> couldn't find any instructions or faq, so sorry if this
is the wrong place.
>
> I'm just trying to incorporate the Text_Wiki parser
into my site, and I
> would like to change some of the outputs. For example,
how can I get it
> to follow my style sheet rather than creating its own
on the fly? I've
> looked in both the Parser and Renderer folders, but
neither seems to
> have much in the way of info that I can understand!
Could someone help
> me please?
>
> Thanks,
> LOI Kratong
>
>
------------------------------------------------------------
---------
> To unsubscribe, e-mail: users-unsubscribe textwiki.tigris.org
> For additional commands, e-mail: users-help textwiki.tigris.org
>
>
>
>
------------------------------------------------------------
---------
To unsubscribe, e-mail: users-unsubscribe textwiki.tigris.org
For additional commands, e-mail: users-help textwiki.tigris.org
|
|
| Re: Editing the Text_Wiki
parser/renderer |

|
2007-02-07 04:36:35 |
Ah ha, that is surprisingly easy! Thanks a lot, I'm going
to have a
play around, and I'll get back to you with some results.
Just another question, how active is this mailing list? I
notice there
hasn't been much activity on the Text_Wiki website since
about 2004, is
this the case with the mailing list?
Thanks again,
Josh
mic wrote:
> Hi Josh,
>
> I'm not directly involved in the XHTML renderer, but I
know it doesn't
> have any default css or style associated with it.
> In some of the output the "class" attribute
is set, in other places
> (more common) the style is inlined - just because no
css files are
> supposed to exist by default.
>
> Anyway, you can change the generated output quite
easily.
> For example, open Render/Xhtml/Center.phph and change
the following text:
>
> style="text-align: center;"
>
> with the html you prefer, for example the following
one:
>
> class="center"
>
> Then you can set the style of elements in your custom
css file.
> Please note that most elements don't have classes or
style at all,
> which is correct from my point of view.
>
> I hope this helps. Ciao. Mic
>
> Josh Sephton wrote:
>> Hi, I hope that I'm not committing a cardinal sin
by posting here, I
>> couldn't find any instructions or faq, so sorry if
this is the wrong
>> place.
>>
>> I'm just trying to incorporate the Text_Wiki parser
into my site, and I
>> would like to change some of the outputs. For
example, how can I get it
>> to follow my style sheet rather than creating its
own on the fly? I've
>> looked in both the Parser and Renderer folders, but
neither seems to
>> have much in the way of info that I can understand!
Could someone help
>> me please?
>>
>> Thanks,
>> LOI Kratong
>>
>>
------------------------------------------------------------
---------
>> To unsubscribe, e-mail: users-unsubscribe textwiki.tigris.org
>> For additional commands, e-mail: users-help textwiki.tigris.org
>>
>>
>>
>>
>
>
------------------------------------------------------------
---------
> To unsubscribe, e-mail: users-unsubscribe textwiki.tigris.org
> For additional commands, e-mail: users-help textwiki.tigris.org
>
>
------------------------------------------------------------
---------
To unsubscribe, e-mail: users-unsubscribe textwiki.tigris.org
For additional commands, e-mail: users-help textwiki.tigris.org
|
|
| Re: Editing the Text_Wiki
parser/renderer |

|
2007-02-07 09:39:28 |
The list is not very active at all, recently. Very few
messages per month.
But the website and the code are updated quite regularly.
See:
<http://pear.php.net/package/Text_Wiki/download/All>
Ciao. Mic
Josh Sephton wrote:
> Ah ha, that is surprisingly easy! Thanks a lot, I'm
going to have a
> play around, and I'll get back to you with some
results.
>
> Just another question, how active is this mailing list?
I notice there
> hasn't been much activity on the Text_Wiki website
since about 2004, is
> this the case with the mailing list?
>
> Thanks again,
> Josh
>
> mic wrote:
>
>> Hi Josh,
>>
>> I'm not directly involved in the XHTML renderer,
but I know it doesn't
>> have any default css or style associated with it.
>> In some of the output the "class"
attribute is set, in other places
>> (more common) the style is inlined - just because
no css files are
>> supposed to exist by default.
>>
>> Anyway, you can change the generated output quite
easily.
>> For example, open Render/Xhtml/Center.phph and
change the following text:
>>
>> style="text-align: center;"
>>
>> with the html you prefer, for example the following
one:
>>
>> class="center"
>>
>> Then you can set the style of elements in your
custom css file.
>> Please note that most elements don't have classes
or style at all,
>> which is correct from my point of view.
>>
>> I hope this helps. Ciao. Mic
>>
>> Josh Sephton wrote:
>>
>>> Hi, I hope that I'm not committing a cardinal
sin by posting here, I
>>> couldn't find any instructions or faq, so sorry
if this is the wrong
>>> place.
>>>
>>> I'm just trying to incorporate the Text_Wiki
parser into my site, and I
>>> would like to change some of the outputs. For
example, how can I get it
>>> to follow my style sheet rather than creating
its own on the fly? I've
>>> looked in both the Parser and Renderer folders,
but neither seems to
>>> have much in the way of info that I can
understand! Could someone help
>>> me please?
>>>
>>> Thanks,
>>> LOI Kratong
>>>
>>>
------------------------------------------------------------
---------
>>> To unsubscribe, e-mail: users-unsubscribe textwiki.tigris.org
>>> For additional commands, e-mail: users-help textwiki.tigris.org
>>>
>>>
>>>
>>>
>>>
>>
------------------------------------------------------------
---------
>> To unsubscribe, e-mail: users-unsubscribe textwiki.tigris.org
>> For additional commands, e-mail: users-help textwiki.tigris.org
>>
>>
>>
>
>
------------------------------------------------------------
---------
> To unsubscribe, e-mail: users-unsubscribe textwiki.tigris.org
> For additional commands, e-mail: users-help textwiki.tigris.org
>
>
>
>
------------------------------------------------------------
---------
To unsubscribe, e-mail: users-unsubscribe textwiki.tigris.org
For additional commands, e-mail: users-help textwiki.tigris.org
|
|
| Adding rule to the Text_Wiki parser |

|
2007-02-09 17:44:17 |
Hi people, back again!
I am having great success ensuring the package renders
itself correctly,
now I would like to try something a little more advanced. I
am trying to
incorporate the PhpMathPublisher, and to do this I need to
find all of
the text between <m>....</m> tags and submit it
to a function. I have
been digging around but can't see an obvious config file
listing all of
the possible tags, or is it the case that I need to just
create a file
for it? I would appreciate it if someone could point me in
the right
direction :-D
Thanks,
Josh
------------------------------------------------------------
---------
To unsubscribe, e-mail: users-unsubscribe textwiki.tigris.org
For additional commands, e-mail: users-help textwiki.tigris.org
|
|
| Re: Adding rule to the Text_Wiki parser |

|
2007-02-12 16:57:29 |
Hi Josh,
it depends on what you use as both input and output
languages.
You'd need to write at least one class for the parser
(Mediawiki?) and
one for the renderer (XHTML?)
I suppose you'll need to write something like Preformatted
(I should
remove the inner text, to save it from further processing by
other rules).
It's not difficult at all. But not as easy as modifying a
configuration
file, either ;)
Keep me informed. Good work! Ciao. Mic
Josh Sephton wrote:
> Hi people, back again!
>
> I am having great success ensuring the package renders
itself correctly,
> now I would like to try something a little more
advanced. I am trying to
> incorporate the PhpMathPublisher, and to do this I need
to find all of
> the text between <m>....</m> tags and
submit it to a function. I have
> been digging around but can't see an obvious config
file listing all of
> the possible tags, or is it the case that I need to
just create a file
> for it? I would appreciate it if someone could point me
in the right
> direction :-D
>
> Thanks,
> Josh
>
>
------------------------------------------------------------
---------
> To unsubscribe, e-mail: users-unsubscribe textwiki.tigris.org
> For additional commands, e-mail: users-help textwiki.tigris.org
>
>
>
>
------------------------------------------------------------
---------
To unsubscribe, e-mail: users-unsubscribe textwiki.tigris.org
For additional commands, e-mail: users-help textwiki.tigris.org
|
|
| Re: Adding rule to the Text_Wiki parser |

|
2007-02-12 17:01:46 |
Grrrr I spent ages working on it earlier, understood pretty
much what I
needed to do, but my regular expressions suck, so I hit a
major brick
wall! I've posted in some other places for some help, but
I'm not sure
what's going to come of it.
Do you think that you may be able to help me? This could be
a really
good addition to the package as a whole, providing a
function for users
to enter mathematical formulas that are displayed
correctly!
Josh
mic wrote:
> Hi Josh,
> it depends on what you use as both input and output
languages.
>
> You'd need to write at least one class for the parser
(Mediawiki?) and
> one for the renderer (XHTML?)
>
> I suppose you'll need to write something like
Preformatted (I should
> remove the inner text, to save it from further
processing by other
> rules).
> It's not difficult at all. But not as easy as modifying
a
> configuration file, either ;)
>
> Keep me informed. Good work! Ciao. Mic
>
> Josh Sephton wrote:
>> Hi people, back again!
>>
>> I am having great success ensuring the package
renders itself correctly,
>> now I would like to try something a little more
advanced. I am trying to
>> incorporate the PhpMathPublisher, and to do this I
need to find all of
>> the text between <m>....</m> tags and
submit it to a function. I have
>> been digging around but can't see an obvious config
file listing all of
>> the possible tags, or is it the case that I need to
just create a file
>> for it? I would appreciate it if someone could
point me in the right
>> direction :-D
>>
>> Thanks,
>> Josh
>>
>>
------------------------------------------------------------
---------
>> To unsubscribe, e-mail: users-unsubscribe textwiki.tigris.org
>> For additional commands, e-mail: users-help textwiki.tigris.org
>>
>>
>>
>>
>
>
------------------------------------------------------------
---------
> To unsubscribe, e-mail: users-unsubscribe textwiki.tigris.org
> For additional commands, e-mail: users-help textwiki.tigris.org
>
>
------------------------------------------------------------
---------
To unsubscribe, e-mail: users-unsubscribe textwiki.tigris.org
For additional commands, e-mail: users-help textwiki.tigris.org
|
|
| Re: Adding rule to the Text_Wiki parser |

|
2007-02-12 17:21:34 |
Hi Josh.
For what I understood (maybe little) you should replicate
both
Parse/Mediawiki/Preformatted and Render/Xhtml/Preformatted.
You can copy the files and change the filename and class
name according
to your needs (Math for example).
In the parser, simply change "<pre" to
"<m" and "</pre>" to
"</m>" in
the regex.
Then in the renderer class, you'll have your text in
$options['text'],
ready to be elaborated and sent to output. I hope you've a
function or
some code for this, already.
Ah, you need to add Math to the rules in Wiki/Mediawiki.php,
put it just
after Preformatted.
But... others here could know the package more in deep, and
have better
ideas. I mostly work on the Creole parser.
Mic
Josh Sephton wrote:
> Grrrr I spent ages working on it earlier, understood
pretty much what I
> needed to do, but my regular expressions suck, so I hit
a major brick
> wall! I've posted in some other places for some help,
but I'm not sure
> what's going to come of it.
>
> Do you think that you may be able to help me? This
could be a really
> good addition to the package as a whole, providing a
function for users
> to enter mathematical formulas that are displayed
correctly!
>
> Josh
>
> mic wrote:
>
>> Hi Josh,
>> it depends on what you use as both input and output
languages.
>>
>> You'd need to write at least one class for the
parser (Mediawiki?) and
>> one for the renderer (XHTML?)
>>
>> I suppose you'll need to write something like
Preformatted (I should
>> remove the inner text, to save it from further
processing by other
>> rules).
>> It's not difficult at all. But not as easy as
modifying a
>> configuration file, either ;)
>>
>> Keep me informed. Good work! Ciao. Mic
>>
>> Josh Sephton wrote:
>>
>>> Hi people, back again!
>>>
>>> I am having great success ensuring the package
renders itself correctly,
>>> now I would like to try something a little more
advanced. I am trying to
>>> incorporate the PhpMathPublisher, and to do
this I need to find all of
>>> the text between <m>....</m> tags
and submit it to a function. I have
>>> been digging around but can't see an obvious
config file listing all of
>>> the possible tags, or is it the case that I
need to just create a file
>>> for it? I would appreciate it if someone could
point me in the right
>>> direction :-D
>>>
>>> Thanks,
>>> Josh
>>>
>>>
------------------------------------------------------------
---------
>>> To unsubscribe, e-mail: users-unsubscribe textwiki.tigris.org
>>> For additional commands, e-mail: users-help textwiki.tigris.org
>>>
>>>
>>>
>>>
>>>
>>
------------------------------------------------------------
---------
>> To unsubscribe, e-mail: users-unsubscribe textwiki.tigris.org
>> For additional commands, e-mail: users-help textwiki.tigris.org
>>
>>
>>
>
>
------------------------------------------------------------
---------
> To unsubscribe, e-mail: users-unsubscribe textwiki.tigris.org
> For additional commands, e-mail: users-help textwiki.tigris.org
>
>
>
>
------------------------------------------------------------
---------
To unsubscribe, e-mail: users-unsubscribe textwiki.tigris.org
For additional commands, e-mail: users-help textwiki.tigris.org
|
|
| Re: Adding rule to the Text_Wiki parser |

|
2007-02-12 17:28:58 |
Ah I see, hopefully someone will know it better. I tried
that earlier,
cloning the <html> parser, and in the rendering file
calling the
function, but to no avail, I must have overlooked something,
it simply
wasn't working. I'm gonna give it another shot tomorrow but
anyway
thanks for the interest, and I'll let you know if I'm
successful at all.
Cheers!
Josh
mic wrote:
> Hi Josh.
>
> For what I understood (maybe little) you should
replicate both
> Parse/Mediawiki/Preformatted and
Render/Xhtml/Preformatted.
> You can copy the files and change the filename and
class name
> according to your needs (Math for example).
> In the parser, simply change "<pre" to
"<m" and "</pre>" to
"</m>" in
> the regex.
> Then in the renderer class, you'll have your text in
$options['text'],
> ready to be elaborated and sent to output. I hope
you've a function or
> some code for this, already.
>
> Ah, you need to add Math to the rules in
Wiki/Mediawiki.php, put it
> just after Preformatted.
>
> But... others here could know the package more in deep,
and have
> better ideas. I mostly work on the Creole parser.
>
> Mic
>
> Josh Sephton wrote:
>> Grrrr I spent ages working on it earlier,
understood pretty much what I
>> needed to do, but my regular expressions suck, so I
hit a major brick
>> wall! I've posted in some other places for some
help, but I'm not sure
>> what's going to come of it.
>>
>> Do you think that you may be able to help me? This
could be a really
>> good addition to the package as a whole, providing
a function for users
>> to enter mathematical formulas that are displayed
correctly!
>>
>> Josh
>>
>> mic wrote:
>>
>>> Hi Josh,
>>> it depends on what you use as both input and
output languages.
>>>
>>> You'd need to write at least one class for the
parser (Mediawiki?) and
>>> one for the renderer (XHTML?)
>>>
>>> I suppose you'll need to write something like
Preformatted (I should
>>> remove the inner text, to save it from further
processing by other
>>> rules).
>>> It's not difficult at all. But not as easy as
modifying a
>>> configuration file, either ;)
>>>
>>> Keep me informed. Good work! Ciao. Mic
>>>
>>> Josh Sephton wrote:
>>>
>>>> Hi people, back again!
>>>>
>>>> I am having great success ensuring the
package renders itself
>>>> correctly,
>>>> now I would like to try something a little
more advanced. I am
>>>> trying to
>>>> incorporate the PhpMathPublisher, and to do
this I need to find all of
>>>> the text between <m>....</m>
tags and submit it to a function. I have
>>>> been digging around but can't see an
obvious config file listing
>>>> all of
>>>> the possible tags, or is it the case that I
need to just create a file
>>>> for it? I would appreciate it if someone
could point me in the right
>>>> direction :-D
>>>>
>>>> Thanks,
>>>> Josh
>>>>
>>>>
------------------------------------------------------------
---------
>>>> To unsubscribe, e-mail:
users-unsubscribe textwiki.tigris.org
>>>> For additional commands, e-mail:
users-help textwiki.tigris.org
>>>>
>>>>
>>>>
>>>>
>>>
------------------------------------------------------------
---------
>>> To unsubscribe, e-mail: users-unsubscribe textwiki.tigris.org
>>> For additional commands, e-mail: users-help textwiki.tigris.org
>>>
>>>
>>>
>>
>>
------------------------------------------------------------
---------
>> To unsubscribe, e-mail: users-unsubscribe textwiki.tigris.org
>> For additional commands, e-mail: users-help textwiki.tigris.org
>>
>>
>>
>>
>
>
------------------------------------------------------------
---------
> To unsubscribe, e-mail: users-unsubscribe textwiki.tigris.org
> For additional commands, e-mail: users-help textwiki.tigris.org
>
>
------------------------------------------------------------
---------
To unsubscribe, e-mail: users-unsubscribe textwiki.tigris.org
For additional commands, e-mail: users-help textwiki.tigris.org
|
|
| Re: Adding rule to the Text_Wiki parser |

|
2007-02-13 02:58:20 |
Hi Josh,
did you use insertRule() and enableRule() ? At what position
did you
insert the rule? I did this about one year ago and I just
remember,
that you had to be careful with the position.
Did you make sure, that your scripts are getting called at
all? You
can do this by intentionally causing a PHP error (start with
a parse
error, if that is shown, go ahead with something like
division by 0)
in your script.
Gregor
2007/2/13, Josh Sephton <josh heldtogether.co.uk>:
> Ah I see, hopefully someone will know it better. I
tried that earlier,
> cloning the <html> parser, and in the rendering
file calling the
> function, but to no avail, I must have overlooked
something, it simply
> wasn't working. I'm gonna give it another shot tomorrow
but anyway
> thanks for the interest, and I'll let you know if I'm
successful at all.
>
> Cheers!
> Josh
>
> mic wrote:
> > Hi Josh.
> >
> > For what I understood (maybe little) you should
replicate both
> > Parse/Mediawiki/Preformatted and
Render/Xhtml/Preformatted.
> > You can copy the files and change the filename and
class name
> > according to your needs (Math for example).
> > In the parser, simply change "<pre"
to "<m" and "</pre>" to
"</m>" in
> > the regex.
> > Then in the renderer class, you'll have your text
in $options['text'],
> > ready to be elaborated and sent to output. I hope
you've a function or
> > some code for this, already.
> >
> > Ah, you need to add Math to the rules in
Wiki/Mediawiki.php, put it
> > just after Preformatted.
> >
> > But... others here could know the package more in
deep, and have
> > better ideas. I mostly work on the Creole parser.
> >
> > Mic
> >
> > Josh Sephton wrote:
> >> Grrrr I spent ages working on it earlier,
understood pretty much what I
> >> needed to do, but my regular expressions suck,
so I hit a major brick
> >> wall! I've posted in some other places for
some help, but I'm not sure
> >> what's going to come of it.
> >>
> >> Do you think that you may be able to help me?
This could be a really
> >> good addition to the package as a whole,
providing a function for users
> >> to enter mathematical formulas that are
displayed correctly!
> >>
> >> Josh
> >>
> >> mic wrote:
> >>
> >>> Hi Josh,
> >>> it depends on what you use as both input
and output languages.
> >>>
> >>> You'd need to write at least one class for
the parser (Mediawiki?) and
> >>> one for the renderer (XHTML?)
> >>>
> >>> I suppose you'll need to write something
like Preformatted (I should
> >>> remove the inner text, to save it from
further processing by other
> >>> rules).
> >>> It's not difficult at all. But not as easy
as modifying a
> >>> configuration file, either ;)
> >>>
> >>> Keep me informed. Good work! Ciao. Mic
> >>>
> >>> Josh Sephton wrote:
> >>>
> >>>> Hi people, back again!
> >>>>
> >>>> I am having great success ensuring the
package renders itself
> >>>> correctly,
> >>>> now I would like to try something a
little more advanced. I am
> >>>> trying to
> >>>> incorporate the PhpMathPublisher, and
to do this I need to find all of
> >>>> the text between
<m>....</m> tags and submit it to a function. I
have
> >>>> been digging around but can't see an
obvious config file listing
> >>>> all of
> >>>> the possible tags, or is it the case
that I need to just create a file
> >>>> for it? I would appreciate it if
someone could point me in the right
> >>>> direction :-D
> >>>>
> >>>> Thanks,
> >>>> Josh
> >>>>
> >>>>
------------------------------------------------------------
---------
> >>>> To unsubscribe, e-mail:
users-unsubscribe textwiki.tigris.org
> >>>> For additional commands, e-mail:
users-help textwiki.tigris.org
> >>>>
> >>>>
> >>>>
> >>>>
> >>>
------------------------------------------------------------
---------
> >>> To unsubscribe, e-mail:
users-unsubscribe textwiki.tigris.org
> >>> For additional commands, e-mail:
users-help textwiki.tigris.org
> >>>
> >>>
> >>>
> >>
> >>
------------------------------------------------------------
---------
> >> To unsubscribe, e-mail: users-unsubscribe textwiki.tigris.org
> >> For additional commands, e-mail:
users-help textwiki.tigris.org
> >>
> >>
> >>
> >>
> >
> >
------------------------------------------------------------
---------
> > To unsubscribe, e-mail: users-unsubscribe textwiki.tigris.org
> > For additional commands, e-mail: users-help textwiki.tigris.org
> >
> >
>
>
------------------------------------------------------------
---------
> To unsubscribe, e-mail: users-unsubscribe textwiki.tigris.org
> For additional commands, e-mail: users-help textwiki.tigris.org
>
>
------------------------------------------------------------
---------
To unsubscribe, e-mail: users-unsubscribe textwiki.tigris.org
For additional commands, e-mail: users-help textwiki.tigris.org
|
|
|
|