Leaderboard
Popular Content
Showing content with the highest reputation on 05/23/2013 in all areas
-
If you are deploying on LAMP, then set up a LAMP stack in a virtual machine. You can get VMWare Player for free on Windows and install Linux very easily. In my opinion it is better to fully understand the tools you are using and understand how to setup the LAMP components etc. It also makes it much easier to replicate the live environment if you can at least try to have the same version of Apache, PHP etc. I used to use WAMP and XAMP out of laziness, but it can cause problems. For example, windows (at least back then) is not case-sensitive and Linux is, so you have potential for problems with filenames right there. With a pre-packaged stack you lose control and it can be harder to locate problems, fix bugs etc. I understand why some people use these things when they start programming, but if you are serious about doing LAMP development, you will need to learn this stuff sooner or later. I have not once regretted teaching myself to do command-line linux, install packages, set up PHP etc. It will pay off in the long term. And once you know it, you can spin up virtual servers on the cloud for all kinds of purposes very easily, and maintain total control.3 points
-
Don't know if I understand your needs right: Under Setup -> Templates -> URLs is the option should page URLs end with a slash? Or maybe you can redirect the old pageURL to the new one via .htaccess EDIT: I think redirect can be done like this: Redirect 301 /store_item_detail.cfm http://example.com/new_pw_page_for_that/ Another way would be to use ModRewrite, but with Redirect 301 (permanent) you also tell google and other crawlers that they can update their cache with the new URL.3 points
-
ProcessWire Online Installer Since there's now a shortcut to download latest stable PW http://grab.pw , I created a simple helper PHP script you can upload to your server to download and extract a new PW installation. Upload this php file to the server where you want to install latest ProcessWire Go to the browser and call this script. It will download and extract ProcessWire files. Once done successfully it will redirect to the installer. Downloaded zip the grabpw.php will be removed. If anything fails, make sure permission are correct on server and you remove files manually in case. I tested this on my local XAMPP (Mac) install and on some of my account on a ISP. Also I took some methods to download and extract files from my ModulesManager which seems to be "reliable" so far. Download The script can be found on github: https://github.com/somatonic/PWOnlineInstaller Why Just because it's cool. There's many ways to accomplish this task if you have ssh access for example using shell. Just wanted to have this alternative and maybe people find this useful too. @ryan. Do you think you could provide an latest dev shortcut url too?2 points
-
This module is available on the modules section now http://modules.processwire.com/modules/process-admin-custom-pages/ mods.pw/4Y2 points
-
I think it's interesting personally. I think often as web designers we like to show off our content but we struggle at pushing our own sites towards new sales, they serve simply as a reputation check. This is fine but their approach is more like a product driven site. They're telling you step by step what you get then try and get you to signup. An interesting one for sure.2 points
-
I was checking out the site last month. Seems cool to me. The service stands out because they are communicating great value at extremely low prices. I have colleagues who will barely build you a stock WordPress site for $5K, and there is practically zero focus on any kind of marketing or user decision-making. Usually there's also more to the story that you can't see on the website. Examples: Yes, we advertise $5K / 2 weeks but most of our clients are just loading us up with ongoing work that is much more expensive. We probably couldn't take on your project. Yes, we advertise those things, but we recommend that you do X, which is our cool new thing, just a bit more expensive. OK, here is your $5K / 2 week design! It was fun to work on. The results are looking great so far! Here is a list of things we think we should help you do next. The cost is based on some multiplier of the original cost. Yes, we do all that, but this is kind of a side gig for us. Once it gets really serious, our prices are going to be up there with everyone else's. Thanks for contacting us--right now we are booked 6 months out. If you're willing to pay more, however... Thanks for getting in touch. For your special project we think we'd approach this as a consultancy. We think we can do X,Y, and Z for you. Let us know if you can afford a weekly rate of $X. If so, I think you'll like the results... The value they are communicating, and their prominent voice, will probably give them the ability to pick the best from lots of different potential clients. So they can say things like the points above to people who have deep pockets and deadlines, and it works out fine. It can be weird and depressing to see this stuff as a fellow web designer, especially if you have ever charged more than that for a site that is considerably less hip, but they must have realized that most web firms are very hesitant to write down a cost and time, especially if they do amazing work. So they stand out based on that alone. But as I said above, there is usually more to the story. They also develop proprietary widget-type stuff that is pretty neat, so it's not just great Photoshop work. There's also the concept of the "smart site" and the various qualifications you jump through as you get ready to get in touch with them. They want a specific type of person who has either already bought in or is willing to be very flexible. Overall I think there's a lot to learn from this approach, but it can't really be taken at face value. I'd be interested to hear what they're up to right now.2 points
-
Does the presence of spam on the forums mean we are becoming more popular? I've encountered a couple this week. Either way, I think PW is becoming more popular. My take, it's more popular in Europe than other regions?1 point
-
I am looking for a developer with experience using both Shopify & ProcessWire. US-based developers only for this project, please. Please contact me at: marc at marccarson.com; feel free to mention any experience you have with Shopify, PW, & e-commerce. Budget for this developer's work on the project would probably be north of $5K but could change as we discuss the client's needs prior to submitting a proposal. Thanks.1 point
-
Today I want to present my personal website with a new design and my tumblr posts (in "Blog" section) directly imported into ProcessWire: Nico.is What do you think?1 point
-
I found creative way to fix the problem! HTML inspection in Chrome over empty raws has shown that there are empty <a> tages which I manually filled with qwerty text. After that page became accessible with all edit/move/delete links near it. )))1 point
-
You could go to phpMyAdmin, search for all Pages that have an empty title and give them a title. Or note the ID and then just enter this as ?id=xxx when editing another page. You find the titles in the table field_title under data. Edit: Soma's solution is simpler Cheers1 point
-
Yes. Then go to the template of those pages and enter name as the alternative list label under advanced tab.1 point
-
I think it's probably just whatever you find most useful in your situation. But my preference is usually to sanitize on first access, unless I potentially need an unsanitized version to determine how it should be sanitized (which might be the case here). You could sanitize first with pageName (which sanitizes to [-_.a-z0-9], and then use ctype_digit to determine if it's an integer or string: $value = $sanitizer->pageName($input->post->something); if(ctype_digit("$value")) { // it's an integer $value = (int) $value; } else { // it's a string }1 point
-
If you've got a situation where you are having to do something repetitive (like the image selection and placement you've mentioned), then look at breaking it down further. Images manually positioned in copy (via TinyMCE) aren't ideal, and are better for one-off or unique situations. It's better to standardize on dedicating a specific image field (i.e. featured_image) to be a method of automatically connecting an image with a page. There are also situations where you may find it helpful to associate images with page references. For instance, a blog post with categories might have the categories each have an image that gets automatically pulled in and displayed when the blog post is rendered.1 point
-
I'm sure that's a facepalm issue. Any modules installed? Custom scripts that mess with page view?1 point
-
Yeah they're the new hardcore splatter movies, lot's of blood and guts.1 point
-
Worked on my localhost as soon as I increased max_execution_time in my php.ini file. It was timing out at 30 seconds.1 point
-
You could use the config options for page secure files... $config->pagefileSecure = true; $config->pagefileSecurePathPrefix = '-'; and make unpublished pages and their files will not be accessible via url. So you could create child pages under the users page with a file field, and leave those pages unpublished. The assets directory will be prefixed with "-" which is restricted by htaccess. But then you can use a passthru script to send the file to the user if certain requirements are given using wireSendFile(); So for example construct the download link to the file like this on a page the user can see. <a href="/download.php?user=1007&file=filename.pdf">Download file</a> and in download.php with something like this for the passthru and user check // bootstrap PW include("./index.php"); // make sure user is logged in if(wire("user")->isLoggedin()){ $file = $_GET['file']; $userid = $_GET['user']; $userpage = wire("pages")->get(wire("user")->id); if($userpage->id != $userid) die("no access"); // make sure it's the user if($filepage = $userpage->child("include=all")){ // since page is unpublished we add include all // get the file from the page $filename = $filepage->images->get($file)->filename; if(!$filename) die("download not found"); // send file to browser wireSendFile($filename, array('exit' => true)); } else { die("no user page found"); } } else { wire("session")->redirect("/somepage/"); }1 point
-
I prefer http://www.uniformserver.com/ for my wamp needs. It doesn't look really sexy but it is lightweight and powerfull. It's easy to setup vhosts, smtp for testing using gmail, hotmail etc. It keeps up with versions really well. http://wiki.uniformserver.com/index.php/Main_Page1 point
-
OK!! Just implemented the code and it works out of the box! It has also resolved the underlying issue in relation to resizing - so happy!! Thanks Horst Alex1 point
-
hey thanks horst - i didn't know you could not have slashes on a per template basis; that should solve this, i'll report back tomorrow if i get it all working! ok got it working!... this is the template that the store_item_detail.cfm page is using: <?php if($input->get->item_ID) { $pid = $sanitizer->selectorValue($input->get->item_ID); } $fwd = $pages->get("template=product-legacy, legacy_item_id=$pid")->url; if($fwd) { $session->redirect($fwd); } else { $session->redirect('/default-page/'); }1 point
-
There is so much to explore and learn with PW, - so, only overlook a single method isn't that bad. I have to go to CheatSheet too when writing the code example. First, before looking to the CheatSheet, I have tried with $img->path instead of your $img->url but the right property is $img->filename. It takes time to learn all the usefull stuff. The CheatSheet is my best friend besides the great people here.1 point
-
OK - that looks exactly like what I'm after!! After reading your code I've just noticed the $file->rename and found it in the cheatsheet as well - feeling a little silly - thanks heaps!!! Can't wait to try it out - love learning all these new things Alex1 point
-
WhoopWhoop! It's a php bug, see here: https://github.com/ryancramerdesign/ProcessWire/issues/1871 point
-
Hi Reno, When you loop through your repeater, in each iteration you already get the page. So the additional find is not needed, but I guess it does not affect performance at all because the page is loaded already: foreach ($expenses as $rp){ // changed $expense to $rp // the following line got you the same page as $expense before // $rp = $pages->get("id=$expense->id"); // the repeater page we want to update $rp->of(false); // ...1 point
-
Should we leave this one here today for public shame?1 point
-
Ah! Yeah urlSegment1 returns nothing, because there's no. When reading a post, you are on a page with template 'post'. The last segment in the url is the page's name. If you'd add after that another segment yourself, this would be the first urlSegment then. But to solve your problem: foreach ($posts as $item) { if ($item->id == $page->id) continue; } This will then result in $limit-1 posts, so you could also exclude the current page at db level: $posts = $pages->find("template=post, sort=-date, start=0, limit=$limit, id!={$page->id}");1 point
-
1 point
-
Processwire is a perfect load balanced template/code system. If that fact is recognized and experienced by more people it can really boom drupal and wordpress away from cms land. But then again, strangly enough, it doesn't work that way. You can be the best and yet other wanna be designs get more credit and more fame. I am in the repair/service field for computers for more than 15 years and I know of tools like deepfreeze and shadow user that can recover a pc fool proof from any software problem/attack/virus/mis-installs/wrong driver installs/dumb users/user mistakes/ etc. etc, simply by rebooting the pc. And yet is everybody knowing about it and buying it ? No ! Why ? Beats me ! Same for tools that can make a pc with 8 Gb of ram or more start to fly and run your programs in high speed mode by using a ramdisk or supercache. Doesn't everybody want his pc to run your programs super fast ? Make IE / FF / Word / Photoshop / etc. etc. run fast ? Yes ! Do people know and use ramdisks and supercache ? No ! Why ? Beats me ! I guess people are sometimes hard to understand.1 point
-
1 point
-
Yes, there has been very strong growth recently. Monthly visits in April: 2011: 5 112 2012: 12 448 2013: 48 455 Most popular countries this year: 1. United States 2. Germany 3. United Kingdom 4. Netherlands 5. India 6. Finland 7. Switzerland 8. Canada 9. France 10. Italy1 point
-
Yes, it looks like PW is rapidly becoming more popular. Ryan posted some stats here some months ago: http://processwire.com/talk/topic/1793-2012-critic’s-choice-cms-awards/?p=20070 Google trends look good too: http://www.google.com/trends/explore#q=processwire1 point
-
If you are using the latest versions of jQuery close-link is not working. The solution: Replace the file AjaxSearch.js line # 95 From: .live('click',function(){ On: .on('click',function(){ Excuse me for my English, I use Google Translate1 point
-
Brilliant! Thanks a lot for the solution and super quick replies! As a newbie here, I'm blown away by both the capabilities of PW and the top-notch community!1 point
-
Not sure. Everything looked to be fine. But it's working now1 point
-
For the pages belonging to an author I think you can use the following selector created_users_id= (as per cheatsheet) so $auth_pages = $pages->find("created_users_id=$userpage->id"); Not tested.1 point
-
With url segments (http://processwire.com/api/variables/input/ scroll to the middle of the page). Allow them on the authors page template, and on this template's file put something like this: if ($input->urlSegment1) { $username = sanitizer->name($input->urlSegment1); $userpage = $pages->get(name=$username, template=user, include=all); if ($userpage->id) { // echo the user info. these would be custom fields added to the "user" template echo "<h2>{$userpage->first_name} {$userpage->last_name}</h2>"; echo "<p>{$userpage->bio}</p>"; } } You can add any info you want to the users pages by adding fields to the "user" template (on the templates page, under "filters", enable "show system templates?") Edit: Wanze beat me again. He beats everyone lately Edit2: corrected my code to make the check for guest visitors that Wanze refered, except that I'm using $pages instead of $users to get the user page1 point
-
Hi patrik, You can use urlSegments for this case. In your template used by the /author/ page, enable urlSegments in the Template config. Then in the template file (example code): if ($input->urlSegment1) { $username = $sanitizer->selectorValue($input->urlSegment1); // Maybe you need to add 'check_access=0' to your selector if also guest users can see this page... $u = $users->get($username); if ($u->id) { // Display the information about user } else { throw new Wire404Exception(); } } // No urlSegment passed - throw a 404 or output some message1 point
-
So, I guess the modules manager is the must module that should be installed1 point
-
You can add a page field to the user template and a role parent. Then you can give them access to their children pages with (all code written in the browser): if ($user->hasRole("parent") && $user->kids->has($page)) { //show the page } else { // redirect to a general page or show 404 } and to the room page like this: if ( $user->hasRole("parent") && count($user->kids->find("parent=$page")) > 0) { // <- tricky hein? here we had to check if any of the kids of this user has this page as parent //show the room page } else { // redirect to a general page or show 404 } To link to the pages from the entry page you can: // show the kids pages and room foreach($user->kids as $p) { echo "<a href={$p->url}>{$p->title}'s page</a>"; echo " and "; echo "<a href={$p->parent->url}>his room</a>"; } Doesn't help that we are talking about real children and real parents while writing PW code1 point
-
1 point
-
Hi alex, <style> tags are normally inside the <head>, as far as I know. You can set the chosen color inline: foreach($page->repeater as $p) { echo "<div style='background-color: #{$p->colour_picker};'></div>"; }1 point
-
Anyone using sshfs to edit files in the server? I'm using to edit files in my server, and it's extremely practical. Is there any inconvenient? ps: the equivalent for mac would be osxfuse and for windows win-sshfs1 point
-
You're welcome. Here's a good overview how Hook works: http://processwire.com/api/hooks/ Also checkout the captain which shows you all the hooks available: http://somatonic.github.io/Captain-Hook/ And here an example, written in the browser and not tested: // Inside your autoload module you have installed... public function init() { $this->addHookAfter('ProcessPageEdit::buildForm', $this, 'hideFields'); } public function hideFields(HookEvent $event) { // Do nothing if we don't edit a user if ($this->page->template != 'user') return; // Get the form instance returned from the hooked method $form = $event->return; // Define fields to hide per role $hideFields = array( 'role1' => array('field1', 'field40'), 'role2' => array('field5', 'field2'), ); // Hide the fields foreach ($hideFields as $role => $fields) { if ($this->user->hasRole($role)) { foreach ($fields as $field) { $f = $form->get($field); $f->collapsed = Inputfield::collapsedHidden; } } } $event->return = $form; }1 point
-
It's very cool Edit: working perfectly on my localhost. And it even took care of changing the htaccess file name for me!1 point
-
Some interesting reads for those interested in security: Well it should be mandatory for every webdev to know these thing or at least care about. Hack yourself first - how to go on the offence before online attackers do http://www.troyhunt.com/2013/05/hack-yourself-first-how-to-go-on.html Feel free to discuss or post other articles about the subject.1 point
-
I've been wanted to start this theme for a while because ever since I first heard of ProcessWire I felt it needed a really calm theme, one void of clutter and noise. While I may have taken this one to the extreme, I'm hoping some will find it's simplicity refreshing. It will be optimised for mobile devices and you can customise the colours, even the grey. I look forward to posting more of my progress!1 point
-
1 point
-
Thanks ryan. Using the 'forgotten your email' module from now on. still having massive permission issues but i think its because I was using root and then switched to the ftp user and cant sorted it with either now. boo1 point
-
1 point