Leaderboard
Popular Content
Showing content with the highest reputation on 09/25/2013 in all areas
-
http://www.michael-wessel.de/ - the website of a german IT service provider - is now powered by processwire. By the way: Some of the most recent work of the agency i work for is and (most likely) will be done using processwire. Me and my colleagues (some of them are registered here, also ) are pretty excited about it's speed, simplicity, community, ease of use and last but not least: the awesome API. So: Expect some more examples (as well as plugins and admin-themes) to come! Best regards Felix7 points
-
A quick tutorial how to create file downloads using pages You will be able to create a new page using template "PDF" (or any you setup), upload a pdf file. You then can select this page using page fields, or links in Wysiwyg. The url will be to the page and NOT the file itself. This will allow to keep a readable permanent unique url (as you define it), unlike /site/assets/files/1239/download-1.pdf, and you'll be able to update/replace the uploaded file without worring about its filename. Further more the file will also have an id, the one of the page where it lives. Clicking those links will download or open the file (when target="_blank") like it would be a real file on server with a path like /downloads/project/yourfile.pdf. You'll be also able to use the "view" action directly in the page list tree to view the file. Further more you'll be able to esaily track downloads simply by adding a counter integer field to the template and increase it every time the page is viewed. Since the file is basicly a page. This all works very well and requires only minimal setup, no modules and best of it it works in the same way for multi-language fields: Just create the language alternative fields like "pdf, pdf_de, pdf_es" and it will work without modifying any code! Still with me? ok PW setup Download folder: Create a template "folder" or "download-folder" with only a title needed. Create pages in the root like /downloads/project/ using this template. Setup the template for the pdf files 1. Create a new template in PW. Name it pdf 2. Goto template -> URLs tab and set the URL end with slash to no. (So we can have /path/myfile.pdf as the URL) 3. Create a new custom file field, name it pdf. Set its maximal count to 1 under -> Details tab. 4. Add the pdf field created to the pdf template. Easy. 5. Create a new "pdf" page using the pdf template under a download folder you created earlier. 6. Give it the title and in the name field add ".pdf" to the end (could also leave as is) Template PHP file for the pdf files 1. Create the template file pdf.php in your /site/templates folder 2. add the following code: <?php // pdf.php if($page->pdf){ wireSendFile($page->pdf->filename); } Done. To see the options you have with PW's wireSendFile() you can also overwrite defaults <?php // pdf.php if($page->pdf){ $options = array( // boolean: halt program execution after file send 'exit' => true, // boolean|null: whether file should force download (null=let content-type header decide) 'forceDownload' => false, // string: filename you want the download to show on the user's computer, or blank to use existing. 'downloadFilename' => '', ); wireSendFile($page->pdf->filename, $options); } Simple and powerful isn't it? Try it out. Some thoughts advanced Create as many file types as you like. It might also be possible to use one "filedownload" template that isn't restricted to one field type but evaluate it when being output using $page->file->ext, or save the file extension to the page name after uploading using a hook. One last thing. You can add other meta fields or preview images to the template and use those to create lists or detail pages. It's all open to goodness. Again all without "coding" and third-party modules. Further more you can use the excellent TemplateDecorator to add icons per template and have a nice pdf icon for those pages. This as a base one could also easily create a simple admin page for mass uploading files in a simple manner, and create the pages for the files automaticly. ImagesManager work in the same way. Cheers3 points
-
This is my first website using process wire. Design was not done by me though. It was old existing website with simple design. just integrated static site to processwire. www.tourntrek.com/demo2 points
-
Actually found the part of code that misses the imagealphablending and imagesavealpha. Submitted a pull request2 points
-
Annakus you type faster then me. I see you type fast and like travel and extreme, you like lessons and wish to improve skills set. We look for these skill in our employees. Do you like restaurant business? Do you know how to make online menu with process wire? Are you interestad in restaurant career with many opportunity for right skill? We offer competative pays, weekly meat boats and more. I awaits your enthuestic response. Regards, Roderigo Sosa2 points
-
A very interesting topic for sure https://www.google.com/search?q=AnnaKus&oq=AnnaKus&aqs=chrome..69i57&sourceid=chrome&ie=UTF-8#q=AnnaKus+how+fast+do+you+type I hope we can stop here.2 points
-
'If' Ryan updates the default PW theme, it would be nice that Soma's Helper Field Links was better integrated . I get the warm feeling that I have the Classical love !1 point
-
Oh, I understand now. Try this: foreach ($page->children("include=all") as $child){ foreach($child as $grandchild){ echo $grandchild->title; } } However there are other ways that might be cleaner. Perhaps you could use a selector to find all those pages like this: $grandchildren = $pages->find("template=template_name"); Or something along those lines, then foreach through $grandchildren Or maybe: $grandchildren = $pages->find("parent.template=template of the unpublished child pages"); So many options1 point
-
This should do it assuming the current page is "Program Overview" foreach ($page->children("include=all") as $child)1 point
-
I think the idea is that you could have a say a "customer" template and assign "phone, address, etc" fields to them, then you could make a shipping group and use the same fields again so the the references are simple clean and consistent. Example $customers = $pages->find("template=customers"); foreach($customers as $customer){ // customer personal info echo $customer->phone; echo $customer->address; // customer shipping info echo $customer->shipping->phone; echo $customer->shipping->address; } I believe Ryan is working on something called ProFields that will allow this, though I believe it will be a payed module (with much more that just this functionality). It'd be conceivable that modifying the repeater for this basic functionality wouldn't be too difficult, though I imagine what Ryan is making will come with an abundance of reason to forgo the effort and just purchase what he creates.1 point
-
The site looks great - nice and clean, simple and bright! I do have quite a few issues I noticed though. Please don't take offense - I think most of them appear to have resulted when you migrated from your local development machine to live. Hope these observations are helpful to you. On this page: http://www.tourntrek.com/demo/nepal/everest-flights/ The image right below "A great experience of mountain flight in Nepal" is broken. The link is to: http://localhost/tourntrek_cms/site/assets/files/1035/nepalmountainflight.jpg - note the localhost link! The entire gallery page is currently broken: http://www.tourntrek.com/demo/gallery/ If I go to submit the inquiry form or the contact, they both return an error. On the hotel reservation form, the popup that says I haven't filled out required fields uses the field names, eg: "phno" - not very friendly for the end user. If I do fill everything out, I get the same error page as the other forms. Also, I think it would be good to have popup date pickers for the to and from date fields, or at a minimum an example of the date format that is required - at the moment it accepts any text you want. I think it would be nice to have a dropdown list of hotel names to choose from, or at least some info on where to find hotels that can be entered in this field. The link to "more info" in the left sidebar is broken I really do hope that helps!1 point
-
@adamspruijt long time no see! still around? Also wanted to note that if you download the module from modules repository I still get 1.0.7, but the newest is 1.0.8!1 point
-
Like the site! It'd be nice if the vertical scrolling photos paused on hover. Also I clicked one at went here where PW threw out an error. Guessing you know about config.php $config->debug = true; ...saved me totally recently when I made a site live and the obscure public-facing error changed into a clear message about a Module needing a PHP resource my hoster didn't have. Congrats on the site!1 point
-
@soma: this is already filed as a Github issue and also fix is posted / committed. Ryan has said that he will work on that. (There is Github conversation and also posts somewhere in the Forums here, but I'm on mobile and Not able to link to it) I think currently it could be that some other parts (language) has higher prio and he is only one man. (?? maybe ??)1 point
-
Hey guys, another green website from the processwire beginners based near munich. This website is our first REAL PW project - and (for us) one of the biggest sites we‘ve ever built. And actually the first one with a CMS/framework that we did totally on our own. So, don‘t be too negative - but don‘t be too positive either. http://www.roha-gmbh.de There are still many things that are not perfect yet, but since we started to design this website in 2011, it really was time to get it "into the wild" now! Many furniture manufacturers still haven‘t sent their best product images, so that is why there are still some lowres images in there. The project chapter needs some work on the photos as well, but that time will come... The site is not responsive yet, because it wasn‘t our main goal in 2011 - so we only wanted to get it working on tablets and phones, but without any special mobile styles. This will come, but that may take a while. The modules we used: - formbuilder - procache - redirects - versioncontrol - sitemapxml I‘m totally glad I found processwire a few months ago, because at first we planned to get that site done with pure static html. Which would not be TOO nice with about 80 html pages and many, many images (about 400). Finally a few "thank you"s to ryan, soma, diogo (for creating processwire and your help in this lovely forum) and to mademyday (for posting this on twitter, which made me read about processwire). Comments are welcome! Of course!1 point
-
Thanks, guys. @dragan: Yeah, thanks. Ms Sell is now married - do you know her? We simply forgot to change the pic, right. Will be done tomorrow. Proofreading would be cool, yes - but you don’t wanna know how many hours we’ve already spent on this project. So no proofreading from us in the near future. We will keep correcting typos as we find them. Therefor many thanks for your reply!1 point
-
No worries teppo - things are always changing - even Flowplayer tries to use mp4 with native html5 players now. Unfortunately server-side conversion is a little tricky. ffmpeg can do it fine with exec calls, but that rules out servers with exec disabled, safe mode on etc. Antti - not sure about using a cloud service - they are both paid services - maybe if there was a free one available? Maybe I shouldn't worry about the format conversion at this stage - just make sure people know to only upload mp4s and maybe just make note that people can download http://www.mirovideoconverter.com/ which is free fore both Mac and Windows versions. I have found it fantastic - clients find it very easy to use - it really is a two click process. Maybe offer the option to also upload a webm version as well (also easy to create with Miro) if they want to make their videos play without a flash container in all browsers.1 point
-
I don't want to complicate things, so until the above is working and understood just ignore this post. If you want the fields to match the theme of the admin, you can use the built in methods to create them. Let's adapt Soma's instructions from here http://processwire.com/talk/topic/2089-create-simple-forms-using-api/ to our example above: <?php if($input->post->submit) { $thought = new Page(); $thought->parent = $pages->get("/thoughts/"); $thought->template = "thought"; $thought->name = time(); // page name can be a timestamp, this will make it unique $thought->title = substr($input->post->thought, 0, 30); // let's make the title match the first 30 characters of the thought $thought->body = $input->post->thought; $thought->save(); // confirmation message with link to edit the new thought echo "<p>A new thought was created. Edit it <a href='{$config->urls->admin}page/edit/?id={$tweet->id}'>here</a>.<br>Create a new one?"; } //create a new form wrapper $form = $modules->get("InputfieldForm"); $form->action = "./"; $form->method = "post"; $form->attr("id+name",'new-thought'); //create a textarea input $field = $modules->get("InputfieldTextarea"); $field->label = "Thought"; $field->attr('id+name','thought'); $field->required = 0; $form->append($field); // append the field to the form //the submit button $submit = $modules->get("InputfieldSubmit"); $submit->attr("value","Submit"); $submit->attr("id+name","submit"); $form->append($submit); //render the form echo $form->render(); ?>1 point
-
Here is another thread where we talked about frameworks. If size and flexibility matters, PocketGrid could be a good choice? It's only a grid, nothing more. Very minimal and seems to be very flexible. Looks like you can do anything with it (like doing with PW). But haven't tested it.1 point
-
I think Ryan means this: $pages = wire('pages')->find("template=property"); foreach ($pages as $page) { $page->images->deleteAll(); $page->save(); $page->images->add("http://images.com/image1.jpg"); $page->save(); }1 point
-
Good call diogo! Ideally the admin theme should be shared too. Maybe something more like this then: /wire/ /shared/ /modules/ /templates-admin/ /site/ /site-example1/ /site-example2/1 point
-
At least in ProcessWire, the tree is far more scalable than a linear bucket system like in EE. If it helps to conceptualize, think of ProcessWire as having a tree of buckets. This is the natural way the web works. If a single-level linear bucket system suits your needs, then you can do this in ProcessWire. But there's a good chance you can do much better. So I would argue that your statement about buckets vs. trees is backwards. In terms of scalability, a tree will take you much farther. But it does require that each branch in that tree have the ability to function as an unlimited bucket. This is exactly what ProcessWire does. Also consider that websites have hierarchy by nature, need and design. That hierarchy is extremely useful and powerful, and should be embraced. Websites lacking hierarchy would be limited, for obvious reasons. When working with a linear bucket system, you are always mapping a hierarchal system to buckets. This has always struck me as completely unnecessary, complicated and unfortunate. This mapping and conversion is ultimately a side effect of having to reduce a powerful system of tree hierarchy (upon which the web is based) to a less powerful bucket system. But if the system embraces the natural hierarchy of the web, then no mapping or conversion is necessary. You are working with the tree either way. The question is whether the system is embracing and using it (like ProcessWire), or mapping it to a more limited system of linear buckets. I don't have enough experience with MODX to know what the "resource tree shortcoming is", but am guessing it's something to do with pagination that others have mentioned before? I know that MODX has a reputation for being quite scalable, so would guess that they just have a different approach to managing that scale. But once you have worked with trees, and really experienced the benefits, it's very difficult to go back to buckets, IMO. The words "tree" and "shortcoming" simply do not go together. As for keeping more than one CMS in your toolbox, I think that's always a good idea. It sounds like MODX and ProcessWire have common ground in terms of philosophy, and these two would be good to have in your toolbox. I don't think I would bother with keeping a bucket-based system in your toolbox, except for perhaps WordPress, which can be handy in the right situations (like one-off blogs when client has very limited budget). ProcessWire is pretty much infinitely scalable, within the boundaries of a server, SQL database and file system. As scale increases, you do have to practice care in how you use the API. ProcessWire gives you a lot of power, and will fill up your memory if you tell it to. So you have to use common sense when using the API at the large scale. For example, an API call like $page->children(); might be referring to a million pages. Do you really want to load and display links to a million pages at once? (probably not). Does the server have enough RAM to keep a million pages in memory at once? (not likely). So you accommodate scale by specifying limits and using pagination, like $page->children("limit=50"); This is something you don't necessarily have to consider at the smaller scale. But I think it's a good practice to design and develop every site as if it could grow infinitely. Do you need to learn PHP? Not any more than you would need to learn the {tags} from another system, like EE. The time investment and scope of what you'd have to learn would be about the same, maybe even less with ProcessWire. In fact, you can do almost anything in ProcessWire by simply learning how to use just two API variables: $page and $pages, and knowing what a PageArray is. There are a few bonuses you get from learning PHP vs. a tag system though: Whatever you learn about PHP is something you can take with you, beyond ProcessWire. The more you learn about PHP, the more you can do, both inside and outside ProcessWire. Meaning, the environment can grow with you, when and if you want it to. Whereas, at some point, you'll start hitting your head on the ceiling in a {tag} environment. ProcessWire's API is identical regardless of context. You can be in a template file, command line script, plugin/module, etc., and everything works the same. In a {tag} environment, if you want to grow and learn plugin/module development, you'll be starting from scratch. In ProcessWire, everything you learn applies throughout the system in any context. It's only a small step to go from building templates to building modules. In {tag} systems, it's a canyon. In fairness, while you don't need to know much about PHP to effectively use ProcessWire, you may indeed need to learn more PHP to accomplish some of the things you've set out to do: paid membership and access, member signup forms, etc. ProcessWire is a tool more than a turn-key solution for these particular needs. While they aren't difficult to accomplish, you might find yourself doing more on the code side than you would with a system that has turn-key solutions for membership sites. If your project budget/timeline doesn't give you the room to learn and build these things, you would want to investigate more ready-to-use solutions for these. But I think you would do well to make friends with and use ProcessWire either way.1 point
-
Hi there and welcome to ProcessWire. I wouldn't worry about scalability as it's been tested with at least hundreds of thousands of pages and your first limitation will be with your server to serve content to what I would assume be millions of visitors each month. There's not a great worry about backend performance as features like pagination are actually built into the tree (if you open a parent element with 100 children for example, it will display the first X amount with AJAX pagination for the next page and so on). In terms of database performance, everything is nicely indexed as well. The trick with ProcessWire is that whilst everything is a page on the surface, a page can be anything you want it to be and it certainly adds to the flexibility over some other CMS'. A lot of the questions I had when I moved from MODx to ProcessWire revolved around "can I do X in ProcessWire" as every feature I had built into a previous MODx site seemed to take a lot of effort with some really long snippets and some complicated PHP, but ProcessWire not only let me replicate every feature but allowed me to do it in about a third of the code, if not less. The beauty is that whilst there is some PHP to learn, the API is jQuery-inspired and you shouldn't have to write a single line of SQL as the sensible API calls allow you to do things like this, which whilst requiring some PHP knowledge, leaves you with code that is easy to understand if you have to tweak it months after writing it: <?php /* Let's assume we have a music site - there's a section for artists, under artists we have albums and under albums we have tracks. All are pages (artists would be title, images, body - albums similar and tracks could contain title, length and writer(s) if you like just to give you a rough idea of flexibility - I'll keep the code simple though. */ // Iterate through the artist pages, echo the artist title and body field foreach ($pages->get('/artists/')->children as $artist) { echo "<h2>$artist->title</h2>"; echo $artist->body; // Now list all their album titles and body field foreach ($artist->children as $album) { echo "<h3>$album->title</h3>"; echo $album->body; // Finally list each track on the album echo "<ol>"; foreach ($album->children as $track) { echo "<li>$track->title</li>"; } echo "</ol>"; } } My MODx/PW relationship started out as "let's look at another CMS" and I was quickly converted to be honest. It's easy to understand once you get past the relatively small learning curve and we have folks here who consider themselves beginners but who are coming up with some amazing site profiles and modules. One module which I think might be of interest to you in terms of scalability on the front-end is ProCache. If you have a lot of static pages on the site then that would be invaluable as it caches and serves pages as pure HTML with no PHP or mySQL queries (for member-driven sites it could easily be used to display pages to non-logged-in users rather than touching PHP or mySQL, so anonymous guests get a lightning fast performance and don't add much load to your server). Past that, there are a few other caching options available to you either in the backend or things like MarkupCache (if you have a drop-down list on the site for example that can be updated by adding a page in the admin - a new Album maybe in my above example - then you can use MarkupCache to build that list once, cache it for X hours and only rebuild it after that time. There are other caching options too though so it can be cleared on page save etc). Sorry, my train of thought is meandering a bit this morning, but the short answer is "yes, you should spend some time making friends with ProcessWire" http://processwire.com/talk/topic/2675-processwire-pro-cache-now-available/1 point