Clean URLs

Please post answers on the most frequently asked questions about CMSimple
Post Reply
Maxim
Posts: 121
Joined: Thu Jun 13, 2013 6:52 am
Location: Запорожье
Contact:

Не знаю, не вникал. Ожидаю Clean URLs

Post by Maxim » Wed Feb 05, 2014 12:28 pm

[ external image ] Здравствуйте
Не знаю, я не устанавливал CMSimple_XH 1.6 и CMSimple_XH 1.6.1 - не вникал. Ожидаю Clean URLs
Не нравятся вопросительные знаки "?":
/?Welcome_to_CMSimple_XH&print
/Welcome_to_CMSimple_XH?&login
/?&print&Login
/?&print&mailform
/?&print&sitemap

Не нравится "?&print&" вначале:
/?&print&Login
/?&print&mailform
/?&print&sitemap

Не нравится "&Login":
/?&print&Login

Хочется ".html":
/Menu_Levels_and_Headings/Menu_Level_2_Page_1/Menu_Level_3_Page_1.html
/Welcome_to_CMSimple_XH.html
/Welcome_to_CMSimple_XH&print.html
/login&print.html
/mailform&print.html
/sitemap&print.html

Хочется заполненный "Urichar":
$tx['urichar']['new']="and";
$tx['urichar']['org']="&|–";

Будет новая русская локализация? Или самому понемногу переводить?

[ external image ] Hallo
Ich weiß nicht, ich nicht installiert haben CMSimple_XH 1.6 und CMSimple_XH 1.6.1 - nicht vertieft. Erwarte Clean URLs
Nicht gefallen Fragezeichen "?":
/?Welcome_to_CMSimple_XH&print
/Welcome_to_CMSimple_XH?&login
/?&print&Login
/?&print&mailform
/?&print&sitemap

Gefällt nicht "?&print&" am Anfang:
/?&print&Login
/?&print&mailform
/?&print&sitemap

Gefällt nicht "&Login":
/?&print&Login

Ich möchte ".html":
/Menu_Levels_and_Headings/Menu_Level_2_Page_1/Menu_Level_3_Page_1.html
/Welcome_to_CMSimple_XH.html
/Welcome_to_CMSimple_XH&print.html
/login&print.html
/mailform&print.html
/sitemap&print.html

Möchten gefüllt "Urichar":
$tx['urichar']['new']="and";
$tx['urichar']['org']="&|–";

Wird eine neue russische Lokalisierung? Oder selbst ein wenig übersetzen?

[ external image ] Hello
I don't know, I didn't install CMSimple_XH 1.6 and CMSimple_XH 1.6.1 - not delved. Expect Clean URLs
Don't like a question mark ?":
/?Welcome_to_CMSimple_XH&print
/Welcome_to_CMSimple_XH?&login
/?&print&Login
/?&print&mailform
/?&print&sitemap

Not like that, "?&print&" in the beginning:
/?&print&Login
/?&print&mailform
/?&print&sitemap

Not like that, "&Login":
/?&print&Login

I want to ".html":
/Menu_Levels_and_Headings/Menu_Level_2_Page_1/Menu_Level_3_Page_1.html
/Welcome_to_CMSimple_XH.html
/Welcome_to_CMSimple_XH&print.html
/login&print.html
/mailform&print.html
/sitemap&print.html

Want filled Urichar":
$tx['urichar']['new']="and";
$tx['urichar']['org']="&|–";

Will the new Russian localization? Or to gradually translate?
Simple Hosting
Бедная, бросаемая бурею, безутешная!

Maxim
Posts: 121
Joined: Thu Jun 13, 2013 6:52 am
Location: Запорожье
Contact:

metaru

Post by Maxim » Fri Feb 28, 2014 9:34 am

[ external image ] Здравствуйте.
BTW: Have you noticed the new cmsimple/languages/metaXY.php files? What do you think of it -- is it useful for Russian/Ukrainian users?
"Настройки" > "CMS" > "Show homepage" - не меняется.

\cmsimple\languages\metaru.php

Code: Select all

$mtx['show_homepage']="Startseite anzeigen";
Я только начал переводить, не много могу сказать.
http://foxpro.maxim.zp.ua/saytostroenie ... -urls.html

[ external image ] Guten Tag.
BTW: Have you noticed the new cmsimple/languages/metaXY.php files? What do you think of it -- is it useful for Russian/Ukrainian users?
Einstellungen > CMS > “Show homepage" - ändert sich nicht.

\cmsimple\languages\metaru.php

Code: Select all

$mtx['show_homepage']="Startseite anzeigen";
Ich habe gerade angefangen zu übersetzen, nicht viel sagen.
http://foxpro.maxim.zp.ua/saytostroenie ... -urls.html

[ external image ] Hello.
BTW: Have you noticed the new cmsimple/languages/metaXY.php files? What do you think of it -- is it useful for Russian/Ukrainian users?
"Settings" > "CMS" > "Show homepage" - does not change.

\cmsimple\languages\metaru.php

Code: Select all

$mtx['show_homepage']="Startseite anzeigen";
I just started to translate, not much I can say.
http://foxpro.maxim.zp.ua/saytostroenie ... -urls.html
Last edited by Maxim on Wed Jan 20, 2016 6:19 am, edited 4 times in total.
Simple Hosting
Бедная, бросаемая бурею, безутешная!

cmb
Posts: 14225
Joined: Tue Jun 21, 2011 11:04 am
Location: Bingen, RLP, DE
Contact:

Re: Clean URLs

Post by cmb » Fri Feb 28, 2014 12:05 pm

Maxim wrote:Настройки" > "CMS" > "Show homepage" - не меняется.
Indeed. We will hopefully address this issue in CMSimple_XH 1.6.2. For now you can use (space instead of underscore):

Code: Select all

$mtx['show homepage']="Startseite anzeigen";
Maxim wrote:Не везде нужно переводить и в "Настройки > CMS" и в "Настройки > Язык"
К примеру:
\cmsimple\languages\metaru.php

Code: Select all

$mtx['images']="Изображения";
$mtx['language']="Язык";
I'm not sure if I understand you correctly. If some translations are not necessary, they can be skipped completely (just remove the lines from metaXY.php). If more translations are needed, they can be inserted to the file. However, I'm still not sure, if the translation capabilities are fine grained enough; it might be necessary to translate certain words differently in different contexts.
Maxim wrote:Я только начал переводить, не много могу сказать.
http://maxim.zp.ua/users/2/files.html
Thanks. I hope you'll find some time to finish the translation. :)
Christoph M. Becker – Plugins for CMSimple_XH

Maxim
Posts: 121
Joined: Thu Jun 13, 2013 6:52 am
Location: Запорожье
Contact:

language

Post by Maxim » Fri Feb 28, 2014 12:54 pm

[ external image ] Если я меняю:
\cmsimple\languages\metaru.php

Code: Select all

$mtx['language']="Язык";
То меняется здесь:
"Настройки > CMS"

и здесь:
"Настройки > Язык"

Если меняется здесь:
"Настройки > CMS" - всё правильно

Если здесь:
"Настройки > Язык"
Выглядит нелепо, получается, что я перевожу русское слово, которое и так на русском языке.

[ external image ] Wenn ich wechsle:
\cmsimple\languages\metaru.php

Code: Select all

$mtx['language']="Язык";
Das ändert sich hier:
"Einstellungen > CMS"

und hier:
"Einstellungen > Sprach-Datei"

Wenn sich hier:
"Einstellungen > CMS" - alles richtig

Wenn Sie hier:
"Einstellungen > Sprach-Datei"
Lächerlich, stellt sich heraus, dass ich übersetze das russische Wort, das so in russischer Sprache.

[ external image ] If I change:
\cmsimple\languages\metaru.php

Code: Select all

$mtx['language']="Язык";
The changes here:
"Settings > CMS"

and here:
"Settings > Language"

If the changes here:
"Settings > CMS" - all right

If here:
"Settings > Language"
Looks absurd, it turns out that I translate the Russian word, which in the Russian language.
Simple Hosting
Бедная, бросаемая бурею, безутешная!

cmb
Posts: 14225
Joined: Tue Jun 21, 2011 11:04 am
Location: Bingen, RLP, DE
Contact:

Re: Clean URLs

Post by cmb » Fri Feb 28, 2014 3:59 pm

Ah, I see. Do you think it's better to never translate the labels in the language settings? Basically, I would agree, but there are some language strings that are not translations (urichar_org/new, for instance), what raises the issue of separating language strings and language settings again.
Christoph M. Becker – Plugins for CMSimple_XH

Maxim
Posts: 121
Joined: Thu Jun 13, 2013 6:52 am
Location: Запорожье
Contact:

Убираем ? и &

Post by Maxim » Fri Mar 21, 2014 8:11 am

[ external image ] Здравствуйте
Убираем &
Было так:
/Welcome_to_CMSimple_XH?&login

Теперь так:
/Welcome_to_CMSimple_XH?login

\cmsimple\functions.php
Эту функцию:

Code: Select all

function lilink()
{
    global $s, $tx;

    if (!XH_ADM) {
        return a($s > -1 ? $s : 0, '&login') . $tx['menu']['login'] . '</a>';
    }
}
Меняем на:

Code: Select all

function lilink()
{
    global $s, $tx;

    if (!XH_ADM) {
        return a($s > -1 ? $s : 0, 'login') . $tx['menu']['login'] . '</a>';
    }
}
Убираем ?
Было так:
/?Welcome_to_CMSimple_XH&print

Теперь так:
/Welcome_to_CMSimple_XH&print

\cmsimple\tplfuncs.php
Эту функцию:

Code: Select all

function XH_printUrl()
{
    global $f, $search, $file, $sn;

    $t = '&print';
    if ($f == 'search') {
        $t .= '&function=search&search=' . stsl($search);
    } elseif ($f == 'file') {
        $t .= '&file=' . $file;
    } elseif ($f != '' && $f != 'save') {
        $t .= '&' . $f;
    } elseif (sv('QUERY_STRING') != '') {
        $t = sv('QUERY_STRING') . $t;
    }
    $t = XH_hsc($t);
    return $sn . '?' . $t;
}
Меняем на:

Code: Select all

function XH_printUrl()
{
    global $f, $search, $file, $sn;

    $t = '&print';
    if ($f == 'search') {
        $t .= '&function=search&search=' . stsl($search);
    } elseif ($f == 'file') {
        $t .= '&file=' . $file;
    } elseif ($f != '' && $f != 'save') {
        $t .= '&' . $f;
    } elseif (sv('QUERY_STRING') != '') {
        $t = sv('QUERY_STRING') . $t;
    }
    $t = XH_hsc($t);
    return $sn . $t;
}
[ external image ] Hallo
Entfernen &
Es war so:
/Welcome_to_CMSimple_XH?&login

Jetzt so:
/Welcome_to_CMSimple_XH?login

\cmsimple\functions.php
Diese Funktion:

Code: Select all

function lilink()
{
    global $s, $tx;

    if (!XH_ADM) {
        return a($s > -1 ? $s : 0, '&login') . $tx['menu']['login'] . '</a>';
    }
}
Ändern auf:

Code: Select all

function lilink()
{
    global $s, $tx;

    if (!XH_ADM) {
        return a($s > -1 ? $s : 0, 'login') . $tx['menu']['login'] . '</a>';
    }
}
Entfernen ?
Es war so:
/?Welcome_to_CMSimple_XH&print

Jetzt so:
/Welcome_to_CMSimple_XH&print

\cmsimple\tplfuncs.php
Diese Funktion:

Code: Select all

function XH_printUrl()
{
    global $f, $search, $file, $sn;

    $t = '&print';
    if ($f == 'search') {
        $t .= '&function=search&search=' . stsl($search);
    } elseif ($f == 'file') {
        $t .= '&file=' . $file;
    } elseif ($f != '' && $f != 'save') {
        $t .= '&' . $f;
    } elseif (sv('QUERY_STRING') != '') {
        $t = sv('QUERY_STRING') . $t;
    }
    $t = XH_hsc($t);
    return $sn . '?' . $t;
}
Ändern auf:

Code: Select all

function XH_printUrl()
{
    global $f, $search, $file, $sn;

    $t = '&print';
    if ($f == 'search') {
        $t .= '&function=search&search=' . stsl($search);
    } elseif ($f == 'file') {
        $t .= '&file=' . $file;
    } elseif ($f != '' && $f != 'save') {
        $t .= '&' . $f;
    } elseif (sv('QUERY_STRING') != '') {
        $t = sv('QUERY_STRING') . $t;
    }
    $t = XH_hsc($t);
    return $sn . $t;
}
[ external image ] Hello
Remove &
Was so:
/Welcome_to_CMSimple_XH?&login

Now:
/Welcome_to_CMSimple_XH?login

\cmsimple\functions.php
This function:

Code: Select all

function lilink()
{
    global $s, $tx;

    if (!XH_ADM) {
        return a($s > -1 ? $s : 0, '&login') . $tx['menu']['login'] . '</a>';
    }
}
Change to:

Code: Select all

function lilink()
{
    global $s, $tx;

    if (!XH_ADM) {
        return a($s > -1 ? $s : 0, 'login') . $tx['menu']['login'] . '</a>';
    }
}
Remove ?
Was so:
/?Welcome_to_CMSimple_XH&print

Now:
/Welcome_to_CMSimple_XH&print

\cmsimple\tplfuncs.php
This function:

Code: Select all

function XH_printUrl()
{
    global $f, $search, $file, $sn;

    $t = '&print';
    if ($f == 'search') {
        $t .= '&function=search&search=' . stsl($search);
    } elseif ($f == 'file') {
        $t .= '&file=' . $file;
    } elseif ($f != '' && $f != 'save') {
        $t .= '&' . $f;
    } elseif (sv('QUERY_STRING') != '') {
        $t = sv('QUERY_STRING') . $t;
    }
    $t = XH_hsc($t);
    return $sn . '?' . $t;
}
Change to:

Code: Select all

function XH_printUrl()
{
    global $f, $search, $file, $sn;

    $t = '&print';
    if ($f == 'search') {
        $t .= '&function=search&search=' . stsl($search);
    } elseif ($f == 'file') {
        $t .= '&file=' . $file;
    } elseif ($f != '' && $f != 'save') {
        $t .= '&' . $f;
    } elseif (sv('QUERY_STRING') != '') {
        $t = sv('QUERY_STRING') . $t;
    }
    $t = XH_hsc($t);
    return $sn . $t;
}
Simple Hosting
Бедная, бросаемая бурею, безутешная!

Maxim
Posts: 121
Joined: Thu Jun 13, 2013 6:52 am
Location: Запорожье
Contact:

Подскажите как поменять...

Post by Maxim » Fri Mar 21, 2014 10:35 am

[ external image ] Подскажите как поменять "Login" на "login"?:
[ external image ] Sag mir, wie ändern "Login" auf "login"?:
[ external image ] Tell me how to change the "Login" on "login"?
/?&print&Login

[ external image ] Как поменять местами "?&print&" и (login, mailform, sitemap)?:
Из таких адресов:
[ external image ] Wie tauschen "?&print&" und (login, mailform, sitemap)?:
Aus solchen Links:
[ external image ] How do I reverse "?&print&" and (login, mailform, sitemap)?:
From these links:
/?&print&Login
/?&print&mailform
/?&print&sitemap

[ external image ] Создать такие:
[ external image ] Eine solche:
[ external image ] To create such:
/login&print.html
/mailform&print.html
/sitemap&print.html

[ external image ] Как в каждом адресе добавить ".html"?
[ external image ] Wie in jedem Link hinzufügen ".html"?
[ external image ] How to add a link to each ".html"?
Simple Hosting
Бедная, бросаемая бурею, безутешная!

Maxim
Posts: 121
Joined: Thu Jun 13, 2013 6:52 am
Location: Запорожье
Contact:

Maybe

Post by Maxim » Mon Apr 07, 2014 10:41 am

[ external image ] Здравствуйте.
Вероятно, Вы не хотите менять местами "?&print&" и (login, mailform, sitemap) и не хотите добавить ".html".
Может быть подскажите как:
1. Отключить печать для login, mailform и sitemap?
2. Как добавить переменную в которой будет храниться ".html" либо ничего не будет храниться, если кому-то больше нравится без ".html"?

[ external image ] Guten Tag.
Sie wollen wahrscheinlich nicht zu ändern "?&print&" und (login, mailform, sitemap) und nicht möchten, hinzufügen ".html".
Kann mir sagen, wie:
1. Drucken deaktivieren für den login, mailform und sitemap?
2. Als Variable hinzufügen, in dem gespeichert wird ".html" entweder wird nichts gespeichert, wenn jemand mehr, wie es ohne ".html"?

[ external image ] Hello.
You probably do not want to change places "?&print&" and (login, mailform, sitemap) and don't want to add ".html".
Maybe you will tell me how:
1. Disable printing to login, mailform and sitemap?
2. How to add a variable in which to store ".html" nothing will be stored, if someone likes without ".html"?
Last edited by Maxim on Mon Apr 07, 2014 1:24 pm, edited 1 time in total.
Simple Hosting
Бедная, бросаемая бурею, безутешная!

cmb
Posts: 14225
Joined: Tue Jun 21, 2011 11:04 am
Location: Bingen, RLP, DE
Contact:

Re: Clean URLs

Post by cmb » Mon Apr 07, 2014 12:50 pm

Maxim wrote:Вероятно, Вы не хотите менять местами "?&print&" и (login, mailform, sitemap) и не хотите добавить ".html".
Может быть подскажите как:
It's not so much that I don't want to tell you, but rather that it's not easy to accomplish (if at all), and that I do not have the time to find that out now. Sorry.
Maxim wrote:1. Отключить печать для login, mailform и sitemap?
Find function printlink() in cmsimple/tplfuncs.php and change it to the following:

Code: Select all

function printlink()
{
    global $tx, $f;

    if (in_array($f, array('login', 'Login', 'mailform', 'sitemap'))) {
        return '';
    }
    return '<a href="' . XH_printUrl() . '">' . $tx['menu']['print'] . '</a>';
}
(There seems to be something wrong with "Login", which should rather be "login" -- I have to investigate.)
Maxim wrote:2. Как добавить переменную в которой будет храниться ".html" либо ничего не будет храниться, если кому-то больше нравится без ".html"
That is not possible, because this variable would have to be know in the .htaccess file, but there no PHP variables are known.
Christoph M. Becker – Plugins for CMSimple_XH

Maxim
Posts: 121
Joined: Thu Jun 13, 2013 6:52 am
Location: Запорожье
Contact:

Addon с ".html"

Post by Maxim » Tue Apr 08, 2014 1:43 pm

[ external image ] Добавил Addon с ".html"
[ external image ] Hinzugefügt Addon ".html"
[ external image ] Added Addon with ".html"
http://foxpro.maxim.zp.ua/saytostroenie ... -urls.html

[ external image ] Многое не понял нужно добавлять или нет. Этот код не добавлял:
[ external image ] Vieles nicht verstanden Hinzugefügt werden sollen oder nicht. Dieser Code nicht Hinzugefügt:
[ external image ] Many have not understood the need to add or not. This code not added:

Code: Select all

$su = substr($su, 0, $cf['uri']['length']); // this line is line 221, which is already there

foreach (array('login', 'mailform', 'print', 'sitemap') as $i) {
    if (!empty($GLOBALS[uenc($tx['menu'][$i])])) {
        $$i = 'true';
    }
}
[ external image ] Как не печатать:
[ external image ] Wie nicht drucken:
[ external image ] How not to print:
/Welcome_to_CMSimple_XH&login.html
/mailform.html
/sitemap.html

[ external image ] не знаю.
[ external image ] ich weiß nicht.
[ external image ] I do not know.
Last edited by Maxim on Wed Jan 20, 2016 6:22 am, edited 3 times in total.
Simple Hosting
Бедная, бросаемая бурею, безутешная!

Post Reply