Page 1 of 1

Commands / Abbreviations

PostPosted: 27 Dec 2013, 22:34
by PGalea
Hello,

Im writing today to get a little advice on how to create some custom commands/abbreviations in order to make my life a little easier when assisting people with query's.

For example if I type "!faq" it will be replaced with a link to a project FAQ page.



I have added the following code to the functions_send.php:

Code: Select all
$text = str_replace('!faq', 'Testing123', $text);



It works great for the users receiving the text, although the sender still views the text being sent as "!faq".

In short I want the sender to also see the replaced text, just the same way if the sender sends ":)" they will see a smiley instead of the static text representing a smiley.



Can anyone point me in the right direction in order to achieve these results ?

I assume this would require some javascript editing ?

PostPosted: 27 Dec 2013, 22:49
by PGalea
Shortly after writing this I discovered how to do this you must add further replacements to arrowchat_core.js

Simply add a new replace function and add your function to all the receive events.

Topic Closed

PostPosted: 16 Dec 2014, 00:26
by Staff Bot
[b]This thread has been locked because the last post is greater than six months old. There is a good chance that the information in this thread is outdated. Please open a new topic if you wish to discuss this further.[/b]