Jump to content

qtguru

Members
  • Posts

    356
  • Joined

  • Last visited

  • Days Won

    5

Posts posted by qtguru

  1. Well I think you're right about this. In my opinion the wiki should be removed and it's helpful articles should become Tutorials in the Tutorial section (I think Joss is already working on this somehow?).

    I guess with 2.6 or 3.0 there will be a new complete documentation but at the moment Ryan is busy enough making ProcessWire more awesome every day :)

    Maybe there should be some kind of documentation team. Just an idea.

    Exactly because I know how much Ryan is working on Processwire Core, is why I felt the documentation can be created by a team, I like the idea of a documentation team, if you got ways to execute this ideas please let me know so i can join, I can sacrifice some Skyrim time to do this.

    • Like 3
  2. Hi usually I don't create topics until i feel they are necessary but this is really become a chore for me in development phase, The issue is the Developer Documentation; its really hard for me to get the necessary information I need. I have to go through various topics and navigate through conversations just to find what am looking for.

    Just today I was looking for the API for the PageField to save a page as a value and I have no luck, I feel this can increase development time to those new to Processwire. i found out there's a site called wiki.processwire.com but it's been last updated 2012 and the cheatsheet.processwire.com doesn't go indepth enough for me to understand what's going on. 

    ADVICE:

    I feel we can have a documentation page where users can edit and contribute text to it gradually, there's recipe.processwire.com but its still not enough, it would cool to have something like this http://framework.zend.com/manual/current/en/index.html

    Forgive my rant I come from a country where electricity is not guaranteed so its a big deal for me when I have to spend alot of time looking for information. I don't mind contributing examples or if we can find ways to allow community update the wiki.processwire.com.

    THANKS GUY 

    Still looking for how to use code to save a PageFieldtype with another page

    • Like 3
  3. I'm migrating our corporate Intranet from Contenido to PW. ~8500 pages, 2 languages, 400+ users, about 20 modules and templates. I'm a little more than halfway there right now, most modules are working as planned and the first migration tests look promising, though I'm pretty sure a few headaches will be popping up when I start with bulk imports (though those won't be PW's fault...).

    it depends on what you are importing, I prefer to go the route of using PW in CLI to import contents. does Contenido allow bootstrap from CLI ?

    • Like 1
  4. @kathep

    Usability is of course a part of design, but for me it's much related to functionality than to look and feel, which is what I meant to convey. I've yet to find a framework which doesn't restrict me in styling while still doing a great job of providing solid building blocks for the web. OOCSS or inuitcss kinda go in a way which I can see really useful. But something like bootstrap never appealed to me.

    Never heard of OOCSS but I use Stylus and LESS (CSS Pre-processors) not really a designer just a developer who can manage to design. I think Bootstrap 3 is awesome. 

    @Kathep  I didn't mean you shouldn't use it I meant, if you already know HTML then its no problem as it would increase productivity.

    • Like 1
  5. I think I stoped reading on when it said it's using Bootstrap 3. Nonetheless, I tried the tryout and it's not something I would use for building anything other than your typical Bootstrap layout page without knowing anything. Don't like the UI at all and it crashed after 2 min.

     What's wrong with Bootstrap 3 ? its good in my opinion though am open to better ones.

  6. Wow i really love the concept, I don't mind using it however I have to agree to what @pwired is saying but I will add my opinion, I don't fancy drag and drop systems, why ? most of the time the issue is flexibility, however it seems this gets exported in HTML and Bootstrap 3.0 so it would only increase productivity and save me time. But if you don't know HTML my advice is grasp that and use this to enhance your productivity. There would be times where this app won't be able to handle much specific layouts by clients but for simple site it suffices. and Yes you can use this with Processwire, Processwire is an API driven platform, it gives you the data, its up to you to reformat that data the way you want it.

    This is no different than using a basic site to Processwire.

    Disclaimer: The views of Sephiroth on the forum does not reflect the views of Sephiroth in real life.  O0

    • Like 1
  7. Why not to use js client side for form validation ?

    What happens when the user disblaes JavaScript ?, I do it on several site (only when my evil side wakes up). Never Trust user input and frontend security mechanism. That being said truly this is where frameworks have an advantage however you can use Valitron and PW Form together, I used Valitron alot and its the one Validation lib that doesn't suck after Yii and Zend 2, all you need to do is create the rules and validate the rules against the values from the form and all is good to go. 

    • Like 3
  8. I really want to thank you guys all for the patience and time to answering this questions, however sadly I have much In-depth technical questions to ask and I will explain why I am asking all these questions, that way you will get a picture of where am coming from.

    I built a WordPress website which is a fashion directory and it is heavily customized, however I have implemented 40% of the features to Processwire but I have some questions which I would ask and give reasons behind them.

    1. Is it a Good Practice to create your own Database Schema and not necessarily follow PW architecture of Fields ?

      In our WordPress application, we have a form that accepts application and stores them in a WordPress TableList until the admin activates or rejects them, upon activation I could save them as pages however i don't intend to save the pending applications as pages, will it be Anti-Processwire to display the table in the admin in own way as to using Pages/Fields.

    2. PHP Command Line

     We use a Real Cronjob to delegate sending of newsletter to subscribers however as to my research it seems ProcessLazyCron gets triggered upon a visit so my question is, are there any resources/tutorials on running processwire in CLI mode. 

    3. Migrating 6gb of Images from WordPress to Processwire 

    This is my biggest nightmare even Adrian assists in giving advises on this, We will eventually migrate all of our data however the host is limited in space pending we upgrade. Is it possible for me to explicitly set the source of the image without saving a copy ? I know it sounds wrong but i intend to save the Image Path without the saving images then later move the images to the folder that way i don't make a duplicate for each image.

    Our total space is 9GB on our server and our Image count is 6,738 Number of Images it takes likes 6GB the last time i checked.

    I want the FieldTypeImage to read the images from a specific folder

    Thanks all once again. Will share my experience one of these days because am doing a lot of complicated stuff in Processwire and its pretty fun.

     

    Thanks for the response all, after further investigation and reading Bootstrap and includes I was able to import all the Members in processwire easily using CLI PHP, however couldn't use WP and PW together in CLI as they had similar function names so a clash ensued.

    I am documenting my result for educational purposes incase anyone wants to achieve the same. Our Membership is stored in a seperate table that links to a post. with the script below we are able to import them with freaking ease.

    <?php
    set_time_limit(0);
    /**
     * Created by PhpStorm.
     * User: x64
     * Date: 1/24/15
     * Time: 2:29 PM
     */
    
        echo "****Welcome to Processwire CommandLine API**** \n";
        echo "****This script will migrate WordPress Membership from Styljunki to Processwire**** \n";
    
        //Require Processwire
        include_once("../StyljunkiPw/index.php");
        //Connect to WordPress
        // include_once("../WP38/wp-load.php"); // Wordpress API
        try{
        $wpdb = new PDO("mysql:dbname=styljunki_backup;host=localhost", "root", "admin",
        array(PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES 'UTF8'"));
         //Fetch All the Data from the Membership Page
           $query="SELECT * FROM  wp_styljunki_registration where approved = '1'";
           $stmt=$wpdb->query($query);
           $stmt->setFetchMode(PDO::FETCH_OBJ);
           while($row=$stmt->fetch()){
               //let's remove the category they belong to
              $Membership=new Page();
              $Membership->template="membership";
              //let's get the type of membership
              $category=smartGetMembers($wpdb,$row->post_id);
              if(is_null($category)){
                //get the default parent
                
                $Membership->parent="/members/";
                
              }
              else{
                $members=$wire->pages->get("/members/".$category);
                echo "Member ID:".$members->id.'\n';
                $Membership->parent_id=$members->id;
              }
              $Membership->name = wire('sanitizer')->pageName($row->fullname);
              $Membership->title = $Membership->name;
              $Membership->of(false);
              //assign all the properties
    
              foreach ($row as $key => $value) {
                 if($key == "id" || $key == "approved" || $key == "time_sent" || $key == "last_modified" || $key == "height" || $key == "old_id"){
                    continue;
                 }
                 $Membership->{$key}=$value;
                 
              }
              
              $Membership->save();
              echo "Entry for {$row->fullname} has been imported successfully\n";
    
              
              
    
           }
               
        }
        catch(PDOEXception $e){
            echo $e->getMessage();
    
        }
        echo "Commandline::finshed \n";
        
        function smartGetMembers(PDO $db,$postID){
           $statement=$db->prepare("SELECT * FROM `wp_term_relationships` 
            as tti INNER JOIN wp_term_taxonomy ON tti.`term_taxonomy_id`
            =wp_term_taxonomy.term_taxonomy_id WHERE `object_id` = ?
            ");
           $statement->execute(array($postID));
           $statement->setFetchMode(PDO::FETCH_OBJ);
           while($row=$statement->fetch()){
                $d=sniffMemberType($db,$row);
                if(is_null($d)):
                    continue;
                else:
                    return $d;
                endif;
           }
    
           }
    
        function sniffMemberType(PDO $db,$resultSet){
            $stmt=$db->prepare("Select * from wp_terms where term_id = ?");
            $stmt->execute(array($resultSet->term_id));
            $stmt->setFetchMode(PDO::FETCH_OBJ);
            while($row=$stmt->fetch()){
                switch($row->name){
                    case "Stylist":
                    case "Designer":
                    case "Make-up artist":
                    case "Model":
                    case "Photographer":
                        return strtolower(str_replace(" ","-",$row->name)."s");
                    break;
                    
                    default:
                        
                    break;    
                }
                continue;
            }
        }

    Because we have so many datas in wp_options and wp_terms that need exporting also. 

    post-2850-0-40552500-1422217684_thumb.pn

  9. That last update to Migrator that we have been discussing handles your desire to NOT migrate images, but rather point to the original source. If you need to do this until you can upgrade the server and then migrate the images, I am sure it wouldn't be too hard to steal some of the code from Migrator (in the idImagePath() function) to iterate through all the pages, download the images, and edit the links in the RTE fields. Let me know if you need any help with that when the time comes.

    Wow for real dude, you just saved me alot of code I was gonna write, I will review the last update and test it out, also is there a forum for ideas of Module am not good in the idea for Module department want to contribute more to processwire. Thanks alot bro

  10. I really want to thank you guys all for the patience and time to answering this questions, however sadly I have much In-depth technical questions to ask and I will explain why I am asking all these questions, that way you will get a picture of where am coming from.

    I built a WordPress website which is a fashion directory and it is heavily customized, however I have implemented 40% of the features to Processwire but I have some questions which I would ask and give reasons behind them.

    1. Is it a Good Practice to create your own Database Schema and not necessarily follow PW architecture of Fields ?

      In our WordPress application, we have a form that accepts application and stores them in a WordPress TableList until the admin activates or rejects them, upon activation I could save them as pages however i don't intend to save the pending applications as pages, will it be Anti-Processwire to display the table in the admin in own way as to using Pages/Fields.

    2. PHP Command Line

     We use a Real Cronjob to delegate sending of newsletter to subscribers however as to my research it seems ProcessLazyCron gets triggered upon a visit so my question is, are there any resources/tutorials on running processwire in CLI mode. 

    3. Migrating 6gb of Images from WordPress to Processwire 

    This is my biggest nightmare even Adrian assists in giving advises on this, We will eventually migrate all of our data however the host is limited in space pending we upgrade. Is it possible for me to explicitly set the source of the image without saving a copy ? I know it sounds wrong but i intend to save the Image Path without the saving images then later move the images to the folder that way i don't make a duplicate for each image.

    Our total space is 9GB on our server and our Image count is 6,738 Number of Images it takes likes 6GB the last time i checked.

    I want the FieldTypeImage to read the images from a specific folder

    Thanks all once again. Will share my experience one of these days because am doing a lot of complicated stuff in Processwire and its pretty fun.

     

  11. Okay so increasing post_max_size works but if it's lower it fails silently so maybe a feature would be a message that checks the size of file against the ini_get('post_max_size') and display that to the user. should i create a pull-request for that ? Happy Sunday

    • Like 1
×
×
  • Create New...