Elegance Slideshow Help

Re: Elegance Slideshow Help

by Gareth J Barnard -
Number of replies: 31
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers

Sounds like JavaScript is broken, which could be ANYTHING, so in Chrome, press F12, go to the 'Console' tab, refresh the page and print screen any errors and post here.

In reply to Gareth J Barnard

Re: Elegance Slideshow Help

by Michael Rice -

Hi Gareth,

Here are the screen shots of the JS errors.

Javascript Error for the Elegance Theme slide show

Error 1

Javascript error 2

Thanks for the help! 

In reply to Michael Rice

Re: Elegance Slideshow Help

by Gareth J Barnard -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers

Hi Michael,

The screen shots show clearly a fault with the JavaScript of the theme, where at a guess the slider JavaScript has not been loaded by the theme's 'plugins.php' file.  Have you (or others) made any changes to it recently?  As you say its just stopped working.  And the 'banner' and 'mediaplug' classes cannot be found.

Gareth

In reply to Gareth J Barnard

Re: Elegance Slideshow Help

by Michael Rice -

Hi Gareth,

The /moodle/theme/elegance/jquery/plugins.php hasn't been manually changed.  The only changes made from the default theme settings have been html/css and replacing some moodle logos with our logo. I have looked at some of the php/js/jquery/less files in the theme for some (relatively simple) hacks, but didn't change anything. Otherwise I think I changed the ownership/permissions in the themes directory.  I just gave the elegance theme directory full permissions (777), but there was no change.

-Michael

In reply to Michael Rice

Re: Elegance Slideshow Help

by Gareth J Barnard -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers

Hi Michael,

Odd.  Is your site online?

File ownership should not affect it and could pose a security risk.  I think the HTML is missing the CSS classes that the scripts reference.

Gareth

In reply to Gareth J Barnard

Re: Elegance Slideshow Help

by Gareth J Barnard -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers

Does your installation have these files: https://github.com/moodleman/moodle-theme_elegance/tree/master/jquery ?

Are there any '404' errors on the 'Network' tab of the developer tools?

In reply to Gareth J Barnard

Re: Elegance Slideshow Help

by Gareth J Barnard -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers

Have you changed anything in 'lib.php'? As remembered this: https://moodle.org/mod/forum/discuss.php?d=256875&parent=1113934.

In reply to Gareth J Barnard

Re: Elegance Slideshow Help

by Michael Rice -

Hi Gareth,

  1. The site is online.
  2. I changed the permissions back.  I was just trying to eliminate the permissions and the culprit.
  3. There are all of the necessary jQuery files in the theme.
  4. I am getting a 404 with the request url: http://mymoodleipaddress/moodle/theme/jquery.php/core/jquery-1.10.2.min.map
    1. There is also a 304 response with the request url http://code.jquery.com/jquery-latest.min.map and remote address 108.161.188.209:80.
  5. I haven't changed anything in lib.php.

 

 

In reply to Michael Rice

Re: Elegance Slideshow Help

by Gareth J Barnard -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers

Hi Michael,

By 'is it online?' I meant 'Is it online so I can access via the URL and see if I can find the fault'.  So, what is the URL please?

The jquery-latest.min.map will not be the culprit, but I would have thought that map file would be for the version of jQuery being used.

Gareth

In reply to Gareth J Barnard

Re: Elegance Slideshow Help

by Michael Rice -

Hi Gareth,

We don't have a domain linked to the site yet, but you can see the site at http://72.18.223.169/moodle.

-Michael

In reply to Michael Rice

Re: Elegance Slideshow Help

by Gareth J Barnard -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers

Thanks.

Do you know why jQuery is being loaded twice?  I found the line:

script src="http://code.jquery.com/jquery-latest.min.js"></script

In the header.

And underneath that:

script type="text/javascript" src="/menu_source/menu_jquery.js"></script

Therefore have you added some custom jQuery to the theme without using the correct method for doing so? -> http://docs.moodle.org/dev/jQuery

I suspect that because its being loaded twice, the first instance which has the slider and media plugins is being overwritten by the second and hence the initialisation in the footer when the document is ready cannot find the functions.

In reply to Gareth J Barnard

Re: Elegance Slideshow Help

by Mary Evans -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

I had a problem with the Elegance theme when I first tried it out. The slide show in particular and then dicovered quite by chance it was because Theme Designer Mode was ON switching it OFF made every thing work. 

In reply to Gareth J Barnard

Re: Elegance Slideshow Help

by Michael Rice -

Hi Gareth,

Thanks for the help!  I was loading jquery again from the site administration>appearance>additional html to enable a drop down menu.  That was creating a conflict and messing with the slideshow.  Thanks for all your help!

-Michael

In reply to Gareth J Barnard

Re: Elegance Slideshow Help

by KirK Chapman -

Hello Gareth & Mary et al. thoughtful

Here is my issue as posted before https://moodle.org/mod/forum/discuss.php?d=255432#p1107891

Persistent problem! No matter what I do my slideshow will not respond to the settings I select. Slideshow shows as in the screen shot on the forum reference. 4 Images seem stuck in the database no matter the number I choose in the setting.

Could you F12 this in Chrome and decipher it for me?

myesol.org/moodle

Mary has been diligently helping out with this but I can't seem to get it fixed.

I've updated the plugin.Purged caches...purged all caches Theme designer Mode off

Many thanks.

Peace on Easter

In reply to KirK Chapman

Re: Elegance Slideshow Help

by Gareth J Barnard -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers

Image 5 & 6 are empty, i.e. url is - http://myesol.org/moodle/ which is probably throwing off the slider calculation for the overall width of the entire slider to make it slide.

Also getting:

Failed to load resource: the server responded with a status of 404 (not found) - http://myesol.org/moodle/theme/image.php/elegance/theme/1398025638/ - i.e. no actual image.

So disable slides 5 & 6 in the settings.

Average of ratings: Useful (1)
In reply to Gareth J Barnard

Re: Elegance Slideshow Help

by Gareth J Barnard -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers
In reply to Gareth J Barnard

Re: Elegance Slideshow Help

by Gareth J Barnard -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers

Or, given the code in https://github.com/moodleman/moodle-theme_elegance/blob/ELEGANCE_26/jquery/unslider_1.0.2.js, which appears to perform the calculations already, then Julian has a coding fault in the code of the layout by hard coding calculated values.

Need to test.

Average of ratings: Useful (1)
In reply to Gareth J Barnard

Re: Elegance Slideshow Help

by KirK Chapman -

Wow that was fastwide eyes Thanks a bunch!

Yep...I read that when I F12ed my site myself... oddly enough I only have 1 slide in the setting so just why it's looking for slide 4 and 5 lead me to conclude that there must be an issue with the database. Upon installing the first iteration of Elegance I experimented with 3 slides.  When Julian addressed the bug I installed the next version but i could never get the original 3 images removed.

Peace

In reply to Gareth J Barnard

Re: Elegance Slideshow Help

by Gareth J Barnard -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers

Ok, looks like the hard coded widths are wrong as they are calculated.  But removing them shows that unslider is not responsive so the jQuery code needs improving.  This will take time which I don't have.

Average of ratings: Useful (1)
In reply to Gareth J Barnard

Re: Elegance Slideshow Help

by KirK Chapman -

Gareth,

Well you've done enough and it looks like you've helped solve another mystery. I'm only going to use 3 slides so I should be okmixed.

Perhaps this Easter egg hunt will help Julian as he continues to refine Elegance.

Many thanks again

peace

In reply to KirK Chapman

Re: Elegance Slideshow Help

by Mary Evans -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

If I were you I would change theme to Clean theme and then uninstall the Elegance theme completely. This will remove all the settings from the Database.You will then be told to remove the elegance folder from the server.Once this is done, you can add the most up today's Elegance theme. If then you find that it is not working, then please report back.

thanks

Mary

Average of ratings: Useful (1)
In reply to Mary Evans

Re: Elegance Slideshow Help

by KirK Chapman -

Ahhhhh Yes! Girl,,, you put the E in Easter!cool

 I attempted something like this earlier EXCEPTI didn't uninstall the Elegance theme completely, i just removed the folder thinking somehow the database settings would be magically wiped upon doing sosurprise.

So, as always, Many thanks to you and Gareth!

 

Peace

In reply to Mary Evans

Re: Elegance Slideshow Help

by Gareth J Barnard -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers

Hi Mary,

I've looked at Julian's code (latest master) on GitHub and the Unslider source too and they both will not work for variable responsive images.

Cheers,

Gareth

In reply to Gareth J Barnard

Re: Elegance Slideshow Help

by Mary Evans -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

Well that can be remedied with CSS. From memory the Unslider works great on its own, so no reason whatsoever that it should stop working in Elegance, I think Julian made a few blunders trying to marry it up with Bootstrap 3.

Is anyone looking after Elegance theme? Is Julian still updating it?

In reply to Mary Evans

Re: Elegance Slideshow Help

by Gareth J Barnard -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers

Hi Mary,

The thing is, I've looked at the Unslider code and it does have a flaw with regards responsive webpage integration.  It does have a fluid initialisation option but that is only for the container.  The images within the slider are still specified a fixed width by the code in pixels based upon the window size at first render.  If you resize the window then the images do not adjust.  I suspect that Julian saw this and put in percentages instead in the included layout file for the slider.  However they are fixed percentages based upon four slides.  If you have less or more then you get the issues reported.

Therefore the solution is to remove the fixed inline CSS styles that are in the slider layout file and improve the Unslider jQuery code to work on percentages for the individual images based upon the number of images in the slider.  The latter is not yet in Juilan's or indeed the main source of the Unslider itself.

Cheers,

Gareth

In reply to Gareth J Barnard

Re: Elegance Slideshow Help

by Mary Evans -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

In that case people should switch to using http://bxslider.com/ instead...which is what I've used in the past.

In reply to Mary Evans

Re: Elegance Slideshow Help

by Gareth J Barnard -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers

And me in 'Mutant Banjo' thanks to you Mary smile

What's wrong with Bootstrap 3's carousel?

In reply to Mary Evans

Re: Elegance Slideshow Help

by Richard Schwarz -

Hi Mary,

I'm just starting with the whole theme development/editing process, so my apologies in advance.


When you say people should switch to bxslider (which looks pretty cool and is really responsive in scaling images and text), how do I go about doing that in my Elegance theme? Which files do I need to look at for replacing these bits, but keeping the same administration (slider settings) page?


Thanks,

Richard Schwarz

In reply to Richard Schwarz

Re: Elegance Slideshow Help

by Mary Evans -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

Hi,

Looking back I made that comment when I was young and brash and wet behind the ears! Now I know better the easiest thing to do is use the 'Carousel' slider which is ALREADY coded in Bootstrap!!!

You can see the simple version of it HERE

It is easy enough to add as all you need to do is make sure your theme is a child of Bootstrapbase, or Bootstrap if you want to go down the Elegance path.

That said, Essential theme is having a makeover and the 'Carousel' slideshow is being added to it in the next version which is going to be released soon. Read more

Hope this helps?

Mary

Average of ratings: Useful (3)