Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 12/31/2013 in all areas

  1. AutoSave This module saves the page via ajax when editing in the admin. The interval for saving the page is configurable in the AutoSave module settings. By default it will only be enabled for unpublished pages. So far it seems to work fine for all fields and supports multilanguage. There's a message dialog show on top of page when saving happened with either a success or error. Requirements ProcessWire 2.3+. Haven't really tested with 2.3. Known Issues Nothing really obvious so far. Note that when you have multiple editors editing pages, it would be possible 2 persons editing the same page would overwrite each other, since the page is autosaved! The only solution for this would be to have my PageEditSoftLock module enabled with the complete "Lock" option active, so the page would be locked for editing. Todo Add some checks, if connection is lost. To be defined This module is currently a proof of concept. This module may not be suitable for all instances, but for personal use it may help preventing loss of long edits, most likely blog posts. Not sure this should be used for regular sites with clients editing. Most likely there's some more issues that interferer with what a CMS "page save" has to deal with. So you might find some ugly stuff happening. Thanks to Apeisa and his great Fredi font-end module, from where some logic is borrowed to save the page via ajax. Download https://github.com/somatonic/AutoSave So, that would be my last stroke for this year! Have a great silvester party and a happy new 2014!
    4 points
  2. I'm not sure what login you mean but for custom login using $session->login(user,password) you'd have to code it like this: //.. try{ $u = $session->login($username, $pass); if($u && $u->id){ $session->redirect("/somepage/"); } } catch(Exception $e) { echo $e->getMessage(); }
    2 points
  3. Google Maps doesn't like being initially hidden. It will produce the effect you see in your screenshot. The solution would be to initialize the map at the time you intend to show it (like after the reveal modal opens). An alternative would be to trigger an event on the map, telling it to redraw when shown. Credits to diogo for figuring this one out, as it's the solution we implemented in the InputfieldMapMarker for when a map is on a tab. For Zurb Foundation reveal, you'd do something like this below. The "mgmap1" is the map from MarkupGoogleMap module, so you may need to change that according to your map name, etc. The setTimeout() below may not be necessary, or you may be able to reduce the delay from 250 down to 100 or something. $(document).on('opened', '[data-reveal]', function () { setTimeout(function() { google.maps.event.trigger(mgmap1, 'resize'); mgmap1.map.setCenter(mgmap1.options.center); }, 250); });
    2 points
  4. This could be down to the IP address of your connection. The ProcessWire config variable 'sessionFingerprint' ensures consistency between IP address and user agent of the session information. This helps to prevent "session fixation" - whereby malicious users could potentially use your session cookie information to impersonate you and gain unauthorised access to the site. To determine if this is the cause, try changing sessionFingerprint to false in your site's config.php file, and carry out your VPN connection test again as you described.
    2 points
  5. You obviously don't know my AdminHotKeys module.
    2 points
  6. I'm already on a proof of concept thingy as there's already a saveAjax feature in ProcessPageEdit. Though I also think what's so hard to write an article in a text-editor, or just hit "save" once in a while when you write an article that takes time.
    2 points
  7. I've been experimenting with an addition to VersionControlForTextFields. Let's say we have a Page with some revision data. $soup = wire('pages')->get('/specials/soup/'); echo "<br/>Current soup: " . $soup->title; //Doing this gives Page a new method wire('modules')->get('ProcessRevisionHistoryForTextFields'); //What kind of soup were we serving last week? $soup->snapshot('-1 week'); echo "<br/>Old soup: " . $soup->title; After the call to snapshot() any version controlled fields of the Page will have the values they had at the time specified. The changes to make this work are made to the ProcessRevisionHistoryForTextFields.module file. Add one line to the init() public function init() { parent::init(); $this->addHook('Page::snapshot', $this, 'pagesnapshot'); //add this line } Add these: public function pagesnapshot($event) { $page = $event->data['object']; if ($data = $this->snapshot($page, $event->arguments(0))) foreach($data as $k=>$v) $page->$k = $v; } public function snapshot($page, $time='') { $id = $page->id; if (!$id) throw new WireException("Missing required param id"); if (!is_integer($time)) $time = strtotime($time); if (empty($time)) $time = time(); // how many of this page's fields do we keep history for? (configured for each template) $ct = count($page->template->versionControlFields); // find values $sql = " SELECT m.fields_id, m.pages_id, d.* FROM " . self::TABLE_NAME . " AS m, " . self::DATA_TABLE_NAME . " AS d WHERE m.pages_id = $id AND d." . self::TABLE_NAME . "_id = m.id AND m.timestamp <= FROM_UNIXTIME($time) ORDER BY m.timestamp DESC "; $result = $this->db->query($sql); // generate data (associative array) $data = array(); if ($result->num_rows) { while ($row = mysqli_fetch_assoc($result)) { $field = $this->fields->get($row['fields_id']); if (!array_key_exists($field->name, $data)) $data[$field->name] = $row['data']; if (count($data) >= $ct) break; } } return $data; }
    2 points
  8. What a coincidence that this thread turns up now. I've just finished a system for managing users and was wondering how best to share it. It consists of five template files, one stylesheet and a slightly modified InputfieldPassword module (I changed the validation and some text). You setup a page for each template, all of them children of a hidden /access/ page. The various forms are made with InputfieldForm. Each template sets $page->body and then includes a basic-page.php template file, like we see in many of the processwire profiles. /access/login/ /access/profile/ (for changing your password, username or email address) /access/logout/ /access/register/ (for creating a new user account) /access/reset/ (for when you've forgotten your password) Each user acount must have a unique username. An email address is collected for each user but does not need to be unique (it's okay for someone to have more than one account). When setting an email address we verify it by emailing a message to that address. Confirm by clicking a link or pasting a code into a form (an 'email-confirmed' role is added). Requests to reset a forgotten password are verified by emailing a message to the account's email address. Confirm by clicking a link or pasting a code into a form. To close the registration process set the /access/register/ page status to Hidden. For my own purposes, this is a convenient parts kit I can quickly add to a project. Seems like the easiest way to share it is as a profile. I suppose I could bundle up the files and create a module which installs everything for you but doesn't that seem just a bit overdone? Any suggestions? Good points were made above about coding standards, translatable text strings, etc. I'd have to do some work on that. I value the multi-language capabilities in PW but hardly ever need them in my work so if the community insisted on it being standard would that encourage me to get over my aversion to the syntactic baggage it requires or would it discourage me from sharing? For modules the Proof of Concept category works pretty well. It's nice to share unfinished work. Often the author's intent is easier to grasp in these less filled out implementations. Often there will never be a final version because every project is different. Framework add-ons can actually suffer from too much completeness. Do you want to transplant a seedling or a mature plant? Perhaps coding standards for modules could be expressed as a checklist and implemented as tags in the Modules section of this site. Likewise for profiles and any other kind of package we may come up with. Thanks to the many generous and thoughtful coders here.
    2 points
  9. Dear Ryan, I think that the way you've created the interface to the more exotic field types in the Admin back end is really great. I'd like to be able to use any or all of those fields on the front end, via the API, more easily, based on a clear and simple set of notes and possible division of .js and .css files per field. For example, to get the calendar popup working in edit mode, in a front end app, I had to include these files in the <head> section of my pages: <link type='text/css' href='/site/templates-admin/styles/JqueryUI/JqueryUI.css' rel='stylesheet' /> <link type='text/css' href='/wire/modules/Inputfield/InputfieldDatetime/InputfieldDatetime.css?v=103' rel='stylesheet' /> <script type='text/javascript' src='/wire/modules/Jquery/JqueryCore/JqueryCore.js?v=183'></script> <script type='text/javascript' src='/wire/modules/Jquery/JqueryUI/JqueryUI.js?v=192'></script> <script type='text/javascript' src='/wire/modules/Jquery/JqueryWireTabs/JqueryWireTabs.js?v=103'></script> <script type='text/javascript' src='/wire/modules/Inputfield/InputfieldDatetime/InputfieldDatetime.js?v=103'></script> <script type='text/javascript' src='/wire/modules/Inputfield/InputfieldDatetime/jquery-ui-timepicker-addon.js'></script> To get the multi-column checkboxes working in edit mode, I had to include this <div> in my edit form: <ul class='Inputfields'> ... input field here ... </ul> and then I copied a variety of CSS classes from your core code into my main css file. I'd like to be able to use the image upload field with the progress bar, and many of the other specialized fields that you've created, that require special javascript or css to run properly. My suggestion is to create js and css files per field -- or field family, that can be easily included, without extra weight from other items, with notes on each field, e.g. - for xyz field, include these .js and .css files, and add this xyz html to your edit template (if necessary) This would allow developers to *easily* use the full power of the admin fields in front-end edits, which would be a truly glorious thing. Thanks! Peter
    1 point
  10. Dear Soma I shall rush off and try it immediately A Prosperous new year to you and yours! Joss
    1 point
  11. $parent = $page->parent; $current = $page->id; $overviewchildren = $parent->children("id!=$current, limit=4"); Or maybe $overviewchildren = $page>siblings("id!=$page, limit=4"); Edit: oh and welcome!
    1 point
  12. Thanks Soma - I knew it would be something easy like that - works perfectly
    1 point
  13. Not hard, just inconvenient. CKEditor in inline mode is comfortable enough to finally make writing with RTE in browser comparable to writing in text editor. Having one go-to tool instead of two feels slightly better. This is very much a question of preference, so there won't be any "correct answers" here -- some users prefer to write at Admin and others will probably always write with Word, Notepad, Notepad++ etc. AdminHotKeys is only partial answer to saving issues mentioned here, unless I'm missing something: it still requires reloading page, which (especially when working with crappy connections) can a) take ages and b) result in timeout and lost data if you're not careful. Isn't that exactly why we're discussing background save methods here? One more thing to note is that any autosave / background save feature will also need to handle exceptions (such as being momentarily disconnected) properly, otherwise they could even make things worse; user must know what's happening, when last successful save occurred, whether there are connection issues etc. Basic stuff, but very important nevertheless.
    1 point
  14. About a week ago I wrote a blog post while on train and some odd hiccup -- not sure if it was connection issue or just something I did wrong as I was using a tablet, which is far from perfect tool for this job -- but the whole post simply disappeared. Needless to say, I wasn't very happy. Sure, I should've saved more often, so it was really my mistake, but that was still an example of a situation where autosave would've saved the day (quite literally.) My needs are quite simple so I'm currently thinking of writing a very simple module for that purpose alone, but it's good to see that others are toying with similar ideas here. My issues are pretty far from a full-featured "save as draft" solution, but still
    1 point
  15. Just picking this up again as someone has just asked me about this and I saw this post: http://processwire.com/talk/topic/5236-admin-session-logs-out-when-wireless-connection-has-hiccup/ I think the use of CMSs for drafts will increase simply because the idea of "working in the cloud" is now the new "in thing." Several of my clients (music clients, mostly) use Google Sites for a lot of their project work, and they are very used to the fact that is saves every so often, quietly in the background, with only a small notification appearing off the work area. Also, ProcessWire has the ability (as has been shown by others) of being used as a web application for everything from help desks to sales and CRM to general intranet functionality. In these scenarios, perhaps when you are conducting a live interview on the phone and typing into a PW application, some sort of autosave or draft autosave is essential to save embarrassment or possibly the job. General autosave would be easy enough - the page does not need to be refreshed as you are still working so it can just save in the background. This is fine for a page that has yet to be published (autosave should respect the current state), or for something like a client record or help desk record where there is never a public viewable version as you would have with a blog, for instance. Autosave for updating an existing published article is a little more complicated and probably should be part of a page version system. From my point of view, I would see this as just being saved as simple hidden child pages with some sort of specialised ID that shows that they are directly related to the page for versioning rather than as children for other purposes. Clicking Save as Draft or the Autosave would save to the child. Clicking Publish would save to the main page.
    1 point
  16. This is pretty much how I'd solve this, still no need for any core changes or additions Create new template called "symlink", add page type field "symlink" with value limited to single Page (use PageListSelect as input field type) and then in template file do something like this: <?php if ($page->symlink instanceof Page && $page->symlink !== $page) echo $page->symlink->render(); else throw new Wire404Exception(); Now you can add as many symlinks you wish and easily choose which page each is tied to. Don't forget to add canonical tags to let robots know which version of this page is the "original" one, though, or you'll have serious SEO issues.
    1 point
  17. I was incredibly intrigued when I found PW two days ago! A lighter-weight Drupal, enabling a much more agile way of working, is exactly what I have desparately needed for the few side projects I'm doing in my limited time besides my developer work at Uppsala University. My first PW site ever produced is now up (although somewhat a work in progress): A humble little site for our humble little firm: RIL Partner ABAttaching a screenshot as well, for your convenience.
    1 point
  18. That $p->snapshot() stuff is supercool! It would be trivial to create "timeback machine" for frontend...
    1 point
  19. Yes, that would be great. FYI, the first thing I had done was to simply modify ___execute() so I could pass it a page id and it would return the $data array of revisions. Then I wrote the snapshot function. Then I got the idea to hook it to pages. A couple more thoughts... Normally the revision data will be limited by data_max_age or data_row_limit settings. If you give the snapshot method a timestamp older than the oldest revision data you get current Page data and don't know whether that's really what the page was like at the specified time or not. The simple change below helps but doesn't tell you the difference between a Page which never changed and a Page with changes that are no longer in the database. public function pagesnapshot($event) { $page = $event->data['object']; if ($data = $this->snapshot($page, $event->arguments(0))) foreach($data as $k=>$v) $page->$k = $v; else return false; //ADDED THIS } Is there a simple way to have the snapshot capability automatically hooked into pages which have tracked fields? I'm wondering if the VersionControlForTextFields gather method could set that up. I noticed after I deleted a page that the version info for it did not go away. If data_max_age hasn't been set it won't age out and get cleaned up.
    1 point
  20. Excellent Yes, that's probably right. A more robust way might be to add the photos via an AJAX, one at a time, showing progress as it goes, and PW would only deal with one picture at a time. It was a quick win for a site that only has a handful of photos at a time, and the server it's on can do those rather quickly, and it hasn't been a problem. The screenshot is displaying the "Grid" functionality, which is part of the new default admin theme on the development branch of the main PW repository. Perhaps there is scope here to work towards a grand, unified Flickr module that offers multiple ways to access and display photos?
    1 point
  21. Hello All, After spending most of my free time this year building a large web application with ProcessWire, I've finally found the time to migrate my magazine site from MODX Evolution to PW. http://significatojournal.com I'm very, very pleased with ProcessWire, and will no longer be using MODX. In a separate post, I'll write up a case study of how I did the migration. But for now, I really thank Ryan and all the extremely supportive gurus in this very fine PW community. Peter Brown
    1 point
  22. thanks for the replies, and sorry for the late response, I already kind of gave up on cloud9 and got it working on the above mentioned koding ide without mayor problems but as I'm still figuring things out on my chromebook I'm still going to try and get processwire installed on cloud9. So tommorow I'll give the stable branch another go and read through all the info on manual installs and if that doesn't work I'm going to switch to the dev branch. I'll post my experiences here Tino
    1 point
  23. Disabling the CSRF is likely to fix some issues that can occur with sessions and cookies. Are there any other important features or quirks with the hosting environment that you're aware of? Have you used the same service before? Sometimes hosting environments do weird things with the way they handle sessions. One option to look at is to use the "Session Handler Database" module. It should be present in your PW install, and just needs Installing. However, it will be using the database now instead of local files - which comes back to the performance problem you mentioned Whenever the website is hosted away from the database on separate networks, the more likely it is that it will be slower. Template caching might help in terms of the front-end, but not for the admin pages. PW's database caching ($config->dbCache in config.php) is set to true by default, so changing that is unlikely to help. What is the reason for using a remote database in this instance? Are there any other alternatives or different configurations that are available?
    1 point
  24. @Julian: since PW is simply using MySQL NOW() function, I'm guessing that your database has different opinion about correct timezone than PW. Typically it would be using the server timezone, but that's not entirely certain. This Stack Overflow thread contains some tips that could prove useful here.
    1 point
  25. OK, so finished my marathon forum catch-up...14 pages of threads! Here's signs you've been away too long..... 1. You get this message when trying to like a post... 2. Soma has (finally) updated his personal web site! 3. Pete trimmed his "facial" hair (ahem, fur) 4. Arimo is the new Arial, no Arial is the new Arimo, no actually Arial is still...uh, Arial..... 5. Willy C is designing a new top secret Admin theme. ;-) 6. You are no longer sure what this means.. 7. It's Christmas eve and you are starting a lousy thread... 8..........?
    1 point
  26. Indeed. We all need to cut down our working hours or take more holiday to keep up I had 14 pages to get through too, but I chose to go at it forum by forum, picking topics that looked interesting to read (you can hover over a topic and a little down arrow will appear), then click that to see a short preview) and reading them, then marking the forum as read. Cheating I know, but I have no trouble in admitting I don't have time to read everything any more when it's backed up as much as that
    1 point
  27. I took the liberty of merging your two forum accounts - the details from your newer one should work fine. I very much doubt a full-blown forum solution in ProcessWire will appear any time soon - the general suggestion is to use another piece of software. This is because forum software is usually really complex, taking teams of developers at least a year to create and years after that to perfect. I know this is why ryan at least suggests using other software for this side of things - see here: http://processwire.com/talk/topic/572-release-discussions/?p=48129 If you've ever looked at forum admins for the likes of Invision Power Board you'll see that there are dozens of pages just for managing them as well so it's not as straightforward as it might seem at first. That said, it is possible to build modules that bridge the membership between forum software and ProcessWire. I've done it myself (and will one day get around to polishing and releasing the module): http://www.strategycore.co.uk - note that you would still manage the forum in the forum admin but you then have available the membership functionality and members and their groups exist in ProcessWire as well. As kongondo says, Moodle is an entirely separate piece of software. I have, in the past, shoehorned several different applications to work together and the results are always painful when you have to update one of them (not usually ProcessWire as the API functions stay the same) but even something like the forum bridge mentioned above could rbeak on a newer release of the forum software as other developers just will not design a good API and stick to it. That's one of the things that makes ProcessWire exceptionally different - ryan has gone for as close to human readable code as possible and it doesn't matter so much how the code works behind the scenes - it could all change behind the scenes (but it won't) and the functions available to you in the templates to pull out the data would still be the same. I think you may need to step back and take a look at what you want to achieve in terms of functionality as Moodle for example already has its own forum module. No offense intended, but you appear to be looking at different solutions, liking the idea of some of them and then deciding you want them all, rather than explaining what features you need. I would suggest that it is actually possible (with enough time and money) that you could recreate what you want from Moodle in ProcessWire and do away with one of the three software packages entirely, then hook it up to something like IP.Board if you didn't like Moodle's forums, but depending on your requirements from Moodle you could be talking about a year's work easily. That said, you can have forums, course modules and site pages all just in Moodle, so if time and budget are your constraints then you could already do it all in one package. There are also dozens of categorised plugin modules for Moodle on this page: https://moodle.org/plugins/
    1 point
  28. Had the same problem, and it turned out to be a classic: On Ubuntu, the default Apache configuration has turned off the "AllowOverride" setting for /var/www, so I had to edit my /etc/apache2/sites-enabled/000-default file like this (the changed part in bold text): From: <Directory /var/www/> Options Indexes FollowSymLinks MultiViews AllowOverride None Order allow,deny allow from all </Directory> To: <Directory /var/www/> Options Indexes FollowSymLinks MultiViews AllowOverride All Order allow,deny allow from all </Directory> ... and then restart apache with: sudo service apache2 restart (Didn't even need to change the RewriteBase setting in my .htaccess file, although I have a subfolder named "procwire") Hope this helps!
    1 point
  29. It looks like it's something to do with the encoding (or not) of the accented characters in the "description" entry. I set up an RSS template with the same code and content you provided, and it worked OK for me. In order to reproduce the problem, I had to save the file with an encoding that wasn't UTF-8 (for me, the other main choice is ISO-8859-1). So - try saving your template file with UTF-8 encoding and see if that solves it.
    1 point
  30. Fieldtype File from folder I “needed” a module to select a file from a folder, using an <select> and store the filename. There's only 1 setting: The path to the folder to list. The Path is relative to the templates directory. So if your files are located in /site/templates/scripts/, type scripts/ in the `path to files` setting. here's the gist, enjoy. This module is released because it was useful for me in several projects.
    1 point
  31. Merry Christmas everybody! Sorry for not being here guys, I had to quit web-development for a while. Still come here regularly and read a lot of cool stuff you post. Hey, Valan. I guess this is what you need: Also check out these modules for more granular access control: http://modules.processwire.com/modules/page-edit-per-user/ http://modules.processwire.com/modules/page-edit-per-role/ It should be enough to solve this problem.
    1 point
  32. ...and 12 pages later here I am.... very, very late to the party....I am liking what I am seeing and loving where this is going. I'll have me one "warm", thank you very much Ryan and all other contributors...
    1 point
  33. Looks awesome - some really great photos there!
    1 point
  34. Hi Uniweb. Welcome to ProcessWire and the forums *Bilingual:: Yes, right out of the box. There are various implementations explained here in the forums. Have a look at the docs for starters. http://processwire.com/api/multi-language-support/ *Membership:: there are 5 different types of users: teachers, research workers, administrative staff members, students and anonymous. Yes, again, there's various implementations. This is about users and access. See this thread for pointers and other links. http://processwire.com/talk/topic/3946-membership-module/ *Moodle integration:: teachers should be able to use Moodle from our domain I am not sure exactly what you mean by integration. Moodle is an application in its own right. Did you mean shared users, for instance? Others will be chime in about this am sure. *Blog. Not sure if I can integrate a built-in Blogger blog into Processwire. Or is there a blog feature already in Processwire? Yes, PW already has a blog profile....it is also easy to roll out your own (this depends on your dev skills though) http://processwire.com/talk/tags/forums/blog/ http://modules.processwire.com/modules/blog-profile/ *Forum would be a nice addition although I'm not sure if it's possible with Processwire? There's no native PW forum. There has been talk though about developing one. You will be better of (I think) for now using a solution such as IP Board. Sorry for the quick answers. I hope they get you going... ..others will chime in with better responses...
    1 point
  35. Looks like ya'll had a great vacation, welcome back. Merry Christmas & Happy New Year to you and your family as well.
    1 point
  36. Hi All, First of all a big "THANK YOU!" to the community of ProcessWire and its founding father! It has been a great adventure developing this site with ProcessWire, allowing me to focus on getting things done! http://www.goaroundeurope.com On thing that was great, for me and for the site owners is the widget system I created. I used Pagefields for including a multitude of widgets that the site-owners place on pages in the site. They can create their own widget too and reuse them throughout the site. ProcessWire not only helped me during development, but the backend is very user friendly for the site owners. This was one of the major factors I considered when choosing the platform to build this site on. I only have to develop it once (and maintain/extend it ofcourse), but they have to use it day in day out....
    1 point
  37. I just committed suic.. ehrm an update to ColorPicker. As of 2.0.0 you can enable output formatting of the field in the details settings. When enabled it will format value directly from AADDEE to "#AADDEE" and "transp" to "transparent".So you can now simply write: echo "background-color: " . $page->color; // outputs // background-color: #AEADEA added converting "0" settings to "000000", just in case This update should be save to update and backward compatible, but as always you should first test on a development server if you have a chance. In case something went wrong just ask here in the forums and I'm sure it will be solved within short time. Thanks
    1 point
  38. I work on multiple devices, ranging from phones (rarely) and tablets (not so rarely) to desktop machines. Having everything properly set up no matter what device I start (and no matter whether I've ever even used it before) is cool. I'm also most productive when I don't have to spend time adapting to new environment every time I start different machine, so having a consistent experience would definitely be a big plus. Personally I've solved most of these by having everything set up server-side, making browser and SSH client (and, though that's apparently going to change pretty soon, Photoshop) only things I really need to start working and be productive. Nevertheless I can see why some people might not like that and would actually prefer some horrible mouse-driven graphical IDE and other similar productivity killers.. From company's point of view, on the other hand, this just makes sense; not only does it make new kind of collaboration possible (like Joss already pointed out) and (theoretically) even make moving people from one project to another a breeze, it can also decrease costs of each new employee. No more high-end Macs, pricey IDEs and self-hosted complicated environments when all you need is couple of cheap thin clients and web-based, monthly billed app. That, and the (sad) fact that when that environment is developed far enough your employees don't really even need to know what's happening behind the scenes (Git, whatsthat?) when everything just magically works. Lower requirements when hiring new people often equal lower salaries.. and each new guy takes shorter time to learn the ropes and start being productive. I could list a dozen or so other benefits, but I think this pretty much summarizes it
    1 point
  39. This is where I put my hands up and say I aint a tech! But, isn't it usual to do this the other way around? In other words, write a script that runs in each of the clones and looks at the master and does a file compare, then updates if required. So, pull the new bits rather than try and push them.
    1 point
  40. In addition to that, if you really just need to save one field, you can always use $page->save("my_field"). Logic (change tracking etc.) behind it is a bit different, but it's also usually faster. Not that it would, in most cases, really matter Edit: by the way, it looks like Ryan's example is about creating new pages with a custom frontend form? If you want to edit one field of current page, it's a bit easier than that; no need to create new page etc. as you can simply set value from $input->post->my_field to $page->my_field and call $page->save() (or $page->save("my_field")). Don't forget to use $sanitizer, though..
    1 point
  41. I started playing with these things about a year ago and sort of got bored. It seems to be solving a problem that doesn't quite exist, at least for the lone worker. I can see more advantages for collaborative projects, but then, things like GitHub seem to work pretty well for those - at least it allows separate experimentation and then pulling successful elements together. Personally, I still use an old PC as a dev server with Virtualmin and Samba on it, and I have just added WD My Cloud to the home network (which is accessible from the web) for other bits (There is a 4-bay, raid version now for people that want extra safety). That way I can hop around editors and IDEs as I fancy, Also, the faster everyones connections are, the less of a pain it is sending stuff to clients rather than archiving centrally somewhere for them. It seems that clients always manage to have problems with things like Own Cloud or Ajaxplorer, however carefully I set them up. Often easier to either email something or just bung a zip up on my server.
    1 point
  42. I'll start with saying that I'm not a 'coder' by far and sometimes I have the impression that most people here are and suppose that everybody is one. Being a 'performance artist' you could say I'm the opposite I need nothing else but my body to do my work. www.performan.org Nevertheless I've used the internet as a means to make my work public, since 1994 when Netscape 1.1 was released with the major introduction of frames. The Jockel Project Since 1985 I've kept a database of events that I find interesting, in notebooks, in a Commodore 64 environment, in a FoxPro database, in a Filemaker database, as a blog When I Was Buying You a Drink Where Were You? and now finally (and hopefully working from 1 Jan 2014) in a searchable website thanks to ProcessWire. Apart from that I worked as a cook, a carpenter, a welder, a painter, a teacher, a bus driver, manager of a tattooed pig farm in China and currently at an architecture school operating CNC machines and lasercutters but also unloading wood, card- and fiberboard or simply bricks from delivery trucks. And more actually I'm painstakingly recovering from a complex leg fracture since the unfortunate meeting of my left leg and a yellow car while driving my bicycle in Antwerp last summer. So yes, PHP and XML are hard work for me, but I'm willing to learn. And I'm happy to have discovered ProcessWire and appreciate the help I've had so far from anybody responding to posts and questions. Some things just aren't obvious, and even when searching the forums you don't always find what you want. Or sometimes something doesn't even looks like a solution until someone tells you to look at it in a different way - which you did, thank you. Oh, and if you're looking for some electronics to listen to while you're coding, our complete catalogue of electronic music since 1980 (vintage analog synthesizers, tapeloops and voices only!) is available for free at the Internet Archive.
    1 point
  43. So you're using ProcessWire Admin login for frontend login? ProcessLogin is only meant for backend login, and it has only a GET id for editing pages. So the id (if set with ?id=1231) will get appended to the form action url. This will be looked for and redirect to the edit screen after login. ProcessLogin::afterLoginRedirect is hookable, so you could replace it depending on what user logs in. After all since it looks like a front end login you should consider creating your own login form, where you have full control and don't let everybody see where your backend login is.
    1 point
  44. You use http://php.net/json_decode or a specific library to turn the json into a PHP array, and then use the PW API to create the pages. Here is a good example of how to do it: http://processwire.com/talk/topic/352-creating-pages-via-api You might also want to have a look at the code of this module to take some ideas, since it does exactly that: https://github.com/adrianbj/ProcessPageTreeMigrator
    1 point
  45. First of all, robots.txt needs to be in your site root (not /site/, but before that) to work properly. It's also possible to place it somewhere else, but then you'll have to find a way to make your web server serve it from site root, which can get tricky, depending on your web host and it's capabilities. I'd go with root to keep things simple. Favicon can be placed somewhere else than root, but root seems to work best as some browsers look from there automatically. I'm not sure how many browsers do this on their own, but the link tag is definitely recommended. Probably the only way to make sure that your favicon is found is a) placing it in the root directory and b) adding link tag pointing to it. Edit: Wikipedia provides some details about how different favicon settings are interpreted. This seems to support what I said above, i.e. placing favicon in site root and adding link tag, though that link tag is at least partially optional (I'd still leave it to make sure, though.)
    1 point
  46. Potential bug: Has anyone else noticed a problem with the inline datepicker option on the Date inputfield? With the new admin theme, the month/year selection is filling the container's width when it shouldn't - the screenshot attached demonstrates it better than I can put into words. The datepicker appears normally when configured on button click.
    1 point
  47. I quickly created a grey color scheme for the new theme for all the color haters out there https://github.com/ocorreiododiogo/pw_grey_colors
    1 point
  48. When I originally looked at this, it worked with some fields and not others (like rich text fields?). TinyMCE has such a plugin too, but it regularly results in false positives, which get to be a real annoyance. I don't like adding stuff to the core unless I know it's going to work universally across any field, triggering when it should, and not triggering when it shouldn't. Otherwise I know I'll get regular bug reports about this or that field not working with the functionality. Another factor is that I've never personally felt the need for it, nor has it ever come up with a need with clients, until Mike mentioned it above. So I've always seen this as a feature that would serve as a big annoyance for myself and many others. But if it's something that at least 30% of users would use, and it can be done in a way that always works, then I think it would make sense as a core module and I'd be happy to include it. That's so long as it's something people that don't want it can leave uninstalled. But in lieu of these conditions, I think it makes a lot of sense as a 3rd party module and I'm thankful that you've created it. It's been awhile since I've tried it, so I'll have to experiment with it again.
    1 point
  49. I'm not sure it's correct to compare RoR to ProcessWire. You would rather use RoR to build something like PW in Ruby i guess, for example http://www.locomotivecms.com/ I think it would be better to compare it to Zend Framework, Symfony or even Django (Python)
    1 point
×
×
  • Create New...