Page 1 of 1

local-national links-urls in phpwcms

Posted: Tue 16. Oct 2012, 23:28
by Ћирилица1
How can this CMS use user defined national links?
i.e. why alases was restricts to english character set?

UTF-8 was posibble in urls?

http://xn--80adklaau1bbz5bc8x.xn--90a3a ... 1%80%D0%B1
i.e. http://ЧувариЋирилице.Срб/listpage=2.Срб


How to change "listpage" to something else?

I change php to Срб and this work without problems.
I like to use all parts URLs in national character set - Cyrillic...

Re: local-national links-urls in phpwcms

Posted: Wed 17. Oct 2012, 13:38
by update
What's your (Nick)name?

Re: local-national links-urls in phpwcms

Posted: Sat 20. Oct 2012, 17:28
by Oliver Georgi
I have to think about changing this. It is a historic question…

Re: local-national links-urls in phpwcms

Posted: Mon 22. Oct 2012, 17:38
by Ћирилица1
Oliver Georgi wrote:I have to think about changing this. It is a historic question…

Good solution for that is to have configuration variables for every function - part of URLs...

As you have defined variable for sufix for used articles, maybe to have variable for prefix?
This will solve all my ideas if vaules can be UTF-8 ;) :)

Re: local-national links-urls in phpwcms

Posted: Mon 22. Oct 2012, 19:36
by Ћирилица1
claus wrote:What's your (Nick)name?
Ћирилица1 - Cyrillic1 was sucessor of oldest letters of word (Srbica, about 7.000 years)! :)

Ћирилица = Cyrillic = Serbian Alphabet phonetic - phonemic script
Faithfully following Johann Adelung's principle of "write as you speak and read as it is written" :)

Image

Re: local-national links-urls in phpwcms

Posted: Tue 23. Oct 2012, 06:29
by Oliver Georgi
This char is unknown to me Ћ. My Russian is a bit rusty.

Re: local-national links-urls in phpwcms

Posted: Sat 27. Oct 2012, 00:00
by Ћирилица1
I am Pascal/Java programmer and before 10 years I was learn little Pearl.
PHP I not use all this years :)


When I think how to add prefix to my links of articles,
I look on net how you worked with suffix in phpwcms ... :)


And based on this article
http://forum.phpwcms.org/viewtopic.php?t=11618
I made following changes:
---
/config/phpwcms/config.inc.php(at end):

// 25.10.2012
$phpwcms['article_prefix'] = 'свитак_'; // The file prefix used while URL is rewritten # 25.10.2012

---

/include/inc_lib/default.inc.php (in block where PHPWCMS_REWRITE_EXT was defined)
---
define ('PHPWCMS_ARTICLE_PREFIX', isset($phpwcms['article_prefix']) ? $phpwcms['article_prefix'] : ''); // 25.10.2012 - emty if not defined
---


--- /include/inc_front/front.func.inc.php (at end of function)
// REWRITE - PATCHED FOR 04/04 // jan212
function url_search($query) {
$query_string = '';
$anchor = '';
if ( substr($query[3], 0, 3) == 'id=') {
$file = str_replace(',', '.', substr($query[3], 3));
} else {
$file = str_replace(array(',', 'aid='), array('.', 'aid'.rawurlencode('=')), $query[3]);
}
if(strpos($file, '#') !== false) {
preg_match('/^(.*?)(#.*?){0,1}$/', $file, $match);
$file = $match[1];
if(isset($match[2])) {
$anchor = $match[2];
}
}
if(strpos($file, '&') !== false) {
preg_match('/^(.*?)(&.+?=.*?){0,1}$/', $file, $match);
$file = $match[1];
if(isset($match[2])) {
$query_string = $match[2];
if(substr($query_string, 0, 5) == '&') {
$query_string = substr($query_string, 5);
}
$query_string = '?' . $query_string;
}
}
return $query[1].'="'.PHPWCMS_ARTICLE_PREFIX.$file.PHPWCMS_REWRITE_EXT.$query_string.$anchor.'"'; // 25.10.2012
}
---

And I change rss.php /feed.php/ and sitemap.php...
This was worked, as I want!
-------------------------

My links of articles have now prefix as I want :) Complete on Cyrillic!
Why was this important to me or our group?

Type of oure articles which was published of site was special as Scrolls.
As Robin Hood, we published it on tree! And I like that this names was corresponding!
And now I think, that sucess...

Real changes will come... (Like Obama's lies or not?)
It's only question of time and patience ...

It's left only problem of paging...

I hope, that this will help to someone!


Something about Scrolls:
http://www.spc.rs/eng/largest_ever_dead ... s_seminary

Re: local-national links-urls in phpwcms

Posted: Sat 27. Oct 2012, 00:06
by Ћирилица1
Ћирилица1 wrote: This was worked, as I want!
-------------------------
And, how this work,
you can see on following links:

чуварићирилице.срб/

чуварићирилице.срб/feeds.php

чуварићирилице.срб/sitemap.php

Re: local-national links-urls in phpwcms

Posted: Sat 27. Oct 2012, 00:21
by Ћирилица1
Oliver Georgi wrote:This char is unknown to me Ћ. My Russian is a bit rusty.
Number of РФ domains:
http://statdom.ru/tld/%D1%80%D1%84/report/summary/ (Curent 838.461)

Number of СРБ domans:
http://рнидс.срб/cir/ (Current 6.772)

There was many different Cyrillic, as there was other latinic letters :)

Look this photo:
Image

http://Чуварићирилице.срб/слике/3_01.jpg



And how many will be Chinese, when start?