Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Markdown on Comments in TXP 4.0.2 (blockLite() undefined function)
I just upgraded to TXP 4.0.2 and using Markdown, instead of Textile on comments causes an error. Call to undefined function blockLite() in txp_misclib. Now I know why the error is being cause, Markdown doesn’t have a blockLite() function, just the Textile() function.
Is there a any way to solve this or at least get around it ?
Offline
#2 2005-11-07 01:22:05
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: Markdown on Comments in TXP 4.0.2 (blockLite() undefined function)
Currently there is no built-in way to switch markup (that’s coming soon…), which means you’re modifying the files. What did you change?
Topic moved.
Offline
Re: Markdown on Comments in TXP 4.0.2 (blockLite() undefined function)
I’m using PHP Markdown instead of textile. I just rename markdown.php as classTextile.php and drop it into the /lib/ folder. Other than that I haven’t changed anything. Textpattern still functions as normal, using Markdown on the articles. The error just occurs whenever you try to post a comment. I know I’d have to change the call to Textile in the blockLite() function. I just don’t know exactly what to change…
Last edited by marz (2005-11-07 02:47:39)
Offline
#4 2005-11-07 03:01:32
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: Markdown on Comments in TXP 4.0.2 (blockLite() undefined function)
Okay.
- Open up txplib_misc.php
- Find the function, “markup_comment” it starts on line 1184.
- Make necessary adjustments.
Offline
Re: Markdown on Comments in TXP 4.0.2 (blockLite() undefined function)
Yep. I made some changes, and it worked. So far, nothings broken…
Here’s what I have..
<pre><code> function markup_comment($msg) { global $prefs, $txpcfg;
include_once $txpcfg[‘txpath’].’/lib/classTextile.php’; $textile = new Textile();
extract($prefs);
$im = (!empty($comments_disallow_images)) ? 1 : ‘’; $msg = $textile->TextileThis($msg,’‘,’‘,$im,’‘);
return $msg;
}
</code></pre>
Last edited by marz (2005-11-07 03:17:01)
Offline
Re: Markdown on Comments in TXP 4.0.2 (blockLite() undefined function)
Thanks. I had the problem after the acronym-hack in the classTextile.php
And gravatars I use now, also. Maybe this is responsible for that, too (images in comment).
Meine Textpattern-Seite mit kuriose, lustige Fotos – TXP-Template
Infos zu Webseitenoptimierung für Suchmaschinen.
Offline