Re: ImpressCMS site improvements for mobile

A very good question. And it looks like it is only posts that have been made after the migration to ImpressCMS 1.4.0.

Topic | Forum

Re: ImpressCMS site improvements for mobile

Why are the html tags showing in the rendered posts, now?


Attach file:

png  icms-forum-html-tags-rendered.png (80.25 KB)
54__52725e324badd513b.png 695X569 px

Steve Twitter: @skenow Facebook: Steve Kenow

Topic | Forum

Re: Where does the core inject all this javascript?

There are minify and combine functions in the core - and currently left unused. Mostly because the resulting file was placed in the cache/ folder and at least one of the js and css files had some specific paths that didn't work when the file was in a different location.

Steve Twitter: @skenow Facebook: Steve Kenow

Re: Where does the core inject all this javascript?

I found the locations in the header file where all the different files were loaded, and I included a switch statement so that I can switch the way includes are done by simply defining a boolean in the theme. When the boolean is true, I include a file 'combined.js' and 'combined.css', which are combined and minified versions of the different javascript and CSS files that are included at the moment. Whent he boolean is false, the old behaviour is still there.

This reduces considerably the loading time (first time at least) of a page. I still have some small issues with the minifying, but I think I have identified the problem.

Re: ImpressCMS site improvements for mobile

I ran into something else - I had to update the system module to regenerate templates.

Steve Twitter: @skenow Facebook: Steve Kenow

Re: Where does the core inject all this javascript?

icms_core_theme_Object does all the work, but the work to be done is defined in /header.php. Just search for ->addScript and ->addStylesheet

include/cp_functions:: icms_cp_header() creates the work for the admin area.


Steve Twitter: @skenow Facebook: Steve Kenow

Re: Where does the core inject all this javascript?

The billboard module needs major updates and it is no longer used on the site at the moment.

I'll look into the icms_view_theme_Object, because I want to understand where the different javascript and CSS files get included in the core. I believe some of them are not needed on every page. 

Re: ImpressCMS site improvements for mobile

<p>I tested on the test website before pushing the new code to the production website, but didn't verify after that. Noted for the future.</p>

Re: ImpressCMS site improvements for mobile

We're back in business - I deleted the contents of cache/ and templates_c/ and that resolved the issue.

Steve Twitter: @skenow Facebook: Steve Kenow

Re: ImpressCMS site improvements for mobile

I'm not sure what happened, but since this update, I am not able to access the admin area - I just get a blank page.

Edit: just added this and saved. The HTML tags go away on the save, since the forum setting has changed.

Steve Twitter: @skenow Facebook: Steve Kenow

Re: Where does the core inject all this javascript?

This is the question I had in the slack channel - "async deferred" can be used to move when the javascript is loaded. The actual place is during the renderMetas method of icms_view_theme_Object.

This works for most things and I have it running this way on several sites. The Billboard module does not work properly on the initial page load and renders separate images for each slide until you refresh (works sometimes)

Steve Twitter: @skenow Facebook: Steve Kenow

Re: Where does the core inject all this javascript?

These comes from <{$icms_module_header}> variable in theme. Sadly, right now I think there is no way to specify place where to output this variable.

Where does the core inject all this javascript?

I'm trying to find out where the core automatically injects javascript in my page. I use Bootstrap theme, and I came to the conclusion that I have 2 jquery scripts, and a load of other scripts as well that are included automatically on my page. Google proposes to change the place on the page, in order to speed the rendering, so I would like to know where the core does that, and perhaps alter the behaviour.

Re: ImpressCMS site improvements for mobile

I have fixed the most important issue : the topbar menu is now visible on small mobile devices, and the 'fork me on github' banner is no longer shown on those screen sizes. I'm looking at the blocks on the front page with news items and forum topics now to improve upon.

ImpressCMS site improvements for mobile


I've come to realize that the current theme has some issues for mobile admin users. The user menu block is not visible for mobile devices. The theme will be updated to improve on that. 

If you have other suggestions to improve the mobile experience, let me know in the thread. 

Happy 2020!

<p>As the year 2019 runs to its end, I would like to thank you all for the contributions the last year. Our contributions have been up year-on-year, resulting in the 1.4 release, which is a nice achievement even though it isn't the long-awaited v2.&nbsp;</p> <p>The work on v2 has advanced, and we now have a quite clear view of the steps that still need to be taken to get this major mile-stone out in the field. I feel that the momentum for v2 has improved, even though my availability has had some periods where it wasn't what I wished it to be. The fact that my availibility can have such an impact on the advancement of the project is a clear wakeup call that we need to expand the team.&nbsp;</p> <p>There are interesting challenges to look forward to in the next year, such as making v2 the best version possible without getting down into a feature creep spiral, finalizing a new base theme, rethinking how editors are handled, updating our installer. This will give us the opportunity to investigate in very diverse parts of ImpressCMS how we can improve or modernize&nbsp;what is already there, and add new functionality that improves the usefulness to our users.</p> <p>All nice things to look forward to, but in the meantime I wish you happy celebrations the way you prefer (wild parties, amongst friends, with&nbsp;family or loved ones) and a happy 2020!</p>

Happy Thanksgiving! (a.k.a. The Day Before Black Friday)

"Thank you!" 2 of the most important words in any language. Say them often, say them out loud, say them like you mean it. Here's how the observation of this day came into being in the U.S.

Washington, D.C.
October 3, 1863

By the President of the United States of America.

A Proclamation.

The year that is drawing towards its close, has been filled with the blessings of fruitful fields and healthful skies. To these bounties, which are so constantly enjoyed that we are prone to forget the source from which they come, others have been added, which are of so extraordinary a nature, that they cannot fail to penetrate and soften even the heart which is habitually insensible to the ever watchful providence of Almighty God. In the midst of a civil war of unequalled magnitude and severity, which has sometimes seemed to foreign States to invite and to provoke their aggression, peace has been preserved with all nations, order has been maintained, the laws have been respected and obeyed, and harmony has prevailed everywhere except in the theatre of military conflict; while that theatre has been greatly contracted by the advancing armies and navies of the Union. Needful diversions of wealth and of strength from the fields of peaceful industry to the national defence, have not arrested the plough, the shuttle or the ship; the axe has enlarged the borders of our settlements, and the mines, as well of iron and coal as of the precious metals, have yielded even more abundantly than heretofore. Population has steadily increased, notwithstanding the waste that has been made in the camp, the siege and the battle-field; and the country, rejoicing in the consciousness of augmented strength and vigor, is permitted to expect continuance of years with large increase of freedom. No human counsel hath devised nor hath any mortal hand worked out these great things. They are the gracious gifts of the Most High God, who, while dealing with us in anger for our sins, hath nevertheless remembered mercy. It has seemed to me fit and proper that they should be solemnly, reverently and gratefully acknowledged as with one heart and one voice by the whole American People. I do therefore invite my fellow citizens in every part of the United States, and also those who are at sea and those who are sojourning in foreign lands, to set apart and observe the last Thursday of November next, as a day of Thanksgiving and Praise to our beneficent Father who dwelleth in the Heavens. And I recommend to them that while offering up the ascriptions justly due to Him for such singular deliverances and blessings, they do also, with humble penitence for our national perverseness and disobedience, commend to His tender care all those who have become widows, orphans, mourners or sufferers in the lamentable civil strife in which we are unavoidably engaged, and fervently implore the interposition of the Almighty Hand to heal the wounds of the nation and to restore it as soon as may be consistent with the Divine purposes to the full enjoyment of peace, harmony, tranquillity and Union.

In testimony whereof, I have hereunto set my hand and caused the Seal of the United States to be affixed.

Done at the City of Washington, this Third day of October, in the year of our Lord one thousand eight hundred and sixty-three, and of the Independence of the United States the Eighty-eighth.

By the President: Abraham Lincoln

William H. Seward,
Secretary of State

Enjoy your day, everyone! Be safe, be happy - and most of all - "Thank you!"

Steve Twitter: @skenow Facebook: Steve Kenow

Re: icmsOnDemandPreload - what is it and how does it work?

<p>I tested this in ImpressCMS 1.4.0 (the module-specific code by marcan) and it works, but the filename doesn't need to have the '.php' extension at the end.</p>

github sponsors beta enrollment


<p>some time ago I expressed my interest for the <a href="">Github Sponsors program</a>, and I received a message yesterday to tell me I was accepted in the beta.</p>

<p>At the moment it looks like the sponsors program is aimed exclusively at individual github accounts, and not at organisations. This means people will need to sponsor a single individual.</p>

<p>I haven't had much opportunity to look into it in detail, I will comment in here once I have more information and background.</p>

<p>Did you enroll in the program, or do you use other types of systems/sites to partially fund your development work? I'd be interested to hear about them.</p>

Refactoring the system module templates

During the period that 1.4 is being finalised, I came across the Bulma CSS framework and i wanted to try it to see if it would be a good fit to develop a new, more modern, admin theme. The work is not yet done, but during that initial search I identified that in fact most of hte templates for the ACP part of the system module simply didn't work. It is possible to change the general appearance of your ACP with a theme_admin.html file, but the specific contents of the different ACP screens are locked.


The reasons were two-fold :

  • in many places, the template file was hardcoded to the one in the module, and not the one in the theme
  • where the theme template was referenced, the reference was using a path structure in the identifier, and that didn't work with the templating engine (smarty 2 at this moment still).

As a result, there are 2 PR in the 1.4.0 beta release that fix this : I changed the location and the name of the templates in the system module, in such a way that all the templates, ACP or user side, all live in the same folder. I also adapted the code to reference the theme template.

During that work, I came to realise that there are still some parts of the system module ACP that are hard-coding HTML (and some ugly HTML constructions, at that). I'm currently trying to refactor the avatar section into clean code and a separate template. That shouldn't keep a new version from being published, because it will not introduce new functionalities or fix bugs, but it's a small step in cleaning up the system module.