Foren

Home » Liferay Portal » English » 3. Development

Kombinierte Ansicht Flache Ansicht Baumansicht
Threads [ Zurück | Nächste ]
toggle
Rochad Tlusty
Messageboard BBcode parsing
24. Juli 2012 13:24
Antwort

Rochad Tlusty

Rang: Junior Member

Nachrichten: 42

Eintrittsdatum: 18. Januar 2012

Neue Beiträge

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. Juli 2012 15:26
Antwort

Jelmer Kuperus

Rang: Liferay Legend

Nachrichten: 1192

Eintrittsdatum: 10. März 2010

Neue Beiträge

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. Juli 2012 08:05
Antwort

Rochad Tlusty

Rang: Junior Member

Nachrichten: 42

Eintrittsdatum: 18. Januar 2012

Neue Beiträge

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