Jump to content

Pete

Administrators
  • Posts

    4,045
  • Joined

  • Last visited

  • Days Won

    67

Everything posted by Pete

  1. You had me at git clone ssh On a more serious note, excellent first post - thanks!
  2. I'm in the process of building a complicated module and was thinking that being able to create the fields in the admin quickly, then export as a JSON string to use in the installer function would be much quicker than what I'm faced with at the moment - manually typing out the code for all the fields I need to add is taking a long time, so aside from the uses when copying fields/templates to other PW installations it would be fantastic to be able to generate the JSON and in a module's installer just do something like this if we wanted to change some template details or add some additional fields: $templatedata = json_decode($jsonstring); $fieldgroup = new Fieldgroup($templatedata->fields); $template = new Template(); $template->name = "template-name"; $template->fieldgroup = $fieldgroup; $template->save(); Or if we were happy with the template name we'd exported and all the fields, then this: // Adding template "template name" $templatedata = json_decode($jsonstring); $template = new Template($templatedata); // $templatedata contains template and field information $template->save(); The second option means you won't even know what the template is called unless you know how to read a JSON string, but I like its simplicity, and we can just put a comment above it as in my example Just a thought.
  3. It is a difficult situation pwired. I guess all you can do is sacrifice your evenings and weekends to some extent, even though your brain may be fried by the 9-5 work. I think to get back into the half-and-half situation again you need to to the extra work whenever you can to build up the client base and enough money to go back to half-and-half. Not sure how else you would do it.
  4. Yes, that's how you would do it. Think about it like this - each page in your web application presumably does something different, so needs a different page.
  5. Thanks Macrura - I love the detail of the first link in your post. That chap has done an amazing job breaking it all down The second link is... interesting. They have 3 hours down for a contact form and only 12 hours for an Android/iPhone app. I think the app could take longer than the rest, but then I'm not an expert in that area. The rest I suppose depends on your CMS as a contact form should technically take under an hour. Quoterobot looks like it could be a great timesaver, but however you do your quotes, charge what you think you're worth. Somebody linked to this in another thread here, and whilst it's all useful info, there's a bit at the end where someone has thanked Mike for giving them the confidence to charge more - like Mike says, they were almost certainly charging too little: http://vimeo.com/22053820 And the last link - I only realised recently that what he says is true and applicable to anything to do with web development. Another way to look at his statistic of 9/10 clients think the price is too high is that which would you rather have? 9 clients who have a hard time parting with $350 for example, or 1 client that is happy to part with $1500? He would need 4 of the cheaper jobs to cover what he makes in 1 at the higher price. Obviously I made some of those figures up for illustrative purposes, but you get the point. Of course, that's only workable if you can get away with charging that much and are comfortable enough financially and in general that you can turn away a job and wait for the next one if it's not quite right.
  6. I think the problems inherent with a table booking system are as follows (and this is with no real research by the way): Do restaurants have a good grasp of how long a table will be occupied for? If so, give them an option (maybe default to 2 hours per table) Different table sizes will affect the booking. You need to enter your party size ideally to see what is available. That or the restaurant may be able to push tables together in many cases - how do you deal with that? If you're using a web booking system for a restaurant and it needs to be up to date, the system needs updating whenever walk-in customers come into the restaurant. Either that or you can only book online X hour in advance (4 hours default maybe?). Basically, what I'm getting at is that there are far more variables in play than other booking systems. Booking a holiday cottage is easy - it's got a fixed number of beds - no problem. Booking a hotel room is slightly trickier - you have more options, not just with how many beds per room, but type of room. The more I think about it, the less likely every eventuality will be covered just by the module I'm creating. I think it far more likely that each scenario needs to be tailored and that they might be best as site profiles since there will be a lot of templates with them. As such, the module I'm working on may help as a starting point for accommodation/asset-based booking, but won't be much help for table bookings and other time-of-day based scenarios. At least, not in version 1.
  7. Pete

    ProcessWire on the web

    Erm... Yeah... "review". I see what you mean. Not intending to offend the author, but why start off talking about something by essentially stating you don't have time to look into it, presumably then look into it only as far as the video and a list of sites and then draw the conclusion that it's for more complex sites?It saves me hours over any other system even on the simplest of sites, and indeed brings me a level of enjoyment and a sense of fun whenever I use it because it has few-to-no limitations. But again, the exposure is welcome.
  8. Pete

    ProcessWire on the web

    Oh now that's nice diogo
  9. If you can wait, I'm currently working on a booking module for ProcessWire Currently it has specific needs for a specific job, so allows bookings on non-consecutive days, but will have consecutive days as an option by the time I'm finished (more useful for accommodation then). One thing I would say is that a restaurant booking system and a room booking system have very different needs. Both have been at the back of my mind when developing this module, but I need to look into the options required for a restaurant booking system when I get further along with this - the links in the first post here are helpful for that. There are some other nice features I don't want to give away just yet, but it might be worth waiting if you can for a few weeks.
  10. I'd probably need to see your configuration for the module, as well as exactly what you've put as the link in CRON - you can PM me a screenshot of the config if you like.
  11. Don't suppose you want to send a copy my way to have a peek at before you disappear for 3 weeks on your InterRail trip? You're such a tease!
  12. @kongondo - I noticed when adding this that Firebug shows lots of images not working so will look into this later on. @teppo - Not sure. Might be possible, might not, but I didn't see a setting for it. @Nico - yep, so we should probably add more people as moderators for more forums
  13. Pete

    Minify

    @Macrura - Most minified files have worked for me, but now I see that setting I guess they didn't have .min in the filename. @totoff - I just put everything on there usually as I didn't want to faff around with the core Minify directory for when I update the module, but I guess it's safe to run it without that folder. Best way to check is upload everything, check it works and then delete that folder and check it still works - not a lot can go wrong and it would be easy to put the folder back again
  14. @videokid - keep an eye on this topic as Nico is doing a great job - both with the module he's building as well as reading my mind as it's more or less got all the features I wanted too http://processwire.com/talk/topic/3907-markupnewsletter
  15. Just thought I'd chip in and say it's EXTREMELY unlikely that you would be able to copy passwords across. Most CMS systems use slightly different ways of encrypting passwords, and the point of an encrypted password is that you can't decrypt it - rather when a user enters their username and password to log in, it encrypts the password that's been entered and checks that against the value in the database. Having said that, it would be pretty easy once you've moved everything across to email all the users a link to reset their passwords, so that's a good way around it. The short version of the above is: no matter which CMS you are moving to, it's unlikely that you could copy passwords across. If you could point us to the URL of your current site we would be able to give you a better idea on how you might go about migrating your site, but I suspect Matthew has far more hands-on knowledge of Joomla than I do
  16. For that to work, you would have to use some recursive function in order to go through every category and make a UL tree from them. My question to you is: why do you want to output a massive tree of categories and list all downloads under each of them like you're trying to do in your code? It would make more sense to me if, depending which category you're viewing, it just shows the child category titles so you can click through to them as well as the downloads for the current category.
  17. EDIT: In fact I've just rolled it out across most forums where I think it made sense. The topic starter as well as moderators and admins can choose a best answer.
  18. You mean like this? I just enabled it in this forum for a test, as well as Getting Started, General Support and Modules & Plugins. I can see it needs some styling though so it stands out a bit more.
  19. I love you Soma Here's a more detailed example - again, this code needs to go in a Process module public function execute() { // This is our outer wrapper $outerWrapper = new InputfieldWrapper(); // This will be our first tab $tabOne = new InputfieldWrapper(); $tabOne->attr('title', 'Tab 1'); // I'm using InputfieldMarkup as I just want to output HTML - could be a form, some fields etc, but since I only just realised what InputfieldMarkup actually does (d'oh!) I'm going to use it lots! $markup = $this->modules->get('InputfieldMarkup'); $markup->attr('value', "And I'd have gotten away with it..."); // Append the markup to tab one $tabOne->append($markup); // Append this tab to the outer wrapper $outerWrapper->append($tabOne); // Here's another tab $tabTwo = new InputfieldWrapper(); $tabTwo->attr('title', 'Tab 2'); $markup = $this->modules->get('InputfieldMarkup'); $markup->attr('value', "...if it wasn't for those pesky kids!"); $tabTwo->append($markup); $outerWrapper->append($tabTwo); return "<div id='MyTabs'>" . $outerWrapper->render() . "</div>"; } And again, you need Soma's JS in your module's JS file: $(function(){ $t = $("#MyTabs"); $t.find("script").remove(); // to avoid double script execution $t.WireTabs({ items: $("#MyTabs > .Inputfields > .InputfieldWrapper"), id: 'ProcessExampleTabs' }); }); Lovely job
  20. Ah, no, I thought you'd just copied my example without changing any field names I've never used saveReady, but ryan explains it a bit here: http://processwire.com/talk/topic/1705-need-to-send-email-notification-after-a-page-has-been-published/?p=15786 I should probably use that instead from now on I'm not sure why the code you posted doesn't work though unfortunately - I don't have time to test it right now either so hopefully someone else will be able to help.
  21. Loving the look of this - it would probably be relatively easy to integrate with Mandrill for sending (and lists etc, as that system handles bounces etc). Something I'll look into myself further down the line unless you beat me to it
  22. My code would only work for the OP as he had those specific fields that he wanted concatenating into the page name Your code looks like the default behaviour for PW anyway - it makes the name from the page title already so not sure what that will achieve? I suspect you are wanting the name (slug) to change if the page title ever changes, but beware as if you do something like this on a page that has been on your site for a while then you could break links from external sites and search engines. I would suggest installing ryan's page path history module as well as this will automatically redirect links from the old URLs to the new ones.
  23. Thanks adrian - I forgot I'd even written that, but I need to do something very similar tomorrow so I'm glad you linked to it
  24. Yep, nothing like that in the core. The general rule is that if it's not something that the majority of people will need then it's not in the core.
  25. Netcarver kindly helped me with this some time ago: http://processwire.com/talk/topic/1111-integrating-flourish-with-processwire/ I now use Flourish in a number of modules, but there's no reason you couldn't adapt it for use in a template I don't think - it just needs to run before you try using any other flourish functionality.
×
×
  • Create New...