Jump to content

Joss

PW-Moderators
  • Posts

    2,862
  • Joined

  • Last visited

  • Days Won

    47

Everything posted by Joss

  1. I dont think the FTP protocol allows for copying. You would need to use SSH and something like WinSCP I would think. http://winscp.net/eng/docs/task_move_duplicate Mind you, its a whole lot easier if your are running CPanel on the server
  2. As a composer, the thing I MUST avoid is anything I have written, or anything written in a style that I like. The trouble is that I start picking holes in it and forget the work I am meant to be doing and end up writing music instead. So, inevitably I end up either sitting in silence or listening to Manuel & The Music of the Mountains or Pan Pipes - which is pretty much the same as silence, to be honest.
  3. Three ProcessWire sites being built at once - Fishing, Campervan Restoration and a bit of a surprise. All fun, of course!

  4. Its a nice little bit of real life: "Hey, information? I lost my socks." "They are behind the sofa" "Thanks." With data, there should always be the equivalent of "behind the sofa" somewhere.
  5. Joss

    ProcessWire on the web

    Bravo Christophe! I am beginning to wonder whether I should write an article not so much about Processwire, but rather why professional sites should not be made using Wordpress. I have nothing against Wordpress - it is an extremely powerful and well supported blogging platform and it is a really great tool for the hobbiest or small company that wants to create their own website without using a developer - indeed, I use it for a couple of my own blogs (though more recent ones have been built with PW) But the other day, while researching competition for a client, I came across a professional website made by an "award winning developer," built on Wordpress. I will be nice and not post the site here. It was a perfectly acceptable website, except that it used a wordpress installation and a ton and a half of wordpress plugins. The list of style sheets and script that the template was resourcing was huge and there were three different versions of JQuery being accessed, The actual site was very simple, but some of the layout was a bit cock-eyed because the client had been editing his own site with the TInyMCE editor and messed up some of the images. The client's web site requirement had been shoe-horned into Wordpress, whether that was appropriate or not, and for me that is just plain wrong. When I compose music for someone's advert, I don't go through my files trying to find an old piece of music that more or less fits the clients brand, I start from scratch and write something that fits their brand, their name and their campaign properly. In the industry I come from, that is what is expected of me. To stretch an analogy to breaking point, Processwire is a piano that you can use to write any song you like. Wordpress is a pianola that can only play the tune that is punched out on the scroll. (And just in case you don't know what a Pianola is: http://en.wikipedia.org/wiki/Player_piano)
  6. Joss

    I'm so stuck :(

    One question at a time, I suggest. A good starting point would be to create the fields and template you think you will need to store the information for the event calendar - name of event, postcode, details, website, date start time, date end time, and so on. Once you know what actual information you are dealing with, then it is less of a mountain to climb. The next step will be to work out how you want your calendar displayed - this is the bit that kind of got me twisted up, but anything is possible. That is the bit that might cause you the most grief and will probably see you back here asking questions! Joss
  7. I think it needs the justify class to be allowed if using ACF - not sure how to do that. See this: http://ckeditor.com/forums/CKEditor/Enable-Justify-in-ACF Oh, by the way, the standard installation of ckeditor does not include the justify plugin - that only comes with the full build. But you can download it.
  8. It does have one interesting advantage - portability. It means you can write pretty comprehensive help files, and then just copy them into a new installation, editing them a bit to match the new template. Since certain things get repeated between sites, like news, this makes sense.
  9. Even works on my old Bootwire Admin Theme! Soma, that is perfect. Get it on the Modules immediately! Now, where is my old copy of FrontPage 98 so I can knock up some quick help files? (Actually, I still have on my shelf a copy of Corel Webmaster Suite and Adobe Go Live, which I don't think I ever used) Thanks Soma!
  10. Soma! Its only a thought on a wish list, not a demand for product! Still, probably useful.....
  11. HI Soma That is why I put it in the Wish list!! I had forgotten about the template decorator. (Its been sooo long.....)
  12. Hi Macrura The trouble with that is that you need to install an additional extension to do the permissions on a field (I think) plus the output of it would just be a form field, rather than a nicely formatted page.
  13. What a lovely fellow! Yep, that works. I was wondering how to get hold of the page number. Thanks mate Joss
  14. I have a little blog page which has various functions on the top half of the page, then the actual list of blog posts on the lower half. The blog posts are paginated. However, I would like to lose the other rubbish from the top of the page when I go to page 2 and onwards, leaving only the list of blog posts. Any bright ideas? Joss
  15. Basically, this would be an optional tab in the template administration form. The tab would have a nice big textarea (perhaps with editor) where you can write documentation for the specific template. Then, when the user creates a new page with that template, they have a Help tab where they can see all that nice help. This can be useful when you need lots of explanations for the fields, but want to keep the form as uncluttered as possible, so may not want to have descriptions displayed on every field. It would also allow plenty of space for talking about writing styles for particular templates, including lists of key phrases for SEO. Joss
  16. Yes, I have already used a similar solution for all the display - that was just an example.
  17. The way I did that was to use the date() function, eg: $start_date = date("l jS", $e->getUnformatted("event_start_time")); $out .="<td><strong>{$start_date}</strong></td>"; to give me the day name and the day number (with a th or nd on the end) - Saturday 19th
  18. Well, it seems to be working fine now! This sort of thing is REALLY REALLY useful! Why don't you do it up as a little tutorial, explaining in more detail exactly how you are extracting data using processwire and how to use nested loops? There are a lot of people like me on here that would appreciate it! All the best Joss
  19. Yee-haw!!! Okay, looks like that works ... now I have just got to work out how (and throw some extra bits in to test properly) ...... er, so you just removed one line? Thanks a million!
  20. Right, I think I have a vague idea about the problem. This line: foreach ($year_events as $year_event) { $months[]= date("m", $year_event->getUnformatted("event_start_time")); $event->event_month = date("m", $event->getUnformatted("event_start_time")); } If I add $Out .= $event->event_month to the loop it just returns 11, which is the month associated with the very last event. If I move that event to october, it returns 10. Now, if I change the loop so that the last line is: $event->event_month = date("m", $year_event->getUnformatted("event_start_time")); Then my check outputs all the correct months. However, I am still not getting my events. Closer, perhaps?
  21. Okay, I think I have worked out the year confusion - I have changed the last find to $month_events = $events->find("event_month=$month, event_year=$year"); However, that has not solved the original problem of only one actual event showing.
  22. Okay, just noticed another oddity. I put an event in november 2014. It is displaying that under november 2014 (good!) However, although no other events are showing, the Nov 2014 event is also showing under Nov 2013 .... ummm! It does not seem to be relating to the year. Joss
  23. Hi Macrura I have been putting the count right at the end of the function. Counting the $years variable is returning the right number - 2 (2013 and 2014) Counting the $months variable is returning 1 - this is not right. I have three events in three different months, so it should be returning 3 However, if I put count($months) BEFORE the last foreach (the events one), it returns the right number - so something is breaking with that last foreach. I have tried debug, but it is happy with everything, which doesn't surprise me as I cant see any code errors. Joss
  24. Pete, so nice to see you are awake and sober! Joss
  25. Okay, nearly there! Actually, now you have given unique variable names, it is much less confusing! I can almost get the workflow, despite my aged brain. In the code below I am outputing the year as an H2, then the month as an H3 (just for convenience). The code is happilly listing the years and the associated months. However, when it comes to outputting the actual event, it is only outputting the most recent event for the most recent month and not the others in the other months. Note: This code is set up as a function and I have corrected the variable names since I accidentally gave the wrong ones in the original post - sorry! Thanks guys, we are definitely getting there! <? function events() { // get all of the events $events = wire("page")->events; //gets the repeater field $years = array(); $out =""; // find the array of years for all events foreach ($events as $event) { $years[]= date("Y", $event->getUnformatted("event_start_time")); // change the format of the year in memory for later comparison $event->event_year = date("Y", $event->getUnformatted("event_start_time")); } $years = array_unique($years); asort($years); foreach($years as $key => $year) { // Output the year $out .="<h2>{$year}</h2>"; // find the array of events this year $year_events = $events->find("event_year=$year"); $months = array(); // loop through the events for this year and add the months to the array foreach ($year_events as $year_event) { $months[]= date("m", $year_event->getUnformatted("event_start_time")); $event->event_month = date("m", $event->getUnformatted("event_start_time")); } $months = array_unique($months); asort($months); foreach($months as $key => $month) { // Output the month as a number $out .="<h3>{$month}</h3>"; // Set up a variable for the next loop of events $month_events = $events->find("event_month=$month"); foreach($month_events as $e) { $out .="<p>{$e->event_who}</p>"; // output the table here } // end foreach events for this month } // end foreach months } // end foreach years echo $out; } ?>
×
×
  • Create New...