I'm new to CouchCMS and I've successfully embedded a YouTube video in a page using shortcodes. I then added a new shortcode handler in kfunctions.php to load a thumbnail image that when clicked opens a video in a lightbox.
This works, my only issue is that the admin user can't change the thumbnail image without editing the code in kfunctions.php. Is it possible to set this up in such a way that the user can change the thumbnail image in admin?
- Code: Select all
$html =<<<EOS
<iframe width="560" height="315" src="https://www.youtube.com/embed/$video" frameborder="0" allowfullscreen data-basicLightbox data-id="1"></iframe>
<a href="#" style="" data-show-id="1"><img width="240" height="200" alt="some text" src="images/video-thumb.jpg"/></a>
EOS;
This works, my only issue is that the admin user can't change the thumbnail image without editing the code in kfunctions.php. Is it possible to set this up in such a way that the user can change the thumbnail image in admin?