Printable Version of Topic
Click here to view this topic in its original format
Jcink.com Forums > Feedback and Discussion > Odds and Ends Scripts


Posted by: Dusty Jul 16 2017, 03:16 AM
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
https://github.com/duuuuuuuuuuuusty/JCF-Quote-Code-Blocks


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
https://github.com/duuuuuuuuuuuusty/JCF-RTF


JQuery shout-box adaptation
Expanded styling (user specific, etc)
Filtered doHTML/JC Ink BB code (prevents script execution/etc)
Audio notifications
Auto-refresh and manual refresh
Not iframe based
user posted image
https://github.com/duuuuuuuuuuuusty/Dust-box

Posted by: Delphi Jul 16 2017, 08:18 AM
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.

Posted by: owl Jul 16 2017, 01:50 PM
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!

Posted by: 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.

Posted by: kjrod98 Jul 17 2017, 01:58 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.

Posted by: owl Jul 17 2017, 09:36 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!

Posted by: Rosalieart Jul 20 2017, 01:55 PM
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!

Posted by: Dusty Aug 5 2017, 04:35 AM
owl
user posted image

whew lads. I'll upload this tomorrow or sometime when I'm not a zombie

kjrod98 that would certainly be possible, but you're killing me homie.

just kidding it wouldn't be too difficult at all. Maybe not right this second though!

Rosalieart Iii don't know that the random events would be possible (or at least, not in an un-editable fashion) actually. The only thing I can think of is removing the edit button (circumventable by editing the URL) or using the alert system to preserve a copy of the original roll in an admin's inbox, but I'm on my phone so I can't even check if that's an (ab)usable feature in the alert settings.

The miniprofile elements moved to the post would be totally doable, I'm just not sure why you would want to?

Posted by: Rosalieart Aug 5 2017, 09:06 PM
re: miniprofile elements -- I have a custom post template that includes a top info bar section where I'd like to put, for example, the member's post count or some other miniprofile variables pertaining to the player and leave the miniprofile for IC information essentially. Plugging the keys in directly didn't make them display, probably because they're meant to be in the miniprofile one and not the post row template itself /shrugs either way, not a big issue haha.

Posted by: Dusty Aug 13 2017, 04:02 AM
Wheee, JQ Shoutbox is up. Should work for y'all, but I dunno.

As far as miniprofile elements, that's a fairly specific implementation, but you could do something general by writing a string with the miniprofile variables in it, and parsing it to distribute with .addClass()

Posted by: multiplicity! Aug 13 2017, 05:01 AM
    RE: miniprofile elements

    I accomplish this by using CSS and HTML so it loads with the page, not after. Namely because it doesn't have a loading issue when I use the CSS/HTML method.

Posted by: kjrod98 Aug 13 2017, 11:06 AM
Gonna have a go at testing the shoutbox code. It looks really nice!

<3

Posted by: Chlocelot Aug 14 2017, 05:51 PM
Dusty, I would just like to love on you a little and say thank you, thank you, thank you for these. I've been looking EVERYWHERE for the quote/code things. You Rock!

Posted by: Ekko Oct 24 2017, 01:13 PM
These scripts are so amazing!

So I tried out the Recent Topics filter and while it did indeed filter out the forums I didn't want showing on it (advertising forum most especially, so my Recent Topics clip wasn't full of link-backs) it seems to have done too well of a job. Now my Recent Topics isn't showing anything. When a post is made, it will pop up on the Recent Topics for a couple hours and then vanish. Not sure what's causing this?

The url of the site is: https://tortall.jcink.net

Posted by: Dusty Oct 24 2017, 02:05 PM
I can't find your recent topics location, but I did just catch a dumb bug regarding the selector. Might fix it for you.

In other news, updated the JQ Shoutbox to enable channels:
user posted image

Should work, no promises.

Posted by: Ekko Oct 24 2017, 02:21 PM
Ah, my bad. Our Recent Topics clip is down in the footer/board stats area beneath "Today's Topics". In which it's completely blank. xD Will update and see if it does anything.

EDIT: ... I see what the issue is. If all of the "recent topics" are from forums you have hidden, it just shows nothing, like a display:none; effect rather than bumping the topics from the forums you DO want displayed up. Hahaha..

Posted by: Dusty Oct 24 2017, 03:07 PM
JC Ink has a hard limit of 15 recent topics, so if the 15 most recent posts are all from excluded forums then it will show up as blank. Make sure to adjust the maximum setting in System Settings > Topics Posts & Polls

Posted by: Chlocelot Nov 8 2017, 07:03 PM
Dusty

I have tried saving your codes and just wanted to know if I am doing something wrong, specifically with quote and code boxes.

When I paste the code into the wrapper with <script> tags, it works perfectly but I tried creating a .js file with Notepad++ to load into the file manager, but if I do that, it stops working and I'm not sure why.

Am I missing something or is it not possible to upload and link that script?

Posted by: Dusty Nov 8 2017, 07:30 PM
Link me to ya' page boyyo

'
Powered by Invision Power Board (http://www.invisionboard.com)
© Invision Power Services (http://www.invisionpower.com)