how to disable links in chat

35 views
Skip to first unread message

annie...@gmail.com

unread,
Oct 29, 2017, 7:04:58 PM10/29/17
to ajax...@googlegroups.com
hi everyone, is it possible to disable links in chat? i want to disable hyperlinks in chat where nothing can be clicked (standalone)

thanks in advance!

Bobby Russ

unread,
Oct 29, 2017, 7:43:47 PM10/29/17
to AJAX-chat
Do you want the url to be there or that ommitted too?

On Oct 29, 2017 7:04 PM, <annie...@gmail.com> wrote:
hi everyone, is it possible to disable links in chat? i want to disable hyperlinks in chat where nothing can be clicked

thanks in advance!

--
You received this message because you are subscribed to the Google Groups "AJAX-chat" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ajax-chat+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

annie...@gmail.com

unread,
Oct 29, 2017, 7:56:20 PM10/29/17
to ajax...@googlegroups.com
omit that as well that would be great. I tried setting the values to false at line 59,60 in cofing.js but it did nothing, unless there's some sort of rehash command or reset process im forgetting about? thanks for replying bobby


On Sunday, October 29, 2017 at 7:43:47 PM UTC-4, Bobby Russ wrote:
Do you want the url to be there or that ommitted too?
On Oct 29, 2017 7:04 PM, <annie...@gmail.com> wrote:
hi everyone, is it possible to disable links in chat? i want to disable hyperlinks in chat where nothing can be clicked

thanks in advance!

--
You received this message because you are subscribed to the Google Groups "AJAX-chat" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ajax-chat+...@googlegroups.com.

Bobby Russ

unread,
Oct 29, 2017, 8:10:26 PM10/29/17
to annie...@gmail.com, AJAX-chat
Depending upon your version you are using, look somewhere around 2784 in chat.js for this function:

        replaceBBCodeUrl: function(content, attribute) {
                var url, regExpUrl, link;
                if(attribute)
                        url = attribute.replace(/\s/gm, this.encodeText(' '));
                else
                        url = this.stripBBCodeTags(content.replace(/\s/gm, this.encodeText(' ')));
                regExpUrl = new RegExp(
                        '^(?:(?:http)|(?:https)|(?:ftp)|(?:irc)):\\/\\/',
                        ''
                );
                if(!url || !url.match(regExpUrl))
                        return content;

                this.inUrlBBCode = true;
                link = '<a href="'
                                + url
                                + '" onclick="window.open(this.href); return false;">'
                                + this.replaceBBCode(content)
                                + '</a>';
                this.inUrlBBCode = false;
                return link;
        },

then change: 
                link = '<a href="'
                                + url
                                + '" onclick="window.open(this.href); return false;">'
                                + this.replaceBBCode(content)
                                + '</a>';
to either this if you want all to be eliminated:

                link = '';

or to this if you want the content of the link without the link being used:

                link = this.replaceBBCode(content);

Hope that helps :)

On Sun, Oct 29, 2017 at 7:56 PM, <annie...@gmail.com> wrote:
if it isnt too much trouble to add that would be great. I tried setting the values to false at line 59,60 in cofing.js but it did nothing, unless there's some sort of rehash command or reset process im forgetting about? thanks for replying bobby
To unsubscribe from this group and stop receiving emails from it, send an email to ajax-chat+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
-----
"Dance as if no one were watching,
 Sing as if no one were listening,
 Live everyday as if it were your last,
 and love as if you've never been hurt."
 - Irish Proverb

annie...@gmail.com

unread,
Oct 29, 2017, 8:23:45 PM10/29/17
to AJAX-chat
worked perfect after clearing mysql database! Bobby, thank you so much for helping me! 

Bobby Russ

unread,
Oct 30, 2017, 12:27:36 AM10/30/17
to annie...@gmail.com, AJAX-chat
Anytime.

On Oct 29, 2017 8:23 PM, <annie...@gmail.com> wrote:
worked perfect after clearing mysql database! Bobby, thank you so much for helping me! 

--
Reply all
Reply to author
Forward
0 new messages