Jump to content

mr-fan

Members
  • Posts

    848
  • Joined

  • Last visited

  • Days Won

    4

Everything posted by mr-fan

  1. For a list of events you could use a repeater or this fieldtype: https://processwire.com/talk/topic/5040-events-fieldtype-inputfield-how-to-make-a-table-fieldtypeinputfield/ it's a startingpoint for events....with simple output as a list or in the way you want like this:
  2. not plug and play - but some read and learn..... 1. https://processwire.com/talk/topic/3006-display-a-list-calendar-using-a-date-field/#entry29865 (using this calendar script: http://fullcalendar.io/ 2. https://processwire.com/talk/topic/2435-tutorial-howto-create-a-simple-eventcalendar/ 3. google calendar..... regards mr-fan
  3. maybe this is an option to have control over the images in wysiwyg fields: https://processwire.com/talk/topic/4071-textformatterimageinterceptor/ or if the textbox + image setup is almost the same you could setup a "user-input-save" combination with two fields one for the text and one for the "right image".... such things are often messed up by userinput in a wysiwyg.... regards mr-fan
  4. http://misterui.de/shop/ and https://processwire.com/talk/topic/2315-preview-intranet-application-%E2%80%93-office-management/#entry22154 i've got the 19 bugs version - spend it not really for the function....more for the learning lesson from that code - it's build upon PW with a complete frontend driven app....so it is very interesting...but not switched from my old system that works like pwired solution
  5. A other approach could be the new PageTableExtended module...to get different contenttypes on one post. https://processwire.com/talk/topic/7459-module-pagetableextended/ here it would be a similar page setting like diogo explained - but the editing of the childpages (image, text, ...) would be easy on the blogpostpage. But this addon needs a basic understanding of templates, fields, and the api for rendering proper output in your templates.
  6. Yes - i like it very much!! only thing i'd like was some icons for pagetree and find - would be a nice addition - this would fit better here - or splitt it up in two links because "Pages" is really important - it gets a little bit lost in a kinda submenu? So one item more for Find and some fitting icons should be more usefull. And the if i switch the sidebar off (i thought i could simply work with the breadcrumbs like a cool "full view") a memory with the session would be great that it stay hidden or stay in front....don't know if this is possible... But the whole handling with your theme is great and easy! Love the typography special!! best regards mr-fan
  7. i think PW handle much more than i (or maby you) can imagine... there some good explanations on cat's... the most important thing is to create a page/content structure that it expandable and fit exactly your needs before creating fields and templates handle structure: https://processwire.com/talk/topic/3579-tutorial-approaches-to-categorising-site-content/ example: https://processwire.com/talk/topic/4116-best-way-to-structure-a-classifieds-site/#entry40330 some posts on categories: simple: https://processwire.com/talk/topic/1232-simple-categories-filtering/ nested: https://processwire.com/talk/topic/2519-nested-categories/ a very usefull gist from soma on image tags: https://gist.github.com/somatonic/5808897 imagetag module: http://modules.processwire.com/modules/textformatter-image-tags/ and for blog examples check out the blog profile fram ryan https://processwire.com/talk/topic/1394-blog-profile/ and the blog module from konkondo https://processwire.com/talk/topic/7403-module-blog/ so i wish a good reading.... regards mr-fan
  8. GET IT.....i can't say how much i like to explore PW! like everything i learn about the api ->it->is->really->in->most->cases->easier->than->i->think... //deletes events that older than today foreach($page->events as $e) { // get date $ed = $e->date; //check against today if(time() > $ed) { $page->of(false); //remove is the right way from wirearray $page->events->remove($e); $page->save(); } } thank you dave for the hint!
  9. Error: Exception: Method Event::addStatus does not exist or is not callable in this context (in /var/www/web1807/html/gs/wire/core/Wire.php line 320) the same for $event->delete(); or $page->events->delete($event); i've looked in the cheatsheet since i've thought that eventsfield is a repeater and repeaters are like pages.....? How could i get an item removed via the API looked into the module itself there is no methode in EventArray.php and in the inputfieldEvents.module i did'nt found something usefull....
  10. just a small question on this....i'd like to automatic delete expired events on the template with the API. Since i trashed my event page with the second try i think i could ask here... foreach($page->events as $event) { //setup $now with time() and $edate is my eventdate.... //deleting entries if($now > $edate) { $page->events->trash($event); } //output all events goes here so far i've found that trash() is not possible here....how can i remove an item via API? regards mr-fan
  11. since i come from the same former as argos - i've to write some different letters. like written i'am a "non-coder" too with limited skills but kinda like "mud grubbing" on code to learn new things! (and love to think abstract and crossways and listen and read to people that know more - so i get most things i need sorted) the actual homepage of PW says for the mainreasons to choose PW: 1. Build Bigger, Faster, Stronger, Easier. ->Impression: Yeah its a good slogan but how it serve my needs? -> Ok thats says nothing about the techical side of the product - this could even placed on the the typo3 homepage wich is a real complex system for content 2. A friendly and powerful open source CMS with an exceptionally strong foundation.With all custom fields, an easy-to-use jQuery-inspired API, and a powerful selector engine, ProcessWire will rise to any task. ->Impression: friendly & powerfull sounds a bit like "captain planet" ->strong foundation...hmm we will see - custom fields...interesting - what is a jQuery-inspired API??? - what is a selector engine??? rise to any task? ===> now i'm really curious! -> Ok this sounds not like a normal CMS - API such things only named on PHP frameworks...not on a joomla, drupal or wordpress homepage.....hmm read on 3. last paragraph of intro: Managing and developing a site in ProcessWire is shockingly simple–and fun–compared to what you may be used to. What makes ProcessWire different? ->Impression: hmm i just wanna know now how it works and where is the fun...more curious ok read the Whats different stuff!! -> So far so good--until now we read about fun, developing, API, selector-engine ->get in the end to this video: http://processwire.com/videos/overview/ This video shows _not_ here you can install a theme with one click - here you add some fancy stuff......!! this video shows the real power under the cover! So for me after 30 minutes reading and watching some videos.....i get a "friendly and powerfull" feeling that i read about in the 2. part of the homepage! For me as a non-dev landing on the PW homepage - everthing is clear - there is a API (hey an API -> i have to code let's look if i can take this stuff....until now a have a little bit fear of this API thingy) there is a naked/fast/foundation as backend (ok -> no problem i like minimal effort on tools) all is a page and a field - i can create what i want----> ohhhh hmm that give me power - but more power is more responsibility - can i manage this? this is no "normal" CMS beeing disappointed depends on what you expect - not what you find! I'm sad that PW not fit your needs - in a few days my first website will go online - i've managed some parts (easy forms, image managment, small newssystem) that i missed for building small websites, argos have a look in the showcase section i will explain deeper what i did next week. best regards mr-fan
  12. i like zorro but i'll keep by this turboboost thingy..... can't choose - >left right< button
  13. ok i think for templates in semantic way you've two options.... use PHP + HTML while PHP + HTML = dynamic content.....while the PW API give the power to minimize footprint and make it readable. or use a template engine with controllers like: https://processwire.com/talk/topic/6835-module-twig-for-the-templateenginefactory/ or https://processwire.com/talk/topic/4604-template-data-providers/ that would be the option to get rid of php tags in HTML.... oh third way i found on many examples (like in joss's newstutorial) Third, i like the idea of having one central file to allow for template wide functions , for example a loginscript that allows me to have a loginbox on every page and don't need any redirects as i simply can post the form to the current page itself. build up a _func.php for some basic functions to generate your output for navigation, login or something else and reuse it in any templates. example from my first project: 1. this in my _init.php // Include shared functions include_once("tpl/_func.php"); 2. and this is a part of the _func.php <?php /** * /site/templates/_func.php * * Example of shared functions used by template files * * This file is currently included by _init.php * */ //default vars $homepage = $pages->get("/"); //siteMapNav $siteMap = $modules->get("MarkupSimpleNavigation"); // load the module $siteMapNav = $siteMap->render(); // render default menu //mainMenuNav $mainMenu = $modules->get("MarkupSimpleNavigation"); // load the module $options = array( 'parent_class' => 'parent', // overwrite class name for current parent levels 'current_class' => 'current', // overwrite current class 'has_children_class' => 'has_children', // overwrite class name for entries with children 'levels' => true, // wether to output "level-1, level-2, ..." as css class in links 'levels_prefix' => 'level-', // prefix string that will be used for level class 'max_levels' => 1, // set the max level rendered 'firstlast' => false, // puts last,first class to link items 'collapsed' => false, // if you want to auto-collapse the tree you set this to true 'show_root' => true, // set this to true if you want to rootPage to get prepended to the menu 'selector' => '', // define custom PW selector, you may sanitize values from user input 'selector_field' => 'nav_selector', // string (default 'nav_selector') define custom PW selector by using a property or field on a page. Use this setting if you want to overwrite the default nav_selector 'outer_tpl' => '<nav><ul class="nav-list">||</ul></nav>', // template string for the outer most wrapper. || will contain entries 'inner_tpl' => '<ul>||</ul>', // template string for inner wrappers. || will contain entries 'list_tpl' => '', // template string for the items. || will contain entries, %s will replaced with class="..." string 'list_field_class' => '', // string (default '') add custom classes to each list_tpl using tags like {field} i.e. {template} p_{id} 'item_tpl' => '<li><a class="pure-button" href="{url}">{title}</a></li>', // template string for the inner items. Use {anyfield} and {url}, i.e. {headline|title}, if field is of type image it will return url to image (first image if multiple) 'item_current_tpl' => '<li class="selected"><a class="pure-button" href="{url}">{title}</a></li>', // template string for the active inner items. 'xtemplates' => '', // specify one or more templates separated with a pipe | to use the xitem_tpl and xitem_current_tpl markup 'xitem_tpl' => '<a href="{url}">{title}</a>', // same as 'item_tpl' but for xtemplates pages, can be used to define placholders 'xitem_current_tpl' => '<span>{title}</span>', // same as 'item_current_tpl' but for xtemplates pages 'date_format' => 'Y/m/d', // default date formatting for Datetime fields and native created/modified 'code_formatting' => false, // enable or disable code indentations and newslines in markup output 'debug' => false, // show some inline information about rendertime and selectors used as html comments ); $mainMenuNav = $mainMenu->render($options); should be no problem to set such functions as controller for a templatefile like soma to get the controller in /views/ to setup needed functions....so you've got one main.php template with the main HTML structure....templatefiles for your different output (HTML of the content) and some reusable included functions to clean up the templatefiles... But you've got one file more anyway. I've choose to have on _func.php that is included and give me some helpers for all templatefiles it's all there a Processwire foreach isn't that hard abstract for normal templates and for more build a function. http://processwire.com/api/why-php-syntax/ i like this one
  14. THIS saved my afternoons at primary school.......of course _after_ the homework.....
  15. there are a bunch of new tutorials on the way and my special part is this point on chapter 1 So have a great reading - for all non coders - really great - usually you didn't get such good docs on other CMS/CMF anyway!! https://processwire.com/docs/tutorials/but-what-if-i-dont-know-how-to-code/ https://processwire.com/docs/tutorials/but-what-if-i-dont-know-how-to-code/part-1-pages-templates-fields-files/ https://processwire.com/docs/tutorials/but-what-if-i-dont-know-how-to-code/chapter-2-easy-images/ https://processwire.com/docs/tutorials/hello-worlds/ thanks to joss and ryan i hate it to be not that good in english - so writing tutorials is limited for me.....did several in german for former systems.
  16. or read the last point on the template tutorial from ryan he describes the approach of the 2.5 site templates. (...and work with the 2.5 version for testing...) http://processwire.com/docs/tutorials/how-to-structure-your-template-files/page4 best regards mr-fan
  17. i liked all your posts - great video!
  18. yes indeed this is much safer....other snippets to splitt a datefield maybe usefull for panophobie... //get the date $mydate = $page->week_beginn; //splitt a timestamp $timestamp = strtotime($mydate ); $month = strftime("%b",$timestamp); $day = strftime("%d",$timestamp); $year = strftime("%Y",$timestamp); this should work - so i've build a calender with outputting single parts of a date....adding days, minutes to a timestamp is the better way like LostKobrakai described. regards mr-fan
  19. $wdate = $page->week_begin //and add some days $wdateplus = date('Y-m-d',strtotime($wdate. ' + 6 days')); i was...to slow....
  20. Great BIG Thankyou!!!! I tried so much - since i thought it should be an easy way here....it works like a charm. I will present it on a casestudy - i've done my first project with a Adminpage for images (manage images as pages central) and since i don't wanna fall back to the /page/ while editing i search for some fancy way with a lightbox it works as expected. here is the complete code for a simple template that runs with CustomAdminPage http://modules.processwire.com/modules/process-admin-custom-pages/ <?php // Bilderübersicht Custom Admin Page ?> <style type="text/css" media="screen"> /** * larget magnific popup */ .mfp-iframe-holder .mfp-content { max-width: 1200px!important; } </style> <script type="text/javascript"> $(document).ajaxComplete(function() { //add trigger class and modal setup $('.PageListActionEdit a').each(function(){ $(this).addClass("lb-edit").attr("href",$(this).attr('href')+"&modal=1"); }); $('.PageListActionNew a').each(function(){ $(this).addClass("lb-edit").attr("href",$(this).attr('href')+"&modal=1"); }); //setup lightbox $('.lb-edit').magnificPopup({ type: 'iframe', disableOn: 0 }); }); </script> <?php //get Magnific css and js $this->modules->get('JqueryMagnific'); //render PageListtree with setting the parent page $formImages = $this->modules->get('InputfieldForm'); // prep the form $wrapperImages = new InputfieldWrapper; // a wrapper $wrapperImages->attr('value', '<h2>Bilder</h2>'); $i = $this->modules->get('ProcessPageList'); // get the pagelist process $i->set('id', 1015); // setting the parent page $pageTreeImages = new InputfieldMarkup; // the placeholder $pageTreeImages->value = $i->execute(); // fill the InputfieldMarkup form field... $wrapperImages->add($pageTreeImages); // put inside the wrapper... $formImages->append($wrapperImages); // append the wrapper echo $formImages->render(); So i've used the PageListTree with a preselected parent and the edit function works within the modal..... It's not my threat so i couldn't vote for best answer! Best Regards
  21. Hi there i open this old topic for a question....i'm trying for a few hours to get simple add a class and the modal=1 option on the pagelisttree....and i don't get it. i've searched - studied somas module.... all i've got is this 1. I have a Custom Admin Page (djogos addon) with renders a PageListTree with a specific ParentPage and a template file under /site/templates/myadminpage.php like: (works great) $formImages = $this->modules->get('InputfieldForm'); // prep the form $wrapperImages = new InputfieldWrapper; // a wrapper $wrapperImages->attr('value', '<h2>Bilder</h2>'); $i = $this->modules->get('ProcessPageList'); // get the pagelist process $i->set('id', 1015); // setting the parent page $pageTreeImages = new InputfieldMarkup; // the placeholder $pageTreeImages->value = $i->execute(); // fill the InputfieldMarkup form field... $wrapperImages->add($pageTreeImages); // put inside the wrapper... $formImages->append($wrapperImages); // append the wrapper echo $formImages->render(); 2. I'm calling the Core scripts for the magnific lightbox like (works easy and great) $this->modules->get('JqueryMagnific'); 3. i'll try to add simple modal=1 and a lightbox class to the a tag with this jquery script $(document).ready(function() { //add trigger class and modal setup $('.PageListActionEdit a').each(function(){ $(this).addClass("lb-edit").attr("href",$(this).attr('href')+"&modal=1"); }); //setup lightbox $('.lb-edit').magnificPopup({ type: 'iframe', disableOn: 0 }); }); so it seems to work only in the first level of the PageListTree....not in the second levels!!?? i don't get it - searched for :visible selector tried some other selectors to get it but no success... maybe somebody knows why the hidden pagelists don't get it - are they build via ajax calls and i don't get this a href's to change? i'm sadly not so skilled with jquery that i figure it out. regards mr-fan
  22. yes indeed and a hanna code section would be great....i love these little snippets for manipulating/generating content.... let's wait for nico - if he had a second for this (i think he's always bussy )
  23. don't miss this one: https://processwire.com/talk/topic/7565-making-pw-more-userfriendly/page-2#entry72937 i think we should talk to nico......and make it happen like http://processwire.tv/ i'll contributing in the "beginner" section
  24. +1 ^^ (sorry for the missing screen - i think it was only a problem in my office workstation - at home the font is fine...i haven't forget it....)
  25. Short tipp for CKEEditor contents.css (copied in your site/templates/styles directory and add the path like metioned) it's mostly easy to get the same styles like in frontend with easy import default template styles and adapt them like: /** * General editor styles (regular mode only) * * See contents-inline.css for inline styles. * */ /* Template CSS ONLY */ @import url("style.css"); /* WORKSPACE EDITOR SETUP */ body { } /* CORRECT THE ORIGINAL STYLESHEET */ don't tested with the 2.5 - but my first project on 2.4 works great and simple without having the stuff twice - i ionly have one frontend stylesheet. sometimes there is some padding needed for the WYSIWYG....or other things in the default style.css that needs to be overwritten or changed.
×
×
  • Create New...