Jump to content

Luis

Members
  • Posts

    295
  • Joined

  • Last visited

  • Days Won

    5

Everything posted by Luis

  1. Why dont you call a pw page with this get variable? Sth. like <?= $pages->get(1)->url ?>?logout=1
  2. Okay #fcbfcb was bitte war das? Hut ab

  3. Can i haz occulus rift and GTR3 pleaz, i bet Virtual Racing realistic like never before

  4. This sounds like a good idea. Will put your suggestion on my roadmap. But please don´t expect Version 1.1 soon. Never been busier before.I didn´t even find time to update my modules.
  5. you mean something like $price * ($variable) e.g. 19,95 € * 1.1 ? Nope, something is not implemented. I'm working with different prices on same products, like Coding - Hard = 500€ and Coding - Easy = 250€
  6. I found a documentation about the famous silk road by the swiss journalist Peter Gysling. Watch it: http://seidenstrasse.srf.ch/de/home.html You just have to scroll down, unfortunatly the site is in german but the pics and the technical realisation is just worth it.
  7. My little workaround <?php if(!$input->post->import && !$fieldsImport && !$input->post->generate): ?> <hr /> <h4>Separate Fields by comma like this: i,am,a,new,field</h4> <form name="importform" method="post" action="./"> <div class="span3"> <p><label>Field Prefix?</label> <input type="text" name="prefix" /></p> </div> <div class="span3"> <p><label>Field Tag?</label> <input type="text" name="fieldtag" /></p> </div> <div class="span3"> <p><label>assign to </label> <select name="template"> <option></option> <?php foreach($templates as $singleTemplate): ?> <option value="<?php echo $singleTemplate->name ?>"><?php echo $singleTemplate->name ?></option> <?php endforeach ?> </select> </p> </div> <div class="span12"><textarea name="string"><?php echo $input->post->string ?></textarea><p><input type="submit" name="import" value="import" /></p></div> </form> <?php endif ?> <?php if($input->post->import){ $fieldsImport = $input->post->string; $fieldsImport = explode(',', $fieldsImport); } if($fieldsImport): ?> <hr /> <form name="fieldform" method="post" action="./"> <div class="row"><div class="span12"><hr /></div></div> <ul> <?php foreach($fieldsImport as $fieldNew): ?> <?php $alleTypes = '<select class="required" name="'.$fieldNew.'"> <option selected="selected" value=""/> <option value="Checkbox">Checkbox</option> <option value="Email">Email</option> <option value="File">File</option> <option value="Image">Image</option> <option value="Page">Page</option> <option value="Text">Text</option> <option value="Textarea">Textarea</option> <option value="URL">URL</option> </select>'; ?> <li><?php echo $fieldNew ?> <?php echo $alleTypes ?></li> <?php endforeach ?> </ul> <input type="hidden" value="<?php echo $input->post->prefix ?>" name="prefix" /> <input type="hidden" value="<?php echo $input->post->template ?>" name="template" /> <input type="hidden" value="<?php echo $input->post->fieldtag ?>" name="tag" /> <input type="submit" name="generate" value="generate" /> </form> <?php endif ?> <?php if($input->post->generate){ $prefix = $input->post->prefix; $tags = $input->post->tag; $template = $input->post->template; $addedFields = $fieldgroups->get('name='.$template); foreach($input->post as $key => $val){ if($key != 'prefix' && $key != 'tag' && $key != 'generate' && $key != 'template'){ $f = new Field; if($prefix){$f->name = $prefix.'_'.$key;}else{$f->name = $key;} $f->type = $val; $f->save(); $f->tags = '-'.$tags; $f->save(); $addedFields->add($f); $addedFields->save(); echo "$key = $val <br />"; } } } ?>
  8. From: http://php.net/manual/en/language.basic-syntax.instruction-separation.php
  9. ok, a little sum up. To understand what happens, here is the setup: Page called Clients, container for every client. every client got his unique number written to the title. The client template itself contains a set of round about 35 fields. I imported a set of data via CSV import Module. This set is provided by a client of mine who needs a new Intranet Solution. His client Database contains exactly 15987 entries. Every entry is one client and so every client is a page. As you can see in the screenshot, PW provides a automatic pagination. To handle this amount of data pagination is definitly not the best way. To edit and manage some clients you could use the built in search engine in the backend. Maybe I want to edit clients with the name Richard. I just pick my Clients Name field, type Richard in the Search box, et voila. What also could be interesting, is the performance of PW. Lets have a look: <? $pages->find('template=kunde'); ?> All clients in one PageArray gives me the following : Page generated in 33.5099 seconds. <? $pages->find('template=kunde,limit=50'); ?> Results in : Page generated in 0.0376 seconds. Rendering those sets of data doesnt affect our render time much. The following: <? foreach($pages->find('template=kunde,limit=50') as $client): ?> <p>Number: <?= $client->title ?></p> <? endforeach ?> Results in: Page generated in 0.0462 seconds. Conclusion: At a certain point you dont have to worry about how to order pages, instead you have to worry about how to catch your pageArrays as efficient as possible. Managing large amounts of data is somewhat to think about at the very beginning. I´m handling the clients in a tree like this: Home/Database/Clients/ Hope this was helpful
  10. Im really busy these days, but fyi I setup a pw system with ~ 15.000 pages. Trying to write a little review the next days.
  11. Mh Joshs html kickstart,Twitter bootstrap,zurbs Fundation, gumby... pick one of those. They all provide some tab thingy
  12. Luis

    Boston

    Not good... hope everyone is okay. Fckng unbeliveable :-/
  13. I'm thrilled to see the final result. +1 Horst for your Idea. Would be another great example of PWs flexibility
  14. Please Philip, I know your sites, can't imagine that they don't want to stay this long on your sites You are right, gonna try to fix this issue today after work.
  15. Uh nice, a lot of little cupcakes inside your code to pick and learn from.
  16. Would you share your solution with us?
  17. You could check checkboxes like this: if($checkbox) and if(!$checkbox) example: if($page->checkbox) echo 'i am set'; if(!$page->checkbox) echo 'i am not set'; So to modifiy your output in a foreach just put your markup in an if condition.
  18. #effzeh ich glaub mittlerweile haben wir den Tatbestand der Arbeitsverweigerung erfüllt...

  19. Auf geht's Kölle, Mission Aufstieg http://t.co/Fjr61EYdIw

  20. To add various events on the same day via Processwire and stored pages we have to edit our existing getEvents() function and we have to change the way we store events. According to my first example we stored events like this: Children of /calendar/ with date and event entry as our single calendar event. Now we change this way a little bit. We create calendar events by date and add children to this day. Something like this: /calendar/01-01-1970/deployunix6/ /calendar/ -> is our events container /01-01-1970/ -> is our day container /deployunix6/ -> one event at the 01-01-1970 This way we could avoid redundant information in our pagetree and easily maintain our calendar. In the next step we edit our getEvents() function. function getEvents(){ $days = wire('pages')->get("/calendar/")->children("sort=title"); foreach ($days as $day) { echo "'$day->title' : '"; $events = $day->children("sort=created"); foreach ($events as $event) { echo "<span><p>$event->title</p></span>"; } echo "', \n"; } }
  21. Code example tomorrow, just arrived at home, le me now @ couch
×
×
  • Create New...