Leaderboard
Popular Content
Showing content with the highest reputation on 06/08/2012 in all areas
-
I've been working on a blog profile that we can have as an installation option for ProcessWire. The goal is to have a profile that someone could download and setup a pretty nice website/blog without having to touch any code (i.e. it's ready-to-run and populate). I'm hoping that this is something that may help us to grow our audience beyond the web development community. The requirement is that it must be as easy (or easier) than WordPress, both to install and use. This profile is also for web developers, as it's a blog profile ready to be styled and enhanced -- a good starting point. It uses the Zurb Foundation CSS framework, so it is fully responsive and mobile-ready. It's not much to look at now, but should be fully functional. I'm making progress and wanted to post a preview. The content you see here is from one of my client's blogs and the content is just here to test things out. http://processwire.com/blogtest/ I'm hoping to get this up on GitHub next week. I've never really done much blogging, so am seeking feedback on what others would suggest to make the blog profile as good, powerful and simple as it can be. Right now it's pretty much a generic Zurb Foundation "look and feel", so it probably needs at least some color tweaks and integration of some masthead photo(s) or something.6 points
-
I started building responsive sites more than a year ago, and like everyone else I quickly realized that the weakness of that new method / philosophy is serving the same image to all devices, from mobile to desktop. Matt Wilcox's Adaptive Images (server-side resizing) works great, but like JeffS above, I'm interested in optimizing content for device groups, i.e. content optimized for mobiles, tablets, desktop and even smart TVs. I've come to the conclusion that to do this efficiently, device detection has to be done on the server. There's even a buzzword for this new technique: RESS, or Responsive Design + Server Side Components as coined by Luke Wroblewski. WURLF is the most famous device detection database, and there are some good tutorials to get you started such as NetMagazine's, but it seems to me way too complicated for simple projects, and WURLF has turned into a commercial project anyway. I've been looking at two recent projects that seem very promising: Detector Categorizr Categorizr is by far the simpler approach, and I like how it turns the traditional and much-decried User-Agent sniffing on its head: it assumes that whatever is not detected as desktop and TV (which are relatively easy and safe to detect) is a mobile device. In other words, it's a mobile-first based device detection. Clever. Here's a test page I created using Categorizr and that you can check on your mobile, tablet, or computer that will show different content according to the device used (disclaimer: not fully tested): http://www.arqyestud.../categorizr.php Combining this server-side detection technique with the versatility and power of PW could make for very powerful and easily-maintainable 'hybrid' responsive sites. What do you guys think?2 points
-
Ajax Search 1.1.0 There was a request for a ajax live search. So I went and created a simple module. Added in 1.1.0 * added key support for browsing results with arrow down and up. * added escape key to close results. * added close results on click outside http://modules.proce...es/ajax-search/ From the readme: This module progressively enhances the search form to an ajax live search. It will perform a search like you would use the form normally, and returns the output of the search page. So the search will still work without js enabled. There's some basic styling attached to this module in the "styling-example". You can use it to get started. See readme in there. Setup the search.php So it works almost out of the box with the basic install profile of ProcessWire, you only need make a minor change to the search.php template file to only return the content part (results) on a ajax request. To get the ajax search only return the content, open search.php and change the output on the bottom to this: ... if(!$config->ajax) include("./head.inc"); echo $out; if(!$config->ajax) include("./foot.inc"); Module Settings It comes with some module options to define various settings regarding the search form. Following a list with the defaults. Minium length = 3 min length for starting ajax request Close button text = 'close' close button text ID of searchform = #search_form if you have a different search form id,class ID of input = #search_query if you have a different search input id,class Query name = 'q' this is the default param name as_query_url = '' if left blank the script will take the action of the form Any help testing this module is appreciated. If you have any questions or problems setting this up feel free to ask here. Also feel free to use this as a starting point for your own, or take out the script to implement it differently. It's quite simple and can be adapted really quickly.1 point
-
1 point
-
I second Jeff's opinion of CloudFlare. I've been using the free version for a couple of months on 3 different websites, and the bandwidth saving + speed improvements do make a difference. Threat protection is a nice bonus too, and seems to work really well according to the statistics they provide. The $20-a-month pro version is tempting as it adds SSL encryption and two brand-new server-side image optimization services: what they call Mirage and Polish. Polish "applies 'lossless' or 'lossy' image optimization to reduce your image sizes by 35% on average". That's nice, but a program like ImageOptim does the same thing: http://imageoptim.com/ What really looks amazing is Mirage which "automatically resizes images for optimal display based on the screen size of your visitors' device." I haven't tried since I'm on a free plan, but that kind of server-side automatic resizing looks like the perfect solution to optimize loading time on mobile / responsive sites.1 point
-
Well the great thing about PW is your driving the output. Look at your template. It can pull content in from anywhere via the API. You can add whatever fields to a template you need, then write the logic using standard PHP and the easy to leverage PW API. So rendering could be simple or more complex based on your business needs. Sometimes the hardest part a flexible framework is deciding what your logic needs to be rather than implementing it. Look at code examples sprinkled through the forums and the API and PW will start to shine before your eyes.1 point
-
FYI anyone else looking to implement Ryan's solution for authenticated ProcessWire pages: you can make the request via cURL and pass the cookies in along these lines: $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, "http://$_SERVER[HTTP_HOST]/path/to/content"); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_COOKIE, $_SERVER['HTTP_COOKIE']); $content = curl_exec($ch); BIG CAVEAT: set $config->sessionFingerprinting to FALSE, or the code above will log your users out.1 point
-
Ryan, if you ever need some king of slogan for PW, I suggest: "It's just too easy." Of course, thanks to soma, this foreach($page->children("include=hidden") as $child) sitemapListPage($child); does the trick. Boy, I wish I had known about PW way, way earlier.1 point
-
Small issue with this module: It assumes that jQuery is referenced in the <head> of the html, which quite a lot of people (including me ) don't do. For perfomance reasons (and because it's the HTML5 boilerplates default), I like to reference jQuery before the closing </body>. I assume it would suffice to edit the FieldtypeGMap.module like this: $event->return = str_ireplace("</head>", "$css\n</head>", $out); $event->return = str_ireplace("</body>", "$js\n</body>", $out); (haven't tested it yet), but that's of course not safe in case of an update to the module. It would be more flexible to have this as an option in the module. Also, the script call in the content area should probably go there also. I'm fine with adding a Google Map manually if this is not feasible for the module as a general option, I just thought I'd mention it.1 point
-
Isn't the default sort oldest first? Then you should get newest first just reversing the order (of course assuming you haven't changed the order): $images = $page->images->reverse(); Other WireArray methods: http://processwire.com/api/arrays/1 point
-
Hi Diogo, thanks for your suggestions. I've just updated the github repository (https://github.com/mcmorry/PW-language-localized-URL) with the last changes from Soma. Almost all your suggestions has been implemented.: $page->url instead of $page->mlUrl() the use of id based on the module settings support for urlSegments. Thought the segments are not automatically readjusted. (on this I have to check better) I'll wait for your feedback.1 point
-
Another update I worked on I commited just now. The theme has now a modules navigation dropdown. It shows all modules by section. Uninstalled modules have only a anchor link to the modules page, it will scroll to the module. If you're already on modules page it will also scroll to the module. All installed modules will get you to the edit screen of the module. Configurable modules are marked with the gear icon. Enjoy.1 point
-
1 point