Jump to content

celfred

Members
  • Posts

    189
  • Joined

  • Last visited

Posts posted by celfred

  1. Please let me know if you are up-to-date with your PW version and still experiencing incorrect behavior with this.

    Well... I am on 2.2.3 version (I guess up to date), and my code

    $selected = $page->children()->find("createdUser=$user, sort=-date"); // HERE'S THE DATE PROBLEM
     //if ($page->children()->find("createdUser=$user")->count() > 0) {
     if ($selected.length > 0) {
       $out .= '<ul id="list-invit">';
       foreach ($selected as $invit) {
        $out .= '<li data-id="'. $invit->id .'">';
        $out .= 'Invitation le ';
        $out .= $invit->date .'<br />';
        $out .= 'Liste des invités : ';
        $out .= '<a href="#" class="guest">'. $invit->title .'</a>';
        $out .= '<a href="#" class="mod_invit">Modifier</a>';
        $out .= '<a href="../ajax/delete_invit.php" class="del_invit">Supprimer</a>';
        $out .= '';
        $out .= '';
        $out .= '</li>';
      //}
       }
       $out .= '</ul>';
    

    doesn't work as expected (from me...) I try to get the list of pages from the logged in user and sort them along the date Datetime field. My 'date' field is formated 'Sunday, 5 November, 2012', and it seems to me that the sort order stays based upon the days alphabetical order. In other words, Wednesdays display first (because of the W) and then I get Thursdays, then Fridays... (except I'm trying to sort chronologically although I want to display the day's names).

    Do I do anything wrong?

    Thanks for the help ;-)

    (I hope I was clear enought in what I wrote...)

  2. These are great indications, Ryan. As always, very clear and so helpful. Thank you!

    While on those 'confusing' issues with forms, how about InputfieldPassword. If I use it, I get 2 fields : 1 for password and 1 for confirmation. Would it be possible to limit it to the first field only? If not, how can we integrate such a password field in a form created via the API?

    To understand these issues more clearly, I keep trying to find information on the Forum and to look at the code in wire/modules/Inputfield/ and try and analyze it. Is there another place we could find information about this?

    Thanks.

  3. Thanks for your reply.

    I have now managed to get the datePicker working. I am still struggling with the style since even though I put the link to the stylesheet, it doesn't seem to work... Anyway, I'll look closer later... Looks like I have to link to several stylesheets... (I told you I'm no professional developper...)

    Just a quick note : you wrote : wire/core/Inputfield/InputfieldDatetime/InputfieldDatetime.js . I found the file in wire/modules/Inputfield...

    Anyway. Thanks again.

    • Like 2
  4. Thanks a lot for these indications. It helps me a lot, even though I'm a little stuck on one thing : my form is OK, but I'm trying to use a datepicker in one field... is this possible?

    Here's where I am :

    I changed this part of Soma's code

    // you get the idea
    $field = $modules->get("InputfieldPassword");
    $field->label = "Passwort";
    $field->attr("id+name","pass");
    $field->required = 1;
    $form->append($field);
    

    with

    // you get the idea
    $field = $modules->get("InputfieldDatetime");
    $field->label = "Date";
    $field->attr("id+name","date");
    $field->required = 1;
    $form->append($field);
    

    And tried to play around with

    $field->datepicker = 1;
    

    ...But I have to admit I don't really understand what I'm doing and I just know this doesn't work...

    I've spent quite a few hours on that (don't laugh ;-)) and if one of you can give me a hint, I'd greatly appreciate!

    Thanks !

    • Like 1
  5. @teppo, Thank you for your help ! It works better now although I had tried doing this, but on the second link and it never worked. Actually, this second link still doesn't work. I've changed it with another equivalent video (for my purpose), and the new link works...

    I can't tell what the problem is... If I copy and paste this link, the video is available...

    If someone is interested in understanding the issue, here are my 3 Youtube links (preceded by https://www.youtube.com/ [to avoid the max number of media error I get posting in the Forum]):

    1. watch?v=8-NeizIkHBY
    2. watch?v=Imum21-hdNg
    3. watch?v=dsO__o4Ezjw

    Number 1 and number 3 : Video embed without any problem since I followed teppo's advice (in their own paragraph's tags).

    Number 2 : no embed... Just a regular text...

    Thanks again !

    Again, if you want to see the original article : http://flenglish.tux...s/the-alphabet/

  6. Hi all,

    I'm trying to use the Embed video module, but it doesn't work for me... I followed the documentation, but it failed and I keep wondering what I am doing wrong.

    Here's my work :

    • Module upload in 'site/modules/' > Check new module > installation
    • Setup > Fields > body > Details > Textformatters > Video embed
    • In my page body field, I have 2 Youtube links, but they stay as links (no embed...).

    If you want to have a look at the page, here it is : http://flenglish.tux...s/the-alphabet/

    Thanks for your concern ;-) (And sorry not to be able to find the answer myself...)

  7. Hello to all,

    I keep testing ProcessWire on my 'amateur' side (compared to what you all do) and I'm really impressed by the work.

    And this blog profile sounds excellent to me. I can't wait to see the distribution version!

    I was trying to build a personal site from scratches, but I do have to admit that it is difficult for non-professional programmers to think of everything and profiles like this one is a great help for us (at least, for me...). So thanks in advance !

    My post doesn't help for anything... but I just wanted to let you know that I am interested and... happy to use PW ;-)

    • Like 3
  8. Hello to all of you,

    I'm new to Processwire and I've been trying desperately for a few hours to just... install it on my localhost (Ubuntu 12.04, Apache 2.2.22). You'll soon find out that I am not a professionel web developper, but still... this is driving me crazy and I'd love to get some help.

    To describe my problem briefly : installation goes fine, no problem. I set everything as asked during the process (writable directories and so on). Then I go to 'View my site' : just fine. And as soon as I hit ANY link on the Basic homepage, I get that 404 error quite a few talked about in other posts...

    So far, I've tested :

    - nonsens string in my .htaccess : throws a 500 error (sound good, no?)

    - re-read everything in my Apache setting (again I'm no professional and couldn't find anything wrong...)

    - checked the mod_rewrite in my phpinfo... Looks good. I'll put it underneath for those interested to help.

    - tried to uncomment the rewriteBase rule in the .htaccess. Nothing worked (actually, and that's CRAZY to me, it worked once on a reload (I DID see the ABOUT page simply putting for the nth time RewriteBase /mysubdir/, but it worked ONCE (can you believe this?) and never again.

    - tried restarting my Apache server many times... no change....

    I can't think of anything else to do, so please, if someone can help, I'd greatly appreciate...

    Thanks in advance for your help and time.

    My phpinfo is attached.phpinfo.php.html

    Celfred.

    EDIT : Oh I'm SO sorry and ashamed... (Did I tell you I was no professional?) I had just one last idea before going to bed... trying one last change on my rewriteBase line and... It worked ! It's cool, but I can't believe it took me hours to find this out. Actually my server is installation is in private/processwire/ subfolder and I simply forgot the 'private' part in the path...

    I guess you can ignore my post now... Have a good night...

    • Like 1
×
×
  • Create New...