Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 12/30/2012 in all areas

  1. 4 points
  2. That's a good example sinnut, but a minor change to make it work: public function afterSave($event) { $page = $event->argumentsByName('page'); // get argument by name, more readable if($page->is(Page::statusUnpublished) || $page->publish_date) return; $page->publish_date = time(); $page->save('publish_date'); } isset() wouldn't work in the previous example as the field exists but is not populated it will always return true. Also $page->of(false) isn't really required as in a module the page has no outputformatting on anyway. To populate the datetime field you'd just give it a timestamp. As the field holds input-outputformatting date formatting it will take that. Not wrong but no need to. If you also need to restrict to certain pages you could add a check for the template before status check. if("article" == $page->template) return;
    2 points
  3. Hi, I wrote a new module this evening: Template Editor This module adds the possibility to edit and rename template files directly from the backend. Requirement: It's important to have this module installed and PW 2.2 running. Download: http://modules.proce...emplate-editor/
    1 point
  4. Greetings, I came across this intro video of an "office application" made with ProcessWire. Not too much information on it, but what's shown looks very interesting... Here's the link: http://m.youtube.com/#/watch?v=d6lWyfk53mg&desktop_uri=%2Fwatch%3Fv%3Dd6lWyfk53mg Anyone know what this is about? Thanks, Matthew
    1 point
  5. I know it's not the same thing as David was requesting, but there's also this module for scheduling publishing of pages in the future as well as optional unpublishing: http://modules.processwire.com/modules/schedule-pages/ I use this module on one site on the rare occasions I have lots of news and want to spread the articles out over the week. Just thought I'd mention it as if you were using some of the code the guys above have come up with you want to be careful to match your fieldnames with both modules (changing $page->publish_date in the above code to $page->publish_from would do the trick).
    1 point
  6. One of my clients specializes in putting on conferences/summits around the world, primarily focused on architecture and sustainable design. I mentioned to them how some users here (starting with Netcarver) had expressed interest in a ProcessWire meetup or conference in the UK. This client does conferences in the UK every year and they are extremely enthusiastic about ProcessWire and interested in helping us to put on a conference by letting us collaborate with their conference and share the same venues and accommodations. This would help us benefit from their expertise in putting on conferences (which they've done for more than a decade), as well as help [significantly] on costs in reserving the venues, food, hotels. I have worked with this client since 1994 (18 years), so have a very high level of trust with them. The conference would be in August 2013 and be 1.5 days in London at a major ad agency, then we'd step on a train for an hour or so and do the rest of the conference in Cambridge at Kings College for another 1.5 days (total 3 days). This would be a small but relatively formal conference with presentations and workshops covering everything ProcessWire, design and web development. We'd cover topics at a higher level than you'd find anywhere else in the world. I don't yet have an idea on costs except to say that we'd find a way to make it accessible to as large of an audience as possible, and it would be completely non profit, food and accommodations (for those that wanted it) included. Yet, it'd still be higher class and more personal than any other webdev conference. This is about a year out, so I'm interested in finding out who'd be interested in this. Please 'like' or reply to this post if you would be interested in attending (or presenting) at this conference.
    1 point
  7. That's great. I felt the same way when seeing even I could make such powerful modules without learning something very difficult. It's not very different from when using API anywhere in front-end. So you can use your knowledge already aquired and start dreaming away. Agreed. See examples on previous post
    1 point
  8. I don't have coding skills but if you have some this would be an easy module i guess. Something like: /** * * "Set Publish Date" module * */ class SetPublishDate 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' => 'Set Publish Date', 'version' => 001, 'summary' => 'your summary', 'singular' => true, 'autoload' => true ); } /** * Initialize the module * * ProcessWire calls this when the module is loaded. For 'autoload' modules, this will be called * when ProcessWire's API is ready. As a result, this is a good place to attach hooks. * */ public function init() { // add a hook after the $pages->save $this->pages->addHookAfter('save', $this, 'afterSave'); } public function afterSave($event) { $page = $event->arguments[0]; if($page->is(Page::statusUnpublished) || isset($page->publish_date)) return; $page->of(false); $page->publish_date = date('Y-m-d H:i:s'); // not sure about the date format $page->save('publish_date'); // save only specific field like this? } } Perhaps someone more experienced can help you out
    1 point
  9. Have you tried this ? http://www.fyneworks.com/jquery/star-rating/
    1 point
  10. Are there any plans to upgrade the TinyMCE editor again in ProcessWire 2.3? The current solution works fine overall, but what I'm really missing are the webkit image resize handles (integrated since TinyMCE 3.5.5).
    1 point
  11. I don't think something like this is going to happen on the degault field, because PW doesn't make any assumptions concerning your markup or css. What you can do is copy the Inputfieldimage module and add a dropdown or radio field to it, so you have that options also with multiple images. The preview thing won't be that simple, but have a look at Nico's preview module, maybe it will be useful in this situation.
    1 point
  12. A little more OT, but I have to disagree with what you're saying. When using find() the order of sort and limit doesn't matter at all if they're both used at once. The database query would be like '... ORDER BY xyz LIMIT nnn' either way. And if find() was used for an already existing PageArray, this would still hold true - works perfectly both ways (sort is executed first). But, if the sort and limit were done separately, it's a different story (left other selectors out): find('sort=-created, limit=1') equals to find('limit=1, sort=-created') ..but.. find('sort=-created')->find('limit=1') does not equal to (unless there's only one item in the array we're dealing with) find('limit=1')->find('sort=-created')
    1 point
  13. So you want to show the editor the pages in one view and not in another view? Have you tried to move the Features one down? For example, instead of /features/ you create a /settings/features/. You hide the settings page. Perhaps this will work since features will be invisible, but only by inheritance.
    1 point
  14. Would be great if there would be a possibility to set a specific limit for the amount of repeater items - or is there such a possibility and i just didn't found it? Cheers, Christian
    1 point
  15. Per @nik's request (from awhile ago), I've expanded support for the parent field selectors that you can use with $pages->find() and related functions. You can now pass those functions selectors like this: parent.name=about parent.name=about|contact parent.title*=Something parent.body*=Something|Something Else parent.title|parent.body*=Something|Something Else parent.template=basic-page parent.template|template=basic-page|fancy-page // and I think this is the one that @nik requested: parent.title|title*=Something Pretty much any combination of stuff can be used with the parent selector. Previously, you could only use id or path. As an added bonus, you can now also perform partial matches on a page name: name%=something name^=some name$=thing parent.name%=something parent.name|name%=something parent.name|parent.title|title%=something|something else These new features are available via the latest commit to the dev branch (upcoming 2.3).
    1 point
  16. Although not frequent, and usually not for very long, databases will experience problems and just not be able to be connected to. An error message of just "Unable to complete this request due to an error. Error has been logged." just doesn't seem too friendly to visitors. Perhaps I just haven't seen this (or discovered how to do it), but if it isn't currently an option (or a hook) for this, it'd be a welcomed thing. (If there is a way to do this, I apologize...it's sometimes hard to come up with the proper search terms to find results.)
    1 point
  17. As yesterday promised, the preview of the actual version. This Video shows the dependencies of the single modules. Dependencies of clients, invoices and accounting. Creating a client, creating a quotation assigned to this client, converting the quotation into an invoice, adding some invoice items and finally close the invoice and handle it over to the accounting module. https://youtu.be/WOUz3jfKOeM For those interested I attached a screenshot of the pagetree:
    1 point
  18. Cropping direction has been added to the latest commit on the dev branch. Example of usage: $image = $page->image->size(300, 200, array('cropping' => 'north')); // or you can use this shorter syntax $image = $page->image->size(300, 200, 'north'); That would make it crop towards the top of the image. Possible values for crop direction include: northwest, north, northeast, west, center, east, southwest, south, southeast or a blank string to disable. If you prefer, you can use short versions like 'nw' for northwest or 's' for south, etc. Crop direction can also be used with the width/height functions: $image = $page->image->width(300, 'north'); PW now supports this shorter syntax for crop direction, and also with quality and upscaling. If you specify a string for the last argument, it assumes you are specifying a crop direction. If you specify an integer, it assumes you mean a 'quality' setting. If you specify a boolean, it assumes you mean an 'upscaling' toggle on/off. If you need to combine multiple options then of course you should specify an array, as before. This behavior applies to the size(), width() and height() functions. If interested, more details are in the function comments. Thanks to interrobang for providing the implementation of crop directions.
    1 point
  19. I have some news about the potential conference in 2013. When I posted about this originally, I didn't know that we had another baby girl on the way, due around May. I am very happy about this, but it would also interfere with my ability to attend a conference. The baby would be too young to travel, and it's too much for me to ask my wife to be alone with a newborn + a 3-year old, while I travel across the world. So I have to put this conference plan on a back-burner while we figure out a better time to do it. Thank you for all of your interest in this conference. I'm really thrilled at all the enthusiasm this conference idea has received, lets plan to reschedule.
    1 point
  20. Don't use images in text wysiwag. Seriously. I think u can avoid a lot of issues. Think if you replace img with a different size and ratio. I stoped doing it and use other ways a long time ago. You just give away control, and editors start to think they need to do design. All websites we done with free images in text are horrible after 1 month in hand of a client and lots of maintenance needed. Use repeater to make blocks with images and a option to align or size. Or intext tags where to put image. Theres even a module. And your back in control. And other nice effect.
    1 point
×
×
  • Create New...