Digital experiences for all disciplines
New Landing › How can we help? › Themeforest Theme Support › Dante › Portfolio Lightbox Custom Content
New Landing › How can we help? › Themeforest Theme Support › Dante › Portfolio Lightbox Custom Content
- This topic has 5 replies, 3 voices, and was last updated 10 years by Kyle – SUPPORT.
-
Posted in: Dante
-
April 22, 2014 at 7:56 pm #69222
Hi guys —
Love the theme, using it to set up a client WP site right now. WP3.9, Dante 2.53.
They’ve asked me to customize the theme (I’m a developer) to provide a piece of functionality that the theme doesn’t support, and I’m wondering what the recommended way is to interface with your code. I’ve read through the theme code and your developer docs, and I think I mostly understand what’s going on.
The requirement is to provide an additional “Thumbnail Link Type” for Portfolio items, to allow it to link to a light-box with custom content (beyond just the image).
From what I can tell, I need to extend the functionality in the following files:
– swift-framework/meta-boxes.php — under “THUMBNAIL LINK TYPE”, register a new type of link
– includes/sf-portfolio.php — under the section “LINK TYPE CONFIG”, look for my new type of link and build an appropriate $link_config that triggers a new type of lightbox
– includes/sf-portfolio.php — somewhere in the main while loop, render out a hidden DIV lightbox to be able to be triggered by the $link_config above
– There’s some files in swift-framework/page-builder/builder/shortcodes/* that seem relevant, but I think I can safely ignore them if I don’t care about updating the Page Builder WYSIWYG editor in the admin screen?
– There’s also some relevant looking code in js/sf-admin.js, but not sure I understand what it’s doing? Is this just for the admin screen?Questions:
– Do I have this mostly right? Am I misunderstanding or missing any pieces? Is there a better way to do this?
– Ideally, I’d extend your functionality, not override it, so that future theme updates don’t break. There don’t appear to be any real hooks though, so I think I’d have to define the same functions myself in the child them, copy your code, and make my tweaks. Or am I missing something?
– It looks like your lightbox support comes from View.js, which doesn’t support HTML content. I can integrate another lightbox plugin/library, are there any ones that you recommend as working well with the theme, being responsive, etc?Thanks!
Ankur
April 22, 2014 at 8:22 pm #69225Hi, I’m sorry we cannot help with that in-depth customization of the theme.
Cheers
April 22, 2014 at 8:24 pm #69226I’m not asking you to customize the theme, I’m doing the customization.
I’m just asking what your best practices are so that future theme updates don’t break my customization.
Thank you,
Ankur
April 23, 2014 at 9:33 am #69339Hi
All we can suggest is make note of your changes, and then when you update the theme, make the changes again (those files are not possible to overwrite in the child theme)
The other options is rather than updating the theme when a new update is released, go through the changelog and manually update it yourself.
– Kyle
April 23, 2014 at 4:08 pm #69474Okay, thank you for your help.
In general, the functionality I’ve added seems like a useful feature. Along with “Link to post”, this would basically be “Link to post in lightbox”.
I’ve already implemented it in the theme, how can I submit it to you guys as a patch to consider including in the next version of the theme? If it saves other people time from having to build it themselves, not sure how that’s a bad thing.
Thanks!
Ankur
April 24, 2014 at 7:58 am #69552Feel free to upload it as a .zip file and I’ll pass it on to the developer
– Kyle
-
Posted in: Dante
You must be logged in and have valid license to reply to this topic.