If you want to work it with CLEditor, do the following: Comment or remove the lines below in ezreply.js:
/*
$('body').animate({ scrollTop: ipt.position().top }, 300);
ipt = ipt[0];
setCursorPosition(ipt, ipt.textLength);
ipt.focus();
*/
Then insert the lines below to the same place:
var ed = ipt[0].editor;
if (ed) {
// Update the frame to match the contents of textarea
ed.updateFrame();
}
An issue still remains though: it works only once without page refresh. Click reply -> write something -> post comment. You see your nice comment, but when you click reply again (without page refresh), nothing happens. I'd appreciate some help on fixing that...
im use russian latters for user nicks, when use "@" this simbol with russian nick - this nick dont have link to user profile (for users with latin letters works ok)
@andelf tell me more what i want to do, i dont know chinese lang how to modify '@mentions' and possible do link to profile when use cirillic latters with simbol '@'
@batters ok~ the key function is GetMention in the file functions.generl.php. there is a regular expression to match `@something`, so in order to use chinese or russian nick, you should modify it to support your lang. '/(?:^|[\s,\.])@([\S]{1,20})(?=[\s,\.!?]|$)/i' also library/core/class.format.php 's Menions() function first regexp change to '/(^|[\s,\.])@([\S]{1,20})(?=[\s,\.!?]|$)/i',
I've made some changes to this plugin to get it to work more reliably.
Previously it would stop working if the textarea was edited, as mentioned by @Csabbencs
It now uses val() rather than html() to check or modify the textarea contents, and the animate() call has also been changed to work more reliably.
Comments
I am planning to add a link to anchor of the comment.
Comment or remove the lines below in ezreply.js:
/* $('body').animate({ scrollTop: ipt.position().top }, 300); ipt = ipt[0]; setCursorPosition(ipt, ipt.textLength); ipt.focus(); */
Then insert the lines below to the same place:
var ed = ipt[0].editor; if (ed) { // Update the frame to match the contents of textarea ed.updateFrame(); }
An issue still remains though: it works only once without page refresh.
Click reply -> write something -> post comment. You see your nice comment, but when you click reply again (without page refresh), nothing happens.
I'd appreciate some help on fixing that...
how to modify '@mentions'
and possible do link to profile when use cirillic latters with simbol '@'
the key function is GetMention in the file functions.generl.php.
there is a regular expression to match `@something`, so in order to use chinese or russian nick, you should modify it to support your lang.
'/(?:^|[\s,\.])@([\S]{1,20})(?=[\s,\.!?]|$)/i'
also library/core/class.format.php 's Menions() function
first regexp change to '/(^|[\s,\.])@([\S]{1,20})(?=[\s,\.!?]|$)/i',
its not help rus nicks with simbol '@' dont have links to the profile
i change files functions.general.php and class.format.php as you wrote
perhaps you should full text search "mentions"
I've made some changes to this plugin to get it to work more reliably.
Previously it would stop working if the textarea was edited, as mentioned by @Csabbencs
It now uses val() rather than html() to check or modify the textarea contents, and the animate() call has also been changed to work more reliably.
Download: [removed]