1 mrdav Aug 01, 2007 23:28
3 yabba Aug 03, 2007 15:45
Hey MrDav, good to see you're still alive :D
I've forgotten what my original hack was. If you could jog my memory with the code I'll see if I can update it
¥
4 mrdav Aug 03, 2007 19:25
Yabba: In /b2evocore/_class_comment.php was this code;
// YaBBa's hack to use renderer in comments
global $Renderer;
$renderers = explode( ".","b2evALnk" );
$post_renderers = $Renderer->validate_list( $renderers );
$comment = $Renderer->render( $comment, $post_renderers, $format );
// end hack
I tried to use it in /inc/model/_comment.class.php and it generated an error, but did leave the link. I can't remember what the error was. :(
Edit I reproduced the error:
Fatal error: Call to a member function on a non-object in /var/www/vhosts/remonstrans.net/httpdocs/inc/MODEL/comments/_comment.class.php on line 883
The code on that line is:
$post_renderers = $Renderer->validate_list( $renderers );
It did not generate a comment this time...
5 yabba Aug 04, 2007 07:03
Ok, now I'm confused, I just looked at the code and the Auto-Link plugin already works on comments in 1.9.x so all you should need to do is install it.
¥
6 mrdav Aug 04, 2007 16:05
Well, it doesn't! :'(
I even re-installed it, and it just won't do it.
If I could just get the renderer/html checker to accept the "a href" tag, I would be satisfied.
Is that a possibility? 88|
EDIT:
You can enter a url from the backoffice editor, but not from the post a comment on the blog page.
7 yabba Aug 05, 2007 08:58
To allow the <a> tag in comments, create conf/_overrides_TEST.php with the following ;)
<?php
$comment_allowed_tags .= '<a>';
$comments_allowed_tags += array( 'a' => C_E_a_content ); // Allowing this will call for a whole lot of comment spam!!!
?>
¥
8 mrdav Aug 05, 2007 14:32
Yabba, my man! It almost works! ;)
It generated this error
Warning: Cannot modify header information - headers already sent by (output started at /var/www/vhosts/remonstrans.net/httpdocs/conf/_overrides_TEST.php:4) in /var/www/vhosts/remonstrans.net/httpdocs/inc/MODEL/skins/_skin.funcs.php on line 71
I commented out the send content bit in _skin.functions.php, and "a" was included in the allowable tags. I inserted the test URL and it generated a similar error message in about 6-8 files when I tried to send the comment.
9 yabba Aug 05, 2007 14:44
Check you haven't got any whitespace in _overrides_TEST.php ( just after the ?> )
¥
10 mrdav Aug 05, 2007 19:35
Oh, geeeze. doh :oops:
I copy and pasted into crimson editor, and when I copied I got a whitespace.
You da man!
11 yabba Aug 05, 2007 20:19
don't let yer boss hear you say that huh? :roll:
¥
12 mrdav Aug 05, 2007 20:32
Well, when your boss is also your Dad, you can do pretty much anything you want...saving things he has said no to. And who wants to do them anyway? B)
I was looking for the same feature.
:)