Jump to content

maba

Members
  • Posts

    167
  • Joined

  • Last visited

Posts posted by maba

  1. Thanks Ryan.

    Also tried commenting out floatval(), it works but:

    - IT user must use . (dot) and not , (comma) for decimal separator

    - thousands are not respected (1.200,10 -> 1,20 / 1,200.10 -> 1)

    $value is edited before floatval() call in sleepValue(). But.. Where? Javascript?

    In my examples "XX passed" is the $value echoed at the beginning of sleepValue() function (2,3 -> 2 / 2.3 -> 2,3).

  2. After some tests.. refer to ___sleepValue in FieldtypeFloat.module

    LC_ALL = it_IT


    write 2.3 (just for test)

    2,2 passed
    2.2 after mon_decimal_replace 
    2,2 after floatval()

    saved as 2.. floatval() use my locale.

    write 2,3

    2 passed
    2 after floatval()

    $value is cleared somewhere before this call..

    Italian user have to use . (dot), less floatval(). It is wrong.

  3. With setlocale setted to default values float works:

    (2 decimal digits)

    #from db
    5.69 -> view in admin page as 5.69
    #new
    5.6899 -> 5.69
    5.6 -> 5.6
    ...
    

    If I change setlocale from Setup->Lanuages->... to it_IT

    #from db
    5.69 -> view in admin page as 5,69 # so It works, replace . with ,
    #new
    5,6899 -> 5
    5,6 -> 5
    5,9999 -> 5
    5.69 -> 5
    5.9999 -> 6 #!!!!
    ...
    

    So, in input I can't use , and decimal digits aren't respected.

    Thanks

  4. Hi all,

    is there a method to regenerate all thumbs from api (command line)?

    I have to change all thumbnail setting and after that recreate thumbs with different sizes and delete the oldest.

    Probably a double request but I cannot find the right post/thread.

    Thanks

  5. I'm not sure I understand the question/comment/request?

    Focused on javascript I made some tests. Also with the last fixes.

    My situation:

    • checkbox "new"
    • checkbox "hightlight"
    • image "highlight_cover"
    • test "highlight_text"

    With

    text: {"columnWidth":50,"required":1,"requiredIf":"new>0","showIf":"higlight>0"}
    image: {"columnWidth":50,"required":1,"requiredIf":"new>0","showIf":"highlight>0"}
    

    or (change requiredIf to the same filed, only to test, if required is active the field result required when showed and the check works)

    text: {"columnWidth":50,"required":1,"requiredIf":"highlight>0","showIf":"higlight>0"}
    image: {"columnWidth":50,"required":1,"requiredIf":"highlight>0","showIf":"highlight>0"}
    

    image and text are not showed.

    With

    text: {"columnWidth":50,"required":1,"requiredIf":"new>0","showIf":"higlight>0"}
    image: {"columnWidth":50,"required":1,"showIf":"highlight>0"}
    

    only image is showed (and required).

    With

    text: {"columnWidth":50,"required":1,"showIf":"higlight>0"}
    image: {"columnWidth":50,"required":1,"showIf":"highlight>0"}
    

    image and text are showed and required.

    With consoleLog active and requiredIf I noticed that out of the loop

    if(condition.type == 'show') {
    

    is never true, so fields are required but not showed.

    Thanks

    • Like 1
  6. Ryan, future "automatic sorting" means the we will be able to sort children pages also for repeater.subfield in page list (admin)?

    I have a movie template with a scheduling repeater that contains day_time field.

    I would sort movies by the first day_time in page list..

    Thanks

  7. With both *If, condition type is always "required" so we never use

    				if(condition.type == 'show') {
    					if(!$fieldToShow.is('.InputfieldStateHidden')) {
    						$fieldToShow.addClass('InputfieldStateHidden').hide();
    						consoleLog('Field is now hidden.');
    						numVisibilityChanges++;
    					} else {
    						consoleLog('Field is already hidden.');
    					}
    				} else if(condition.type == 'required') {
    					$fieldToShow.removeClass('InputfieldStateRequired').find(":input.required").removeClass('required');
    				}
    
  8. Strange problem here: I have a text field "highlight" showed only if checkbox "spotlight" is checked. Field is never showed. This because condition.type is not "show", never.

    And.. is correct that the check runs twice?

    Field "wrap_Inputfield_cover_highlight" detected a change to a dependency field! Beginning dependency checks... 
    ---- 
    Start Dependency 0 
    Condition type: show 
    Field: spotlight 
    Operator: = 
    Required value: 1 
    Value #0 - Current value: 1 
    Value #0 - Matched? YES 
    ---- 
    ---- 
    Start Dependency 1 
    Condition type: required 
    Field: spotlight 
    Operator: = 
    Required value: 1 
    Value #0 - Current value: 1 
    Value #0 - Matched? YES 
    ---- 
    Summary (required/matched): 2 / 2 
    Determined that field "cover_highlight" should be visible. 
    ------------------------------------------------------------------- 
    Field "wrap_Inputfield_cover_highlight" detected a change to a dependency field! Beginning dependency checks... 
    ---- 
    Start Dependency 0 
    Condition type: show 
    Field: spotlight 
    Operator: = 
    Required value: 1 
    Value #0 - Current value: 1 
    Value #0 - Matched? YES 
    ---- 
    ---- 
    Start Dependency 1 
    Condition type: required 
    Field: spotlight 
    Operator: = 
    Required value: 1 
    Value #0 - Current value: 1 
    Value #0 - Matched? YES 
    ---- 
    Summary (required/matched): 2 / 2 
    Determined that field "cover_highlight" should be visible.
     

    Required is not setted.

    Dependencies in "input" tab works fine.

    Last dev.

    Thanks

  9. Someone has this problem after the CKEditor update?

    Error:
    Call to a member function set() on a non-object (line 118 of /home/.../site/modules/MarkupHTMLPurifier/MarkupHTMLPurifier.module)
    

    When I enable HTML Purifier I cannot save pages that have a CKEditor field..

    Ryan test works, so I believe that HTML Purifier works.. 

    Thanks

  10. Ryan, is always the localUrl call.

    To try it locally:

     

    - install the default PW profile

    - install all the Language* modules

    - add a second language (Italian in my example)

    - in head.inc add 

    <?php
    echo "<ul id='subnav' class='nav'>";
    
    foreach($languages as $language) {
    if(!$page->viewable($language)) continue; // check if page not published for this language
    $url = wire('page')->localUrl($language);
    $title = $language->title;
    echo "<li><a href='$url'>$title</a></li>";
    }
    
    echo "</ul>";
    ?>
     

     

    Now call:

     

    http://pw.dev/

    http://pw.dev/it/

    http://pw.dev/http404/

    http://pw.dev/it/http404/

    and there are no problems.. but if you call

     

    http://pw.dev/error

    http://pw.dev/it/error

     

    you can see the error in sidebar.

    Obviously if the menu is on the very top of the page you see only a blank page.

  11. Thanks for the update Ryan.. 

    But seems that it not solve my problem.

    Menu is broked by localUrl().

    <?php
        foreach($languages as $language) {
          if(!$page->viewable($language)) continue; // check if page not published for this language
          $class = "$language" == "$user->language" ? " class='active'" : "";
          $url = wire('page')->localUrl($language);
          $title = $language->getUnformatted('title')->getLanguagevalue($language->id);
          echo "<li$class><a href='$url'>$title</a></li>";
        }
    

    I can solve the problem in this way

    $url = (wire('page')->template == 'http404') ? wire('page')->localUrl($language) : wire('pages')->get('/')->url; 

    but how to obtain the correct homepage urls? (domain.it for default, domain.it/en for english, ..)

    If you try novasiria.it/TEST/ you can see only novasiria.it in ITA and ENG menu.

    Thanks,

    Marco

  12. Try http://novasiria.it/en or http://novasiria.it/en/ and got same result (works), like http://novasiria.it/en/http404 or http://novasiria.it/en/http404/ (works).  Same thing for test example url (error).

    Without the switch language menu all works well, and with test or test/ we got the 404 error page.

    Error notifies are sent for any image not found (just for test), when crawler bot runs or when we call a not existent page.  

    • Like 1
×
×
  • Create New...