Jump to content

pwired

Members
  • Posts

    2,318
  • Joined

  • Last visited

  • Days Won

    2

Posts posted by pwired

  1.  

    If I understand it right then the delayed output strategy in processwire is best suited for separating business logic from view markup.

    business logic goes in the template files and view markup goes in _main.php

    I like the way of building up view markup in a variable e.g. $content with the .= operator

    and if you follow the wire render pattern way of camilo castro you can have many view files

     

     

     

     

  2. Hi, Teppo

    Thanks for this clarification and showing these examples. You even have it explained better than
    what I read in most stackoverflow post. I have saved your post in my Design patterns folder.

    I see now there is more than just <?php ......?> You are right it makes things better readable
    and separatable. Maybe it also makes it less load for memory ?

    I just checked if my code editer is capable of highlighting this style of php syntax,
    and yes it highlights this style of php code nicely where it should ?

    All good, thanks.

    • Like 2
  3. Quote

    I just could never learn to code PHP and Javascript

    If you are a photographer there is no need to learn to code in Javascript. All you need is to tweak some library parameters and they are already well explained with examples that come with the library, e.g. all the picture galleries out there.

    As for php, for picture galleries you only need to know basic php like for each which you can reuse in other picture galleries.

     

  4. Hi teppo

    I am not sure what you are referring to. As far as I can see it (yet?) one of the beauties of Processwire is the possibility of making api calls and using php directly in your html. Isn't that already using PHP as a templating language ? So when doing that, where is at all the difference between using PHP as a templating language and entangling business logic with markup ?

  5. Quote

    I fear Processwire might be more for developers than for where I am at currently?
    Any last suggestions before I scrap everything and start fresh with a new system?

    Dear PhotoWebMax,

    First of, the thing with out of the box systems like concrete5 that you are mentioning, or wordpress or whatever
    out of the box stuff out there, you will have to work with the set of rules that is limited to the system
    being used.

    Processwire doesn't have any rules nor limitations and lets you work your own personal way, or any way you want
    without any limitations.

    I also want to put your attention on that, besides fancybox and lightbox,
    there are the following picture galleries who are really worth while using
    because they present photos in a gallery in a real nice way:

    lightgallery
    lightbox2
    slimbox2
    colorbox
    prettyphoto

    ============================================================================================================

    Coming back on what it boils down to with Processwire.

    First you have to create view size and thumbnails of your pictures. But that you already know.
    Photoshop is ok but there are tools out there who can create automatically view size and thumbnails
    much faster than you can do with photoshop.

    One important issue here:
    With Processwire you do not have to create viewsize and thumbnails with Photoshop or some other picture tool.
    Processwire creates the viewsize and thumnails automatically for you at runtime gallery output.
    Here is an example how Processwire lets you do that:

    $view = $image->width(700);
    $thumb = $image->size(100, 100);
    $title = $image->description;

     

    ============================================================================================================

    All you have to do is to download fancybox, lightbox, or whatever gallery you want
    to use and first setup a working gallery in html only with a few example pictures
    and then have a look at the web code examples that the specific gallery is using.


    Here is an example in case you would use the colorbox picture gallery

    <div class="row">
       <div class="col colorbox-gallery">
    
        <a class='group4' href='img/1.jpg' title="your title."><img src="img/thumb1.jpg" alt=""></a>
        <a class='group4' href='img/2.jpg' title="your title."><img src="img/thumb2.jpg" alt=""></a>
        <a class='group4' href='img/3.jpg' title="your title."><img src="img/thumb3.jpg" alt=""></a>
        <a class='group4' href='img/4.jpg' title="your title."><img src="img/thumb4.jpg" alt=""></a>
        
       </div>
    </div>

     

    In Processwire all you have to do, is to use a for each loop to output all the lines <a class ........ >  ......  </a>
    for all the pictures you have in the processwire backend.
    At the bottom you put this little script to initiate the colorbox gallery:

     

    <script>
         $(document).ready(function(){
          $('.group4').colorbox({rel:'group4', slideshow:true, closeButton:true, transition:'elastic', speed:600});
        });
    </script>

     

    You will already see this script in the example that comes with the colorbox gallery.

    ============================================================================

    Here is another web code example that comes with the slimbox2 gallery

    <div id="">
                    
                    <a href="images/001.jpg" rel="lightbox-cats" title="This Is My Image Caption" >
                      <img src="images/001-thumb.jpg" alt="remember your alt tag" />
                    </a>
                   
                    <a href="images/002.jpg" rel="lightbox-cats" >
                      <img src="images/002-thumb.jpg" alt="remember your alt tag" />
                    </a>
                   
                    <a href="images/003.jpg" rel="lightbox-cats" >
                      <img src="images/003-thumb.jpg" alt="remember your alt tag" />
                    </a>
    
                    <a href="images/004.jpg" rel="lightbox-cats" >
                      <img src="images/004-thumb.jpg" alt="remember your alt tag" />
                    </a>
    
    </div>

     

    Same thing, all you have to do is to use a for each loop in Processwire to output all the lines <a ..... >  .......  </a>


    So that's actually it
    Greetings and have a nice weekend

     

    • Like 6
  6. Windows 7 is in its extended support period, and is officially supported
    by Microsoft with security updates until 2020.

    But hey welcome to MicroSoft, they simply changed their policy at the beginning of 2016
    and now new CPUs will require the latest version of Windows.

    1652661091_unsupportedhardware.png.94d699368d68b0e81ea0b9199b80f5c0.png


    Microsoft is just blocking PCs with latest CPUs from updating via Windows Update.
    You still can install Windows 7

    But in such case it would be a solution to use VMWare Player which is very good.

    Install a VMWare workstation trial and install windows 7 in it,
    export the image and uninstall the trial. Then install the free
    VMWare Player and import the image.

     

     

  7. Quote

    Unfortuantely, you can only run it on older hardware.  No chance if you have equipment of recent specs.

    There are only 4 problems with that:

    1. missing legacy option in uefi bios
    2. missing usb3 drivers during win7 installation
    3. win7 refuses to install on a GTP partition
    4. missing win7 hardware drivers for your laptop

    I have solved all 4 of them with finding the right tools.

     

     

×
×
  • Create New...