Change url from ?company,1 to ?1,company

roca

Avatar: roca

2007-10-29 14:21

Hi,

How do I change the layout of the url as below:
Http://yoursite/?company,1
To
Http://yoursite/?1,company
It is possible in version 2.0

» Quick.Cms v2.x

treewood (OpenSolution)

Avatar: treewood

2007-10-29 20:25

roca - it will be hard but if You want You can try.
1. edit core/pages.php and change generateCache function

$this->aPages[$aExp[0]]['sLinkName'] = '?'.change2Url$this->aPages[$aExp[0]]['sName'] ).','.$aExp[0];

to

$this->aPages[$aExp[0]]['sLinkName'] = '?'.$aExp[0].','.change2Url$this->aPages[$aExp[0]]['sName'] );


2. edit core/common.php and change function getUrlFromGet( ) this function generates variables $p, $a etc. like ?company,1 to $p='p', $a = 1. Wish You luck

roca

Avatar: roca

2007-10-30 11:24

ok thanks, very gooood!!!

avartec

No avatar

2007-11-22 22:47

Witam,
zmieniłem generowanie linku w pliku core/pages.php i generuje się, tak jak powyżej,
ale mam natomiast problem z edycją core/common.php,
mógłby ktoś jaśniej opisać, edycję tego pliku ???

zecke

No avatar

2007-11-26 18:27

A czy w przypadku mode-rewrite jest możliwość ustawienia linków z np: www.onet.pl/2,sport.html na www.onet.pl/sport.html ?

Takie linki będą zdecydowanie bardziej przyjazne

Pozdrawiam i dzięki za odp

merci

No avatar

2007-11-27 08:41

zecke - posiadamy plugin friendly links, niestety jest on platny. Jego opis mozesz znalezc tutaj: http://opensolution.org/os/templates/pl_Quick.Cms_features.2.0.html#friendly-links

Beks

Avatar: Beks

2008-11-22 12:43

Hello!
I am from Slovakia and our language has got the letters like š,č,ť,ž,ú,... and this letters shows in URL incorrectly for example: ť=%9D, so the URL is www.name.com/?ako-sa-objedna%9D-,4

THANKS

kalanta

No avatar

2008-11-22 21:56

I think you need modify function change2Latin in libraries/Trash.php file (approx. from 297 line), for example:

return str_replace( Array( 'ą', 'č', 'ť', 'ž', 'ú' ), Array( 'a', 'c', 't', 'z', 'u' ), $sContent );

first array contains from letters you need to change. for example, č from first array will be changed to c from next array. just try it. I think it should work.

Beks

Avatar: Beks

2008-11-27 19:02

I try it, but nothink change

treewood (OpenSolution)

Avatar: treewood

2008-11-28 07:50

Beks - did you changed it in editor which supports UTF8 encoding?

beholder

Avatar: beholder

2008-12-03 02:39

beks, this is a common problem. Please use Notepad++ and try to convert the file format of libraries/Trash.php to UTF-8 without BOM or to ANSI (depending on what file format the file has right now).
I bet it has ANSI format and needs to be converted to UTF-8.

or if you still don't understand, write to my e-mail shown here:
http://www.tigerware.sk/easyplugins/antispam2.png

beholder

Avatar: beholder

2011-02-22 04:39

Beks' problem solved. I sent him the correct file in UTF-8 encoding.

trzykas

Avatar: trzykas

2011-03-18 00:14

simple solution
http://opensolution.org/Quick.Cms/forum/?p=readTopic&nr=1741

trzykas

Back to top
about us | contact