Jump to content

Luis

Members
  • Posts

    295
  • Joined

  • Last visited

  • Days Won

    5

Posts posted by Luis

  1. Joss, please rename your account to Papabear.

    Everytime you Post, the forums becomes such a nice athmosphere of a dark forest with a tiny warming fire place, the little ones sitting around the fire, listning to the warm and comfortable voice of Papabear.

    I really enjoy your posts, well you allready know what I´m thinking about you ;)

    • Like 2
  2. Central issue was normalizing, first you have to forget about CMS and think in a database-design-mode.

    Always trying to avoid redundancies and make excessive use of the page field.

    When I started the developing I just oversaw this field and created a field which contains the related page-id, so I created the poor brother of the page-field :D.

    Parts of the accounting tax maths are still dealing with this fields, shame on me...

    Yes,UI is based on bootstrap.

    • Like 1
  3. My thoughts about pw:

    If you just started with pw, maybe you created your First Page and saw how pw Works and handles data you think uh yummi nice CMS.

    Well thats fine and correct,pw acts, feels and looks like a CMS.

    You then dig deeper into the API, you understand how the different fieldtypes are working and you get a good overview.

    You probably think at this point: could I use pw like a Database?

    You Set your first page relation, count the arrays and you Play with the Data and you think: WTF!? Is this still a CMS?

    The longer you use pw, the deeper understanding of the API, you finally realise which great,strong and powerfull toolset Ryan just handed right into your hands.

    At this particullar point the term CMS would not come to your mind anymore.

    PW could be used like phpMyAdmin, just create tables,rows and data and work with them, but a Way more easier without even knowig what MySQL really is.

    Some of you might know my Intranet Application i'm working on, this is all made with pw and some little template php scripting.

    The next days I will Show a Little preview of an App i'm also working on, and yes everything PW driven.

    • Like 9
  4. Quick note:

    if ($allowedPage->parents->has($page)) $session->redirect("$allowedPage->url");
    

    This allows the User to open the dashboard of other users if he knows his id and name.

    This snippet prevents to open other users dash:

       $userFolder = $user->id.$user->name;   //form the name of the actuall logedIn User
       $userDashboard = $pages->get("/clients/{$userFolder}/dashboard/");  //get the logged in User´s Dashboard
       $allowed = $userDashboard->siblings("include=hidden");    //define the siblings of the dashboard as allowed pages for the user
    
       //Check if the user tries to open a site which he not owns, if so redirect to own dashboard
       if (!$allowed->has($page)) $session->redirect("$userDashboard->url");
    //    ^- if pageID is not equal to allowed IDs ---> redirect to Dashboard
    
  5. Hey,

    i´m building a little $user dashboard profile like thingy.

    In my Pagetree I got the following:

    Home --

    .

    .

    clients --

    .

    .

    client --

    . Dashboard

    . Data

    . Pages

    How could I now prevent the $user of simply going back in the browserbar to get access to other pages?

    My first thoughts are to just redirect the $user if he goes back.

    I´m achieving it like this:

    $userFolder = $user->id.$user->name;
       $allowedPage = $pages->get("/clients/{$userFolder}/dashboard/");
       if ($allowedPage->parent === $page OR $allowedPage->parent->parent == $page)
           $session->redirect("$allowedPage->url");
    

    But, this is not feeling right, works but I think there are better solutions.

    Any Ideas? Maybe I overlooked sth.

  6. ah sorry, try this:

    <ul class="nav nav-tabs" id="myTab">
    
      <?php foreach ($page->children as $item){
           echo "<li> <a href='{$item->name}' data-toggle='tab'> {$item->title} </a></li>";
      }?>
    </ul>
    <div class="tab-content">
    <?php
       $i = 1;
    
      foreach ($page->children as $item){
        $activeClass = '';
        if ($i === 1) $activeClass = 'active';
    
        echo "<div class='tab-pane $activeClass' id='{$item->name}'>{$item->body}</div>";
    
        $i++;
      }
    ?>
    

    Edit:

    Damn Diogo :D

    Edit2:

    Diogo I prefer the non PW way in the getting started forums.

    Makes code more comprehensible for a PHP novice.

    • Like 2
  7. You need to set the first tap-pane as active by adding the class active to the div.

    try this:

    <div class="tab-content">
    <?php 
    
    $i = 1;
    $activeClass = '';
    foreach ($page->children as $item){
      if ($i == 1) $activeClass = ' active';
    
      echo "<div class='tab-pane $activeClass' id='{$item->name}'>{$item->body}</div>";
    
      $i++;
    }
    
    ?>
    </div>
    
    
  8. The main problem is the number of files not how large the folder in MB actually is.

    Try to upload 700mb in one file via FTP and then upload 700mb splitted into 2k files, you would see the difference ;)

    • Like 1
  9. Hiya Luis, I don't have that option on any of my folders. Strange.

    Also was thinking it may be that MAMP stores its folders underneath Applications.

    Do you have MAMP synced currently using Cubby? Is it definitely possible?

    Thanks again

    Have u installed the cubby client properly and is the cubby process running?

  10. Hi Matthew,

    i´m sorry, but i´m actually not seeking more beta testers.

    Almost 80% of the core developement has been completed.

    I´m now in huddle-together-mode and will create a new preview Video by next week.

    Please take note that this is a commercial project of mine.

    But I will write a detailed Case-Study after release of v1.0.

    • Like 2
×
×
  • Create New...