Welcome, Guest. Please login or register.
Did you miss your activation email?
16 May 2008, 22:56

Login with username, password and session length
Home Chat Help Search Calendar Login Register
Pages: [1]
Print
Author Topic: Some changes... and questions  (Read 976 times)
0 Members and 1 Guest are viewing this topic.
Wiedmann
Forum Member
*

Karma: 0
Online Online

Posts: 141

Location: Stuttgart / Germany


« on: 06 Apr 2008, 21:22 »

Hallo Alby,

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 <span> (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?

* index.php.diff.txt (0.44 KB - downloaded 22 times.)
* doc-htaccess.txt.diff.txt (0.61 KB - downloaded 23 times.)
* lib-classes-class.content.inc.php.diff.txt (0.69 KB - downloaded 21 times.)
* plugins-function.lang.php.diff.txt (2.52 KB - downloaded 41 times.)
Logged
alby
Member Support Team
Moderator
Power Poster
*****

Karma: 99
Offline Offline

Posts: 2151

Location: Ferrara, Italy


My kids


« Reply #1 on: 07 Apr 2008, 05:09 »

Thank you  Cheesy

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 <span> (for the class).

Cool, I agree and add in SVN


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/"

Here I ask who uses rewrite / pretty_url to test this solution in different conditions


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.

No, is default in 1.2.4
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


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?

Try to add in include.php (around #222):
Quote
   if( (! 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();
  }

Alby
« Last Edit: 07 Apr 2008, 05:18 by alby » Logged

Member CMSMS Support Team
Italian Forum Moderator - Italian admin Project

Plugins: Geolocate hostip - Multiple random image - Image rotator (PLEASE test beta) - Content Pagination (TEST PLEASE)

Modules: ForumMadeSimple - Howto (FMS)

Multilingual: CMSMS MLE 1.2.4b - Doc/Howto/Tips (#9)
Wiedmann
Forum Member
*

Karma: 0
Online Online

Posts: 141

Location: Stuttgart / Germany


« Reply #2 on: 08 Apr 2008, 16:01 »

Quote
Here I ask who uses rewrite / pretty_url to test this solution in different conditions
If someone want test this, don't forgett to change your ".htaccess". Of course, you have the same effect without pretty url:
- 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.

Quote
No, is default in 1.2.4 Serves to avoid a blank page (content and menus)
That's OK, and it works for the content, but I still have an empty menu.

Quote
Try to add in include.php (around #222):
Thanks for the hint :-) I have append the diffs, to make this also working.

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



* include.php.diff.txt (0.56 KB - downloaded 21 times.)
* lib-misc.functions.php.diff.txt (1.04 KB - downloaded 23 times.)
Logged
alby
Member Support Team
Moderator
Power Poster
*****

Karma: 99
Offline Offline

Posts: 2151

Location: Ferrara, Italy


My kids


« Reply #3 on: 09 Apr 2008, 05:01 »

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?

Right!
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
« Last Edit: 09 Apr 2008, 05:24 by alby » Logged

Member CMSMS Support Team
Italian Forum Moderator - Italian admin Project

Plugins: Geolocate hostip - Multiple random image - Image rotator (PLEASE test beta) - Content Pagination (TEST PLEASE)

Modules: ForumMadeSimple - Howto (FMS)

Multilingual: CMSMS MLE 1.2.4b - Doc/Howto/Tips (#9)
Wiedmann
Forum Member
*

Karma: 0
Online Online

Posts: 141

Location: Stuttgart / Germany


« Reply #4 on: 09 Apr 2008, 06:10 »

Quote
In SVN I update setcookie (also to use https)
I see Smiley

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()  Wink

* include.php.diff.txt (0.7 KB - downloaded 19 times.)
Logged
alby
Member Support Team
Moderator
Power Poster
*****

Karma: 99
Offline Offline

Posts: 2151

Location: Ferrara, Italy


My kids


« Reply #5 on: 09 Apr 2008, 06:44 »

I see Smiley

Want you participate in MLE project?

Alby
Logged

Member CMSMS Support Team
Italian Forum Moderator - Italian admin Project

Plugins: Geolocate hostip - Multiple random image - Image rotator (PLEASE test beta) - Content Pagination (TEST PLEASE)

Modules: ForumMadeSimple - Howto (FMS)

Multilingual: CMSMS MLE 1.2.4b - Doc/Howto/Tips (#9)
Wiedmann
Forum Member
*

Karma: 0
Online Online

Posts: 141

Location: Stuttgart / Germany


« Reply #6 on: 09 Apr 2008, 17:53 »

Hi Alby,

Quote from: Wiedmann
Thanks for the hint :-) I have append the diffs, to make this also working.
Damn Sad The change in "include.php" breaks the backend (sorry, have only test frontend).

With:
Code:
    if(!isset($CMS_ADMIN_PAGE) && (empty($mle) || !in_array($mle, array_keys($hls)))) {
There is no stylesheet.

ok, change to:
Code:
    if((!isset($CMS_ADMIN_PAGE) && !isset($CMS_STYLESHEET)) && (empty($mle) || !in_array($mle, array_keys($hls)))) {
i have the stylesheet. But preview or TinyMCE is broken.


Quote
Want you participate in MLE project?
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 Wink)

Well, I need a cms for a project, and also need the changes I'm trying to do.

Regards,
Carsten
Logged
Wiedmann
Forum Member
*

Karma: 0
Online Online

Posts: 141

Location: Stuttgart / Germany


« Reply #7 on: 18 Apr 2008, 11:37 »

Quote
Damn Traurig The change in "include.php" breaks the backend (sorry, have only test frontend).
OK, I've moved the redirect from "include.php" to "index.php" and now it seams to work.

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).)


* index.php.diff.txt (0.59 KB - downloaded 21 times.)
« Last Edit: 18 Apr 2008, 11:50 by Wiedmann » Logged
alby
Member Support Team
Moderator
Power Poster
*****

Karma: 99
Offline Offline

Posts: 2151

Location: Ferrara, Italy


My kids


« Reply #8 on: 21 Apr 2008, 02:16 »

Should I make an all in one diff (against SVN), thus you can better test it?

Yes  Cheesy

Alby
Logged

Member CMSMS Support Team
Italian Forum Moderator - Italian admin Project

Plugins: Geolocate hostip - Multiple random image - Image rotator (PLEASE test beta) - Content Pagination (TEST PLEASE)

Modules: ForumMadeSimple - Howto (FMS)

Multilingual: CMSMS MLE 1.2.4b - Doc/Howto/Tips (#9)
Wiedmann
Forum Member
*

Karma: 0
Online Online

Posts: 141

Location: Stuttgart / Germany


« Reply #9 on: 21 Apr 2008, 05:19 »

Here it is.

* seo-links.diff.txt (41.8 KB - downloaded 16 times.)
Logged
Wiedmann
Forum Member
*

Karma: 0
Online Online

Posts: 141

Location: Stuttgart / Germany


« Reply #10 on: 26 Apr 2008, 01:14 »

Quote
Here it is.
The patch is not working if you not also have config_lang.php/ALTER tables. I've attached a new diff..

* seo-links.diff.txt (5.4 KB - downloaded 17 times.)
Logged
alby
Member Support Team
Moderator
Power Poster
*****

Karma: 99
Offline Offline

Posts: 2151

Location: Ferrara, Italy


My kids


« Reply #11 on: 26 Apr 2008, 02:24 »

Quote
Here it is.
The patch is not working if you not also have config_lang.php/ALTER tables. I've attached a new diff..

I do not understand why you do not want to enter in MLE project?
This is really a good work  Wink

Alby
Logged

Member CMSMS Support Team
Italian Forum Moderator - Italian admin Project

Plugins: Geolocate hostip - Multiple random image - Image rotator (PLEASE test beta) - Content Pagination (TEST PLEASE)

Modules: ForumMadeSimple - Howto (FMS)

Multilingual: CMSMS MLE 1.2.4b - Doc/Howto/Tips (#9)
Pages: [1]
Print
Jump to: