Pages: (3) 1 2 3  ( Go to first unread post ) Add ReplyNew TopicNew Poll

 Odds and Ends Scripts, taking requests since I need sO mUcH practice
#
Hey Dusty, loving all of these lil mods<3 Just wanted to pop in and say that lol.
#
Made a slight addition to the shoutbox code on my own site to unlink guest names for consistency, figured I'd share. Only works when user group prefix/suffix is set to false because laziness and unsure of how to go about that.

Replace
CODE
a.find('.sbr_nn a').text(msg_arr['nn']).attr('href', '/index.php?showuser=' + msg_arr['id'])

with
CODE
a.find('.sbr_nn a').text(msg_arr['nn']).attr('href', '/index.php?showuser=' + msg_arr['id'])
if(msg_arr['id'] == 0){
   a.find('.sbr_nn').text(msg_arr['nn'])
}
PM
#
Dusty I feel like a massive noob for this but I don't know how to get the avatars working in the shoutbox! I know it gives directions on the github but I'm incredibly confused still XD

Like... where do I put the <div class="avatar"> < !-- |avatar| --></div> and then do I do this: "default_avatar_location = '.avatar img'," ?

Send help http://files.b1.jcink.com/html/emoticons/biggrin.gif

This post has been edited by molzify: Jun 30 2018, 12:19 PM

signature
user posted image 
PM
#
No biggy, I've been meaning to update these scripts!

The avatar element goes in your wrapper, somewhere. It can be set to display:none; and it'll still function. Then give the script its selector string in that variable, formatted like you would any regular CSS
PM
#
Nope, I'm still managing to screw it up still :/


Heres what I have

CODE
.avie img{display:none;}
which is sitting at the bottom of the CSS

CODE
default_avatar_location = '.avie img'


and then
CODE
<div class="avie"> <img src="< !-- |avatar| -->"></div>  
which is sitting right underneath .sbwraapbraapbraap

signature
user posted image 
PM
#
I'm not confident right now since I'm on my phone, but I believe the avatar variable resolves to an image element itself, rather than the direct URL. You'd need to do <div class='avie'><!-- |avatar| --></div> I think
PM
#
Man these avatars really don't want to show up XD I've tried deleting "img" in both the CSS and the settings, then alternating them and that hasn't worked either.

signature
user posted image 
PM
#
Sorry, I keep forgetting to check back in. Could I get a link to the page it's hosted on?
PM
#
I've made a thread over in general support as I dont want to hijack this thread with my problems XD https://forum.jcink.com/index.php?showtopic=29914

signature
user posted image 
PM
0 User(s) are reading this topic (0 Guests and 0 Anonymous Users)
0 Members:
Share this topic:
« Next Oldest | Feedback and Discussion | Next Newest »

OptionsPages: (3) 1 2 3  Add ReplyNew TopicNew Poll