Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2005-11-06 22:38:39

marz
Archived Plugin Author
From: Barbados
Registered: 2004-11-13
Posts: 43
Website

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

#3 2005-11-07 02:47:01

marz
Archived Plugin Author
From: Barbados
Registered: 2004-11-13
Posts: 43
Website

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.

  1. Open up txplib_misc.php
  2. Find the function, “markup_comment” it starts on line 1184.
  3. Make necessary adjustments.

Offline

#5 2005-11-07 03:16:30

marz
Archived Plugin Author
From: Barbados
Registered: 2004-11-13
Posts: 43
Website

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

#6 2006-02-23 22:32:35

robert1
Member
From: Passau
Registered: 2005-08-07
Posts: 51
Website

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).

Offline

Board footer

Powered by FluxBB