Jump to content

stefan

Members
  • Posts

    15
  • Joined

  • Last visited

Posts posted by stefan

  1. Hi folks,

    this question based on http://processwire.com/talk/topic/5414-selector-find-page-reference-help/?p=52292

    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?
    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").
    $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

  2. Hallo Horst,

    marke.title=Masita|Kempa
     
    cool, 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
  3. 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
         - xl

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

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

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

  6. 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 what :-)
    hash('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

×
×
  • Create New...