Jump to content

Pete

Administrators
  • Posts

    3,994
  • Joined

  • Last visited

  • Days Won

    64

Everything posted by Pete

  1. You don't have to apologise for having a life ryan I think I probably spend an unhealthy amount of time in front of a computer, but since I might have an additional family member next year at some point I'm kind of determined to get some things done website-wise whilst I still have a chance to throw some extra time at them!
  2. Just a quick one here - I think when you then go to add a child page, the template list should reflect the order you have them in when specifying possible templates. I've got a slight issue where there are 3 possible child templates, gallery_home, gallery and page, and page would be the most commonly used child template, yet the list is in alphabetical order no matter what order I drag those fields into when specifying the choice of templates. I guess in many situations it would make sense to have it alphabetical if you're specifying a lot of child templates, so perhaps have a checkbox when specifying child templates to allow the admin to specify that the list should appear alphabetically instead of the order they are in the list, or vice-versa if you think alphabetical ordering should be the default?
  3. This is in Firefox 6 (these version numbers with Mozilla are getting silly now!). I'm using the latest build again downloaded half an hour ago and still see the issue. Same issue occurs in IE9 though so don't think the browser is the issue unfortunately.
  4. Hi guys I'm reasonably sure that PW doesn't store this at present, but I just had someone ask me if I could build a website (yes) with a central gallery (yes) and the option of user galleries (yes, all easy enough). What I did think of though was that it would be nice to have the option of creating a simpler user gallery - in this case the client would be happy enough if everyone simply uploaded images to the central gallery and the individual user galleries were just based off photos uploaded by particular users to the central gallery. The only issue is that PW doesn't appear to track who's uploaded an image. Is it possible to add the user id to image and file fields in a future release and have it as a searchable field as well? I was also thinking with my admin hat on for a second, and thought that if you have a collaborative team working on a website and someone gets a bit disgruntled and starts uploading nasty images or files etc then it would also be very useful to be able to find out who'd done it, otherwise you could have a real headache tracking down the culprit. 99% of the time this would never happen on a collaborative website and I've not come across it before, but might be worth adding anyway just in case. Much less likely in business situations and organised clubs/groups, but still a possibility. It's not about not trusting the people you work with, but having the tools necessary to resolve a potential issue quickly
  5. I've only got one install running at the mo, using the latest code as of an hour or so ago. It's consistent though - definitely not a one-off.
  6. It's only a very slight issue, and I hesitate to call it a bug as nothing's actually broken, but when creating some fields of the Page variety, I seem to be seeing double - see attached image. I'd have put it in the tracker but you can't upload images there. Nothing too major, but this seems to have crept in with a recent update. Unless of course you're planning on being able to select pages from multiple parents just for fun ryan?
  7. And this is why I love ProcessWire Cool stuff!
  8. Hi guys I do like the ability to be able to set the choice of child template for children of a given page based on the parent template (hope you're still with me), however I've had a couple of occasions where I would have liked to be able to set the option for more than one choice of template for a set of child pages but not necessarily the whole list of templates (I have lots of templates). Would it be possible in a future version to be able to select more than one template for child pages of a given page's template, and if so it would also be nice - but not essential - if you could still set a default from that list.
  9. Pete

    Hard Drive Died

    Cheers guys. Yeah ryan, I'll give the freezer trick a go as I'm reasonably sure that if it doesn't work and I return it to the manufacturer they'll not be able to tell that I've tried it. The biggest issue is that I can't run any recovery tool until I find a machine that can actually see the drive. Thus far I've had no luck, but I've only been trying it on a few modern Windows 7 machines. I can't think that trying it on an older box with an older motherboard and XP would help but it's worth a shot as well. If all else fails I'll just have to re-do the work I've lost, which I'm beginning to do today anyway. I'm definitely not doing anything though until I've got things backed up this time! Thing is if you read the manufacturer's info about SSDs they're supposed to have somewhere between 1-2 million hours of use - that's their mean time before failure anyway (not sure how they come up with these figures as a million hours is a long time!). The thing to remember about MTBF though is that on average that's ho long they live, and it certainly doesn't mean they can't die inside 3 months like this one did. Still, it's not done as badly as an enterprise-class DELL hard drive we had in a server that lasted less than a week, and that was an old-school hard drive, not a solid state. Fortunately the servers are in RAID so it wasn't a problem - just swapped it out for a new one - but it does make you wonder. In fact, with the small number of drives I've seen fail at work in the last year (there are a lot of drives, so more are likely to fail) you'd think I'd have learned by now...
  10. Just a quick one as I know 2.1 is nearly here - is there any chance that we can have one of the things mentioned here applied to the functionality when you're adding an uploaded image to an RTE field? Whilst it's useful to be able to drag an image down to size to create a thumbnail, it's a bit fiddly to get it to a precise size each time. There are a few pages where I want to dot pictures throughout an article but want the thumbnails to be consistently the same width. The solution in another CMS is having two fields where you can enter width and height, and a checkbox that's checked by default that constrains the proportions (see attached image). Can something like this be added easily enough? I think it would just make it a bit easier to use.
  11. Pete

    Hard Drive Died

    Just taking a few minutes out of my evening to lament the loss of my laptop hard drive. It was an SSD and, as such, I'd thought it would be more robust than normal hard drives. Still, after 3 months use it's gone to hard drive heaven and I've lost a month's work that I won't get back. Fortunately I have two drives in my laptop and all of the design work goes on the other drive (a larger normal hard drive), but everything I've coded recently is gone Still, there's nothing too major lost here, despite my lack of regular backups - just one website template I'd started that can be re-done again from the Photoshop file and a lot of evenings' work on my gaming site that I was porting over to ProcessWire. The other bonus is that everything else I'd completed recently code-wise that did get uploaded to my web server can obviously been downloaded again so the only thing I've really lost is a lot of work on one site. It was good that I had a backup even though it was a bit old so at least all I had to do was replace the drive, run a few windows updates and that was it - no headache of an OS reinstall or anything. So I'm being optimistic in that all the stuff I've learned using ProcessWire means I can do it all again but quicker, and I've also really learned my lesson with hard drives now - back up daily, especially when you've got the luxury of two drives - I could have easily had all my website work backed up to the other drive... Oh well!
  12. The second way is how it works in MODx - well, their older branch at least. I do agree that it could do with a template-based option as well as a lot of the time it is only a few pages that might change as you guys say.
  13. Does the mySQL user for your database have permissions to create/update/delete tables? It needs to be able to. That's all I can think of right now.
  14. But you then end up with another problem - I've had dealings with a multi-lingual site before and the company who owned it decided to have most site pages translated but with news being specific to their dealings in each country, so you can't in that situation have it creating a new page in each language for every page. The way I've seen of doing this in another CMS was that once you had set up the module that tells the CMS to expect multi-language content and you've set up the root pages for each language, when you add a page to a section there are links at the top of that page to create the same page in one of the other languages or, if it's already linked to another page then you can switch across to that other page easily without having to go back to the page list. I think this was the best solution I saw as rather than creating new pages in every language automatically it just made it easier to create and switch to the alternative pages instead. In theory a module could be written to handle this, but it's something that's a bit beyond my level of knowledge in PW at the moment.
  15. Looking at the function getRandom() this should work: $rndm = $pages->find('template=xxx, limit=40, sort=-created')->getRandom(4); 4 in this case being the number of random results you want to return, and note the minus before created else you'll be getting the first 40 created pages for the template instead of the last 40. The actual getRandom function is on line 368 of wire/core/Array.php EDIT: Just tested it on my install and it does work, pulling 4 random pages from the last 6 in my case (easier to debug as I can remember the last 6 I added ). The full code I used was this (my template was game in this case): $rndm = $pages->find('template=game, limit=6, sort=-created')->getRandom(4); foreach ($rndm as $pg) { echo $pg->title . "<br />"; }
  16. This thread discusses a couple of approaches - not sure if it's of any help to you though: http://processwire.com/talk/index.php/topic,311.0.html
  17. Good points there - for me, I just renamed the Pages page to Home as it made more sense to me (used to seeing the tree on the admin homepage in MODx), but you're right that it's a little tricky to add things the way it is as there's only one template file you can edit. It's not hard to check if we're viewing the Pages page and running code if we are but gets a little messy after a while. Not directly related, but as I was adding content to a section yesterday I was looking through the PW source code to change the site tree so pagination kicks in at 30 pages rather than 50 and I've got to give credit to ryan's code commenting which told me I can just to it in the module settings - awesome stuff as I didn't realise modules had settings (not really looked into them in detail) and probably would have hacked it otherwise. Hooray for good code commenting
  18. Just for info, attached is what I came up with. First screenshot shows the PW admin page with the last 10 press emails on the right and the second screenshot shows the first email in the list open in a modal window (the 1 of 10 and Next links at the bottom are both part of the modal script I used - it'll basically load the next email in the list as I set those links to be part of a group). The modal window uses a slightly modified version of Shadowbox - purely because I'm used to it and know all the config options. If I was feeling less lazy I could just have easily took some time to use the modal script used by PW. Also, I renamed the Pages page to Home (again, just personal preference) and put a header at the top of the page list and the email list. I'll almost certainly be tweaking the admin style at some point as I'd really like to spend a bit of time making it feel like the rest of the site - not that I've got anything against the pink mind you! Again, no particular reason for re-theming the admin area, just thought it would be good to get to know the CSS and the template. Anyway, for now I've got to put aside these nice distractions and get on with copying the site content over this weekend. It's going to take me a while so best get started! EDIT: Sorry, you'll have to scroll to the bottom of the attached images and scroll right to view them properly. Not sure why attached images get inserted into the forums this way...
  19. I'm thinking of perhaps taking it one step further and if someone emails us with news - a games developer for example - it could take the contents of the email and set up an unpublished page in our news section at the click of a button that then we can edit and publish. These are all very fancy things that we don't really need, but sometimes it's nice to see what you can do with software Off topic - we could probably do with a form for general coding talk when you're back ryan - no rush
  20. Ah well it was all plain sailing until I had to create a wrapper so that it didn't interfere with Processwire and also I had to change the class as it retrieved emails oldest to newest with no option of doing newest to oldest (which you would think would be the default). I submitted some code changes over on their site and I'll post my little wrapper script here in case anyone needs to use Flourish and PW together in future - no point anyone else scratching their heads as much as I was yesterday, though I'm sure someone with better OO PHP skills would have worked it out quicker. Still, I now have the latest 10 emails pulled into my PW admin page and can click on the titles to open up the contents in a modal window so I'm happy despite the learning curve The idea of all of this is it's for my gaming site and we have several editors who post news to the site and the emails are from publishers who send news to our press email account so it'a just a neat way of having everything in one place. I'm also intending to pull in information submitted through the site's contact form, so eventually the site admin page will be a hub of useful information for editors to dig into and update the site with.
  21. Oh, and I should probably say that if anyone has found or used a more compact email class/library for reading mailboxes and emails then please share as it's one of these niche situations that comes up every so often.
  22. I had need (or rather the desire) of a decent class to read and manipulate an IMAP mailbox and do some other functions, and whilst you can do this with PHP's built-in IMAP library it's impossible to do something as simple as fetch the last 10 emails for example - bizarrely you can only go for other filters such as unread, or a date range etc. There are also other things that I thought should be far easier than they were so I started looking for alternative solutions. I went trawling through Google results until I found, or rather rediscovered, Flourish: http://flourishlib.com/ . It seems to have an excellent mail class to do everything I want and more and what is even better is that on the jQuery-like advanced download page you can click on the class you want (in my case fMailbox) and it selects other dependent classes. It comes out a bit weighty with those other classes at over 129kb compressed, but to be honest the features I'm going to code with it are only for staff users on a website so I'm not too bothered about a little bit of overhead. Anyway, it's not something that's competition to ProcessWire, as Flourish is a library and not a CMS or specific framweork, but I thought it was worth mentioning because it looks quite handy in specific situations such as this where you want to code something that would be fairly complicated if done from scratch and you don't want to reinvent the wheel. It's also something I've searched for dozens of times before without actually successfully finding a satisfactory solution that looked well-coded or that didn't make the page it was used on slow to a crawl. I'll let you know how I get on with it anyway if you're interested
  23. One thing I've seen on another CMS' website (MODx's forums actually) is a jobs board. What you might get is someone who likes the look of a CMS but can't develop the site or a specific feature themselves, or you might get a customer whose developer has vanished and needs someone to take over maintenance of a site, or maybe just some lucky web design company has too much work on and is looking to outsource. Some form of job listing would be a fantastic addition, perhaps with an option to list budget (though the majority of people will probably be asking for private quotes). Just a thought, and it's one of those things that doesn't sound like it would get used much but you'd be surprised - the on on the MODx forums has a steady stream of requests coming in.
  24. Just don't think about the motion of the ocean and you'll be fine. You get used to it after a while and then it's land sickness you have to worry about when you get back ashore Have fun!
  25. I think that for the jCrop type implementation you are giving the user the ability to set what gets cropped (which has already been said earlier) - by default it just goes of whether it hits the width or height of the original image first whereas what jCrop lets you do is select part of an image (and you can set fixed dimensions too so users are forced to drag a rectangle at 16:9 ratio for example) which then tied in better with thumbnailing on the front-end. For now it works fine and on the site I'm building I'm very impressed with it, but with some optional jCrop functionality it would be amazing Looking back at that, I'm just reiterating what others have said here, but fixed aspect ratio is a good thing to be able to set as well I reckon.
×
×
  • Create New...