Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 09/08/2015 in all areas

  1. The repository is available. See the first post for the link. It's in alpha-state however I'm already using it on my new personal website, which hopefully will be online tomorrow, so you can also take a look at the final result.
    11 points
  2. Gebeer you could try to set them - i do that with a custom script to get seo fields prefilled on publishing if users don't fill seo fields manually. example: //set seo_title on publishing $page->set ('seo_keywords', $default_keywords); //set seo_description on publishing $page->set ('seo_description', $default_desc); ... set should work for you. best regards mr-fan
    3 points
  3. Just did the same, and can't spot any issues either. We're already using prepared statements, sessions are securely implemented (especially if you enable the built-in database session manager), CSRF protection is in place, .htaccess prevents direct access to anything potentially harmful, etc. Some of their suggestions are strongly opinionated, and in those cases we don't necessarily follow them and/or agree with them. For an example, OWASP suggests that a templating engine is "essential" for secure sites. Personally I call bullshit on that one, but if you really want to, you can install a templating engine as a separate module, thus making your site compliant with this suggestion. Another point to note is that they (rightly) stress that all input is dirty, and no user input should ever be embedded on a site without proper sanitization. Because use cases differ, ProcessWire won't force sanitization on you, but it does make it very easy to implement by using the built-in Sanitizer, certain Textformatters, and field-level settings that automatically remove tags from content. I would suggest checking out the security documentation, unless you've already done that. It should provide most of the details you need in order to build sites with ProcessWire securely.
    3 points
  4. I had been looking for CMS alternatives for a few months, I had been doing work primarily on Wordpress but only with already made templates, later, for custom design needs, I discovered Perch which I was quite excited to see how well it worked and how easy it was to set up a site with it, but the license fee made it less attractive as it did impact my costs of production (I normally do small websites). But I did love this thing, simple websites, simple admin, just the right amount of things to edit, everything managed through Pages (though not in tree form). Though, I did had a hard time getting used to their weird way of configuring field types (which looked like you were making a template, so I got confused between templating and configuration now an then) I then went to Kirby, flat-file CMS, also a very neat CMS, though I didn't like much the admin panel, I did like that it was pure files, so my local version of sites were pushed really easily, galleries options weren't as neat as in Perch and had no comments system for blogs. Then again, the license fee kicked in. Start looking again... This is when I came up with Bolt, Pico, Grav CouchCMS, etc. But nope, nothing at least comparable to Perch in simplicity, (or some don't have admin panel) If I remember I think Bolt did call to my attention but when I tried it it had this "bloggy" feel to it, similar to Wordpress, that ended up not convincing me. Then I was making a website for a friend's to be released comic book and I wanted to mimic what is done on manga sites, volume, chapter and page navigation dropdowns and stuff, then again same old story, look for a Wordpress plugin, found out that the best option wasn't exactly what I had expected and then again, doing Wordpress themes always looked like such a pain, so I that didn't even bother. Started looking again...even found a dedicated CMS for comics, that didn't really fit my needs. In this now long search for a perfect CMS, I stumbled upon CMS Critic while looking for reviews website, and saw they had an award thing going on, so I decided to check top places. "Well well, who do we have here Mr.Processwho-No-1-OpenSource-CMS?". Started reading the docs, saw the examples, looked awesome, so I decided to put it inside a website. Clean urls, everything custom fields, repeaters, multilanguage out of the box, extendable, a kick ass API....YOU HAVE TO BE KIDDING ME! The rest is history my friends, Processwire has brought the happiness to my web development career as nothing had ever done. I believe in this project and it's community, it's gonna be awesome, nuff said!
    2 points
  5. When I read posts like this, I always think about a list of quotes titled "Developers react to Processwire" , it always seems to be kind of a shock to find out about PW.
    1 point
  6. Thanks for the details. I think it must be a combination of the number in the page name and the "Rename on Save" setting. I am glad the custom ### option fixes it for you though I still can't reproduce it here though, so just curious, what version of PW and CUN are you running?
    1 point
  7. My frontend autocomplete support for text fields is working nicely now. It uses autocomplete to build a csv list in a text field. You can use the autocomplete suggestions or just edit the text field as you like. The UI is sort of a "lite" interpretation of InputfieldPageAutocomplete. The javascript is based on jqueryUI example code, with the ajax call going to a ServicePages URL. For styling, I extracted parts of the CSS of InputfieldPageAutocomplete, mostly that having to do with the popup list and the status icon. Renamed those classes InputfieldTextAutocomplete. There's nothing special to do when making the form markup, just add JS and CSS files to the page. A jQuery selector string in the JS determines which fields get the autocomplete treatment and I'm using the text field id as the template name in the selector that gathers page titles for the list. Some of the people who use this form will also be using the backend so I felt it was important to mimic the ">>" status icon from InputfieldPageAutocomplete. It does a great job of showing autocomplete is there and giving feedback on the ajax search operation. Instead of the note part of InputfieldPageAutocomplete I use a title attribute (on the status icon) to say "Type a few letters and autocomplete will offer matching items" and clear that out after they've done it once. That's enough of a clue and not too naggy. Thanks everybody.
    1 point
  8. 1 point
  9. Thanks adrian, the users have very restricted access to non-sensitive information for this one, it's more of a formality really. I will definitely be using ForcePasswordChange for future projects though, super easy to manage users through PW with these kinds of modules.
    1 point
  10. $value = trim(preg_replace('/\s+/', ' ', $value)); I use this in some contact forms. Converts all single, multiple or mixed spaces, tabs, linefeeds and carriage-returns in a single space.
    1 point
  11. http://www.markgoldsmith.me/blog/why-i-chose-processwire-over-wordpress-drupal-symphony-and-others/
    1 point
  12. If its only partly identical then I would probably start from scratch. This way you would know what's going on and I also think it's quicker than the trial and error mode
    1 point
  13. $wire->pages->find("images.count>0"); But keep in mind, that this will get you a PageArray, which you need to loop over, while your current selector only grabs the first page matching the selector.
    1 point
  14. I do think this is a great project, and there are many great ideas submitted by everyone. Based on my 'past-life' experience as a tech-writer, there are two approaches to this issue. One is from the target audience point of view, the other is from the product capability point of view. Since there are numerous entries in this topic where "I do it this way..." and "I do it that way...", let's set aside the point of view of the end user, and concentrate on the functionality. To do that, each entry should have at least the following things defined: The description of what the function does, The proper syntax for its use, The parameters defined, The return values defined, A simple example of each combination, And a link to the source code. I hate to admit it, but I really like the completeness of wordpress docs... https://codex.wordpress.org/Function_Reference/add_action It makes is very easy for any skill level to quickly obtain the necessary information to move forward. I also think it would be advantageous to use ProcessWire to present this information. Eating our own dogfood, kind of thing. I would like to participate on this team too, if I may.
    1 point
  15. UNTESTED, probably have some typos + poorly formatted code (I gotta run...) You want to add this to your template file....Wrap it around code that ensures only Superuser can load the code... //absolute path to a directory called 'tmp' within the site folder where we have our images $dir = $config->paths->site . 'tmp'; $addAndPublish = false;//true if you want to publish on save //prepare some variables we'll need later $a = 0;//for photo pages count $failed = array(); $parent =$pages->get('/portraits/'); $t = wire('templates')->get('your-portrait-template-name'); //if we found the directory (here we use Standard PHP Library (SPL)) if (is_dir($dir)) { $directory = new RecursiveDirectoryIterator($dir, FilesystemIterator::SKIP_DOTS); //iterate through each file in this directory foreach ($directory as $path ) { set_time_limit(30);//we try to avoid timing out //Remove and delete invalid file types $validImagesExts = array('jpg', 'png', 'gif', 'jpeg'); if($path->isFile() && !in_array($path->getExtension(), $validImagesExts)) { unlink($path);//we delete the invalid file continue; } //if valid image file we create a page named after it and later save it to the page if($path->isFile()) { //we are ready to start creating pages... $p = new Page(); $p->parent =$parent; $p->template = $t; $title = $path->getBasename('.' . $path->getExtension()); $p->title = $this->sanitizer->text($title); if (!$p->title) continue;//skip to next if no title found (just in case) $p->name = $this->sanitizer->pageName($p->title);//sanitize and convert to a URL friendly page name //check if name already taken if($p->parent->child("name={$p->name}, include=all")->id) { //if the same name already exists, add it to the $failed array [to display to user in error later] and skip to next title if ($path->isFile()) { $failed [] = $path->getFilename(); } continue; } //if add and publish is false, we save new page unpublished if (!$addAndPublish) $p->addStatus(Page::statusUnpublished); $p->save(); //add image to the page and save again $p->images_field->add($dir . '/' . $path->getFilename()); $p->save(); $a++; unlink($path);//we delete the temp file } }//end foreach //delete the tmp directory wireRmdir($dir, $recursive = true); //create a string of "failed" category titles to add to error message $failedTitles = implode(', ', $failed); //give the user some feedback... if($a > 0) echo 'Added' . $a . 'Portraits<br>'; if($failedTitles) echo 'Some Portraits not added because names already in use. These are:' . $failedTitles; }//end if (is_dir($dir))) else echo 'No Such Directory Found!';
    1 point
  16. For the 7 layouts you've shown above, here is another great css framework to layout content: pocketgrid. http://arnaudleray.github.io/pocketgrid/docs/ Pocketgrid is in the same spirit as pw: total freedom, leaving it all up to you. As for blocks and widgets, compared to wordpress, here are some helpful links: https://processwire.com/talk/topic/316-widgets-and-me-thinking-aloud/#entry2208 https://processwire.com/talk/topic/7350-smart-widgets-blocks/
    1 point
  17. https://www.maletschek.at It's online now for quite a time and my biggest PW-project so far. It has loads of content (sitemap) and the editors are loving how easy it is to manage - client quote: "it's a quantum leap forward" edit: screencast added here: https://processwire.com/talk/topic/10006-maletschek-nautics-boat-center-at-neusiedlersee-in-austria/?p=95531 Highlights shortcut edit-links almost everywhere on frontend with a single line of code in the template file (planning to release a module for this one day i find the time... or if anyone is interested in doing this i can share the code i have so far) and showing what part of the site is going to be edited on mouse hover point of contact for every section - option to inherit it to the whole sub-branch of the tree for example "jakob" is point of contact for boats and he will by default also be POC for every single boat posted in this section. if there is a different POC for one single page in this branch (eg /boats/small-boats/) that's also possible by checking the checkbox - so all boats on sub-pages (/boats/small-boats/boat1) will again have jakob as POC Caching with custom Cache Reset Module (necessary due to the previous point in the list) at least for me that's a highlight because that was the first time i needed to hook something... https://processwire.com/talk/topic/8997-clear-cache-for-all-children/ widget system with complete control of where to display the widget: in this example the "point of contact" widget is shown an all pages ( site "/" - "show" - "also on subpages" ) except section "blog" ( site "blog" - "dont show" - "also on subpages" ) yumpu online catalog textformatter module like on this page: https://www.maletschek.at/shop/bootszubehor/pfeiffer/ see forum thread here: https://processwire.com/talk/topic/9888-textformatter-yumpu-embed/ i hope you like it and i'm looking forward to hearing your feedback and of course thank you all for your help! ps: sorry, there's only a german version of the website
    1 point
  18. Hi Apeisa, Thank you so much. I have enabled the demo mode. Here are the details. Front-end Demo - bluevr.webcreate.lk Back-end Demo mode - bluevr-webcreate.lk/processwire (The username 'admin' and password 'bluevr2')
    1 point
  19. I guess this is as good a place as any to make my first forum post. I stumbled across PW some months ago, and I'm just now starting to learn how to use it, and when I found your BlueVR profile I liked it's looks, and installed the profile to begin learning the ins-and-outs of Processwire.
    1 point
  20. Dear All, Here is the demo for the site profile. Demo - bluevr.webcreate.lk Thanks
    1 point
  21. Thanks to Mont I managed to fix `undefined variable` issue.
    1 point
  22. I have enjoyed using this site profile. I have learned a lot about processwire by using it. Thank you. When I turn on error reporting I get the following error on multiple installations. Code $browserTitle = ($homepage->seo_title)? $homepage->seo_title : $page->title; if ($page->seo_title) $browserTitle = $page->get('seo_title'); $seoMetaDescription = ($homepage->seo_meta_description)? $siteSetting->seo_meta_description : ""; if ($page->seo_meta_description) $seoMetaDescription = $page->seo_meta_description; I'm inclined to just ignore it but thought I would still ask.
    1 point
  23. Thanks Pete. I added the site profile to the Module Directory.
    1 point
  24. Hi BernhardB - awesome and thanks so much for joining in on this.. i really like your approach to the widgets also; the InputfieldSelector field isn't that new, i can't remember when it was announced - i think this past summer; but in terms of the CMS, it is pretty new and it was conceived by Antti Peisa, coded by Ryan Cramer and sponsored by Avoine; it is in the core, so you just need to install it. The field is used in the listers; as a standalone field i haven't seen many posts about day-to-day use of it and i kept thinking of when and where it might come in handy.. then while i was setting up this one site I came across this situation where i wanted a certain widget only to show up on the child pages of another page; so first i did a plain field and typed in the selector and sort of moved on... but something kept nagging at me and then it suddenly dawned on me that there is already this field that could make setting up the selector more user friendly and reliable, and it works great; It provides feedback to tell you how many pages match your selector; for some clients who have a little technical knowledge and skill, this is a really simple and easy way to specify a selector for pages, and then be able to test against that selector in conditionals.. i think in some instances it is probably too technical to be of use; i wonder if you could use the new selector field in your setup, as you can add additional lines to the selector, which would be like your repeaters... i haven't done extensive testing or experimenting yet with this, but i have 3 more sites to launch and i'm sure this selector field will get more use in situations like this..
    1 point
  25. The notifications are part of the admin. PW doesn't get involved with your front-end output, so it's not attempting to provide anything with regard to notifications on the front-end. However, you can still use the API to add notifications to any user, but they'll need to go to the admin before they will see them, unless you provide your own output code on your front-end. If you wanted to output notifications on the front-end of your site, it would actually be as simple as this: foreach($user->notifications as $no) { echo "<p>$no</p>"; } There are of course several other properties, methods and flags that you can access from the Notification ($no) object. But outputting a notification is basically just a matter of iterating through the $user->notifications field and outputting them all, or just the ones you want. So in this sense, it actually would be quite easy to utilize on the front-end, but like with anything in PW on the front-end, you have to decide how you want the output to be handled. Currently it's using the same method as the forum we're typing in (IP.Board). I have not kept up with websockets technology lately, but was under the impression we weren't there yet unless you had specific client-side and server-side libraries to handle it and provide the fallbacks, or were using node.js, etc. I'd gladly implement websockets in the future if they enable us to accomplish the same thing more efficiently, easily and reliably without bloat. Last I researched this, we weren't there yet, at least in our LAMP context. But you likely know more than I do about that technology at this point, so interested in hearing more.
    1 point
  26. Soma's right this is still in development, so things may change and it's too early to write up docs. But here's the basic concepts that probably won't change: Display notification on next request (these work whether SystemNotification is installed or not, but the output is of course different): $this->message("Message to display"); $this->warning("Warning to display"); $this->error("Error to display"); If outside of an object context, you'd replace $this with wire(). These notifications (above) have been with ProcessWire since the beginning (except for the warning one). The SystemNotifications module continues the same strategy and extends it. It enables notifications that go beyond just simple "display once on next request" notifications. It also enables you to send notifications to any user, regardless of whether they are logged in (they'll get the notifications when they next login). If the user happens to be logged in, they'll get it immediately–it will pop up on their screen without them even having to load a page. To use these persistent notifications you have to send them to a user ($user = any user): $user->notifications->message("Message to send"); $user->notifications->warning("Warning to send"); $user->notifications->error("Error to send"); $user->notifications->save(); // this is required to commit them They also have a Javascript API, for sending immediate notifications to the current user. These particular notifications do not persist across requests, so they are more like a JS-version of PW's "display once" notifications, except that they display immediately. Notifications.message("Message to send"); Notifications.warning("Warning to send"); Notifications.error("Error to send"); There's actually a lot more to it, as each notification can have various different flags and properties. Notifications that persist across requests can also be modified, which is great for things like progress bars or other kinds of state changes. Further, they can contain any amount of "details" content, even entire HTML blocks. This is all stuff we'll cover once these are finalized.
    1 point
  27. marcus thankyou! i think you missed out a $ sign thought, but i got it to work using: url: '<?php echo $pages->get('/logincode/')->url ?>' finally! Thank you so much. I should really have posted in here 8 hours ago although i wanted to figure it out myself, and learnt a hell of a lot by trying Thanks mate!
    1 point
  28. Why are you refering to the paths inside the template folder? This would return an error even if you wouldn't call it via AJAX. Try: url: '<?php echo pages->get('/logincode/')->url ?>'
    1 point
  29. I'm having a difficult time imagining a scenario where templates/pages wouldn't be flexible enough to accommodate anything. It's really a matter of the logic in your templates. You can setup your templates to be as DRY as you like. There's no need to duplicate markup. Take a look at the delegate approach kongondo linked above. You may also want to check Ryan's blog profile for some ideas. There is also this discussion that may be of interest. When I first starting using ProcessWire it did take a bit to get used to the idea that there is no set way to do things. I think you'll find it's incredibly flexible, and can accommodate almost any approach. Oh, and the community here is exceptionally friendly and generous.
    1 point
  30. @Xeto: Screen height would matter ! At 480 rows, your screen should be at least 2.5 meters high. oké, seriously. all data is in the same table, so performance & scalability is good.
    1 point
  31. We just launched a new e-commerce website built off of ProcessWire. We worked off of Apeisa's shopping cart module as a base and were able to get the system integrated with Authorize.net's DPM for payments. We had a to do a lot of custom programming for this client as they needed sales tax, promo codes, and different shipping rates for different zip codes. I was delighted throughout the whole process with how much I was able to tailor the editing experience for the client as well as the visitor's experience on the page. The client had several last minute requirements which we would never have been able to implement in the time we had if we were using a different CMS and didn't have PW's API and custom field system. I would like at some point to release some of the new shopping cart code (shipping rates by zip code, sales tax, promo codes) to the rest of the community, but as it stands it's not modularized/generic enough and the code is in too many different pieces to make it practical. If I have time outside of work I will try to see if I can make it more distributable so that I can give back something to PW Special thanks to Apeisa for his input when we were getting started with this. http://www.harkenslandscapesupply.com/
    1 point
  32. To start, get a fresh copy of ProcessWire and install it (with the included basic profile). Then get a fresh copy of HTML Kickstart and unzip it. You'll want to take these dirs/files from HTML Kickstart (below), and move them to the root of your ProcessWire installation (where ProcessWire's /index.php file is located): /css/ /js/ /style.css I've taken the example.html that comes with KickStart and converted it into starter ProcessWire templates for you: html-kickstart-processwire.zip Unzip the attached file to replace the files in your ProcessWire's /site/templates/ directory. This includes these files: head.inc foot.inc basic-page.php home.php Now view your site. You should see HTML Kickstart's example.html file powering your ProcessWire site. Navigation should be using HTML Kickstart's horizontal menu and both bodycopy and sidebar should populate. I've left several static elements from the HTML Kickstart example.html as well, so you've got more to experiment with here. Let me know how it goes and if it makes sense. This thread is also related.
    1 point
×
×
  • Create New...