Fork me on GitHub

Re: Forum bugfix

I guess it's all good now :)

Topic | Forum


Re: some miss?

Hello,

those are locations that cannot be visited directly. Can you explain what page you visited and what action you made when you received the error?

Thank you for the feedback!

Kind regards,

David

Topic | Forum


some miss?

libraries/icms/object.php

in switch 

forexample

                       if ($v['required'] && $cleanv != '0' && $cleanv == '') {
                            $this->setErrors(sprintf(_XOBJ_ERR_REQUIRED, $k));
                            continue;
                        }
and I had PHP error and I change continue to break.

libraries/icms/textsanitiaer.php

line 244

if($html=0) --> if($html==0) ???

libraries/icms/form/element.php

line 345

            return "if (myform.{$eltname}.value == \"\") { window.alert(\"{$eltmsg}\"); myform.{$eltname}.focus(); return false; }";
--->

 if($eltname)
           return "if (myform.{$eltname}.value == \"\") { window.alert(\"{$eltmsg}\"); myform.{$eltname}.focus(); return false; }";

???

plugins/preloads/autologin.php

line 52

$criteria = new icms_db_criteria_Compo(new icms_db_criteria_Item('uname', $uname4sql));

-->

$criteria = new icms_db_criteria_Compo(new icms_db_criteria_Item('login_name', $uname4sql));

???

Thanks



Re: A project I've been putting off - ICMS 1.2.x to 1.3.x

I'll have a look if I can find the migration script we had for the imblogging module, I think it could be useful for moving over the original news to the new news module by @madfish.

The permissions in the IPF modules until now have been handled exclusively in the 'groups' section of the system module, and there is no permissions handling done anymore in the module itself. That is a part that would be missing right now.



Defining modules and plugins in a composer world

in all ImpressCMS versions until now, (1.4) we are basing ourselves on the file location to determine whether a folder contains a module, a theme, a translation or a plugin. Autoloading and composer have allowed us to look into changing that concept a bit.

With composer, it is perfectly possible to change from one library to a fork, while keeping the same development interface. All packages are bundled under the 'vendor' folder now, without indication what type of library they are.

In the case mentioned above, it could be that that fork is more actively maintained, or contains specific code that didn't make it into the main library. Moving to another maintainer of the library makes that the file location of your library will change under 'vendor'. Fortunately, autoloader takes care of the discovery aspect for you : you just tell it that you need class X, and the autoloader matches that with the file that needs to be loaded to make class X available, without you needing to knpw the name of the file on beforehand.

If we take the same concept and apply it to modules, themes and plugins, ImpressCMS still looks in specific locations for certain addon types. we look for modules by reading the icms_info.php files in the subfolders of the 'modules' folder, we look for themes by checking if there is a theme.html in te subfolders of 'themes', and so on for translations and editors.

One place where this is problematic, is with plugins. For example, the sitemap module has plugins for a long list of external modules, to help it understand the content of those other modules, and construct a correct sitemap from them. At the moment, those plugins are bundled with the sitemap module, and they are stored in a subfolder of the sitemap module folder. 

That poses a problem if we want to add a plugin for the sitemap module from another module without resorting to copying files from one location to another, or having specific 'registration' routines. Here, the PHP Reflection API comes to our rescue. It allows us to scan all the classes in the system, and identify the class interconnexions. Which class is a subclass of ipf_module, for example, and which class is a subclass of ipf_module_sitemap. Have a look at StackOverflow for an example.

Perhaps this is worth looking into for future versions, to make management of the different addons and other packages easier and decoupled from the file system.



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.



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: VS Code

I tried it on and off over a period of a year more or less, and I think I'm just too used to the way PHPStorm is working. I had a very hard time with the way VS Code handles its Git integration, and a few other things that I just didn't want to invest time in to figure it out

If PHPStorm isn't available though, VS Code would be my second choice in a heartbeat. The plugin system has a wealth of functionalities, something that has been on the backburner a bit in PHPStorm lately.



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.



VS Code

Just a short note to say if you haven't tried the VS Code editor yet, it's well worth the effort.

I have always used Netbeans up until recently. It's ok and does the job, but it has a few issues that never seem to get fixed like needing to force FTP transfers and popping up huge tooltips over the line I'm trying to work on. And the interface kind of hurts my eyes (well, being Java based you kind of expect that).

I don't like changing editors but I eventually got annoyed enough to give VS Code a go and wow is it good. It's not that it does anything new, it just gets so many of the little things right that you actually end up getting more work done, because you aren't fighting the editor.



Re: 2 languages at 100% on softaculous

Thank you for these translations, I think those will be used in a translation banner I'll setup soon. I'd like to see if it's feasible to make it detect the location and the language of the browser, and show the relevant banner text



Re: 2 languages at 100% on softaculous

that's currently a work in progress, which I should document a bit better. For the wrong reasons, I chose country-specific languages in Transifex to translate into, so the base language is UK English (en-GB) instead of plain english (en). I've created the 'plain' languages, but Transifex doesn't just let you change a language, you have to export everything and import it into the new language. That's the reason why there are multiple double languages, where one is at 0%, and the other more filled up than that.

I've created the targets already, but haven't started the transfer progress, that's something I plan this week normally, if there are no technical hurdles that pop up.



Re: 2 languages at 100% on softaculous

Just curious as to how Transifex lists languages - when I view all the languages, English shows down at the bottom of the list, with 0% translated. There is French (France) and French, Spanish (Spain) and Spain, Dutch (Netherlands) and Dutch, Italian (Italy) and Italy, German (Germany) and German. Most of the languages listed without countries are at 0% translated, while those with countries show progress.

Is it how we're set up, or something Transifex has done or changed? Might we benefit from removing some or all of those 'duplicates'

Steve Twitter: @skenow Facebook: Steve Kenow



Re: 2 languages at 100% on softaculous

Here's my contribution - "Translate ImpressCMS" in multiple languages, from Google Translater

Italian: Traduci ImpressCMS
Spanish: Traducir ImpressCMS
Dutch: Vertaal ImpressCMS
German: Übersetzen Sie ImpressCMS
Korean: ImpressCMS 번역
Japanese: ImpressCMSを翻訳する
Norwegian: Oversett ImpressCMS
Polish: Przetłumacz ImpressCMS
Persian: ترجمه ImpressCMS
Lithuanian: Versti ImpressCMS
Portuguese: Traduzir ImpressCMS

 

Steve Twitter: @skenow Facebook: Steve Kenow



Re: 2 languages at 100% on softaculous

Small update : the German translation for ImpressCMS 1.3 is now complete on Transifex. I'll upload the language pack in the next few days.

Anyone who can help getting the last Spanish and Italian texts up and running would be a great help.



Happy Easter!

Easter holidays, so work has been a bit more slow. I did manage to finish the German translation in transifex this evening, I'll upload a complete translation pack tomorrow.

I did start to rework my solution to plugin to the composer library, but I got lost in the complexity of what I'm trying to get. I think I'm aiming too high, certainly for a first version Work continues on that, because it is one of the remaining new funtionalities that needs to go in before we can start looking into producing beta versions of the 2.0 branch - feature complete, but perhaps more bugfixing needed. My new approach is to let the design patterns on the side for the moment, and just get something working first. We can refactor the hell out of it afterwards.

Because nobody understood why we work in the 'retro' branch, and because those reasons date way back, Mekdrop has taken on the task of migrating our working branch for ImpressCMS 2.0 to the 'master' branch.



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.



Re: ImpressCMS swag

I still have the polo shirts we made for CMS Expo in Chicago 6 years ago. We made them a bit on the large-ish side, so they still fit comfortably



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: ImpressCMS swag

Been a long time since I visited that - although I think some of the clothing would no longer fit....