2017-07-04, 04:33 AM
(2017-07-03, 08:26 PM)faithconnors Wrote: [ -> ]This is an excellent plugin, loving it so far.
One question: Is there a way to make usernames redirect to profile URLs? I've also tried playing with the .php file but had no luck really.
If you don't want to update the plugin itself, you could just let me know which parts of the file to edit lol
Thanks, have a good one man.
rinshoutbox.helper.js
Find (line 704):
shoutgenerator(reqtype,key,colorsht,font,size,bold,avatar,hour,username,message,type,ckold,direction,nums,cur,edtusr);
replace:
shoutgenerator(reqtype,key,colorsht,font,size,bold,avatar,hour,username,message,type,ckold,direction,nums,cur,edtusr,uid);
Find (line 151):
function shoutgenerator(reqtype,key,colorsht,font,size,bold,avatar,hour,username,message,type,ckold,direction,numshouts,cur,edtusr) {
replace:
shoutgenerator(reqtype,key,colorsht,font,size,bold,avatar,hour,username,message,type,ckold,direction,numshouts,cur,edtusr,uid) {
Find (line 176):
username = username.replace(/(<([^>]+)>)/ig,"");
add in next line:
username = "<a href='./user-"+uid+".html'>"+username+"</a>";
After editing clear the browser cache and cloudflare if you are using.