We build. You grow.

Get best community software here

Start a social network, a fan-site, an education project with oxwall - free opensource community software

script topic's content | Forum

Jhon
Jhon Oct 9 '13

I want to shorten urls in forum topic ,I have inserted a script code into :

/ow_plugins/forum/views/controllers/topic_index.html

and the code changed to:

<div class="post_content"><script .......</script>{$post.text}</div>


But  it didn't script the topic's content at all, any error code above? 

Appreciate for any suggestions.

Daisy Team
Daisy Oct 17 '13
Jhon, could you please explain what you want to do in more details?
Jhon
Jhon Oct 17 '13
Quote from Daisy Jhon, could you please explain what you want to do in more details?

The script code by third party
 can shorten  url links in forum topics to short URLs automatically,for example: if topic's content contain link www.xxx.com/....,the script will shorten this link to gool.in/458225

Perhaps there is another problem , the script only encode links with tags [url]...........[/url] and href="..........." etc. but links posted in forum topics don't contain these tags.

Daisy Team
Daisy Oct 23 '13
We use the WYSIWYG text formatter which interprets HTML using the definite rules. If you want to add URL shortening service, you should figure out how the WYSIWYG functionality and URL shortening service work and create your custom plugin.

As far as I know it's quite complicated to integrate the URL shortening service which will creates/store the shorten URLs and required a lot of hard coding, but not adding a small java-script. So, the only way to create this feature is developing a new custom plugin.

I suggest that you download our new Plugin Skeleton plugin to see how to use this or that function. Here is URL to the Store item: http://www.oxwall.org/store/item/695
Also, please see the crash course for more information on how to create your own plugin here: http://docs.oxwall.org/dev:crash-course

If you are not familiar with the plugin development, it would be better for you to find a developer who can help you with this plugin development. I suggest visiting our Oxwall Market