Some changes... and questions
Some changes... and questions
first, thanks for this nice fork of the CMSMS. I've made 4 changes which I want share with you:
1.
{lang} was not working, if you enable cutom 404 error with template.
2.
A link to the default page is not working, if cookies are not enabled in the UA:
- old link syle: "http//example.com/"
- new link style "http//example.com/en/"
3.
In {lang}, if we are on the default page, the new stye link will also be used (so we have the same link as the menu):
- old link syle: "http//example.com/en/home/"
- new link style "http//example.com/en/"
4.
In {lang}, the current page is now not a link. Instead the text/image is inside a (for the class).
And now 2 questions
1.
About "Tips and Tricks - #9". Is there a config switch to disable/enable the new behaviour?
There is IMHO also one problem with the new behaviour. The menu should also use the text from the default lang.
2.
As you have read above, the default page is now "http//example.com/en/". If a user request the page with "http//example.com/", there should be a redirect to "http//example.com/en/" ("en" is the reslut of the accept-language or default lang). Can you give me hint, in which file I must add this?
Regards,
Carsten
BTW:
Sorry for this topic. Do you know a better one?
- Attachments
-
[The extension txt has been deactivated and can no longer be displayed.]
-
[The extension txt has been deactivated and can no longer be displayed.]
-
[The extension txt has been deactivated and can no longer be displayed.]
-
[The extension txt has been deactivated and can no longer be displayed.]
Re: Some changes... and questions
Cool, I agree and add in SVNWiedmann wrote: 1.
{lang} was not working, if you enable cutom 404 error with template.
4.
In {lang}, the current page is now not a link. Instead the text/image is inside a (for the class).
Here I ask who uses rewrite / pretty_url to test this solution in different conditionsWiedmann wrote: 2.
A link to the default page is not working, if cookies are not enabled in the UA:
- old link syle: "http//example.com/"
- new link style "http//example.com/en/"
3.
In {lang}, if we are on the default page, the new stye link will also be used (so we have the same link as the menu):
- old link syle: "http//example.com/en/home/"
- new link style "http//example.com/en/"
No, is default in 1.2.4Wiedmann wrote: 1.
About "Tips and Tricks - #9". Is there a config switch to disable/enable the new behaviour?
There is IMHO also one problem with the new behaviour. The menu should also use the text from the default lang.
Serves to avoid a blank page (content and menus) or error in the case of empty language. You must always to use tips #4 for hide menus
Try to add in include.php (around #222):Wiedmann wrote: 2.
As you have read above, the default page is now "http//example.com/en/". If a user request the page with "http//example.com/", there should be a redirect to "http//example.com/en/" ("en" is the reslut of the accept-language or default lang). Can you give me hint, in which file I must add this?
Albyif( (! isset($force_mle_default)) || (! $force_mle_default) ) $hl = language_user_setting($hls);
else $hl = DEFAULT_LANG;
setcookie('mle', $hl, time()+86400, '/');
$contentops =& $gCms->GetContentOperations();
redirect_to_alias($contentops->GetDefaultPageID());
exit();
}
Re: Some changes... and questions
If someone want test this, don't forgett to change your ".htaccess". Of course, you have the same effect without pretty url:Here I ask who uses rewrite / pretty_url to test this solution in different conditions
- old link syle: "http//example.com/"
- new link style "http://localhost/cmsmadesimple/index.php?page=&hl=en"
BTW ".htaccess":
Removing [NC] from "-f" and "-d" is just fixing a bug from base CMSMS.
--> "NC" is not valid for "-f" and "-d". Instead you have a lot of warnings in your error_log.
That's OK, and it works for the content, but I still have an empty menu.No, is default in 1.2.4 Serves to avoid a blank page (content and menus)
Thanks for the hint I have append the diffs, to make this also working.Try to add in include.php (around #222):
One additional question about cookies... But I think, this is more a quetion for CMSMS dev? CMSMS don't use a cookiepath for (session-) cookies. You are using "/". IMHO the cookiepath should always be set to the cmsms root_url?
Regards,
Carsten
- Attachments
-
[The extension txt has been deactivated and can no longer be displayed.]
-
[The extension txt has been deactivated and can no longer be displayed.]
Re: Some changes... and questions
Right!Wiedmann wrote: One additional question about cookies... But I think, this is more a quetion for CMSMS dev? CMSMS don't use a cookiepath for (session-) cookies. You are using "/". IMHO the cookiepath should always be set to the cmsms root_url?
In SVN I update setcookie (also to use https) and I have restored the old behavior and content GBC using the new parameter "view_default"
Alby
Re: Some changes... and questions
I seeIn SVN I update setcookie (also to use https)
Just a hint (see the appended file):
- $cookie_path now works also on windows (and in the root dir correct)
- if you set $cookie_domain to null, you don't override the setting from php.ini
- $cookie_secure: HTTPS is case insensitive and can also be "ON".
And know we must talk to the CMSMS devs, if they also want use session_set_cookie_params(), before they use session_start()
- Attachments
-
[The extension txt has been deactivated and can no longer be displayed.]
Re: Some changes... and questions
Want you participate in MLE project?Wiedmann wrote: I see
Alby
Re: Some changes... and questions
Damn The change in "include.php" breaks the backend (sorry, have only test frontend).Wiedmann wrote:Thanks for the hint I have append the diffs, to make this also working.
With:
Code: Select all
if(!isset($CMS_ADMIN_PAGE) && (empty($mle) || !in_array($mle, array_keys($hls)))) {
ok, change to:
Code: Select all
if((!isset($CMS_ADMIN_PAGE) && !isset($CMS_STYLESHEET)) && (empty($mle) || !in_array($mle, array_keys($hls)))) {
Sounds interessting. But I'm really new to CMSMS. First installation at 2008-04-05. At the moment I walk through the api doku and try to understand what happens (some more/better docblocks would be nice )Want you participate in MLE project?
Well, I need a cms for a project, and also need the changes I'm trying to do.
Regards,
Carsten
Re: Some changes... and questions
OK, I've moved the redirect from "include.php" to "index.php" and now it seams to work.Damn Traurig The change in "include.php" breaks the backend (sorry, have only test frontend).
Should I make an all in one diff (against SVN), thus you can better test it?
(For me, CMSMS MLE with the above patches is more SEO (don't use different URIs for the same content).)
- Attachments
-
[The extension txt has been deactivated and can no longer be displayed.]
Re: Some changes... and questions
YesWiedmann wrote: Should I make an all in one diff (against SVN), thus you can better test it?
Alby
Re: Some changes... and questions
- Attachments
-
[The extension txt has been deactivated and can no longer be displayed.]
Re: Some changes... and questions
The patch is not working if you not also have config_lang.php/ALTER tables. I've attached a new diff..Here it is.
- Attachments
-
[The extension txt has been deactivated and can no longer be displayed.]
Re: Some changes... and questions
I do not understand why you do not want to enter in MLE project?Wiedmann wrote:The patch is not working if you not also have config_lang.php/ALTER tables. I've attached a new diff..Here it is.
This is really a good work
Alby