Thread Rating:
  • 4 Vote(s) - 3 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[For 1.8] [Firebase] - Rin Shoutbox 0.4.0
#41
(07-03-2017, 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.
Reply
#42
(07-04-2017, 04:33 AM)martec Wrote: 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.

Sadly doesn't seem to work, not sure why though, code is all good and not breaking anywhere, I'm just not getting any anchor tags anywhere as far as I can tell. Even after force/hard refreshing the scripts and pages, changing the version query, deactivating/reactivating plugin and trying SEO friendly URLs/default URLs.

Oh well, you tried, I won't bug you about it haha.
Reply
#43
(07-06-2017, 03:27 AM)faithconnors Wrote: Sadly doesn't seem to work, not sure why though, code is all good and not breaking anywhere, I'm just not getting any anchor tags anywhere as far as I can tell. Even after force/hard refreshing the scripts and pages, changing the version query, deactivating/reactivating plugin and trying SEO friendly URLs/default URLs.

Oh well, you tried, I won't bug you about it haha.

sorry my mistake

revert rinshoutbox.helper.js, and try steps below again.

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:
function shoutgenerator(reqtype,key,colorsht,font,size,bold,avatar,hour,username,message,type,ckold,direction,numshouts,cur,edtusr,uid) {

Find (line 152):
	var preapp = edtspan = area = scrollarea = count = usravatar = shoutstyle = '';

add in next line:
username = "<a href='./user-"+uid+".html'>"+username+"</a>";

After editing clear the browser cache and cloudflare if you are using.
Reply
#44
(07-06-2017, 07:01 AM)martec Wrote: sorry my mistake

revert rinshoutbox.helper.js, and try steps below again.

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:
function shoutgenerator(reqtype,key,colorsht,font,size,bold,avatar,hour,username,message,type,ckold,direction,numshouts,cur,edtusr,uid) {

Find (line 152):
	var preapp = edtspan = area = scrollarea = count = usravatar = shoutstyle = '';

add in next line:
username = "<a href='./user-"+uid+".html'>"+username+"</a>";

After editing clear the browser cache and cloudflare if you are using.

Well whaddya know, it works!
Thanks a ton man, I really appreciate it.
Reply
#45
im confused with installing
Reply
#46
(07-12-2017, 05:38 AM)ketamine Wrote: im confused with installing

Hi,

What step are you having problem with?
Reply
#47
anyone know how to change the background color? .. pic attached.
Been looking for hours.. any help here would be appreciated very much.

area marked in red "not whole area just the shouts area"


http://imgur.com/a/BbWhs
Reply
#48
(07-18-2017, 12:49 PM)bigmug Wrote: anyone know how to change the background color? .. pic attached.
Been looking for hours.. any help here would be appreciated very much.

area marked in red "not whole area just the shouts area"


http://imgur.com/a/BbWhs

root/jscripts/rin/shoutbox/style.css

find:
.wrapShout{
 padding:5px;
 background: #FBFBFB;
 border:1px solid #CCCCCC;
 overflow:auto;
}

replace:

.wrapShout{
    padding: 5px;
    background: linear-gradient(to bottom,transparent,rgba(0,0,0,0.4)) repeat scroll 0% 0% #1B1B1B;
    border: 1px solid #CCCCCC;
    overflow: auto;
}

find:

.msgShout {
 border-bottom: 1px dotted rgba(0, 0, 0, 0.1);
 color: rgb(96, 96, 96);
 font-size: 12px;
 font-family: sans-serif,Tahoma,Verdana,Arial;
 padding-bottom: 8px;
 padding-top: 8px;
 word-break: break-all;
}

replace:

.msgShout {
    border-bottom: 1px dotted #ddd;
    color: #eef4f5;
    font-size: 12px;
    font-family: sans-serif,Tahoma,Verdana,Arial;
    padding-bottom: 8px;
    padding-top: 8px;
    word-break: break-all;
    text-shadow: none !important;
}

Do not forget to clear the cache of browser and in cloudflare too if you use (https://support.cloudflare.com/hc/en-us/...e-my-cache- ).
Reply
#49
(07-18-2017, 01:34 PM)martec Wrote:
(07-18-2017, 12:49 PM)bigmug Wrote: anyone know how to change the background color? .. pic attached.
Been looking for hours.. any help here would be appreciated very much.

area marked in red "not whole area just the shouts area"


http://imgur.com/a/BbWhs

root/jscripts/rin/shoutbox/style.css

find:
.wrapShout{
 padding:5px;
 background: #FBFBFB;
 border:1px solid #CCCCCC;
 overflow:auto;
}

replace:

.wrapShout{
    padding: 5px;
    background: linear-gradient(to bottom,transparent,rgba(0,0,0,0.4)) repeat scroll 0% 0% #1B1B1B;
    border: 1px solid #CCCCCC;
    overflow: auto;
}

find:

.msgShout {
 border-bottom: 1px dotted rgba(0, 0, 0, 0.1);
 color: rgb(96, 96, 96);
 font-size: 12px;
 font-family: sans-serif,Tahoma,Verdana,Arial;
 padding-bottom: 8px;
 padding-top: 8px;
 word-break: break-all;
}

replace:

.msgShout {
    border-bottom: 1px dotted #ddd;
    color: #eef4f5;
    font-size: 12px;
    font-family: sans-serif,Tahoma,Verdana,Arial;
    padding-bottom: 8px;
    padding-top: 8px;
    word-break: break-all;
    text-shadow: none !important;
}

Do not forget to clear the cache of browser and in cloudflare too if you use (https://support.cloudflare.com/hc/en-us/...e-my-cache- ).

Worked like a charm, Thanks Smile
ps. .. for others who might use this..dont forget to press [CRTL] +[f5] keys to refresh cache.
Reply
#50
When I press ENTER the post just makes another line instead of sending; Is there something I am missing?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)