-
Posts
15 -
Joined
-
Last visited
Posts posted by stefan
-
-
It would have been good to start a new thread
http://processwire.com/talk/topic/5427-sanitizer-pagename-and-translations/?p=52339
@horst: incl. the answer for the "sanitizer & pagename" question.
-
Hi folks,
this question based on http://processwire.com/talk/topic/5414-selector-find-page-reference-help/?p=52292
After a look around the Sanitizer::pageName method, i realized that the second argument isn't only a boolean value. The second argument should be "2" (constant "translate").I have added a few lines to the configuration of the module "pagename". Especially for the German umlauts ("ö" > "oe"...).
By Admin > /filter/groessen
Great.$sanitizer->pageName('Größen',true) > "grossen"
Wrong.. should be "gr*oe*ssen". What is the secret here?$sanitizer->pageName('Größen, Sanitizer::translate); // "groessen"
Is this dependent on a special thing (multilanguage support?) or just forgotten in the documentation (/api/variables/sanitizer/)?
Thanks.
Adios, Stefan
-
Hallo Horst,
marke.title=Masita|Kempacool, thank you.have you simply added new lines with äöü? or did you change the default existing ones (that belong to a nordic language and translate ä = a, ö = o, ü = u)?changed it. But both ways results in the same behaviour.ciao, Stefan -
Hello Guys,
i am confused about this and some other points...
At first: the selectors (for page-type)
- produkte (products)
- product 1
- product 2
- marken (brands)
- Masita
- Kempa
- filter (filters)
- geschlecht (gender)
- Damen
- Herren
- unisex
- farben (colors)
- Grün
- Gelb
- Blau
- Rot
- Größen (sizes)
- s
- m
- xlEach "product" has three filelds (type: "page")
1.) marke; childs from "/marken/"
2.) geschlecht; childs from "/filter/geschlecht"
3.) farbe; childs from "/filter/farben"
So this working.. that means the expected pages are returned.geschlecht=Damen OR geschlecht=Damen|Herren OR farbe=Grün|Gelb
But...
marke=Masita // no Result marke=Masita|Kempa // no Result
This works again
$brands = (title=Masita|Kempa) marke=$brands
So what is the difference and which one is correct?Second: Sanitizer and pageName
I have added a few lines to the configuration of the module "pagename". Especially for the German umlauts ("ö" > "oe"...).By Admin > /filter/groessen
Great.
$sanitizer->pageName('Größen',true) > "grossen"
Wrong.. should be "gr*oe*ssen". What is the secret here?
Thank you.
adios, Stefan
-
Hi Ryan
Just to follow upi will, definitely. Who wants not follow the revelation of st. P.W. Cramer?
-
Hello Guys
there is another app (foolish xtmshop) with smarty engine and i include pw inside some smarty functions
example
<?php require_once '_w/index.php'; function smarty_function_getWireProduct($params, &$smarty) { if( $oProduct = wire('pages')->get('/produkte/' . $smarty->_tpl_vars['PRODUCTS_MODEL'] . '/') ) { $smarty->assign('wireProduct', $oProduct); } return null; }
few minutes ago i installed the Language Support (german Language pack) and all works fine. But the app also use a class "language" so this run into the "cannot redeclare class language" error.
Any ideas how to prevent this?
Thanks in advance
adios, Stefan
Edit:
Ok. i see... there are a lot of related topics around. But not a quick solution, right? Waiting for namespaces...
-
Hello Joss
I have a really bad cold and I am not totally sure what you are asking.
Well done, you guessed my question. thanks for your explanation.
I tend to mix it up because I never seem to do things the same way twice!
sounds logical
Get well!
adios, stefan -
Hi Joss,
thanks for this. Good source for me to getting closer with pw, but a question appear.
Your files just located inside the template folder and contain functions with all the output mixed with php. If the functions wrap with a class and the output strip out to single templates. How the file structure looks then? Where to place the class and the corresponding files? Would it be a module then?
thanks, Stefan
-
sorry english speakers. Be sure, you missed absolutely nothing...
mmmh expect this kind of elegant DADA
Gebäude alles klar gedanken versunken! Tschüüüssadios, Stefan
-
-
Try uberspace, they rock
Mercy, aber ich such keinen hoster, ich bin mein eigener. Mir geht es um die Ausführungsgeschwindigkeit von pw, deshalb die Frage nach der Umgebung und ob caching aktiviert ist. Danke für die Infos.
adios, stefan
- 1
-
Hallo Nico
Du hast einen Bug eingebaut:
<link rel="canonical" href="http://sgym.dehttp://sgym.de/schule/veranstaltungen/"/>
Läuft die Seite bei einem Massenhoster wie Strato, 1und1 o.ä? Und ist dort das pw-caching aktiv? Danke.
ciao, Stefan
-
I just asked google for a "cms with custom fields"
- 4
-
Hello community,
iam using Zend Server (PHP-Version fast-cgi 5.3.8-ZS5.5.0). A fresh install of 2.3 results in an Exception shown below.
The solution for me was tweaking the Password::supportsBlowfish (just return "false"). After the installation i removed the tweak and all is working as expected. Same procedure with a xampp stack (PHP as module 5.3.8) running through without complications.
Error: Uncaught exception 'WireException' with message 'Unable to generate password hash' in E:\htdocs\apps\cms\pwtest\wire\core\Password.php:270 Stack trace: #0 E:\htdocs\apps\cms\pwtest\wire\core\Password.php(106): Password->hash('stefan') #1 [internal function]: Password->___setPass('stefan') #2 E:\htdocs\apps\cms\pwtest\wire\core\Wire.php(271): call_user_func_array(Array, Array) #3 E:\htdocs\apps\cms\pwtest\wire\core\Wire.php(229): Wire->runHooks('setPass', Array) #4 E:\htdocs\apps\cms\pwtest\wire\core\Password.php(73): Wire->__call('setPass', Array) #5 E:\htdocs\apps\cms\pwtest\wire\core\Password.php(73): Password->setPass('stefan') #6 E:\htdocs\apps\cms\pwtest\wire\modules\Fieldtype\FieldtypePassword.module(72): Password->__set('pass', 'stefan') #7 E:\htdocs\apps\cms\pwtest\wire\core\Page.php(462): FieldtypePassword->sanitizeValue(Object(User), Object(Field), 'stefan') #8 E:\htdocs\apps\cms\pwtest\wire\core\Page.php(379): Page->setFieldValue('pass', 'stefan', true) #9 E:\htdocs\apps\cms\pwtest\wire\core\Page.p (line 270 of E:\htdocs\apps\cms\pwtest\wire\core\Password.php) This error message was shown because /install.php still exists. Error has been logged.
This line tells something, but i am not sure whathash('blowfish','mystring',false);
says:xampp (php as module): "Unknown hashing algorithm: blowfish"
zendServer: "false"
maybe this can be a help for others with the same environment.
adios, Stefan
Selector find page reference - help
in General Support
Posted
Philipp... Thank you! Understood.