Vista combinada Visión Plana Vista de árbol
Discusiones [ Anterior | Siguiente ]
toggle
Rochad Tlusty
Messageboard BBcode parsing
24 de julio de 2012 13:24
Respuesta

Rochad Tlusty

Ranking: Junior Member

Mensajes: 42

Fecha de incorporación: 18 de enero de 2012

Mensajes recientes

Im currently writing a plugin for CKEditor, which uses a custom bbcode tag. Inside the editor, everything works fine, it's being displayed properly and I can see the bbcode tags being stored in the database. The problem is when I go to view a thread that has a tag published with this plugin, Liferay doesn't seem to parse the custom bbcode tag. So I started looking around and I found this article on the BBcode implementation for Liferay. Now it looks like I will need to replace com.liferay.portal.kernel.parsers.bbcode.BBCodeTranslatorUtil. I was just wondering if anyone had some input on this, for example can I implement this without using the ext environment? Any help is very greatly appreciated.
Jelmer Kuperus
RE: Messageboard BBcode parsing
24 de julio de 2012 15:26
Respuesta

Jelmer Kuperus

Ranking: Liferay Legend

Mensajes: 1192

Fecha de incorporación: 10 de marzo de 2010

Mensajes recientes

If you want to use a different implementation of BBCodeTranslator then yes you'll need to use an ext plugin

In docroot/WEB-INF/ext-impl/src/META-INF/ you create a file called ext-spring.xml

 1<?xml version="1.0" encoding="UTF-8"?>
 2
 3<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
 4    <bean id="com.liferay.portal.kernel.parsers.bbcode.BBCodeTranslatorUtil" class="com.liferay.portal.kernel.parsers.bbcode.BBCodeTranslatorUtil">
 5        <property name="BBCodeTranslator">
 6            <bean class="com.yourcompany.YourImpl" />
 7        </property>
 8    </bean>
 9</bean


com.yourcompany.YourImpl you create under docroot/WEB-INF/ext-impl/src
Rochad Tlusty
RE: Messageboard BBcode parsing
25 de julio de 2012 8:05
Respuesta

Rochad Tlusty

Ranking: Junior Member

Mensajes: 42

Fecha de incorporación: 18 de enero de 2012

Mensajes recientes

Thank you Jelmer this is perfect! I really appreciate your help.