Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 04/25/2014 in all areas

  1. Hi forum, got a new one up and running: http://www.praxiskreuzer.de. This is a relaunch, the new side replaces a very outdated one. The client is a very renowned GP in Bonn, Germany with practices on two locations in the city. Lucky I am, she invested in a professional shooting which made it easier to create a bright and nice look & feel. Technically there is nothing particular here as you can see, except that the site features my fabulous Unsemantic site profile ;-) The site runs on PW 2.4. Please let me know what you think.
    7 points
  2. Hi there, I just saw totoff's new doctor's site and thought, I add my dentist site here: http://zahnarztpraxis-wunschik.de/ Credits for design and concept go to http://www.gruenklee.de/grkl/ They did a great job on the design and photography. This is my first PW project where I learned my ways around. It is running on v2.3. I used the default site and married it with H5BP and added a sass framework for the styling part that I used in good old Joomla days. From the PW side of things, this wasn't a great challenge thanks to this great forum. I was very happy about the Gmaps field. Only had to tweak it a little to display the info bubble. And FormBuilder. Didn't want to spend too much time on the form coding in a new environment. Tricky part here was to get the datepicker to display in German. There are some Animation features. The three info boxes at the top are slidable. And there state (closed/open) is remebered across the site. That was tricky, too because I had never worked wit jQuery cookies before. Gave me some headache but finally worked out fine. There are also some image slideshow features in the header on the "Praxis&Philosophie" page and on the start page. I used cycle2 jQuery plugin which is absolutely great. And some slide-in effects on the team page. All in all I learned really a lot from setting this up. It gave me a good base to explore PW further and work on more challenging projects with even more Animations AJAX etc. that shall be presented here in the near future.
    5 points
  3. First of all, I'll assume that you've read enough to know that there are more than a few gotchas to be taken into consideration. The tricky part, IMHO, isn't implementing this for ProcessWire -- getting it right and making it secure is way more complicated. Once you got that figured out, you could set the token or whatever method you're using right after successful Session::login. Other part, logging the user in, depends on how and where you prefer this to happen. ProcessLogin::execute is one option you might want to consider. Hope that helps a bit.
    4 points
  4. Processwire will always be free, but commercial modules have a place where a lot of work has gone into something. For example, ryan currently has two commercial modules that add great benefit to a Processwire installation. He has put in many thousands of hours into this free platform. Are you going to begrudge him making money out of some very useful modules that you have no obligation to use? I also want to make some commercial modules eventually too and see no problem with it as long as developers don't start charging for teeny tiny things.
    4 points
  5. Plus the prices that ryan is charging are so low for what they are I really don't have a problem paying them personally. I wouldn't mind it if he increased the prices actually - the benefits are that great.
    3 points
  6. Thanks @apeisa and @Martijn I have sent a pull request, thumbnail,0,100 or thumbnail,100,0 should work now. Thanks
    3 points
  7. @renobird You should open an "issue" on github for this new functionality.
    2 points
  8. Some people put a LOT of work in this project that benefit a lot of other people. The fact that they can sell a very small percentage of this work to compensate all this involvement is probably the only warranty that you have that they won't be forced to stop doing it at some point. You are already using a great piece of software* without paying a dime for it. Edit: *sorry for the understatement. Please read: "the best CMS and best CMF in the world"
    2 points
  9. I don't see a problem with commercial modules. In fact, if that little extra cash allows the developers to spend more time working on them and publishing higher quality stuff others can buy (for a reasonable price) and use in their projects, everyone benefits That being said, high quality free modules (or commercial ones made available with a PWYW model) are still more than welcome and (IMHO) have a very important role in the future of this project. Personally I'd like to see that "donate now" button one day too.. and definitely some non-software products (clothing, mugs, pins etc.) When it comes to raising funds, FSF is a model example of doing it right.
    2 points
  10. You can give the choice of having a sidebar or moving it from left to right with something as simple as this: 1. create two checkbox fields "remove_sidebar" and "sidebar_right" with the labels "remove the sidebar" and "move sidebar to the right" and add them to your template. 2. add this to the template file: <?php if(!$page->remove_sidebar): ?> <div class="sidebar<?php if($page->sidebar_right) echo 'float_right'; ?>"> <!-- html code for the sidebar --> </div> <?php endif; ?> This will print the code for the sidebar only if the first checkbox is not checked (notice the !), and will add the "float_right" class to it only if the second checkbox is checked. Then you just have to float .float_right to the right in your stylesheet. This is only an example of class and css, of course.
    2 points
  11. Hi, I simply bought a 3 license package and use one of the licenses for local development. For me it was a matter of supporting Ryan for his amazing work. Don't even know if a license is required for local installations ...
    2 points
  12. enable tags on image field.. use tag 'featured' $images = $page->images->findTag('featured'); or get first an array of all images from the template gallery or whatever then run your findTag on that array
    2 points
  13. Hi all, I've just pushed a new fully responsive site profile to Github: Unsemantic Site Profile for Processwire 2.3 After having tried seven zillion responsive grid systems, boilerplates, frameworks etc. I finally opted for Unsemantic Grid System. Mainly because it supports IE7, is lightweight and includes Compass/SASS. I've designed the profile as a starting point for development according to my needs. This includes almost no styling, an easy-to-use solution for placeholder images and three teaser boxes on the front page. In addition, I converted the .sass files that come with Unsemantic to .scss because I like the syntax better. Glad if you give it a try and find it an improvement for your workflow. You can see a preview here. Download from Github: https://github.com/christophlieck/UnsemanticSiteProfile
    1 point
  14. Hey, I think if you're a new user to Processwire it's really complicated to understand how to install a new language. I've got a couple of ideas how to optimize this: Better Description: It would be important to show at least a link to a documentary (for example: https://processwire.com/api/multi-language-support/) and add some screenshots to it. So that you get a step by step tutorial. Additonally I would add a description to the "Language Translation field" on how to get the language files (link to: http://modules.processwire.com/categories/language-pack/) Instant install: Another way to add languages could be the Textpattern way. But I'm not sure where to place this. In the module->new section? After clicking "add new" in the setup->languages page (that's the way I would prefer. And at the bottom a link "You're language doesn't exists? Create it now!")? Or somewhere else? What do you think about this? And what are your experiences with adding a new language for the first time? / Nico
    1 point
  15. I'm building a module where I need to set a field to locked, but not collapsed. I can set it to collapsed/locked like so: $field->collapsed = Inputfield::collapsedLocked; But looking for a way to do the same thing, but have the field default to open. There currently isn't an option for "openLocked". Any ideas on how to get around this? I'm feeling a little dense here at the end of the week.
    1 point
  16. Pageimage Naming Scheme I have created a module that extends the naming scheme for images. It reflects more options within the filename. An example is here: http://images.pw.nogajski.de/new-naming-convention/ The module is on github (zip)- additionally you need PW version 2.4.2 or newer (while writing this, the latest dev version from today) The module is in alpha state, so yet do not use in production sites. To install and start using it works very smooth: It doesn't force to recreate your already cached images, only uses the extended naming scheme when need to create new image variations. Also recognizes both naming schemes when collecting imageVariations. Recognizes PageImageManipulator-files too per update to 0.1.3. If you want to uninstall it, you can run a cleaning script from the configuration screen that removes imagevariations to avoid orphaned files when switching back to the core naming scheme. Running the cleaning script as simulation is supported too. --- There are a new thing to mention: You can send a new option together with your images $options array: "forcenew" => true! This results in recreating these single variation of the image, without dropping all other variations. Now that you can have a lot more variations per image, this should be the preffered way to drop / recreate cached image versions. Questions, suggestions are welcome.
    1 point
  17. Just recorded a video of a larger Site I've done some already know of (in this forum). Since a long time I wanted to share something, that maybe of use to others, so here it goes. It shows some technique I use often to give shortcuts to editors when editing content on the page. It's ideal to use for summary entries to give them a direct edit link, or for data pages that have no real view and are located somewhere else in the page tree. Basicly it's simple and just requires to add Fancybox js to the front-end, and you may already have it, or if now use another lightbox that has iframe capabilities. Also if there's not lightbox plugin you need in the site, just load them conditionally using $user->isLoggedin() check. Then generate simple edit buttons/link where you like, and add a "?id=1001" to the url PW admin edit url (/processwire/page/edit/). You can do this without fancybox modal as the default basic-install shows, but using fancybox can make the experience a lot better. To have the navigation of the admin not shown you just add a &modal=1 to the url. Code to generate the year link seen in the video is: if($user->isLoggedin()){ foreach($chart_years as $year){ if($year->editable()) { // if editable by user. echo "<a class='editpage-inline' href='http://" . $config->urls->httpHost . $config->urls->admin . "page/edit/?id=". $year->id ."&modal=1'>edit ".$year->title."</a> "; } } } Then in your JScript you would add fancybox functionality to the links like this. $('a.fancybox-iframe, a.editpage-inline').fancybox({ type: 'iframe', centeronscroll: true, autoScale: true, width: 900, height: '80%' }); Minimal effort, maximal effect.
    1 point
  18. Ok, first take off your mask and try some harder. Collapsed sound more like well collapsed , not?
    1 point
  19. @teppo I don't think Tom wants to have his users click to open the field. He just wants the locked value displayed uncollapsed.
    1 point
  20. According to Inputfield.php, collapsedLocked should be exactly what you're looking for: visible, but not editable. Is the description there outdated or am I missing something here? Edit: right, "otherwise same as collapsedYes".. that's a bummer. Sorry, can't see an obvious way to do this without some custom hooks right now.
    1 point
  21. I hope I interpreted it correctly Besides giving a working example, what I meant was to answer that you do have to use the API, but that it is extremely simple to do and it will also be very simple for the editors.
    1 point
  22. Renobird and Diogo, THANK you very much for your answers, guys
    1 point
  23. Add a template redirect, add page select and in template file redirect to the selected page.
    1 point
  24. Yes thanks again It even provides a API function so it should be possible to automate it. But I wanted to have it even simpler with short links within the page And at the moment I don´t need to have external redirects
    1 point
  25. I am guessing you have also seen this module then? http://modules.processwire.com/modules/link-shortener/ Of course this requires manual creation of each shortlink, but thought I'd post it here just in case someone else finds it useful.
    1 point
  26. I wanted to have a similar short link as mods.pw/XXX and wanted to store them directly in the page in a field. Created a unique text field "shortlink" This is my module code for creating a random key (in this case 6 digits) and assign it to the shortlink field <?php class ShortLink extends WireData implements Module { /** getModuleInfo is a module required by all modules to tell ProcessWire about them * @return array */ public static function getModuleInfo() { return array( 'title' => 'ShortLink', 'version' => 100, 'summary' => 'Pre-populate $field->shortlink with random 6 digit string', 'singular' => true, 'autoload' => "template=admin" ); } public function init() { // add before-hook to the inputfield render method $this->addHooKBefore("Inputfield::render", $this, "renderField"); } /** * If not empty, create unique value for textfield 'shortlink' * */ public function renderField(HookEvent $event) { $field = $event->object; if($field->name == 'shortlink' && $field->value == '' ) { // $id is unique, as page id is unique $shortlink = substr(str_shuffle("0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ!@-_"), 0, 6); $field->set('value', $shortlink); } } } and then I activated URL Segments on my home template and added this at the very top of my head.inc if($input->urlSegment1) { // URL has /category-name/post-name/ $shortLink = $sanitizer->pageName($input->urlSegment1); $post = $pages->get("shortlink=$shortLink"); if(!$post->shortlink) { $session->redirect("/search/"); } $session->redirect($post->url); } It´s customized option 2 from Ryan (post #21) At the moment it seems to work as expected. But as I´m not really a programmer I don´t know if it´s really safe etc.. Maybe the code for the head.inc could come in the module? What do you guys think about this? Cheers Can EDIT: Added canonical metatag to the header I like that I´m able to override the generated key. The module is not really needed but it´s nice to have when I´m to lazy to think about an own shortlink When using for a customer I maybe set the field to read only, but because it´s unique text field it will throw an error anyway so shouldn´t be possible to mess with the field value Ah there is one thing I´m not sure about. The shortlink field is type of TextUnique, but what if the str_shuffle generates a duplicate (don´t think it´s impossible?!) I guess the field wouldn´t get populated right? Of course I could save the page for a second time but I´m sure there is a way of doing this directly while populating it for the first time in the module but I don´t know how? It´s currently not working with Markup Sitemap XML module, could extend the if in my header.inc to check for /sitemap.xml Ah just figured out that Markup Sitemap XML is not working with URL Segments turned on at all.
    1 point
  27. @pwired: I think white is the right choice because it's a doctor's website. So it has to be "sterile"
    1 point
  28. Good one, has easy nav, good font/color/size, perfect pics, responsive layout. Maybe change the (overall) white background into something more soft ?
    1 point
  29. I bought the dev version and that's working out great for me because I can test to my heart's content and also use it on any client sites I build. I honestly haven't tested it on MAMP, but don't see why it wouldn't work if you configure mail correctly. There's a few tutorials on how to do this if you search google. Like I said I haven't done it but I assume it would work
    1 point
  30. Works fine without saving for page select.
    1 point
  31. There are a few different approaches you could take. How are you generating your menu? If it's with Soma's plugin, you can limit the number of page levels with the settings (see the plugin documentation). This is usually the approach I take since I don't ever go more than 2 levels deep on my menus. If that won't work for your use case, I believe you can also exclude by template in the plugin settings. So in that case you would add gallery-album to the excluded template list. You can also exclude by template if you are writing your own menu logic. Another approach would be to make the album pages hidden and then add include=hidden to the children selector (although the downside is that you have to remember to set the page to hidden for every new album): Change this: $albums = $page->children('template=gallery-album'); To this: $albums = $page->children('template=gallery-album,include=hidden'); A third way would be to have all of the albums in a different (hidden) part of the page tree so they are separated entirely from your menu structure, but that would involve a bit of code tweaking. There are probably other ways too... Hope that helps!
    1 point
  32. You can foreach $items but not $items->menu_item. What is the menu_item field by the way? A page field?
    1 point
  33. Thanks for the kudos. Hope you enjoy it. I am hoping to get to those improvements that Steve suggested sometime soon, but just completely swamped here at the moment!
    1 point
  34. non coders get sick with stupid simple problems like when to use curly brackets and when not. Is it php syntax or processWire syntax? I found: http://processwire.com/talk/topic/2682-drop-down-select-to-search-form/?p=26224 "Curly brackets only necessary if you've got two "->" in there" but http://processwire.com/talk/topic/1627-newbie-question-on-template-tags/?p=14916 <li><a$class href='{$child->url}'>{$child->title}</a></li> only one "->" in there... and http://processwire.com/api/variables/pages/ $skyscrapers = $pages->get("/cities/chicago/")->find("floors>=60, sort=floors"); two "->"s but no curlies... two hours trying to find out and no result... this is what I want to do: if($section->knots) { echo "<tr>"; echo "<td><p>$pages->get('/FixedData/')->knotsLang:</p></td>"; echo "<td><p>{$section->knots}</p></td>"; echo "</tr>"; }
    1 point
  35. OK, you PW guys and girls: I am sure most of you know that Kongondo had a previous CMS "relationship" before ProcessWire. Kongondo was a major force in the MODx forums for quite a while. In the Evo days there was constant shrill barking for better documentation with MODx. All CMS systems have this issue. Kongondo produced this massive tome called "The 'almost' complete guide to creating menus in MODx using Wayfinder". This was simply epic in my humble opinion. Wayfinder is an amazing system for generating all kinds of menus in MODx. I downloaded this massive PDF file and had it printed and bound at my local office store. I then sat up reading this thing at night for more nights than I care to remember. My wife thought I was crazy. But the content, examples and guided projects was really a class example of software instruction at its best. This guide was HUGE in my journey through MODx. I learned to build some very cool menus systems with this volume sitting on my desk. We recently moved into a new house and I just found this today. Not to embarrass Kongondo but I had to share and say thank you!
    1 point
  36. Can't write a guide for a module that has the word "Simple" in the title @kongondo - you'll need a bigger hat if these guys carry on much longer
    1 point
  37. Ah, Max, people, you embarrass me! Seriously though, thanks for the comments. This was my one-hit-wonder . There were days when you typed 'kongondo' in Google it would suggest 'Wayfinder'. I think this is because it had been downloaded so many times. I stopped counting when downloads hit 10,000. Even so, I still get PMs from the MODx forums - people asking me for help with Wayfinder! OK, enough chest thumping! @Max, it looks nice bound like that. I never got round to making one for myself. @Teppo: The reasons why the guide was 'massive' were: Detailed explanations about HTML, CSS, some MODx concepts, Wayfinder, code examples, etc plus I talk too much! It took me the better part of 6 months to finish! (IIRC)....The Susan mentioned above expressed similar sentiments to yours. @Adrian: As for a similar thing for PW, I don't know. But yes, PW is much easier. Everything is in the API! I think the alternative I have taken is to write tutorials instead.....if I can find the time for my website! . @Soma, you are partly to blame, hehe! . Your modules, code in the forums and in your Gists have inspired me to love and learn PW and PHP more and more...so very little time for tutorials Cheers
    1 point
  38. I guess I should mention that the pages were only printed on one side, so the bound tome might appear larger than it really is. That being said, I bet you would have to walk a long, long way to find another open source CMS guide written voluntarily for fellow users that is this good...
    1 point
  39. Can I ask about the app for a sec - what's the benefit over a fully functional mobile admin theme? The API makes an app easier to accomplish than in many other systems but unless there's a clear advantage I'm not sure I see the point to be honest.
    1 point
  40. Adrian, this module sounds more and more useful everytime. Next thing, you will be creating a "recording" mode that collects all changes that happen in PW during a certain period and makes it possible to export them as json to make late changes on published sites really easy! (did that sound like a suggestion?)
    1 point
  41. +1 Nevertheless, I noticed that create.js has a very clean approach and interface for inline editing so it is really worth trying. http://createjs.org/guide/ thanks for posting this.
    1 point
  42. This has been discussed about a dozen times already -- not saying that it's not interesting, just pointing out that there's already a lot of discussion and actually couple of (mostly) working examples available if you just take a quick look around
    1 point
  43. What a coincidence, I was reading about those earlier today. Anyway, it's already been discussed here: http://processwire.com/talk/topic/2516-in-page-editing-createjs-createphp/ However, I would like to present you with PW's version of inline editing so far: Fredi. You can read more about it here: http://modules.processwire.com/modules/fredi/ In my personal opinion, Fredi will do the trick. My only concern is that it's still in beta (although I don't have the slightest idea why).
    1 point
  44. I see ProcessWire as a system that you build things on top of, and that's the purpose of it. You don't download ProcessWire to start publishing content in 5 minutes (even if you can), but rather to build a site or application. So ProcessWire is much more of a tool to accomplish some end means, rather than the end means itself. ProcessWire and WordPress are completely different animals in this area (opposites really), and I think it helps to explain why you can't assume that WordPress and ProcessWire would be considered in the same light via the GPL. I think the GPL is flexible enough to handle both. That's not to say we might not switch to MIT in the future, just to avoid even having to talk about it. But I prefer to stick with GPL at this time. When it comes to my own commercial modules, I still consider them open source for the users that have them, and any fees paid are for access to and support of the product. The 1-year timeline applies only to support. You can continue using the products as long as you'd like.
    1 point
  45. It's a fact that you cannot (legally) combine GPL code with code under any non-compatible licenses. That'd be a violation against GPL and most likely against the other license too. Ryan's explanation (here) is based on his interpretation of what extending / building on another application really means; as he explains it, he doesn't consider 3rd party modules to extend ProcessWire -- they just use an API it provides. I would argue that this is a legal grey area and no-one really knows for 100% sure how these rules work or what's legally considered "extending". Even the code word "extends" doesn't necessarily imply that this is something that in legal sense "extends or modifies" ProcessWire and thus needs to be published under GPL (or not be published at all). Heck, even FSF, though they (or mr. Stallman of FSF) are the authors of GPL license itself, admit that they don't know for sure how this would be interpreted in a court: So, I guess it's ultimately a question of whether ProcessWire modules are "intimate enough" with ProcessWire core to make a single, modified program vs. running as separate, individual programs that just communicate with each other. Personally I'd trust Ryan's judgement on this, as it seems to make sense. What I would like to point out, though, is that legally it doesn't make any difference what anyone here, including Ryan, has to say about this -- what really matters is the copyright law and how it should / would be interpreted. In any case I don't think that anyone is going to sue you for creating a commercial module with closed license.. @dazzyweb: regarding FB and ProCache licenses, see this post by Ryan. AFAIK this applies to both modules.
    1 point
  46. Nobody has added it to the modules page. This is up to the author of the module as to whether they want to add it to the modules directory or not. I also wanted to mention that the dev branch of PW has a "locked" option for inputs, which may produce a similar result. See the screenshot:
    1 point
  47. Adrian, You are right, I missed the fact that you changed the after hook into a before hook. I edited my code accordingly and am glad to announce that now everything is working as exptected: class FieldHelper extends WireData implements Module { /** * getModuleInfo is a module required by all modules to tell ProcessWire about them * * @return array * */ public static function getModuleInfo() { return array( 'title' => 'FieldHelper', 'version' => 100, 'summary' => 'Hide fields depending on permission, role, or user.', 'singular' => true, 'autoload' => true ); } public function init() { // add before-hook to the inputfield render method $this->addHooKBefore("Inputfield::render", $this, "renderField"); } /** * If not empty, create unique value for textfield 'invoice_number' * */ public function renderField(HookEvent $event) { $field = $event->object; if($field->name == 'invoice_number' && $field->value == '' ) { // $id is unique, as page id is unique $id = date('Y') . "/" . $this->process->getPage()->id; $field->set('value', $id); } } } Thanks a lot for your help! Cheers, Stefan
    1 point
  48. I'd welcome the opportunity to do anything that helps move the ProcessWire project forward. I'm cool with interviews so long as I've got at least a rough list of questions ahead of time. I tend to think a lot before I speak so wouldn't want to waste people's time with "Hmm, let me think about that" or "Hmm, let me look up what FLOSS and FOSS means again." Since I don't work in an office with other developers, it's rare that I talk to anyone about webdev topics. But think I can do a good job when prepared.
    1 point
  49. I knew it, I was just keeping it to myself. Noooooooooooooooooot. (That was so terribly 1990's I know).
    1 point
  50. i.am first you can puut this in your head.inc tamplate or some includeded file before.u are doing $page->url $pages->addHookAfter('Page::path', null, 'hookPagePath'); function hookPagePath(HookEvent $e) { $page = $e->object; if($page->template == 'article') $e->return = "/blog/$page->name/"; }
    1 point
×
×
  • Create New...