Essential / Marketing Spot

Essential / Marketing Spot

by Kevin Lundy -
Number of replies: 22

I have Moodle 2.6 (Build: 20131122).  The notification section advised my I had an update for the Essential theme.  I installed the updated and now the marketing spots will not display my embedded Videos.  The coding that worked  before the updated doesn't work now.  I cleared the cache on the site and in the browser.  Also, the icons for the course are no longer working.  One last issue, If the pictures are a different size in the top slides it causes the page to jump up and down.  This didn't happened before the updated. 


Site  http://gfd1.k-lundy.com/   


Thanks!

Average of ratings: -
In reply to Kevin Lundy

Re: Essential / Marketing Spot

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

What version of Essential did you update to?

In reply to Gareth J Barnard

Re: Essential / Marketing Spot

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

I seem to remember the marketing spot content having code to strip off HTML for some reason.  I can't remember why as it was over a year ago.  I'm not even sure the latest M2.9 version has changed in that area too.  Perhaps the whole thing needs improving with a block region for marketing spots instead.

If anybody has the time to see in M2.9 if marketing spots allow HTML as its late and I won't have time for a while with the 'list' of work I have at the moment.

In reply to Kevin Lundy

Re: Essential / Marketing Spot

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

Hi,

Just watching the first Video on your site. Seems to work OK on my Windows XP. using FireFox browser.

Cheers

Mary

In reply to Mary Evans

Re: Essential / Marketing Spot

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

Hi Mary,

Those videos are in the content area of the site topic.  The problem is in the marketing spots above.

Cheers,

Gareth

In reply to Gareth J Barnard

Re: Essential / Marketing Spot

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

Hi,

As there are no videos in the Marketing Spots, Kevin, could you add one so I could see what's happening to the code?

Cheers

Mary

In reply to Mary Evans

Re: Essential / Marketing Spot

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

I've double checked the code and the last M2.6 version used 'FORMAT_TEXT' for the marketing spot content but now M2.7 versions and above use 'FORMAT_HTML', thus any html in the content area of the spot in the M2.6 version will be stripped out before it reaches the page.  So, experiment with changing 'format_text' to 'format_html' here: https://github.com/gjb2048/moodle-theme_essential/blob/MOODLE_26/layout/includes/marketingspots.php#L37 etc. for each spot.

In reply to Gareth J Barnard

Re: Essential / Marketing Spot

by Kevin Lundy -

Thanks for the fast reply.  I changed all the marketing spots to 'format_html'  no joy.  Still not displaying.  When I got to the edit content page the videos show up fine and so does the code.  But, when I am viewing them on the front page the do not display.  

In reply to Kevin Lundy

Re: Essential / Marketing Spot

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

FORMAT_HTML  

not

format_html

In reply to Mary Evans

Re: Essential / Marketing Spot

by Kevin Lundy -

Hi Mary,

The code is there, just not displaying the videos.  

In reply to Kevin Lundy

Re: Essential / Marketing Spot

by Kevin Lundy -

Changed all spots to  FORMAT_HTML and did another cache purge.  Sigh, still not displaying.  Thanks for all of the help!!!  

In reply to Kevin Lundy

Re: Essential / Marketing Spot

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

Sorry Kevin my mistake I thought you were changing FORMAT code in another file, sorry for confusion...

In reply to Mary Evans

Re: Essential / Marketing Spot

by Kevin Lundy -

No worries, I appreciate y'all taking the time to assist me.  

In reply to Kevin Lundy

Re: Essential / Marketing Spot

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

Hi,

Could you post an example of the code you currently use, so that I can test it on my version of Essential?

Thanks

In reply to Mary Evans

Re: Essential / Marketing Spot

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

Hi Kevin,

Looking at it more clearly today, please revert the changes so far back to what it was and then here: https://github.com/gjb2048/moodle-theme_essential/blob/MOODLE_26/lib.php#L51 change:

return format_text($theme->settings->$setting, $format = FORMAT_HTML, $options = array('trusted' => true));

to:

return format_text($theme->settings->$setting, FORMAT_HTML, array('trusted' => true));

Cheers,

Gareth

In reply to Gareth J Barnard

Re: Essential / Marketing Spot

by Kevin Lundy -

I reverted the changes from yesterday.  I also made the changes above.  I then purged the Cache.  Still not showing the videos.  I changed the theme for the time being until I can get the bug fixed.  Any other ideas I can try? 


Many Thanks,

Kevin

In reply to Kevin Lundy

Re: Essential / Marketing Spot

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

Hi Kevin,

Could you please post the code in (HTML) from the marketing spot settings box here (use 'Pre-formatted' in the text dropdown) and I'll see if it works on M2.9 then can recommend an upgrade or work out a fix in that version.

Cheers,

Gareth

In reply to Gareth J Barnard

Re: Essential / Marketing Spot

by Kevin Lundy -

Sorry for the delay Gareth.  Work got a little crazy.  Here is the code.  (it is the simple embed code from youtube)


<iframe width="560" height="315" src="https://www.youtube.com/embed/EFg6GYPyqQs" frameborder="0" allowfullscreen></iframe>


I wold love to upgrade but I have it hosted on 1 and 1 and am not sure how to update moodle on 1 and 1.  :/

In reply to Kevin Lundy

Re: Essential / Marketing Spot

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

Hi Kevin,

I've tried the code in a marketing spot in the current Alpha version for M3.0 which is functionally the same as the M2.9 version in that area and it is fine.

At the moment I do not have time to spend to work out the changes required all the way back at M2.6.  Therefore if you are able to find an upgrade path then that might be an alternative.

Kind regards,

Gareth

In reply to Kevin Lundy

Re: Essential / Marketing Spot

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

If you installed Moodle using an installer as offered by your host company, then there is little you can do, unless they have an upgrade available. if it is like my website host company, it will be some time before the upgrade to Moodle 3.0

Mary