SPECIAL OFFER: Only $69 for access to everything in OSTraining for 1 year! You save $75! 
Join today and get access to 1,000's of books and videos. Learn WordPress, Drupal, Magento, Joomla and more! Sign up today!

Using Js and Css Injector to build a slideshow

5 years 7 months ago #123098 by fewgoodmen
Does anyone know how to use the JS module and CS module to construct a slideshow? I am trying to developed it without using any slideshow modules.

I would like to build it using javascript, and css and content images.

Please Log in to join the conversation.

5 years 7 months ago #123104 by Daniel Pickering
Replied by Daniel Pickering on topic Using Js and Css Injector to build a slideshow
Can I ask why you don't want to use a module for it

Please Log in to join the conversation.

5 years 7 months ago - 5 years 7 months ago #123131 by Valentin
Replied by Valentin on topic Using Js and Css Injector to build a slideshow
Hi fewgoodmen,

May I ask you if you have an specific reason to not use a module instead? You can create slidehows with FlexSlider module , or manually use the jQuery standalone plugin to make it work as the documentation explains .

Hopes this helps

Kind regards,
Valentín

Follow us on Twitter - twitter.com/OSTraining
Like us on Facebook - facebook.com/ostraining

Please Log in to join the conversation.

5 years 7 months ago #123132 by steve
Hi fewgoodmen

Yes, I'd have a similar question to dclpuk. The typical Drupal approach would be download external libraries (including the JS and CSS) and then connect them with a module: www.ostraining.com/blog/drupal/flexslider/ The obvious advantage this gives is that the slideshow can be edited inside Drupal.

However, you do see some themes take the approach you describe. They add the JS and CSS into the theme. You then put images inside the theme folder. This might actually be a good approach if you're not distributing the theme. No module needed - handle everything via the theme.

Please Log in to join the conversation.

5 years 7 months ago #123277 by fewgoodmen
Replied by fewgoodmen on topic Using Js and Css Injector to build a slideshow
Yes, I am building it for an organization that limit the modules that can be downloaded to their backend. However, I am allowed to use js and css injector modules. So now I am trying to build the slideshow using those two modules.

Please Log in to join the conversation.

5 years 7 months ago #123288 by steve
Hi fewgoodmen

Do you have access to the theme at all, or do you need to do everything through these two modules, plus the admin interface?

Please Log in to join the conversation.

5 years 7 months ago - 5 years 7 months ago #123291 by fewgoodmen
Replied by fewgoodmen on topic Using Js and Css Injector to build a slideshow
yes only the two modules, create view, content type and upload images

Please Log in to join the conversation.

5 years 7 months ago #123315 by steve
Ouch! That's tricky.

So am I right in thinking you'd need to reference some externally hosted JS and CSS files? Literally, the only thing you can host on this site is the images?

If you can't upload them to your site, we'll need to host almost everything on a different platform.

Please Log in to join the conversation.

5 years 7 months ago - 5 years 7 months ago #123319 by fewgoodmen
Replied by fewgoodmen on topic Using Js and Css Injector to build a slideshow
I was thinking that the js injector would allow me to upload javascript files into to the header of drupal and then allow me to the theme the output using css injector. But I have no way of connecting the js file to the image in order to initiate a slideshow.

If that is possible, I need some directions on how to approach that.

Please Log in to join the conversation.

5 years 7 months ago - 5 years 7 months ago #123331 by steve
Phew, this is a hard one.

With the JS injector module it looks your idea is the only solution. No external scripts allowed.

I'll do some research this. I suspect there's some solution, but it might not be very advanced or fully-featured.

Please Log in to join the conversation.

5 years 7 months ago #123332 by fewgoodmen
Replied by fewgoodmen on topic Using Js and Css Injector to build a slideshow
thanks I will look forward to your findings

Please Log in to join the conversation.

5 years 7 months ago #123334 by steve
How about something like this? css-tricks.com/snippets/jquery/simple-auto-playing-slideshow/

There's a demo here: css-tricks.com/examples/SimpleSlideshow/ (the sizes can be changed)

Please Log in to join the conversation.

5 years 7 months ago - 5 years 7 months ago #123340 by fewgoodmen
Replied by fewgoodmen on topic Using Js and Css Injector to build a slideshow
I also added the js and css scripts to the css and js injector modules.

However, the question that I have would be, what element titles should I be using for the css.?

Please Log in to join the conversation.

5 years 7 months ago #123344 by Valentin
Replied by Valentin on topic Using Js and Css Injector to build a slideshow
Hi fewgoodmen,

However, the question that I have would be, what element titles should I be using for the css.?

May you elaborate?

Kind regards,
Valentín

Follow us on Twitter - twitter.com/OSTraining
Like us on Facebook - facebook.com/ostraining

Please Log in to join the conversation.

5 years 7 months ago #123347 by fewgoodmen
Replied by fewgoodmen on topic Using Js and Css Injector to build a slideshow
I am not having any success connecting the slideshows to the javascript code.

Please Log in to join the conversation.

5 years 7 months ago #123383 by Nick
Hi fewgoodmen,

In order to help, we're going to need more detail about what you're trying and what result you're getting. Posting relevant error message, screenshots, URLs, etc, would be a big help for us to better help you.

Could you upload an annotated screenshot of the issue? evernote.com/skitch/ is a great tool for annotated screenshots.

Also, can we get a URL to where your current progress with the slideshow is?

Looking forward to helping.

Kind regards,
Nick

Follow us on Twitter - twitter.com/OSTraining
Like us on Facebook - facebook.com/ostraining

Please Log in to join the conversation.

5 years 7 months ago - 5 years 7 months ago #123423 by fewgoodmen
Replied by fewgoodmen on topic Using Js and Css Injector to build a slideshow
I will do that and get back to you.

However, just to bring you up to date, I am trying to build a slideshow using the following:

1) js-Injector to upload - javascript, files to the header( jQuery Cyclec) & jquery.min.js)

I don't know if you have any steps on how to achieve this.

Please Log in to join the conversation.

5 years 7 months ago #123424 by Nick
Thanks fewgoodmen!

Cheers,
Nick

Follow us on Twitter - twitter.com/OSTraining
Like us on Facebook - facebook.com/ostraining

Please Log in to join the conversation.

Join today and get access to 1,000's of books and videos. Learn WordPress, Drupal, Magento, Joomla and more! Sign up today!