Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 01/02/2014 in all areas

  1. This is a basic site for a car restorer: http://www.tcfautocare.co.uk/ Its a fun and slightly silly site for people who want to get their old campervan or classic car restored. Since this is a very personal, passionate sort of thing for people to do, I decided that the site should be more friendly and show that the company is as passionate and daft about these old cars as the customer is. Some restoration projects can take years, so it is important to build friendly relationships from the outset. For this reason, the call to action is biased towards getting customers to phone rather than use a contact form. Personal contact is essential. PW 2.3.9 Bootstrap 3 It has a small blog system with a category field that just allows blog posts to appear on the bottom of specific pages as well as the main blog page. So, a blog about Campervans will also appear on the Campervan Restoration page. It has a blocks system (repeater field) for the main product pages (Campervans, classic cars ...) that allows a block to be created and then placed in the left column or right column. The block can have title, text, image, video and will display slightly differently depending on which of these are enabled or not. A block can also be disabled rather than deleted if it is not required at that moment. Photos are mostly by me (the arty ones are mine) All copy (including the two blog posts to get him started) is by me - and probably a bit obvious! All graphics are by me, including the campervan and fiat - took me sodding ages! There are actually three domains - two of them have static pages with unique copy, but all the menu links are through to this main site.
    8 points
  2. Site for a german photographer. Processwire makes it easy to manage categories, photosets and images. http://fredericstreicher.com/ Edit: Let me add a few details regarding the use of PW: I use the thumbnail module (by apeisa) to allow custom thumbnails for the list view. A very useful module, easy to use for the client. For the backend I chose the ergo admin theme and modified it slightly: e.g. removed the sidebar, which I don't need. Oh, and make sure to view the site on your tablet as you can swipe through detail views. Cheers Claude
    8 points
  3. Amidst all the fireworks, celebrations and yesterday's parties around the globe, I silently launched my Birth(+)Fact(x)Death(-)Calendar to the world. Although to most programming gurus on this forum it will probably not be a real 'showcase' to eat your heart out. As mentioned before, I'm not a PHP Grandmaster and I'm not a CSS wizard but just a simple creative artist doing what the uncontrollable urges make me do. Birth(+)Fact(x)Death(-)Calendar is a now 29-year-old project that has lived several lives, re-birthing from simple written notebooks to Commodore 64 cassette storage, several database systems and finally the World Wide Web. When a Zen Buddhist friend hinted me to ProcessWire and I saw the Architects demo I thought "Yeah, this is it!" But soon enough I hit the limits of my programming skills and gave up. I even admit that at a certain moment I thought Drupal was a better option. However, after a while I had the impression I was building a five storey garage building with a ton of complex tools and facilities while basically all I wanted to do was change the oil in the gearbox, grease some joints and keep up with routine repairs on an old LandRover. Things you usually do with a piece of wire, silicone and rock'n'roll tape. Last summer I encountered the unfortunate meeting of my left leg with a yellow car while driving my bicycle in Antwerp, leaving me captured to a couch in the living room and short walks on crutches to the kitchen for a cup of tea. Although thoughts and creativity were also somewhat crippled by the situation I knew I was going to have time on my hands for several weeks and months to say the least. So I went back to ProcessWire and thought "This must be it, get on DDV!" Now I know that this is it. Thank you Ryan for making something 'simple' that even I can manage to do what I've been dreaming to do for quite some time. Thank you also, along with all other hardcoders here to help me get over my beginners' mistakes and help me along the path to coding Nirvana where everything just simply works like simple earthlings want it to. I am sure most of you will either pull some hairs, burst out laughing or just stare with an open mouth at some of my coding solutions. But remember, I'm a mash-up, collage, cut-up, ex-cook, carpenter, welder, painter, teacher, bus driver, manager of a tattooed pig farm in China, visual artist doing my stuff with what I can find, and doing it LandRover owner style. Birth(+)Fact(x)Death(-)Calendar is also a work in progress. It grows day by day and I'm sure many new features will be added along the way. Right now my concern is to have the basic framework functioning from day to day. That's what Birth(+)Fact(x)Death(-)Calendar is about. Serving you a fine selection of events to inspire your day. Check Birth(+)Fact(x)Death(-)Calendar every morning for tips on which book to read, what movie to watch, where to go, maybe what to eat or drink, all based on events for the day. Today (2 January) you could perhaps read 'Suicides' by Guy de Maupassant, take a walk along Rue Le Sueur in Paris, listen to 'She was a Visitor' by Minimal Man, watch the fantastic movie '10 Rillington Place' with a stunning Richard Attenborough or just let your heart skip a beat for Philip Blaiberg. Check for events on your favourite day in the 'events' section. I'm filling in some events for most days of the year, but my collection of events is beyond 10.000, bear patience because I probably have a long way to go. If you like what you see and have suggestions to add new features, new paths, new possibilities, new abilities, better performance, better interfaces, cooler scripts, gadgets, etc,.... please tell me. And even better, also show me the 'how to' as well. The title for this post? It refers to a 1978 song by the Mekons, 'Where Were You?', and it was also the title of a blog I kept about my Birth(+)Fact(x)Death(-)Calendar for several years. Apart from collecting events I also archived where I was in pictures since 1999. Before on another blog The Eyes Have It, but now also integrated into Birth(+)Fact(x)Death(-)Calendar. And finally, post your requests for favourite days here! I have about 25 to 40 events for every day of the year. Any request posted here will be added in the next couple of days. And now.... enjoy Birth(+)Fact(x)Death(-)Calendar! DDV
    6 points
  4. Ryan - any ideas how much work that would be? We have need for this also in next project, so interested in providing some support (=money) for this.
    5 points
  5. My second PW site, theanodyne.com, features info for a local bar & pool hall and is designed to look like a vintage menu. They love how easy it is to update the site.
    4 points
  6. Actually I think it's better to disallow those features for a certain role. Then those buttons will also be gone. Here I assume that the role is named member. public function init() { // only for member if(!$this->user->hasRole('member')) return; // several hooks $this->addHookAfter('Page::sortable', $this, 'hookPageSortable'); $this->addHookAfter('Page::deleteable', $this, 'hookPageDeleteable'); $this->addHookAfter('Page::moveable', $this, 'hookPageMoveable'); $this->addHookAfter('Page::editable', $this, 'hookPageEditable'); $this->addHookAfter('Page::addable', $this, 'hookPageAddable'); } Here a methode, to give you some start: public function hookPageSortable( HookEvent $event) { $event->return = false; return; }
    3 points
  7. Hello, no idea how that happend, but for some reason it seems to work all of a sudden. Problems magically disappearing into thin air. Nice way to start the year!
    3 points
  8. We will put up http://fi.processwire.com site like there are http://de.processwire.com and http://it.processwire.com. If you want your company or yourself portrayed on that page, please provide image and link here on this topic. We also have processwire.fi domain, that we will simply redirect to fi.processwire.com when everything is ready.
    2 points
  9. It could potentially be done right after we wrap up the 2.4 release. The amount of work and time involved would probably go a little beyond what was involved in developing dependencies, but not not nearly as time intensive as developing the multi-language support. The workflow would simple and the same thing as it is when you are editing an unpublished page at present, at least from the perspective of the editor. I think this is also similar to what Soma was talking about with their existing system. Because it would be a draft of a live page, there would also need to be an option to "abandon draft". But beyond that, it would be the same as editing an unpublished page. Of course, you could preview it and such, like you can with an unpublished page. Drafts would use more overhead than a regular page edit (since it has to make a copy of the page first), so you'd designate which templates you wanted it to utilize the drafts system for. The page creation process would not change at all, since a draft would only come into play with a published page (a draft is a working copy of a published page).
    2 points
  10. Oh, boy, it is going to be one of those days; I can just feel it in my bones. For some reason I cannot seem to get the office warm this morning; my banjo has bought a ticket for the deep south, my harmonica is buried under the table, the dog has abandoned me and my hands can herdlery tip the wids on tjhos pist. But, this is also the day when I put up a new site for a client. So, three domains - two of them static and one a PW site. All simple stuff. Just create the new database via CPanel, upload the files, change the config file details and hit go! And... Unable to complete this request due to an error. Error has been logged. Oh Bugger. So, we start the debug procedure. Yes, htaccess is there and right. Yes, config seems all sorted. Permissions good. Can link to an assett - so stuff is actually up there. Dive back into config and turn the debug on. Get some strange message about having SQL base table problems or some such thing that I have never heard of before. So, with a heavy heart, I open up PhpMyAdmin and have a butchers at the squirrel. Oh. Ummmm,,,, ah..... Oooops! You know, creating a database is all well and good. But actually importing some data into it can make a whole lot of difference to the functionality of the site! Silly Idiot!
    2 points
  11. I would go the pages & API route, it's very quick! You could make a big array & loop it: $cities = array( 'Albany, NY', 'Albuquerque, NM', 'Anchorage, AK', 'Annapolis, MD', 'Atlanta, GA', 'and', 'continue', 'the', 'list', ..... ); $parent = $pages->get('/cities/'); // assumed that you have a cities parent. foreach($cities as $city) { $p = new Page; $p->parent = $parent; $p->template = 'city'; // choose a valid template for this $p->title = $city; $p->save(); } (written in the browser, but simular concept I have used often)
    2 points
  12. welcome to pw unlimited: http://processwire.com/talk/topic/4173-grouped-forum-posts-links-articles-tutorials-code-snippets/
    2 points
  13. @SteveB and @ryan: good point about deleted pages, this is now taken care of. No idea why I didn't think of this earlier.
    2 points
  14. And I thought I left the hard ones to you.
    2 points
  15. Soma you and some other guys here make my job easy because most of the hard questions were already answered. So thank you for all the help and support give here. You all make this forum great.
    2 points
  16. Hi, After reading this thread, I decided to make a module that helps generating PDF files of ProcessWire pages. GitHub: https://github.com/wanze/Pages2Pdf Modules Directory: http://modules.processwire.com/modules/pages2-pdf/ This module uses the mPDF library to generate the PDF files. It has fully UTF-8 and basic HTML/CSS support for rendering the PDF files. The output is customizable with ProcessWire templates. Example I've enabled generating PDF files for the skyscraper template of ryans Skyscrapers-profile with a template that outputs the data in a table along with the body text and the images: one-atlantic-center-pdf-4177.pdf Please take a look at the README on GitHub for instructions and further information/examples. Cheers
    1 point
  17. Here are some API additions to the dev branch, primarily for WireArray/PageArray/etc. I've found these very handy lately, and would have on almost any project I worked on, so decided they'd add value to the core. I'll add these to the cheatsheet once 2.4 replaces 2.3, but for now, here they are. The examples here use PageArray, but note that these API additions apply to any WireArray derived type, not just PageArray. WireArray::implode() Implode all elements to a delimiter-separated string containing the given property from each item. Similar to PHP's implode() function. Usage: $string = $items->implode([$delimiter], $property, [$options]); Arguments: $delimiter - The delimiter to separate each item by (or the glue to tie them together). May be omitted if not needed $property - The property to retrieve from each item (i.e. "title"), or a function that returns the value to store. If a function/closure is provided it is given the $item (argument 1) and the $key (argument 2), and it should return the value (string) to use. [$options] - This argument is optional. When used, it's an array with modifiers to the behavior: skipEmpty: Whether empty items should be skipped (default=true) prepend: String to prepend to result. Ignored if result is blank. append: String to prepend to result. Ignored if result is blank. Examples: $items = $pages->find("template=basic-page"); // render all the titles, each separated by a <br>, for each page in $items echo $items->implode('<br>', 'title'); // render an unordered list of each item's title echo "<ul><li>"; echo $items->implode('</li><li>', 'title'); echo "</li></ul>"; // same as above, but using prepend/append options, // this ensures no list generated when $items is empty echo $items->implode('</li><li>', 'title', array( 'prepend' => '<ul><li>', 'append' => '</li></ul>' )); // same as above, but with all items now presented as links // this demonstrates use of $property as a function. note that // we are also omitting the delimiter here as well, since we don't need it echo $items->implode(function($item) { return "<li><a href='$item->url'>$item->title</a></li>"; }, array('prepend' => '<ul>', 'append' => '</ul>')); WireArray::explode() Return a plain array of the requested property from each item. Similar to PHP's explode() function. The returned PHP array uses the same keys as the original WireArray (if that matters). Usage: $array = $items->explode($property); Arguments: $property - The name of the property (string) to have in each array element (i.e. "title"). You may also provide a function/closure here that should return the value to store. When a function/closure is used it receives the $item as the first argument and the $key (if needed) as the second. Examples: // get an array containing the 'title' of each page $array = $items->explode('title'); // get an array containing the id, url and title of each page $array = $items->explode(function($item) { return array( 'id' => $item->id, 'url' => $item->url, 'title' => $item->title ); }); WireArray::data() Store or retrieve an arbitrary/extra data value in this WireArray. This is exactly the same thing that it is jQuery. I've personally found this useful when building search engines: the search engine can store extra meta data of what was searched for as a data() property. Then any other functions receiving the WireArray/PageArray have access to this additional info. For example, the search engine portion of your site could populate an array of summary data about what was searched for, and the render/output code could render it to the user. Usage: // Setting data $items->data('key', 'value'); // Getting data $value = $items->data('key'); // Get array (indexed by key) of all data $values = $items->data(); Arguments: The above usage section explains all that's needed to know about the arguments. The only additional comments I'd make are that 'key' should always be a string, and 'value' can be anything you want it to be. Example: function findSkyscrapers() { $floors = (int) wire('input')->get->floors; $year = (int) wire('input')->get->year; $items = wire('pages')->find("template=skyscraper, floors=$floors, year=$year"); $items->data('summary', array( 'Number of floors' => $floors, 'Year constructed' => $year )); return $items; } // the render function can focus purely on output function renderSkyscrapers($items) { echo "<h2>You searched for:</h2>"; // render the summary of what was searched for foreach($items->data('summary') as $label => $value) { echo "<p>$label: $value</p>"; } echo "<h3>Skyscrapers found:</h3>"; // note use of new implode() function, though a foreach() would be just as well here echo $items->implode(function($item) { return "<p><a href='$item->url'>$item->title</a></p>"; }); } WireArray::and() WireData::and() Return a new copy of the WireArray with the given item(s) appended. Primarily as a syntax convenience for various situations. This is similar to jQuery's add() and andSelf() functions, but I've always felt "add" implied adding something to the original rather than creating a new combination, so went with "and" in this case. The term "and" is actually a reserved word in PHP, so you can't usually have a function named "and()", but through the magic of hooks, ProcessWire can. This function should reduce the instances in which you'd need to do "$a = new PageArray();" for example. Usage: // create a new WireArray with $items and $item (appended) $myItems = $items->and($item); // create a new WireArray with $items and $moreItems (appended) $myItems = $items->and($moreItems); // create a new WireArray with $items and $item (prepended) $myItems = $item->and($items); // create a new WireArray with $item and $anotherItem (appended) $myItems = $item->and($anotherItem); // create a new WireArray 4 items $family = $pappa->and($mamma)->and($brother)->and($sister); Examples: // generate breadcrumb trail that includes current page foreach($page->parents->and($page) as $item) { echo "<a href='$item->url'>$item->title</a> / "; } // check if page or its children has a featured checkbox if($page->and($page->children)->has("featured=1")) { echo "<p>Featured!</p>"; }
    1 point
  18. Hi folks! Despite of ProcessWire being one hell of a cms, we and our clients' editors stumbled upon one issue that is at least annoying and sometimes a major drawback that could lead to customers favoring another software for their projects: In ProcessWire you cannot update an already public pages without simultanously modifing the page's public appearance. In short, we cannot save drafts, use editing copies ore any similar form of manipluating content that should not be published immediatly. This is quite a common use case if you like to - preview your changes before publishing (already addressed by the preview module]) - edit content in teams. - want to schedule publishing of updated content for a future date. - have to apply some kind of approval chain before publishing updates. - just want to quit working for today and continue tomorrow. Personally I think, this should possible a feature request for a future core release instead of a plugin module discussion. But plugin modules are all we have at hand for the time being. ### Reqirements ### So let's start collecting a list of requirements: - New logic is only needed when editing already public pages. No need to mess with the process of editing non-public pages. - Opening a public page for editing: - Instead of presenting the current public state of the page some kind of draft state has to be used to initialize the editing form. - A draft state euqlas the page's state at the time of the last publishing - potentially modifed by preceeding save-as-draft actions of an editor. - The draft state covers the sum of the field values of the page (existing of database content, files of image fields and maybe other forms of serialized data in case of more exotic custom field types being used). - Additionally pages consist of a set of "direct" properties, such as templates_id, parent_id, status, and sort being the most important. Whether this kind of data should or must be part of a draft state is still to be discussed. - Instead of one rather two different saving options must be offered to the editor: save changes and publish changes. - Save changes - When saving changes the public state of a page has to left untouched. - The contents of the editing form must be serialized in a different way updating or replacing any existing draft state or creating a new one if necessary. - Publish changes - This option equals the normal publishing action on public pages as it is implemented right now (due to the editing form being initialized with the current draft state instead of the page's public state). - Delete pages - When deleting a page (entirely) any existing draft state has to be discarded as well. - Preview pages - We need to provide a new preview option (in contrast to the view option) that allows rendering the page's draft state instead of the public page. - This function should be accessible from the editing view as well as from the page tree. There might and probably will be more requirements, but I think this list covers the most common aspects of a save-as-draft feature. As I'm writing this post, I already invested some time trying to implement a plugin module. Unsurprisingly I stumbled upon a bunch of obstacles leading to a halt and seeking help and opinions from the comunity. I'll try to describe the general strategies I came up with for implementing the draft state feature: ### Cloning the page ### My first attempt was to implement a cloning mechanism that duplcates a public page storing it in a hidden folder. The I tried hooking into ProcessPageEdit::execute() trying to replace the originl page object handdles by the module with my draft copy. This approach came to a halt due to the following problems: - The page object within ProcessPageEdit is stored within a protected property ($this->page) and referenced by all the methods of the module. Their is no direct way to manipualte that via a hook. I came up with some kind of dirty hack to circumvent that but this was far from a satisfying solution. - Some parts of the editing form still had to show details of the original page (e.g. the breadcrumps, the children, the state), so the page object used to initialize the editing form had to be some kind of mix of the public and the draft state of the page. - Most of this mixing state issues could be solved for the initializing. But when it comes to saving the draft state (not publishing changes) the need to divide the editing form's content in draft data and public data could not be solved (at least by me). ### Cloning field values ### The second approach was to not clone the entire page but all the page's fields to represent the draft state. This would solve the issues with special treatments for form values for status and template and therefor should be more elegant and "light-weight" in our efforts to mess with ProcessWire's default behaviour as less as possible. I tried hooking into Fieldtype::savePageField() and FieldtypeMulti::savePageField() providing special logic for storing field values in case of a public page being saved as draft. Additional the former mentioned hooking into ProcessPageEdit::execute() used to unserialize this draft field values and overwrite the page's public field contents. The main problem I encountered was that there are more than this two types of FieldtypeXYC::savePageField() implementations (Repeater, I'm looking at you!). Every custom Fieldtype module can and often will come up with its own implementation of serializing values which would have to all be hooked into seperatly (correct my if I'm wrong on this one) and handled accordingly rendering a generic Save-as-draft module useless. ### Cloning the form state ### So I tried a more direct approach, ignoring the existance of pages and fields completly, just looking at the editing form alone. A page's draft state can be represented by the pure form state (meaning the list of form elements and their values). So save-as-draft action could possibly be implemented by intercepting the svaing process of the ProcessPageEdit module, grabbing the form state and serializing it instead of the normal routine. Unfortunatly ProcessPageEdit::processSave() is a protected and therefor unhookable method. But even if that wwasn't the case, you still had to face a mix of the same problems that we encountered in the first two approaches (separating draft form values from public state values and the need of implementing different ways of serializing the form state for a multitude and mostly unknown list of different field types. Additionally you would have to duplicate a lot of code e.g. form validation and handling file uploads that has been covered deep in the guts of the ProcessPageEdit module. ### Starting the discussion ### So, this was a looong intro. And I already thank you if you're still with me. If you have any thoughts regarding - the core feature vs. module question - the list of requirements I came up with so far - my efforts in conecpting and implementing a plugin module - or the need of this kind feature in general drop me line (or two). Regards, Marco
    1 point
  19. This thread is used as a place to collect: 1. links to posts in the forum answering (repeating) newbie questions 2. links to posts in the forum and elsewhere on the net giving good insight in processwire 3. links to good articles about processwire 4. links to good tutorials posted in the forum 5. links to movie clips 6. links to posts in the forum talking about modules 7. code snippets or links to code snippets 8. Usefull Helpfiles Many good posts that answers (repeating) newbie questions or give good insight in the how and why of processwire, links to tutorial posts, (also on the net), movie clips, clarifying articles and code snippets are spread over the forum. PM me if you know a link. About this kick start see this post: http://processwire.com/talk/topic/4143-wordpress-dominates-19-of-the-web/page-2#entry40910 This is a work in progress, it takes time to make it grow bigger and better. = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = STARTING NEWBIES AND DESIGNERS Link1: Starting and growing with processwire. https://processwire.com/talk/topic/3990-another-simple-photo-gallery-tutorial/page-4#entry61069 Link2: I am basically a designer with some programming skills. My question is this: Can I go ahead to use processwire for this even though i am still learning php. http://processwire.com/talk/topic/3954-starting-out-with-website-intranet-and-internet/ Link3: Feeling overwhelmed http://processwire.com/talk/topic/3215-newbie-overwhelmed/ Link4: Questions concerning PW and it's capabilities http://processwire.com/talk/topic/1557-questions-concerning-pw-and-its-capabilities/ NEWBIES FIRST CODING QUESTIONS link1: Using a default install, I'm stepping through the tutorials, templates, etc and trying to understand the basic concepts behind processwire and at this point in time "head.inc" & "foot.inc". http://processwire.com/talk/topic/3421-footinc/ Link2: I am puzzled why some html tags are starting in head.inc but don't end in head.inc Instead they are ended in foot.inc http://processwire.com/talk/topic/3388-question-about-headinc-and-footerinc/ Link3: Question about not using ?> in processwire http://processwire.com/talk/topic/3370-question-about-missing/ Link4: After you installed processwire, it comes with a default website. What is the best way to fill in your own website ? How do you replace the default processwire website with your own ? http://processwire.com/talk/topic/3379-how-to-fill-in-your-own-website/ Link5:How much extra work/time will I have to put in, as far as understanding and writing php and getting the hang of the PW system, just to be able to create the same responsive designs I would make in HTML/CSS/Javascrip, while also achieving the easiest type of content editing capabilities (in line with what you can get with a CushyCMS type product)? http://processwire.com/talk/topic/3961-new-to-cms/ Link6: I realize what I am confused about was really something quite basic, such as where are the snippets of php code go beside on templates? Can they go on a page as the value of body field for example? http://processwire.com/talk/topic/3383-back-to-basic/ Link7: I'm stuck in something that should be very simple. http://processwire.com/talk/topic/3720-my-first-doubt-using-pw/ Link8: Several questions before I can start. http://processwire.com/talk/topic/3589-several-questions-before-i-can-start/ PROCESSWIRE CMS INSIGHTS Link1: Reading this thread makes you understand processwire real quick. http://processwire.com/talk/topic/5667-help-a-noob-get-started/ Link2: Very good case study from RayDale giving good insight in processwire http://processwire.c...a-a-case-study/ Link3: Symphony or Processwire ? Another good insight. http://getsymphony.com/discuss/thread/79645/ ARTICLES Link1: Why he choses processwire over modx http://www.mademyday.de/why-i-chose-processwire-over-modx.html COMING FROM MODX ? Link1: You've been using MODX but now you've found ProcessWire. It’s totally amazed you and you can’t wait to get started. But…you are wondering where everything is. If this is you, read on… http://processwire.c...ning-from-modx/ Link2: A MODX refugee: questions on features of ProcessWire http://processwire.com/talk/topic/3111-a-modx-refugee-questions-on-features-of-processwire/ Link3: Code comparison between modx and processwire. http://processwire.com/talk/topic/2850-processwire-for-designers/page-2#entry30349 COMING FROM DRUPAL ? Link1: How to move your site from Drupal to ProcessWire. http://processwire.c...ndpost__p__8988 PAGES IN PROCESSWIRE Link1: Understanding pages in processwire http://processwire.com/talk/topic/5667-help-a-noob-get-started/page-2#entry55820 Link2: More about the function of pages in processwire http://processwire.c...fused-by-pages/ Link3: How to hide Pages from the Topnavi via Adminmenu http://processwire.com/talk/topic/2037-how-to-hide-pages-from-the-topnavi-via-adminmenu/ TEMPLATES IN PROCESSWIRE Link1: A good post with code examples to start a template http://processwire.com/talk/topic/43-template-tutorial/ Link2: Template design a better route http://processwire.com/talk/topic/2782-template-design-better-route/ Link3: A different way of using templates http://processwire.com/talk/topic/740-a-different-way-of-using-templates-delegate-approach/ FRONT-END / BACK-END Link1: ProcessWire Setup and front-end editing made easy http://processwire.com/talk/topic/2382-processwire-setup-and-front-end-editing-made-easy/ Link2: Creating a front-end admin http://processwire.com/talk/topic/2937-creating-a-front-end-admin/ Link3: How would I build functionality and write information from the front-end to the back-end? http://processwire.com/talk/topic/2174-writing-from-front-end-to-back-end/ Link4: Is it possible to create a custom login page like a template ? http://processwire.com/talk/topic/107-custom-login/ Link5: A "members-only" section in the front-end. Integrating a member / visitor login form http://processwire.com/talk/topic/1716-integrating-a-member-visitor-login-form/ Link6: Trouble deleting pages from the front-end. http://processwire.com/talk/topic/2290-trouble-deleting-pages-from-the-frontend/ MODULE Front-end Edit. It turns the content of $page->body into a clickable area and gives the ability to frontend edit the content via tinyMCE http://processwire.com/talk/topic/3210-module-frontend-edit https://github.com/Luis85/PageInlineEdit/ MODULE Fredi, friendly frontend editing. http://processwire.com/talk/topic/3265-fredi-friendly-frontend-editing/?hl=fredi http://modules.processwire.com/modules/fredi/ MODULE Admin-bar Provides easy front-end admin bar for editing page content in ProcessWire 2.1+. http://processwire.com/talk/topic/44-is-there-way-to-get-information-about-current-user-in-templates/ http://processwire.com/talk/topic/50-adminbar/ http://modules.processwire.com/modules/admin-bar/ MULTI LANGUAGE WEBSITE IN PROCESSWIRE Link1: Multi-language website page names / URLs http://processwire.com/talk/topic/2979-multi-language-page-names-urls/ Link2: API http://processwire.com/api/multi-language-support/multi-language-urls/ Link3: The name of the default language can't be changed in Pw, but the title. http://processwire.com/talk/topic/4145-recoverable-fatal-error/#entry40611 ADD NEW USER TO YOUR WEBSITE AND PASSWORD RESET Link1: Integrating a member / visitor login form http://processwire.com/talk/topic/1716-integrating-a-member-visitor-login-form/?hl=%2Bpassword+%2Breset#entry15894 Module http://processwire.com/talk/topic/2145-module-send-user-credentials/?hl=%2Bpassword+%2Breset BASIC TUTORIALS FOR NEWBIES Link1: Approaches to categorising site content http://processwire.com/talk/topic/3579-tutorial-approaches-to-categorising-site-content/ CODE SNIPPETS AND FUNCTIONS Link1: Get page id from images object https://processwire.com/talk/topic/6176-get-page-id-from-images-object/ Link2: Function to render Bootstrap 3 carousel markup from ProcessWire images object https://gist.github.com/gebeer/11200288 .HTACCESS EXAMPLES ON YOUR HOSTING SERVER Example1: A working .htaccess file. The issues were that the .htaccess file must exist on the server before installing processwire and that the server did not allow options in the .htaccess file. After fixing that processwire could be installed on the server without any problem. Note that such restrictions might be different on your server that you need to find in the faq of your host. RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php?q=$1 [L,QSA,NC] HTML KICKSTARTER Link1: How can i integrate HTML Kickstarter with processwire? http://processwire.com/talk/topic/2731-how-can-i-integrate-html-kickstarter-with-processwire/ MOVIE CLIPS Field dependencies are coming in ProcessWire 2.4. Field dependencies are basically just a way of saying that one field depends on another. It dictates which fields should be shown in a given context. https://www.youtube.com/watch?feature=player_embedded&v=hqLs9YNYKMM HELP FILES Cheatsheet Link1 Cheatsheet 1.1 as pdf file Download: http://processwire.com/talk/index.php?app=core&module=attach&section=attach&attach_id=1299 Link2 Cheatsheet is now a processwire site (great work by Soma) http://cheatsheet.processwire.com/pages/built-in-methods-reference/pages-find-selector/ INTERVIEWS Link1: About the history and coming to be of processwire http://processwire.com/talk/topic/4084-about-ryan-and-processwire-an-interview-with-ryan-cramer/
    1 point
  20. Just in case anyone was wondering why I've been silent for the last week, it's because I've been away on vacation, so have a lot of catch up to do here (didn't have internet access while I was gone). Just got back last night, and it seems my hands have to re-learn how to type. When I click on "view new content" I have 9 paginations of unread messages–ouch. This is probably going to take me a week to get through, especially with the Christmas holiday here. But I've been anxious to get back into the swing of things here and looking forward to getting focused on PW 2.4 now. Because I'm behind on the messages here, if there is anything urgent that you know of waiting on me, please reply or PM me and I'll make sure to get those right away. Thanks to all of you for taking good care of the forum while I was gone. Also Merry Christmas / Happy Holidays to everyone.
    1 point
  21. Thank you Martijn, more info here, it might be usefull for somebody.
    1 point
  22. AutoSave This module saves the page via ajax when editing in the admin. The interval for saving the page is configurable in the AutoSave module settings. By default it will only be enabled for unpublished pages. So far it seems to work fine for all fields and supports multilanguage. There's a message dialog show on top of page when saving happened with either a success or error. Requirements ProcessWire 2.3+. Haven't really tested with 2.3. Known Issues Nothing really obvious so far. Note that when you have multiple editors editing pages, it would be possible 2 persons editing the same page would overwrite each other, since the page is autosaved! The only solution for this would be to have my PageEditSoftLock module enabled with the complete "Lock" option active, so the page would be locked for editing. Todo Add some checks, if connection is lost. To be defined This module is currently a proof of concept. This module may not be suitable for all instances, but for personal use it may help preventing loss of long edits, most likely blog posts. Not sure this should be used for regular sites with clients editing. Most likely there's some more issues that interferer with what a CMS "page save" has to deal with. So you might find some ugly stuff happening. Thanks to Apeisa and his great Fredi font-end module, from where some logic is borrowed to save the page via ajax. Download https://github.com/somatonic/AutoSave So, that would be my last stroke for this year! Have a great silvester party and a happy new 2014!
    1 point
  23. Sounds about right The main thing is just making sure that the editor knows which is a draft and which is a published page - it is amazing how that can confuse people depending on their experience level or how long a lunch hour they have just had! Taking a very, very old publishing idea - drafts were often presented on different colour paper in typing and printing offices so that it was clear they were something different. It might be worth throwing in an optional safety trigger too, so that, for instance, you must preview before you are allowed to publish. But this can also be irritating in some instances, so being able to disable/enable this functionality would be useful. Being able to change what you can do by role is also worth considering here - being able to allow some authors to create an edited draft, but not allow them to commit to publish could be useful for some companies where they want to ensure someone has proofread everything first.
    1 point
  24. Why Not simply use the great Fredi module for front end editing? Or use edit links that point to the edit page in pw and append &modal=1 and use some lightbox iframe script. Much less hassle and dead simple.
    1 point
  25. I'm facing a problem with Ryan's module map marker, the map shows just a little square at the top left of the div and resizing the window it shows the whole map, has anybody got that problem before?
    1 point
  26. Welcome to the forums Marek! This knowledge: http://processwire.com/api/ + the basics of this http://www.php.net I am feeling too lazy to write...here's some light reading to help you get started http://processwire.com/talk/topic/2396-tips-on-getting-started-how-you-got-started/ http://processwire.com/talk/topic/1555-learning-oop/ http://processwire.com/talk/topic/2994-learning-php/ http://processwire.com/talk/topic/1927-php-the-right-way/ http://processwire.com/talk/topic/3518-what-ide-do-you-utilize/ http://processwire.com/talk/topic/2124-interactive-tutorial-knockoutjs/ http://processwire.com/talk/topic/4550-debugging-tips/ http://processwire.com/talk/topic/3115-javascript-resources/ http://processwire.com/talk/topic/2076-time-saving-tips/ http://processwire.com/talk/topic/1029-php-54/ http://processwire.com/talk/topic/2492-book-recommendations/ http://processwire.com/talk/topic/3925-project-management-for-developers-how-you-do-it/ http://processwire.com/talk/topic/4164-what-useful-freecheap-toolssoftware-for-freelancerssolopreneurs-do-you-use/ http://processwire.com/talk/topic/4250-whats-your-development-process/ http://processwire.com/talk/topic/4039-what-rss-web-designdev-feeds-do-you-follow/ Bottom line, only you can answer your main question (your topic title)....
    1 point
  27. Just fixed a bug with status getting cleaned. So a unpublished page would get published. It just ignores the status now, which isn't something you want to autosave anyway. (There would have to be some special treatment as ProcessPageEdit does)
    1 point
  28. Here is an experiment! I have just been playing with fonts, colours and using a bit of jquery to add a few icons and so on. I have gone for open sans and made it a bit more corporate looking, without changing the layout. icons are from the font-awesome, which is in Wire anyway. All I have done is hacked at the main-modern.css file and added to the main.js file. So you need to add $config->adminThemeColors = 'modern'; to the config file to see the colour and font changes. There are no structural alterations, just cosmetic. It probably needs more work, but I have really done it just out of interest and a moment of boredom! templates-admin-experiment.zip
    1 point
  29. Most of the instances I've heard of where people lost their work had to do with creating new pages that weren't yet published. For unpublished pages, the issue Pete mentioned is really not an issue at all. Perhaps a setting to limit the auto-saving to unpublished pages would be all that's needed, since that is the time when this module is likely most valuable. I'd suggest this might even be a good default setting. The 3 instances I'm aware of–Mike (cmscritic), Teppo, and Peter–would have all been for an unpublished page (I think) and would have been saved by this module. Nice job btw!
    1 point
  30. I'm not sure there's really much difference in sending them a reset URL or a password, as neither is encrypted once it goes out in an email. Though I prefer to use a unique reset URL, as it's less work for the user. Expiring that URL is definitely a good idea. I don't see it often used, but I also like to limit the usage of that URL or password to the session that initiated the request. Meaning, when you request the password reset, you get a unique token set in the session, along with a timestamp of when it was set (so you can determine when it should no longer be valid). This token can be the same as the unique URL you sent them. When the user comes back from the URL they clicked on in the email, the request is only honored if the token you set in the session is still active and matches with the URL they requested. Using this method provides a better accounting for the fact that email is inherently insecure.
    1 point
  31. Module has been updated for this change (config.entities=false)
    1 point
  32. That module is meant for admin use only and I don't think it's something that could be used on the front-end as it performs checks to make sure that the page is editable, etc. It is also capable of generating new images based on your selections (for resizing) so it particularly safe from a front-end standpoint either.
    1 point
  33. Thanks for the pr Teppo, just merged it!
    1 point
  34. This is on the repeater roadmap, but no ETA on this yet. There are currently a couple of items in front of it, for repeaters: custom labels, custom sort, and collapse settings. Once those are in place, we're going to start at looking for ways to introduce pagination.
    1 point
  35. That $p->snapshot() stuff is supercool! It would be trivial to create "timeback machine" for frontend...
    1 point
  36. I agree with what you've said. In fact, after reading this insanely exhaustive write-up about password reset techniques, http://www.troyhunt.com/2012/05/everything-you-ever-wanted-to-know.html, I think it might be best to send the user a reset link that's only active for a few hours, and have them pick a new password rather than emailing them a temporary one.
    1 point
  37. In your template files, you can always control access just by performing your own checks, and that may be the simplest route here. For instance, you could have something like this at the top of your template file: if(!$page->category->viewable()) $session->redirect('/path/to/login/page/'); Another way to do it is to hook into Page::viewable to perform your own permission checks. The benefit here is that you would keep it all in one place: wire()->addHookAfter('Page::viewable', function($event) { // if it was already determined page is not viewable, then we'll exit and stick with that // this may or may not be the behavior you'd want, but you probably want some "early exit" // thing to check so that you aren't completely disregarding what the existing // $page->viewable() returned if(!$event->return) return; // check that this page has a 'category' field that we are using for permission $page = $event->object; if(!$page->category) return; // we'll abort now if there is no category // if category isn't viewable, we'll say this page isn't viewable either if(!$page->category->viewable()) $event->return = false; // you could also do things like check user roles: // if(!$user->hasRole('some-role')) $event->return = false; });
    1 point
  38. 1 point
  39. One addition to the code Wanze provided: when using urlSegments it is highly recommended to throw 404 when urlSegment is invalid. So in that case: $home = true; if ($input->urlSegment1) { $category = $sanitizer->selectorValue($input->urlSegment1); $c = $pages->get("name={$category}"); if ($c->id) { echo $c->render(); $home = false; } else { throw new Wire404Exception(); } } if ($home) { //Do your homepage stuff... }
    1 point
×
×
  • Create New...