Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2007-07-06 18:58:25

elwario91
Member
Registered: 2007-07-06
Posts: 42

...use BBCode?

Hi!

Is there a plugin/mod to use BBCode in textpattern or at least smileys?
I searched but didn’t find something :(

Offline

#2 2007-07-06 19:13:54

critx
Member
Registered: 2007-06-27
Posts: 17

Re: ...use BBCode?

i think textile is much easier, isn’t it?

Offline

#3 2007-07-06 19:44:06

ardilla
Member
From: California, USA
Registered: 2007-06-09
Posts: 11
Website

Re: ...use BBCode?

… Why would you want BBCode? Might as well as use regular HTML.

Offline

#4 2007-07-06 21:00:30

elwario91
Member
Registered: 2007-07-06
Posts: 42

Re: ...use BBCode?

Yeah but what I would like is that for example “:)” is converted into a smiley.
I only need smilies :)

Offline

#5 2007-07-07 00:57:46

redbot
Plugin Author
Registered: 2006-02-14
Posts: 1,410

Re: ...use BBCode?

Offline

#6 2007-07-07 07:45:03

elwario91
Member
Registered: 2007-07-06
Posts: 42

Re: ...use BBCode?

Thanks for the link but I couldn’t let it work :(
I installed the plugin and then edited an article, added a smiley and replaced the body with the new tag but I still don’t have smilies.

Then I edited the plugin to add my plugins:

<?php
function ied_replacer ($atts)
{ // Smileys :) $smilies = array( ‘:me:’ => ‘<img src=“images/emoticones/emot1.gif”>’, ‘:hu:’ => ‘<img src=“images/emoticones/emot2.gif”>’, ‘_’ => ‘<img src=“images/emoticones/emot3.gif”>’, ‘:o’ => ‘<img src=“images/emoticones/emot4.gif”>’, ‘;)’ => ‘<img src=“images/emoticones/emot5.gif”>’, ‘:p’ => ‘<img src=“images/emoticones/emot6.gif”>’, ‘:D’ => ‘<img src=“images/emoticones/emot7.gif”>’, ‘:lol:’ => ‘<img src=“images/emoticones/emot8.gif”>’, ‘B)’ => ‘<img src=“images/emoticones/emot9.gif”>’, ‘:rolleyes:’ => ‘<img src=“images/emoticones/emot10.gif”>’, ‘_’ => ‘<img src=“images/emoticones/emot11.gif”>’, ‘(_(’ => ‘<img src=“images/emoticones/emot12.gif”>’, ‘:)’ => ‘<img src=“images/emoticones/emot13.gif”>’, ‘:angry:’ => ‘<img src=“images/emoticones/emot14.gif”>’, ‘:(’ => ‘<img src=“images/emoticones/emot15.gif”>’, ‘:unsure:’ => ‘<img src=“images/emoticones/emot16.gif”>’, ‘:wacko:’ => ‘<img src=“images/emoticones/emot17.gif”>’, ‘:blink:’ => ‘<img src=“images/emoticones/emot18.gif”>’, ‘:dark:’ => ‘<img src=“images/emoticones/emot19.gif”>’, ‘:sad:’ => ‘<img src=“images/emoticones/emot20.gif”>’, ‘:wub:’ => ‘<img src=“images/emoticones/emot21.gif”>’, ‘:ah:’ => ‘<img src=“images/emoticones/emot22.gif”>’ );

extract(lAtts(array(‘what’ => false), $atts)); switch ($what) { case ‘body’: $what=$GLOBALS[‘thisarticle’][‘body’]; case ‘excerpt’: $what=$GLOBALS[‘thisarticle’][‘excerpt’]; break; case ‘title’: $what=$GLOBALS[‘thisarticle’][‘title’]; break; case ‘message’: $what=$GLOBALS[‘thiscomment’][‘message’]; break; } return str_replace(array_keys($smilies), array_values($smilies), $what); } ?>

But the smilies aren’t still converted :(

I never could let work a plugin with TXP, please help me!

Offline

#7 2007-07-07 08:52:55

elwario91
Member
Registered: 2007-07-06
Posts: 42

Re: ...use BBCode?

I saw that you have to hit “no” to activate it…
But nom I have this error on the top of my page:

Parse error: parse error, unexpected ‘<’ in /var/www/users/regnumfr/textpattern/lib/txplib_misc.php(534) : eval()’d code on line 1
The above errors were caused by the plugin:ied_replacer

Offline

#8 2007-07-07 11:02:08

graeme
Plugin Author
Registered: 2004-06-21
Posts: 337
Website

Re: ...use BBCode?

Take out the <?php at the beginning and the ?> at the end – they aren’t needed inside plugins and as you’ve found, it actually breaks them.

Offline

#9 2007-07-07 13:12:41

elwario91
Member
Registered: 2007-07-06
Posts: 42

Re: ...use BBCode?

I don’t have errors anymore but nothing is converted into smileys :’(

Offline

#10 2007-07-07 13:24:08

graeme
Plugin Author
Registered: 2004-06-21
Posts: 337
Website

Re: ...use BBCode?

In your forms are you using the new tag supplied by ied_replacer instead of the default textpattern ones? Look back at the link provided above for examples.

Offline

#11 2007-07-07 13:43:54

elwario91
Member
Registered: 2007-07-06
Posts: 42

Re: ...use BBCode?

Sorry I don’t understeand what you mean :S

Offline

#12 2007-07-07 13:48:22

elwario91
Member
Registered: 2007-07-06
Posts: 42

Re: ...use BBCode?

I’ve just understeand, I use the tags provided by the plugin, but also tried the efault ones.
I think that this pluhgin is broken with the latest textpattern.

Offline

Board footer

Powered by FluxBB