Add ReplyNew TopicNew Poll

 Odds and Ends Scripts, taking requests since I need sO mUcH practice
#
Hi there. Didn't like the idea of starting separate new threads, so I'm just going to start dumping all of my itty bitty scripts in here as they're created.


Mobile-friendly quote/code highlight and copy
CSS transitions friendly
Fixes redundant #QUOTE/#CODE IDs
user posted image
Download (GitHub)



JQuery recent topics filter/non-index cache
Filters and excludes topics by forum ID
Tooltip compatible, tooltip hover contains timestamp
Stock, parses into <li> elements
Updates on index page visit
user posted image
Example courtesy of Delphi
Download (GitHub)



JS image to div conversion
Replaces award images with divs for use with spritesheets
Can also be used to target member-list group icons, etc
Saves load time on sites that have high award usage
Image's src becomes its classname, title is retained
CODE
// Image to DIV awards, Dusty@forum.jcink.com
var imgs = document.querySelectorAll('.pbaward img');
for (var i = 0; i < imgs.length; i++) {
 var isrc = imgs[i].getAttribute('src'),
   ititle = imgs[i].getAttribute('title'),
   nu = document.createElement('div');
   nu.className = isrc
   nu.setAttribute('title', ititle)
   imgs[i].parentNode.replaceChild(nu, imgs[i]);
}



This post has been edited by Dusty: Jul 16 2017, 03:21 AM
PM
#
Easy to install, exactly what I needed, and although a little lippy the developer is a pretty awesome dude http://files.b1.jcink.com/html/emoticons/tongue.gif (He also doesn't mind when you ask him a gazillion unrelated questions) .

++++ Awesome.

signature
user posted image
Brent Weeks AU // Modern Fantasy
#
These are really neat Dusty, I'll have to crack into some of these and play with them on my sites.

RE: Requests, if you're still taking them then it would be awesome (though I have no idea if it's possible) to do something about making the shoutbox a little more modern, particularly if there was some sort of sound indication if a new message was made?

Might not be possible, but I figured I'd try my luck. At any rate, thanks for the awesome scripts you've made already!

signature
user posted image
#
Thanks Owl, and Delphi (though, y'know, maybe slightly less for that lippy comment http://files.b1.jcink.com/html/emoticons/tongue.gif)

I took a minute to explore the shoutbox settings page, and that actually seems entirely doable. I don't see why not, at least - there's enough to make a suitable c-box replacement, even. The username wouldn't be adjustable like they are with c-boxes, but anything else.. shooould? be doable.

Out of curiousity, what sort of modernization were you thinking about? Notification sounds should be simple enough.

This post has been edited by Dusty: Jul 17 2017, 03:14 AM
PM
#
Oh, that recent topics code and the quote/code code are perfect.

If you're able to get notification noises for the cbox to work too, it'd be really nice to use the standard jcink cbox as an OOC chatbox instead of having to rely on cbox/ishoutbox/others. (Right now I've been using jcink's one as an in-character one, but it's so tedious to have to rely on a separate one)

Actually, that gives me an idea. Would it be possible to add a dropdown to the jcink cbox post form, that would have two options, one for IC and another for OOC (OOC being default, of course)? Depending on what is selected, that option specified could add a class/id to that particular comment, and then the frame could be switched into tabs to only show comments with that particular class/id. Theoretically it would mimic having a separate cbox for each/separate channels of a sort.

No clue how feasible the above would be, I haven't looked at the cbox code in... years, at this point lol. I've also been up and without coffee, so if that makes zero sense at all let me know.
PM
#
QUOTE (Dusty @ Jul 17 2017, 03:09 AM)
Thanks Owl, and Delphi (though, y'know, maybe slightly less for that lippy comment http://files.b1.jcink.com/html/emoticons/tongue.gif)

I took a minute to explore the shoutbox settings page, and that actually seems entirely doable. I don't see why not, at least - there's enough to make a suitable c-box replacement, even. The username wouldn't be adjustable like they are with c-boxes, but anything else.. shooould? be doable.

Out of curiousity, what sort of modernization were you thinking about? Notification sounds should be simple enough.


I know some people have requested, in the past, that the avatar show up along side the messages but I don't think that's a make or break situation - any other modernization outside of a sound notification is mostly to do with style, and I think most of that could be handled with CSS (that being said if it's possible to inject some extra classes in there, that would be fantastic).

RE: Usernames, would it be possible to have a setting that:

1. Always used the name of the parent account, no matter what account was posting, or
2. Used a custom profile field to pull a preferred name?

I think it'd be a really useful script with or without any username customization, though - it's as simple as posting.

One thing that would be neat (if possible) would be the ability to delete your own posts with the variable shoutbox the way you can on /index.php?act=Shoutbox (which would hopefully eliminate some issues with posting with the wrong username) but that's all extra.

Thanks for considering this, by the way!

signature
user posted image
#
Personally, if you're doing requests, i'd love some sort of tweak if possible to allow keys from the miniprofile to be used in the post rows section for custom html templates! not sure if it's possible though, haha.

Alternately, some sort of script that appends a sort of 'dice roll' to the posts that isn't editable members and can be set to spit out a line of text for random events, like "You found 20 coins!" "A slime has appeared."

Neither are vital or pressing, but both would be useful, i think!
PM
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:
Share this topic:
« Next Oldest | Feedback and Discussion | Next Newest »

Options Add ReplyNew TopicNew Poll