Jump to content

Pete

Administrators
  • Posts

    4,045
  • Joined

  • Last visited

  • Days Won

    67

Everything posted by Pete

  1. Essentially in the backend templates are just "forms", but I was less confused about template files and admin templates personally because they're directly related. That might be my brain just being able to work that out easier.
  2. Glad it's not just me going crazy Perhaps some cached JS?
  3. Cheers ryan, that makes sense. I keep forgetting pages aren't really pages in the conventional sense and that having lots of them doesn't mean it's a bad thing. EDIT: In fact, as there will only be one main gallery on this particular site and it would only be users adding images, I suspect the easiest thing to do would be to simply add an Images field to the Users template and do it that way.
  4. Makes sense - once a site is built the client isn't generally going to need all the extra options to just edit pages and add the odd one or two.
  5. The ListAfterSave module by adamkiss saved me lots of time yesterday when importing some very basic pages where it was quicker to do it manually than write an importer - very handy module. One thing I would say about this whole area of what to do when a page is saved is that I think it could do with being improved in the core itself. There are a few extra options I've used in MODx in terms of page saving that I think would be beneficial here, as in some cases when I save a page I will want to return to the page list, in other cases I'll want to immediately add another page to the same section and in some cases I'll want to save and stay editing the same page. Below is MODx's solution - a drop-down that remembers which selection you've made, presumably by way of a session variable as there's no need to remember it for more than the current browser session. The ListAfterSave module does get me part way there if I want to add a new page quicker, but there's still an additional click to be made and, multiplied over many iterations when you're copying in text for a client for example it would be handy if there was a quicker method such as this. Additionally, that toolbar in the image below scrolls down the page with you as well which I found a bit neat - handier on long pages where you're making a tweak to one field halfway down a long list of fields and you just click Save rather than scrolling up/down to save. Not at all necessary, but I like nice UI features like that.
  6. 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!
  7. 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?
  8. 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.
  9. 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
  10. 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.
  11. 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?
  12. And this is why I love ProcessWire Cool stuff!
  13. 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.
  14. 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...
  15. 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.
  16. 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!
  17. 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.
  18. 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.
  19. 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.
  20. 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 />"; }
  21. 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
  22. 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
  23. 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...
  24. 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
  25. 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.
×
×
  • Create New...