auto link urls in timeline text posts

 

I have it so when anyone types a url into the timeline as text (meaning they are not adding as a link), it still autolinks the url.

I also have it set so you can @username when posting text to the timeline and it will autolink to the user.

First you must make the modifications I discuss here: http://www.boonex.com/forums/topic/Bug-in-timeline.htm

Next you must install autolinker.js from github. Google ''autolinker.js github'' - the first result.

Copy the autolinker.js file from the dist folder of the download to your themes js folder and link it from your header. 

Create a file in your themes template js folder anyname.js. Add the folowing lines to that file.

       var myTextEl = document.getElementById( 'textlinks' );
       myTextEl.innerHTML = Autolinker.link( myTextEl.innerHTML );

open autolinker.js and set twitter to true, urls to true, and set hashtag to 'twitter' (hashtags won't work until I figure out how to add the wall to the search). Set email and phone to false.

find the line that says return 'https://twitter.com/' + this.twitterHandle; and change the url to your own url (watch that https).

Save file.

Go to the modules/boonex/wall/tempates/base folder and open common_text.html. Add id="textlinks" to the div. After the closing div link your anyname.js filed you created in the beginning.

Save

Go to your site and type in a url and describe it in text, the url is clickable. Tag one of your friends with @user and its clickable

Quote · 3 Jun 2015

I wrote this late last night so I forgot one important detail.

You also must add the following script to your footer file, otherwise when you reload the page all the links vanish.

<script type="text/javascript">
       var thewalllinks = document.getElementById( 'bxwall' );
       thewalllinks.innerHTML = Autolinker.link( thewalllinks.innerHTML );
    </script>

Quote · 3 Jun 2015

Please note that there is official fix for the problem - http://www.boonex.com/forums/topic/Bug-in-timeline.htm#258551

First you must make the modifications I discuss here: http://www.boonex.com/forums/topic/Bug-in-timeline.htm

 

Rules → http://www.boonex.com/terms
Quote · 7 Jun 2015
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.