Leaderboard
Popular Content
Showing content with the highest reputation on 07/08/2014 in all areas
-
8 points
-
4 points
-
I just finished this article and wanted to post it here as I'd love to get some feedback from you guys in the comments of the article explaining why you work with ProcessWire. There's a great chance here to help spread the word a bit more for this awesome CMS we all love. If you have five minutes, please share your thoughts in the article comments. I'd appreciate it. ProcessWire vs WordPress3 points
-
I was trying to get a PHP dev job for creating a CMS type app with wordpress so I did a bunch of google searches to learn more. (I develop in a Java web framework) After googleing about PHP frameworks I came across Laravel which seemed promising. Then as I googled more about CMS and wordpress and laravel some how I came across PW. It seemed like a nice platform to start one and maybe I would integrate a framework into it, but soon I found that it's really all you need to create cool web apps!3 points
-
@Adrian. Migrating WP sites like a boss now Thanks for the fix, that seemed to do the trick, I have not tried it thoroughly yet, but I got past the previously issue and content is being created.3 points
-
This Textformatter allows you to designate areas in a single textarea to be converted to a collapsed accordion list. The markup pattern for this module is based on the Pagination Textformatter module with the idea that they could be interchangeable. Github Page Simple Demo To define an accordion item Put 5+ hyphens '-----Your Title Here' on a single line (within paragraph tags) to specify a title for the accordion item. The paragraphs below will be collapsed. This is the same idea as the Pagination Textformatter, however titles are not optional. If you just put the dashes, the item with be automatically titled "Untitled". To end an accordion To end a group of accordion items and return to regular textarea content, put exactly 5 slashes on a single line '/////' (within paragraph tags). This is only needed if you want to end collapsed content and return to regular textarea content. Notes I've been using this on a production site for nearly a year, but before Ryan released the Pagination Textformatter it was using with a totally different markup pattern to designate the accordion items. It should be pretty stable, but consider it a beta release. Markup pattern inside a textarea (Nearly identical to the Pagination Textformatter) ----- Accordion Item The paragraphs beneath each accordion item are collapsed by default and open when you click on the title specified above. You can use multiple paragraphs, and any other content allowed in the textarea. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec odio. Quisque volutpat mattis eros. Nullam malesuada erat ut turpis. Suspendisse urna nibh, viverra non, semper suscipit, posuere a, pede. ----- Another Accordion Item Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec odio. Quisque volutpat mattis eros. Nullam malesuada erat ut turpis. Suspendisse urna nibh, viverra non, semper suscipit, posuere a, pede.Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec odio. Quisque volutpat mattis eros. Nullam malesuada erat ut turpis. Suspendisse urna nibh, viverra non, semper suscipit, posuere a, pede. ///// The 5 slashes above signify an end to the accordion group above. You only need to specify the end of a group if you want to return to regular textarea content. You can continue to use the same pattern to collapse content into accordions as many times as you wish. Results in the following markup: <dl class="accordion"> <dt> <a href="#accordion-item">Accordion Item</a> </dt> <dd> <p>The paragraphs beneath each accordion item are collapsed by default and open when you click on the title specified above. You can use multiple paragraphs, and any other content allowed in the textarea.</p> <p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec odio. Quisque volutpat mattis eros. Nullam malesuada erat ut turpis. Suspendisse urna nibh, viverra non, semper suscipit, posuere a, pede.</p> </dd> <dt> <a href="#another-accordion-item">Another Accordion Item</a> </dt> <dd> <p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec odio. Quisque volutpat mattis eros. Nullam malesuada erat ut turpis. Suspendisse urna nibh, viverra non, semper suscipit, posuere a, pede.Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec odio. Quisque volutpat mattis eros. Nullam malesuada erat ut turpis. Suspendisse urna nibh, viverra non, semper suscipit, posuere a, pede.</p> </dd> </dl> <p>The 5 slashes above signify an end to the accordion group above. You only need to specify the end of a group if you want to return to regular textarea content. You can continue to use the same pattern to collapse content into accordions as many times as you wish.</p>2 points
-
I have a moderate work load of sites that I develope. Some times I get more than I can handle. Some times I have more than my current skill level can handle. I'd like to expand my sole trading business to work with some more designers developers. Nothing too heavy, but I'd like to have on board some people that would like to take on jobs and be featured on my website as a developer. In return, each of the people should be able to feature each of the developers on their own website as their virtual company. The idea being that the local contact can arrange face to face meetings, specs etc and any of the remote workers can take on parts or all of the projects. I'd be very interested to know if anyone would be interested in this concept, what they typically expect as payment and any other thoughts. Feel free to reply to this topic for public forum chat or pm. David2 points
-
You can even show multiple fields from same page relation: architect.title architect.age etc.. And these go into "Table fields to display in admin" from "Input" tab of field settings.2 points
-
2 points
-
To create a sitemap.xml you can use Pete's Sitemap XML module, or you can create a template file and page to do it for you. This post explains how to create a template to do it for you. The benefit here is that you may find it simpler to tweak a template file than a module, though either is a good solution. Here is how to do it with a template file and a page: sitemap-xml.php <?php namespace ProcessWire; /** * ProcessWire Template to power a sitemap.xml * * 1. Copy this file to /site/templates/sitemap-xml.php * 2. Add the new template from the admin. * Under the "URLs" section, set it to NOT use trailing slashes. * 3. Create a new page at the root level, use your sitemap-xml template * and name the page "sitemap.xml". * * Note: hidden pages (and their children) are excluded from the sitemap. * If you have hidden pages that you want to be included, you can do so * by specifying the ID or path to them in an array sent to the * renderSiteMapXML() method at the bottom of this file. For instance: * * echo renderSiteMapXML(array('/hidden/page/', '/another/hidden/page/')); * */ function renderSitemapPage(Page $page) { return "\n<url>" . "\n\t<loc>" . $page->httpUrl . "</loc>" . "\n\t<lastmod>" . date("Y-m-d", $page->modified) . "</lastmod>" . "\n</url>"; } function renderSitemapChildren(Page $page) { $out = ''; $newParents = new PageArray(); $children = $page->children; foreach($children as $child) { $out .= renderSitemapPage($child); if($child->numChildren) $newParents->add($child); else wire('pages')->uncache($child); } foreach($newParents as $newParent) { $out .= renderSitemapChildren($newParent); wire('pages')->uncache($newParent); } return $out; } function renderSitemapXML(array $paths = array()) { $out = '<?xml version="1.0" encoding="UTF-8"?>' . "\n" . '<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">'; array_unshift($paths, '/'); // prepend homepage foreach($paths as $path) { $page = wire('pages')->get($path); if(!$page->id) continue; $out .= renderSitemapPage($page); if($page->numChildren) $out .= renderSitemapChildren($page); } $out .= "\n</urlset>"; return $out; } header("Content-Type: text/xml"); echo renderSitemapXML(); // If you want to include other hidden pages: // echo renderSitemapXML(array('/path/to/hidden/page/'));1 point
-
A very simple tip, but that might be useful for someone that didn't think of it... This is what I usually do if I want to change something on a live site. if($user->name!='diogo'){ // live code }else{ // my new code } Like this I'm the only one that sees the changes. More examples: // test new javascript. do the same for styles <?php if ($user->name!='diogo'){?> <script src="<?php echo $config->urls->templates?>scripts/main.js"></script> <?php }else{?> <script src="<?php echo $config->urls->templates?>scripts/main-dev.js"></script> <?php }?> // test new head file if($user->name!='diogo'){ include(head.inc); }else{ include(head-dev.inc): } and so on... edit: corrected the first block by Nik's suggestion1 point
-
Hello! I've now got more than a handful of websites running ProcessWire - some running from master and some on development. As Development branch sometimes moves rather fast and I want to keep certain sites up to date with those changes, I wanted to make the upgrade process a bit quicker and smoother if I'm going to be doing it more often. I made a quick and dirty bash script to handle this for me and thought I'd share it for others to make use of. I've only tested it on the hosting platform I use - Vidahost Cloud - which is Linux-based and has Git installed. So you'll probably need that sort of environment too Get it here: wire-upgrade.sh. The basic concept is as follows: Clone ProcessWire dev or master branch from Github to a temporary directory. Move the wire directory from the repository into the current directory named wire.new Rename wire to wire.backup.... Rename wire.new to wire Remove the temporary directory from step 1. The script should be ran in the site's root folder - the same level as the "wire" directory. Just specify which branch you want to upgrade to (master or dev) as the parameter (see comments at the top of the script for an example). My shell scripting skills are a bit on the rusty side these days, but I think I've got most bases covered. Any feedback, improvements, comments or suggestions are very welcome1 point
-
Here is a website I nearly finished(Still waiting for decent photos from client for gallery) for a hairdresser in Slovakia so it's all in Slovak. http://www.milujsvojevlasy.sk/ This is the first site that I used profields. I used pro fields table on the price list page: http://www.milujsvojevlasy.sk/cennik/ Using Profields table made it really nice and simple for the client to update prices in the admin. For the booking system I integrated a separate script. Used my own grid system / framework http://www.cutegrids.com to make it responsive. and of course built using the fantastic Processwire and Profields.1 point
-
Think you could make your own little "cart" just a littly form with a hidden field for storing the page->id or if this form is on the same page you want to add to the cart you don't even need the hidden field. if($input->post->addtocart && !$cart) { $cart = new Page(); $cart->parent = $pages->get(5771); $cart->template = 'cart'; $cart->title = 'session_id()'; //for example $cart->save(); $cart->of(false); $cart->items = $pages->id; //not a hundred percent sure right now but should work (think I've done it like this already) } } items field would be multi page fieldtype you would then include this "$modules->get('Pages2Pdf')->render();" into the page template you want to generate the pdf's from on the cart page you add a link for the customer, think it should work when you just link to one of the pages and append ?pdf=1 to the url, which will then create the pdf create a new template under /templates/pages2pdf/ with the same name as the template you put the "$modules->get('Pages2Pdf')->render();" in in this template you iterate through the pages in the cart like you would on a blog page or similar and output everything you need for me the final output worked only with heredoc syntax, seems that proper double quotes are needed by tcpdf (you could echo as "normal" but then you would need to escape the double quotes) hoffe es ist einigermaßen verständlich und klappt (hope it's understandable and works)1 point
-
I prefer open source software but i learned 3d max in my college. If you want anything, just whistle. I will upload more graphics soon. Gracias por la bienvenida1 point
-
3D Studio Max ? 3675 $ - unghh - can´t afford that kind of super stuff Welcome to the pw club, we like 3d max users, pw needs some pro skinning.1 point
-
I would use page fields and a seperate pagebranch to count the votes. Polls setup | polls (template) |_ question (template) |__answer (template) Votes setup | results |_ result (template with page field: user and a page field: answer) In this setup you can: Get all the votes Get votes by question Get all the votes with a specific user Offcource it's possible to place the results under the answers directly, but I prefer to keep those things seperated if you want to extend it later with multiple questions or such. You won't hit performance issues with these kind of numbers.1 point
-
Hi Mike, The link: "the amazing Ryan Cramer" doesn't link to a page. Thanks for the beautiful article !1 point
-
@Craig: that's a good idea and the script looks OK to me. Just some quick observations: This doesn't seem to replace index.php, which does sometimes change (though very, very rarely, so perhaps not a problem at all) Same thing with .htaccess, which could be even more problematic, since each site may have custom settings here (diff+notice?) Also, if you're hosting multiple PW sites in the same location, generally speaking I'd suggest shared wire directories. Symlinks are good for that. This is what I've done to make upgrading a larg(e/ish) amount of sites at once feasible. Anyway, great to see how others are solving this1 point
-
If you look for CSS “regressions”, my first thing to check out would be if all floats are cleared properly, if there's any “strange” positioning involved. Maybe to test it, temporarily deactivate CSS altogether or very selectively for the pagination using the browser's dev tools. If the pagination links are there and the markups looks the same, it's very likely some CSS issue.1 point
-
Mike, Thanks for the article. I haven't finished reading it yet, but it is looking good. I am still on page 1 and noticed this important typo... "...and why we prefer the latter" should be "...and why we prefer the former"1 point
-
Ok. We just launched our new website today, of course now running on ProcessWire. A long journey with many iterations and somewhat experimental. Still a work in progress, as much as never finished. There's a lot of inter-linkage going on between content news, projects and competence pages. Modules worth mentioning: TextformatterAutoLinks Markup RSS Feed http://update.ch (IE < 9 not supported, sorry. Old Androids may experience strange things)1 point
-
hello, everyone! been an active reader in the processwire community but never felt like i had anything to contribute. ufortunately, i still don't feel up to speed to contribute much to the community but i thought i'd share a new site. i used ryan's blog profile as a base. it's still not 100% finished (probably at about 90% on the dev side) and the blog hasn't been posted to yet. any opinions/critiques, good or bad, are appreciated. http://revengeofthecakeball.com/ many thanks! alex1 point
-
I totally agree. It's not even my own wish, but I hear it more often in the past year since more and more people are considering PW as an alternative. I think such a feature would be a good reason for CMS switchers and/or a good marketing thing. You know, like "look how flexible it is, you can build your page even in the backend very individual with drag&drop and eye candy and such stuff... blah blah" ;-) PageTable is great, repeaters are great, all the new pro fields and of course all your modules are great. The flexibility is endless. You know that, I know that, every experienced PW user knows that. But - as I said - for marketing reasons such at a first glance flexible features or on the other hand the learned and for several years used solutions like a central media manager would be nice. They could be built on top of the PW core without losing the PW paradigms. People are not interested in how something works as long as it works for them1 point
-
There's a new version available. Now supporting file versioning to handle the caching issues of CloudFront. There's an option on the module configuration that will automatically rename the uploaded files by inserting a timestamp in the file name. This way all the files have unique names and that will make it easier to replace old files already cached by CloudFront (something that can be a huge PITA as many CloudFront, or other CDN systems know well).1 point
-
Hello community My new website is nearly finished, I used: processwire (of course) dead simple grid modules: form Builder , XML SITEMAP1 point
-
I Googled "alternative to _____" - I can't remember which bloated CMS I put in that line but that's about as useful as Joomla/Wordpress/Drupal has ever been for me. I had been sick of these CMS's for quite some time and PW instantly became a breath of fresh air. PW is great, but this forum is also incredibly inviting and polite which made making my mind up an even easier thing to do. Reading through the explanations and posts of one member helping another made me realize that there was something different (besides being awesome to use) about PW. Thank you Ryan and contributors!1 point
-
Totally untested, but how about: business|service|customer={$page->customer}|{$page->service}|{$page->business}1 point
-
1 point
-
I don't have a static IP and I use a special string within the UserAgent, for example: RewriteCond %{HTTP_USER_AGENT} !^.*(b346a0b6fe9d440d68e07c9619c0ba0a).*$ This way (with switching UserAgent of the browser) I am able to look to the site as admin and like the public from the same IP.1 point
-
The whole idea of a maintenance mode is something to be careful with on a site that depends on any kind of search traffic. It's not a great idea to make a habit of it, that's for sure. So if you need to put a site in maintenance mode, try not to do it for long. Personally, I have never had the need for a maintenance mode. Though there have been a couple times where I was pushing in a major update to a site, and I temporarily added the following to the top of the /index.php file: die("Go away! We are trying to upgrade the site.");1 point
-
The reason I like these kind of snippets so much is the freedom they offer. If you want to show the dev page to anyone that is logged in, change the conditional to: if($user->name='guest') If you want to give a special url like domain.com/?version=dev change it to: if($input->get->version!='dev') with the url version you can also make all the links work wth sessions like this: if($input->get->version!='dev' OR $session->version != 'dev') and inside the else: $session->version = 'dev';1 point