Fork me on GitHub

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

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.

Topic


Re: MVC architecture, routers and other stuff

What I'm liking about the router + MVC-type approach is that far less code has to run to deliver a page. eg. my current modules have Ye Olde Traditional handler classes for each object, and these are huge because they hold the code to handle all actions for their client objects.

With the strict MVC approach these monolithic handlers are getting chopped up into smaller model classes, each of which only deals with a specific page view (one or two different actions, as opposed to everything), and the router selects which one to load. So there's a lot less stuff to read for any given page load.

Topic


Re: MVC architecture, routers and other stuff

Yes, specific routes that take their input from the symlinks that are already present, with the fallback to 'standard' module routes. That would be great to have.



Re: MVC architecture, routers and other stuff

I have made some progress with 2.0 and routing -> https://github.com/MekDrop/impresscms/tree/use-league-router . However right now I haven't figure out how to register routes for modules. But I hope somehow I will solve this and than this functionality will come to icms.



Re: MVC architecture, routers and other stuff

I have already come across Tom Butler's articles (hard to forget him, with his exuberant hairstyle profile photo ) and he has some very interesting points, yes. I admit I'm also no rockstar developer in PHP to be able to follow the entire reasoning in 1 go. Some kind of url routing would be interesting to have in ImpressCMS2 (2.0 or a later iteration), for a start.



MVC architecture, routers and other stuff

I've been looking into the MVC pattern, and came across a programming blog that has some very interesting articles about MVC and a couple of its descendants - MVVM and MVVMC. Also has some cool stuff about how to build a front end controller to handle routing.

https://r.je/

It took me a few reads to get my head around it. I thought I had been doing MVC, but it turns out not in a very strict sense. Anyway, I'm trying to build something using a front controller and the MVVMC pattern, which is basically MVC except the view gets split into two components (a view plus a 'viewmodel') to decouple the view from the model and allow each component to be substituted or re-used. Together with the front end controller/router it gives you a lot of flexibility.

Worth a read if you have time (see the section 'MVC Related Articles').



Re: To support IE11 or not?

Good question. In a way, it depends largely on your user base. That's one of the great things about all those analytics packages, they can give you a good idea about how many percent of your users are on what type and version of browsers. Not only that, they can also give you information about the type of usage they make of your site.

Imagine that you have a community site, and you really want to upgrade the CSS and the javascript you use, and you would need to perform some very nifty Web-fu to get a more-or-less working version on older IE versions.

When 4% of your use base is using IE11 and below, normally you would go ahead and upgrade your site, making sure that those users get a nice little message telling them that their browser will no longer work with the site the way it is supposed to, inviting them to use another browser.

Now if those 4% are your most active and productive users, you might want to reconsider...

 



Re: Modules Contact 1.04

The linebreaks issue might be a problem with the old default DHTML editor, we have had a problem with it in another thread. Using a HTML editir might fix that if you don't mind receiving HTML email. I think can change it easily as have looked at it before. I'm travelling but will look in a couple if days when I get back (and hopefully have a new laptop!).

HTMLPurifier problem seems strange. Pretty sure it uses UTF-8 by default, so there must still be mis-encoding being fed into it. Will have another look.



Re: Modules Contact 1.04

Hello Madfish,
Thank you for your efforts. I think I found the problem. It is the HTMLPurifier. If I turn off the HTMLPurifier all umlauts are displayed correctly. But in some places the br tags are inserted again, which leads to ugly effects.
Greetings optimistdd

translated with Google



To support IE11 or not?

Remember how long we waited for IE6 to die and how much time/pain we went through trying to support it? All the cool new stuff we couldn't use for years because it would break IE6?

Well now we have Edge, but when I checked the support date for IE11 it's 2025. The problem is that the 'support' for 11 consists only of security fixes, not 'keeping it modern' fixes. So already it is falling out of date with Javascript (main issue at this point), CSS and HTML5 features. 

So I'm wondering, is it justified to throw IE users under a bus, or are people going to support it until it the bitter end?



Re: Modules Contact 1.04

I have not been able to find any problem with encoding in the description field. However, I have added:

  • An accept-charset=utf-8 attribute to the form (will only work on html5 though).
  • Specified utf-8 as the output encoding in mail().

I hope that fixes it, please test this version of the module



Re: Modules Contact 1.04

Hello Madfish,
Thank you very much for your efforts. The module works great and helps me on. Where now the problem lies with the coding of the description_tarea lies one must observe.
greeting optimistdd
translated with Google



Re: Modules Contact 1.04

Ok please download and test this version:

  • Fixes encoding problem with umlauts in title (I cannot find any encoding problem with the message body).
  • Adds a privacy policy checkbox that blocks submission until checked.
  • You will need to translate the Javascript alert messages into German (see top of /templates/contact_message.html).

I ended up having to build a manual template. It works but it is basically a hack and I do not feel happy with it. Anyway, if you want to change the look of the form work directly on the contact_message template.



Re: Modules Contact 1.04

Hi fiammybe the regulation comes so far EU and replaces all national data protection laws and regulations also the data protection explanations become longer the more one has external things. It can be said that the privacy statement on some websites will be the page with the most text. A small overview of everything that can be included depending on the website in a privacy policy: General Privacy Policy, Cookies, Server Log Files, Contact Form, Newsletters, Google Analytics, Google Analytics Order Data Processing, Google Analytics IP Anonymization, Demographics on Google Analytics, Etracker, Piwik, Wordpress Stats, eRecht24 Safe Sharing Tool, Facebook, Facebook Pixel, Twitter, Google+, Instagram, LinkedIn, Pinterest, Google Web Fonts, SoundCloud, Spotify, Maps, Xing, Tumblr, YouTube, Google AdSense, Google Analytics Remarketing, Google AdWords, Google Conversion Tracking, Amazon Affiliate Program, User Registration, Comments , Comment function with details of the e-mail address, comment function with storage of the IP address, comment function with subscribing to comments, SSL encryption of the website, privacy policy for the processing of customer and contract data, data transmission - online shops & merchants (with goods dispatch ), Data transmission - service providers who conclude contracts online (excl sand), encrypted payment transactions, information on cancellation, deletion, blocking, opposition to advertising e-mails. greeting optimistdd



Re: Modules Contact 1.04

Hi optimistdd,

interesting what German law is requiring for GDPR compliance. I have changed team at my company now, so I am no longer building websites for our government customers, but at the end of last year we did a GDPR assessment for them and our legal department estimated that a simple adaptation tot he privacy policy would be sufficient, if you take into account that you have the necessary procedures in your organisation to handle data breach risks.
I heard yesterday that this was a bit too optimistic , but given that the specific legal texts are still being written in Belgium, I'm not surprised by these kinds of changes.

I hope you and @Madfish are able to solve the encoding issue, those are always very hard to handle. PHP6 didn't happen in large part because they got lost in encoding issues.



Re: Modules Contact 1.04

Hello Thanks for your effort. Yes, the subject line works. The Message Text but not yet



Re: Modules Contact 1.04

I think the umlaut problem in subject line is fixed, please download the file below, extract and put in contact module folder (overwrite message.php). Please test. The checkbox should be easy, will look when get back later. https://isengard.biz./message.zip



Re: Modules Contact 1.04

I think the umlaut problem in subject line is fixed, please download the file below, extract and put in contact module folder (overwrite message.php). Please test. The checkbox should be easy, will look when get back later. https://isengard.biz./message.zip



Re: Modules Contact 1.04

Hello thanks for the answer. So I looked again it concerns several persons with different Providern of therefore it seems to me a general problem to be. I've looked at 5 websites and collected the following data. Character set / collation of the MySQL connection Documentation utf8mb4_unicode_ci, utf8_general_ci, depending on the provider Server Character Set: UTF-8 Unicode (utf8) Firefox page information text encoding UTF-8 therefore, everything should be right. Would it be possible to create an additional field with a chekbox before the send button similar to the picture? So the user can confirm that he has read the privacy policy. This procedure is called by German lawyers to be legally compliant from 25.05.2018 optimistdd


Attach file:



png  Screen-3.png (274.52 KB)
2633__9915a58cc377f739.png 1428X678 px


Re: Modules Contact 1.04

It looks like a character encoding problem. I'll have a look at the module code tomorrow afternoon. But character encoding can break at many points, so there are a couple of other things to check: * Is your database set to use UTF-8 collation (utf8_general_ci or something like that?). Quite often it comes with latin1_swedish as default, which will mangle non-ASCII characters. * Is the character encoding of your website specified as UTF-8 in the meta/header tags? (Check the head section of the theme). For the legal issue, I am not sure what the problem is. If it is that you a) don't want the message stored in the database or b) want to store the message but do not want to email it, I could probably alter the module for you. But if the problem is that you need the email encrypted during transit, that is currently beyond my experience. I don't think it would be easy.




 Top