Web Pages - Home Tab

Anything about what happens on the user and teacher side
marius
FormaLms User
Posts: 50
Joined: Wed Oct 05, 2016 3:59 am
Version: forma.lms 1.4.2

Re: Web Pages - Home Tab

Post by marius »

The sample above only have the <h1>DASHBOARD</h1> section in it. If I remove the h1 tags within the editor around DASHBOARD (so all standard text format) then the content displays fine.

Here is the sample from the Debugger view that does work. As you can see, the only difference is the removal of the second pair of h1 tags...

<script type="text/javascript">
document.getElementById('tab_content').innerHTML = '<div id=\"tabhome_title\"><h1>Dashboard</h1></div><div id=\"tabhome_description\">DASHBOARD<br />2020 BETTERBOND (realACHIEVERS) INCENTIVE TRIP (PHUKET)_BOOKING FORMS AND TRIP INFORMATION AVAILABLE HERE <br />(real)UPDATE 13 September 2019 <br />From the Desk of the MD &ndash; September 2019</div>';
</script>

alfa24
Senior Boarder
Posts: 998
Joined: Fri Nov 24, 2017 8:45 am
Version: forma.lms 1.4.2

Re: Web Pages - Home Tab

Post by alfa24 »

Please provide a NOT WORKING sample of what you put in the TinyMce editor.
I'm Jasmines, the One. If you need, you can contact me.

marius
FormaLms User
Posts: 50
Joined: Wed Oct 05, 2016 3:59 am
Version: forma.lms 1.4.2

Re: Web Pages - Home Tab

Post by marius »

This is a not working sample:
<script type="text/javascript">
document.getElementById('tab_content').innerHTML = '<div id=\"tabhome_title\"><h1>Dashboard</h1></div><div id=\"tabhome_description\"><h1>DASHBOARD</h1>
<br />2020 BETTERBOND (realACHIEVERS) INCENTIVE TRIP (PHUKET)_BOOKING FORMS AND TRIP INFORMATION AVAILABLE HERE <br />(real)UPDATE 13 September 2019 <br />From the Desk of the MD &ndash; September 2019</div>';
</script>

tinyMCE source:
<h1>DASHBOARD</h1>
2020 BETTERBOND (realACHIEVERS) INCENTIVE TRIP (PHUKET)_BOOKING FORMS AND TRIP INFORMATION AVAILABLE HERE <br />(real)UPDATE 13 September 2019 <br />From the Desk of the MD &ndash; September 2019


and this is a working sample:
<script type="text/javascript">
document.getElementById('tab_content').innerHTML = '<div id=\"tabhome_title\"><h1>Dashboard</h1></div><div id=\"tabhome_description\">DASHBOARD<br />2020 BETTERBOND (realACHIEVERS) INCENTIVE TRIP (PHUKET)_BOOKING FORMS AND TRIP INFORMATION AVAILABLE HERE <br />(real)UPDATE 13 September 2019 <br />From the Desk of the MD &ndash; September 2019</div>';
</script>

tinyMCE source:
DASHBOARD<br />2020 BETTERBOND (realACHIEVERS) INCENTIVE TRIP (PHUKET)_BOOKING FORMS AND TRIP INFORMATION AVAILABLE HERE <br />(real)UPDATE 13 September 2019 <br />From the Desk of the MD &ndash; September 2019

alfa24
Senior Boarder
Posts: 998
Joined: Fri Nov 24, 2017 8:45 am
Version: forma.lms 1.4.2

Re: Web Pages - Home Tab

Post by alfa24 »

It's not related to the <h1> tag, but to the unescaped line break that TinyMCE adds everywhere.
To fix, change /appLms/view/home/_tabs_block.php from

Code: Select all

document.getElementById('tab_content').innerHTML = '<?php echo addslashes($_content); ?>';
to:

Code: Select all

document.getElementById('tab_content').innerHTML = '<?php echo trim(json_encode($_content),'"'); ?>';
Do the same in /appLms/view/home/_tabs.php
I'm Jasmines, the One. If you need, you can contact me.

marius
FormaLms User
Posts: 50
Joined: Wed Oct 05, 2016 3:59 am
Version: forma.lms 1.4.2

Re: Web Pages - Home Tab

Post by marius »

Great - thank you very much... it is working.

marius
FormaLms User
Posts: 50
Joined: Wed Oct 05, 2016 3:59 am
Version: forma.lms 1.4.2

Re: Web Pages - Home Tab

Post by marius »

Hi Jasmines. Is there a way to display or browse to the other pages, not marked as default but published, in the Home Tab section? Same goes for news - the news section on the right is great, but an alternative way to display the content (or links to old news articles) would be great...

alfa24
Senior Boarder
Posts: 998
Joined: Fri Nov 24, 2017 8:45 am
Version: forma.lms 1.4.2

Re: Web Pages - Home Tab

Post by alfa24 »

Yes, but it would need custom development.
I'm Jasmines, the One. If you need, you can contact me.

marius
FormaLms User
Posts: 50
Joined: Wed Oct 05, 2016 3:59 am
Version: forma.lms 1.4.2

Re: Web Pages - Home Tab

Post by marius »

so at the moment no way to pass a get string to display the second or third web page in the home page section...

who can I contact for custom development?

alfa24
Senior Boarder
Posts: 998
Joined: Fri Nov 24, 2017 8:45 am
Version: forma.lms 1.4.2

Re: Web Pages - Home Tab

Post by alfa24 »

You have my contacts below.
I'm Jasmines, the One. If you need, you can contact me.

Post Reply