Any themes that change the way attachments are displayed?

Started by Jade Elizabeth, September 04, 2015, 11:16:28 AM

Previous topic - Next topic

Jade Elizabeth

Has anyone seen any interesting themes that change how attachments are displayed? Or even a mod?
Once proud Documentation Writer and Help Squad Leader | Check out my new adult coloring career: Color With Jade/Patreon.

Antes


margarett

Well you have 2 inline attachments MODs (from dougiefresh Spuds), but that's all I know.
What are you looking for?
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

Jade Elizabeth

Well I looked through the attachments section of the mod site....but didn't see anything I liked. Maybe I will search for "attachments" :D

I sort of want to make them look almost like a gallery of sorts. Either with them all lined up as large thumbnails OR with some sort of almost slider feature where the first one or one selected becomes "featured".

I also want to hide the file names and focus on the file itself (or extension icon). I was wondering how much of this was accomplish-able with a theme and how much required a mod. I'd like to keep it all on the theme side...

Like this but not ugly and using bigger thumbnails:
Once proud Documentation Writer and Help Squad Leader | Check out my new adult coloring career: Color With Jade/Patreon.

Antechinus

Yeah that sort of thing is easy. I did something like that in the Apocalypse testbed thingy. Attachments sit in rows of thumbnails. Making the first one bigger would just be a matter of using :first-child in the CSS.

It needed a slight tweak to the template and javascript, but most of it was done with CSS. Can all done as part of a theme.

Bloc

ShelfLife makes attachment pictures display in a row, opens up a full-screen image when clicked(and clicked to hide again)..and has type icons. No js, only markup and CSS used.

But as Antechninus  mentions, not hard at all to make the first into a bigger one. With some js even a gallery/slider function could easily be accomplished.

Antechinus

I think you could even do a slider with CSS3 easily enough. Can't see why not. :)

Jade Elizabeth

Bloc that is awesome! Do the docs just display like that or is that a custom icon type thing? I will go have a look at that theme later :D.

Ant that is really relieving to hear, I got very worried I might have to go into sources for more than a slight tweaking if you know what I mean. I would like to consider captions but I don't think I'm skilled enough for that yet!
Once proud Documentation Writer and Help Squad Leader | Check out my new adult coloring career: Color With Jade/Patreon.

Bloc

The theme checks the extension of the attachment and just fetches a matching "type" icon. :) But no, it will only download the actual doc file, not show in the browser - if thats what you meant.

Feel free to use the code. It will only use what the default theme is given, so it should work fine on other themes too. For the gallery effect you need some styles from index.css.

Actually..theres a lot you can do from the theme since its PHP-based. A lot of info is available to deconstruct/construct your custom bits. And if something fails you can just use another theme instead and get your site back right away. Not so easy if it is a mod, even worse if you use hooks. ;) 

Antechinus

But Bloc! Hooks are awesome! Hooks are the best thing ever. No, really. :D

Jade Elizabeth

Yeah. Problem is I want to start mucking around on 2.1 now. I know it's probably a long way off but I've already torn the hell out of these templates (most of them gutted and re-written)...and I don't have attachments even on this forum enabled properly or configured so I think I have plenty of time to do it and if I finish early by some miracle, well then I guess I am going to break a rule about production sites ;).


How is it worse with hooks? Can't you just unhook it and fix it and then rehook it? ha ha :D
Once proud Documentation Writer and Help Squad Leader | Check out my new adult coloring career: Color With Jade/Patreon.

Bloc

Hehe, yeah. :) If you have a means to unhook easily maybe..what I meant was, and this I been fighting a bit with, is that if you add the hook and make a mistake in the code, you need to remove it manually in database first. While using a theme just means ?theme=1(or if you are really clever ?theme=copy-of-your-working-theme. On your localhost it don't mean anything, worse if you, like me which it seems you are, like to try out stuff *live* :D

But yes, hooks are preferable to mods generally. Even I got that lol.

Jade Elizabeth

Yes I do dev live, but I have a dev theme so it's their own fault for using it ;).

With 2.1 though it's on my localhost. I didn't know hooks set in the database, I thought they were all code. Interesting to know!
Once proud Documentation Writer and Help Squad Leader | Check out my new adult coloring career: Color With Jade/Patreon.

Bloc

Yup, they are set in the database. Check the Settings table, and look for anything "integrate_", they will contain the functions for that particular hook, some hooks are used for the required PHP files too.

live627

I just wanted to clarify something about hooks: you can rename the function or move the file to stop it from running; however, in 2.1 you get a nice little error in the  log.

Also see http://www.simplemachines.org/community/index.php?topic=539525.msg3835239#msg3835239 for an example of adding a hook without touching the database.

Illori

also in 2.1 there is a UI for managing integration hooks. although i have not tested it much i assume it works well. you can disable hooks from there, or enable them again.

Bloc

Quote from: live627 on September 07, 2015, 03:27:30 AM
I just wanted to clarify something about hooks: you can rename the function or move the file to stop it from running; however, in 2.1 you get a nice little error in the  log.

Also see http://www.simplemachines.org/community/index.php?topic=539525.msg3835239#msg3835239 for an example of adding a hook without touching the database.

Thanks, I wasn't aware of that option. Could be useful.

Quote from: Illori on September 07, 2015, 06:11:27 AM
also in 2.1 there is a UI for managing integration hooks. although i have not tested it much i assume it works well. you can disable hooks from there, or enable them again.

Even better. :)

Jade Elizabeth

I just want to say that I really appreciate all the help!!

I've been trying to make a system to work inside of SMF but I don't know how to do image/file uploading and it's really scaring the ****** out of me security wise....so I figured maybe I should make the boards use a different theme since themeing is where my skill is at....and since I had no idea how to tackle notifications of new stuff/replies/comments on the items my system would have (and no a gallery wouldn't work for what I wanted). Maybe one day I will have the skills I need to get it done how I want but for now it might just be easier to do it this way!
Once proud Documentation Writer and Help Squad Leader | Check out my new adult coloring career: Color With Jade/Patreon.

Advertisement: