Jump to content

Leaderboard


Popular Content

Showing content with the highest reputation on 12/26/2015 in all areas

  1. 4 points
    Happy Holidays to everyone and have an awesome New year Hope all your PW whishes come true!
  2. 4 points
    I double the thanks! I think LostKobraKai's posts around the forum are a damn awesome source of learning, short elegant code filled answers right in your face! But certainly can't stop thanking here, there is so much talented and experienced people giving away so much valuable advice, I had forgotten how important a community can be when learnimg new stuff. And no, I'm no that drunk yet! But already feeling sentimental lol
  3. 3 points
    I'd like to thank LostKobrakai for this excellent tutorial included in the Dec 25, 2015 blog post regarding custom page types. If you haven't read it yet, please do so. It is contributions like this by the senior members that prove selecting ProcessWire was the correct decision for this ProcessWire-Newbie. I am impressed at what I have learned within the functionality of ProcessWire, and discovering avenues I hadn't yet thought about. It is indeed a merry Christmas. I also want to thank all staff members. They deserve our gratitude for the time they dedicate to helping us learn ProcessWire, and the many avenues available with each project. For example, kongondo contribution is another great example of the team in place here. My hat is off to Ryan and his team for giving of their time and sharing their knowledge. In addition to the regular staff, there are many members, such as Kixe, Tom, (and too many others to name them all here) that also deserve recognition for their contributions and assistance. It is greatly appreciated. I am certainly looking forward to ProcessWire 2016 ;-)
  4. 2 points
    Thanks to everyone who has invested in had joy with ProcessWire.
  5. 2 points
    Old has been referenced way too many times in this thread. I find it interesting to observe the development methodologies preferred by the different generations. It reminds me of this...
  6. 2 points
    Merry Christmas to you as well. That was one of the many CMSs I looked at before making my decision to go with ProcessWire. I'm old-school, so my requirements are far more basic than what others may think is best for development. For example, that matrix functionality, in my opinion, was one of the items that was more fluff than actual enhancement. Being old-school, I don't care for the "dreamweaver/frontpage"-esque approach to developer tools. As powerfully simple as ProcessWire is, anyone can develop whatever feature module they think may help take their ability to create to the next level. I prefer an unobstructed, hands-on approach to development, rather than adding bloat from installers, less, template engines, and any other proclaimed 'enhancement' for development. Split windows and a refresh work just fine for preview.
  7. 1 point
    AvbMarkupHtml - HTML tag manager for ProcessWire This module allow you to use less HTML elements inside your PHP code ! Added hook for page. For make quick markup calls : $page->html(); Github : https://github.com/trk/AvbMarkupHtml Example usage and all methods : // All Configs $config = array( 'quote' => '"', 'indent_with' => ' ', 'tags_without_indentation' => 'link,img,meta', 'WirePage' => null, 'tag' => null, 'tagSelfClosed' => null, 'tagNoClose' => null, 'tagCustom' => null, 'tagStart' => '', 'tagEnd' => '', 'prepend' => '', 'prepends' => '', 'attributes' => array(), 'dataAttributes' => array(), 'label' => '', 'note' => '', 'text' => '', 'texts' => array(), 'hasTexts' => false, 'field' => '', 'field_value' => '', 'fields' => array(), 'hasFields' => false, 'child' => '', 'children' => '', 'append' => '', 'appends' => '' ); // All Methods $page->html(array('key', 'value')) // $config ->tag('string', $args=array())) // tag name, $args=content,tag-options => "/>" self closed, "->" no close, "=>" special tag ->setQuote('double or single quote') // default is : " ->addClass('string') // Element class name ->id('string') // Element id ->attr('key', 'value') // output : key='value' ->attributes(array('key', 'value')) // attributes ->data('key', 'value') // output : data-key='value' ->dataAttributes(array('key', 'value')) // data-attributes, this will add auto data- prefix to your attribute ->prepend('string') // a string value ->prepends(array('values')) // array for values ->text('string') // text for inner tag ->field('field_name', 'page_object') // Field name and page object ->texts(array()) // enter text array | array('Text 1', 'Text 2') ->fields(array(), 'page_object') // enter field names as array, a page | array('title', 'body') ->note('field_name', 'page') // enter a field name, a page ->label('field_name', 'page') // enter a field name, a page ->append('string') // a string value ->appends(array('values')) // array for values ->r(true|false) // Alis with ->render(); function ->render(true|false) // This will return result ->o(true|false) // Alias with ->output(); function ->output(true|false); // This will print result | default pretty print value is : false // #Example 1 : Working With ProcessWire $ul = html::ul()->addClass('list'); foreach($page->children as $p) { $ul->child( html::li() ->addClass('list-item') ->data('id', $p->id) ->child( html::a($p->title) ->addClass('list-item-link') ->attr('href', $p->url) ->data('id', $p->id)->r() )->r() ); } $ul->o(true); /* output : <ul class='list'> <li class='list-item' data-id='1057'> <a class='list-item-link' href='/en/villas/' data-id='1057'> Villas </a> </li> <li class='list-item' data-id='1001'> <a class='list-item-link' href='/en/location/' data-id='1001'> Location </a> </li> <li class='list-item' data-id='1090'> <a class='list-item-link' href='/en/guestbook/' data-id='1090'> Guestbook </a> </li> <li class='list-item' data-id='1055'> <a class='list-item-link' href='/en/contact/' data-id='1055'> Contact </a> </li> <li class='list-item' data-id='1005'> <a class='list-item-link' href='/en/site-map/' data-id='1005'> Site Map </a> </li> </ul> */ // #Example 2 html::div() ->addClass('container') ->addClass('container-center') ->attr('style', 'border: 1px solid #000;') ->data('id', $page->id) ->data('title', $page->title) ->child( html::h1($page->title) ->addClass('h1-title') ->r() ) ->child( html::div($page->body) ->addClass('container-inner') ->r() ) ->o($config->debug); /* Output <div class="container container-center" style="border: 1px solid #000;" data-id="Page id field data will come here" data-title="Page title field data will come here"> <h1 class="h1-title"> Page title field data will come here </h1> <div class="container-inner"> Page body field data will come here </div> </div> */ // #Example 3 : html::div("Hey !") ->addClass('container') ->addClass('container-center') ->id('centered-container') ->output(true); /* Output <div id='centered-container' class='container container-center'> Hey ! </div> */ // #Example 4 html::ul()->addClass('list')->children(array( html::li('Li element value 1')->addClass('list-item')->render(), html::li('Li element value 2')->addClass('list-item')->render(), html::li('Li element value 3')->addClass('list-item')->render(), html::li('Li element value 4')->addClass('list-item')->render(), html::li('Li element value 5')->addClass('list-item')->render() ))->output(true); /* Output <ul class='list'> <li class='list-item'> Li element value 1 </li> <li class='list-item'> Li element value 2 </li> <li class='list-item'> Li element value 3 </li> <li class='list-item'> Li element value 4 </li> <li class='list-item'> Li element value 5 </li> </ul> */ // #Example 5 $title = $page->html('title')->tag('h1')->addClass('h1-class')->render(); echo $title; // #Example 6 : This will directly print $page->html($page->title)->tag('h1')->addClass('h1-class')->output(); html::h1($page->title)->o(); // #Example 7 : Self Closed Tag $modules->AvbMarkupHtml->html()->tag('hr', array(null, '/>'))->output(); html::hr()->o(); // #Example 8 $page->html($page->title)->tag('h1')->addClass('my-h1-class')->output(); html::h1($page->title)->addClass('my-h1-class')->o(); // #Example 9 $page->html('title', $pages->get('/contact/'))->tag('h1')->addClass('my-h1-class')->output(); html::h1()->addClass('my-h1-class')->field('title', $pages->get('/contact/'))->o(); // #Example 10 $modules->AvbMarkupHtml->html()->tag('div')->addClass('container')->children(array( $page->html('title')->tag('h1')->addClass('my-title')->render(), $page->html('body')->tag('div')->addClass('my-body')->render() ))->output(); // #Example 11 | Multiple child, prepend, append $html = $page->html()->tag('div')->addClass('uk-container')->addClass('uk-container-center'); $html->prepend( $page->html()->tag('div')->text('Prepend #1 !')->render() ); $html->prepend( $page->html()->tag('div')->text('Prepend #2 !')->render() ); $html->child( $page->html()->tag('div')->text('Hey !')->render() ); $html->child( $page->html()->tag('div')->text('Foo !')->render() ); $html->child( $page->html()->tag('div')->text('Bar !')->render() ); $html->append( $page->html()->tag('div')->text('Append #1 !')->render() ); $html->append( $page->html()->tag('div')->text('Append #2 !')->render() ); $html->output(); // #Example 12 | Create A HTML page //-> Create Html Tag $html = $page->html()->tag('html')->attr('lang', 'en')->attr('dir', 'ltr'); //-> Create Head Tag $head = $page->html()->tag('head'); //-> Add TITLE inside HEAD tag $head->child( $page->html()->tag('title')->text('My Website')->render() ); //-> Put HEAD inside HTML Tag $html->child($head->render()); //-> Create BODY Tag $body = $page->html()->tag('body')->addClass($page->template); //-> Create DIV Tag $container = $page->html()->tag('div')->addClass('container'); $container->children(array( $page->html()->tag('h1')->addClass('h1-title')->text('H1 Title')->render(), $page->html()->tag('div')->addClass('body-content')->text('Body Content')->render() )); //-> Put DIV.container inside BODY Tag $body->child($container->render()); //-> Put BODY inside HTML Tag $html->child($body->render()); $html->output(true); // Pretty HTML output /* Output <html lang='en' dir='ltr'> <head> <title> My Website </title> </head> <body class='homepage'> <div class='container'> <h1 class='h1-title'> H1 Title </h1> <div class='body-content'> Body Content </div> </div> </body> </html> */ // #Example 13 Static Call Example $article = html::tag('article')->addClass('uk-article')->children(array( html::field('title')->tag('h1')->addClass('uk-article-title')->render(), html::tag('hr', array(null, '/>'))->addClass('uk-article-divider')->render(), html::field('body')->render() )); $article->output(true); /* Output <article class='uk-article'> <h1 class='uk-article-title'>Page Title</h1> <hr class='uk-article-divider' /> Body Content </article> */
  8. 1 point
    MERRY CHRISTMAS for all those who celebrate it! Here's to another awesome year with ProcessWire
  9. 1 point
    Well, according to my short tests with very unscientific methods, HHVM still overtakes PHP, runs to the finish line and back to start just to overtake PHP again. With a normal ab -c20 -n500, HHVM is approximately 24 times faster than PHP 7, under higher load (-c100) this scales up to 60 times. Then the saturation is reached for this small server I'm testing this against. Of course, both are tested out of the box and with a PHP opcode cache you could actually gain more performance. EDIT: Caching was still on, the numbers are wrong. The server was delivering static pages. However, this is a good demonstration of fcgi_cache. However, PHP7 is still super fast compared to 5.4 or 5.5 – and probably has less side effects in large production environment. Or at least they are documented. Let's say it like this: if you have moderate traffic on your site and your application is decently written, you will probably won't note much of a difference. And if you have high traffic, you might face other bottlenecks than PHP, especially if you work with highly dynamic content.
  10. 1 point
    Why not using existing methods? As @LostKobrakai said, git submodules are not used by many because of the peculiar workflow. There is a module to handle core upgrades: Core Upgrade. Or - if you're familiar with using git - you may consider using wireshell, this is a command line interface like drush for drupal. Instead of `git submodule update` just execute `wireshell upgrade`. If there are no changes the `index.php` and `.htaccess` files are updated as well.
  11. 1 point
    The processwire repository is a place to keep "processwire development". So it's git repository is not meant to comply with anything other than that usecase (the site directory is even excluded). For your own projects you can create a own repository how ever you want. While submodules sound like a great idea it's not used by many, because it's workflow is far from optimal. Also, why technically moving the index.php's logic would be possible, that strategy does not work for the .htaccess file, which is also changed every now and then dependent on the processwire version. That file does need to be in the root directory to work correctly.
  12. 1 point
    An other approach: https://processwire-recipes.com/recipes/auto-fancybox/
  13. 1 point
    just a easy one...as a little christmas present. My clients sometimes have problems to find the view link... so here some example CSS for ProcessPageEdit.css in /templates/AdminCustomFiles/ #content .WireTabs #_ProcessPageEditView { color: #69b023; font-weight: bolder; } #content .WireTabs #_ProcessPageEditView:before { display: inline-block; font: normal normal normal 14px/1 FontAwesome; font-size: inherit; text-rendering: auto; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; transform: translate(0, 0); content: "\f06e\00a0 "; } #content .WireTabs #_ProcessPageEditView:hover { background: none; text-decoration: underline; border-color: transparent; } using BernhardB 's famous giphy tool it looks like: (just a example with fontawesome and bold to get the idea) regards mr-fan
  14. 1 point
    I wish all a great end of 2015 and a even better 2016! Best regards mr-fan
  15. 1 point
    Yay! This was the year I started my Processwire affair, it has been great! Thanks everyone for the good vibes!
  16. 1 point
    I started an Flarum integration module. Predefined and also custom API calls are supported. "data" and "included" objects are converted in PW WireArray and supports PW API like find() and get(). http://flarum.org/docs/api/ http://jsonapi.org/examples/ At the moment unencrypted username and password is needed to get an token for logged in api calls.
  17. 1 point
    The so called matrix fieldtype was already discussed multiple times in various places all over the forum. The closest thing we currently have in processwire is probably the page table extended module, which makes different page table items far more visually distinguishable than the raw table view it has by default. The crucial difference between craft and processwire is, that craft decided to let the matrix field hold other fields – fieldception so to speak – whereas in processwire fields can only be hold by templates and therefore used in pages (without any repetition). Even repeaters, which seem like the inflexible predecessor of something like the matrix field, are internally using hidden templates and pages to store their content – opposed to the idea of storing it on the page the repeater is on. For this reasons page tables are probably the best option in terms of content management, but the UI side of it is no were near something like the matrix field. @horst Here you go: https://craftcms.com/features/matrix
  18. 1 point
    It would have been nice if you have pointed to the relevant slides of matrix. Or do you really believe people want to look 1 hour video to be able to understand your question? So, cannot say much to matrix, but a few things came to my mind: I use split screen since ever, via two browser windows! Have a look to the blueVR siteprofile. It seems to handle output positioning of parts very nicely. Don't know if this is something in regard of the (for me) unknown matrix, but, maybe it gives you another point of view.
  19. 1 point
    I just finished following this tutorial on CSS tricks called Gulp for Beginners https://css-tricks.com/gulp-for-beginners/. I didn't copy and paste. For the first time, I typed out all the code and constantly checked on https://www.npmjs.com/ to better understand how things works. I'm very excited and curious now, how everyone else is using Gulp.
  20. 1 point
    Where else would someone post a question like I did, and in the same day find people gathering around the subject and build a new module that solves the problem? This forum feels like actually being in a room filled with people who know their stuff and are willing to help a brother out.
×
×
  • Create New...