Foren

Messageboard BBcode parsing

thumbnail
Rochad Tlusty, geändert vor 11 Jahren.

Messageboard BBcode parsing

Junior Member Beiträge: 42 Beitrittsdatum: 18.01.12 Neueste 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.
thumbnail
jelmer kuperus, geändert vor 11 Jahren.

RE: Messageboard BBcode parsing

Liferay Legend Beiträge: 1191 Beitrittsdatum: 10.03.10 Neueste 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

<!--?xml version="1.0" encoding="UTF-8"?-->

<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">
	<bean id="com.liferay.portal.kernel.parsers.bbcode.BBCodeTranslatorUtil" class="com.liferay.portal.kernel.parsers.bbcode.BBCodeTranslatorUtil">
		<property name="BBCodeTranslator">
			<bean class="com.yourcompany.YourImpl" />
		</property>
	</bean> 
</beans>
<br><br>com.yourcompany.YourImpl you create under docroot/WEB-INF/ext-impl/src
thumbnail
Rochad Tlusty, geändert vor 11 Jahren.

RE: Messageboard BBcode parsing

Junior Member Beiträge: 42 Beitrittsdatum: 18.01.12 Neueste Beiträge
Thank you Jelmer this is perfect! I really appreciate your help.