• Content count

  • Joined

  • Last visited

Community Reputation

4 Neutral

About Smoo

  • Rank
    Jr. Member
  1. Forgive me if this is documented somewhere... I've spun up a dev instance of our project and turned on debug mode. The way our layouts work, the debug output is covered by some page elements, so I'd like to be able to wrap the notices in a container that I can control the placement of. Is there a way to control that output? I've looked in Debug.php and that's not helpful - just a bunch of classes relating to timers. Any guidance appreciated.
  2. Actually i completely worked around this, pulling apart the object returned by $recurme->event() and formatting the whole setup myself. But next time... Anyway thanks for the tip.
  3. I'm trying to pass options to both renderEvent() and renderList(), but the functions aren't picking up my settings. Here's code from my list display page: $siteEvents = $pages->find("template=meetingevent, sort=meeting-event-date-recurring"); $options = array( 'selector' => '', 'monthFormat' => 'F', 'dateField' => 'recurme', 'renderEvent' => array( 'dateFormat' => 'M d, Y @ g:i a', 'timeFormat' => 'g:i a', 'dayFormat' => 'd', 'monthFormat' => 'M', 'yearFormat' => 'Y', 'hourFormat' => 'g', 'minuteFormat' => 'i', 'secondFormat' => 's', 'ampmFormat' => 'a', 'xBefore' => '<li class="rm-list-event {}">ASDF<span class="rm-event-date">{time}</span> ', 'xItem' => '<a href="{link}" title="{title}">', 'xAfter' => 'STRING {title}</a></li>' ), 'renderDay' => array( 'xBefore' => '<ol class="rm-list-day {todayClass} rm-{dayName}"><li><h3>', 'xItem' => '<span class="rm-date-day">{day}</span><span class="rm-date-month">{month}</span><span class="rm-date-year">{year}</span></h3>', 'xListBefore' => '<ol class="rm-list-events">', 'xListAfter' => '</ol><!-- close list-events -->', 'xAfter' => '</li></ol><!-- close day -->' ), 'renderMonth' => array( 'xBefore' => '<ul class="rm-list-month rm-{month}"><li>', 'xItem' => '<h2>{month}</h2>', 'xAfter' => '</li></ul><!-- close month -->' ), 'cache' => true, 'cacheName' => '', 'noEvents' => '<p>No events to show!</p>', ); $content .= $recurme->renderList($siteEvents, $options); Output looks like the attached screen shot. Note that I'm not seeing any of my customization (I changed the UL to OL and added some strings, to test). I'm also not seeing Dates displayed. Clearly I've missed something here - any help appreciated.
  4. The fix seems to be to set all events as recurring, and use a count of one for events that don't actually recur.
  5. This option isn't present for a Select (Options) element. I'm going to rethink the setup - probably make each Photographer a page, and then use a page reference in the Uploaded Photo template.
  6. I'll check this out - thanks
  7. Hi folks. I have a taxonomy of photographers to use in photo credits - the content editor simply picks the correct one from a SELECT element after she's uploaded a photo. I'd like to allow the editor to add a new name to this list when she's uploading the photo, without having to switch gears and visit the options list on the field page. Is there a module to enable something like this? or any clever ideas? TIA...
  8. Smoo

    Thanks, guys - I'll try Soma's module first. Cheers
  9. Smoo

    Hi folks. Is there a way to disable caching entirely during development?
  10. I'm having a similar problem to SoccerGuy above. All I'm trying to do is display the start date of an event on the event's page, and I can't help feeling this shouldn't be this hard. What have I missed? Experiment 1 - $content .= $recurme->renderEvent($page); This returns <li> • <a href="?date=" title="Test Event 1">Test Event 1</a></li> where Test Event 1 is the title of the current page. Experiment 2 - $rcoptions = ['timeFormat' => 'g:i a', 'dateFormat' => 'M d, Y @ g:i a', 'dayFormat' => 'd', 'monthFormat' => 'M', 'yearFormat' => 'Y', 'hourFormat' => 'g', 'minuteFormat' => 'i', 'secondFormat' => 's', 'ampmFormat' => 'a', 'xBefore' => 'TEST', 'xItem' => '{time} &bull; <a href="{link}" title="{timestamp}">ABCDEF{timestamp}</a>', 'xAfter' => '']; $content .= $recurme->renderEvent($page, $rcoptions); This returns the same thing as the first experiment, apparently ignoring the $rcoptions object I passed in. Note that I attempted to change the xItem element, but no joy. Experiment 3 $event = $recurme->event($page); $content .= "Event: " . $event; $content .= "Orig Date: " . $event->orig_date; This outputs Event: and Orig Date: strings, but nothing else. Clearly I have no idea what I'm doing - any guidance appreciated.
  11. Got it. Thanks - this community thus far has been quite pleasant and welcoming. Cheers
  12. Well that's tidier - thanks. What does the - flag before the field name do?
  13. Smoo

    Excellent info - thanks for that.
  14. Hi folks. Newbie here - on PW for a couple of weeks now (I've been a Drupal developer for over 10 years). I've created a template for a Meeting and Event item, which has a title, description and date (a Unix timestamp, called "meeting_event_date"). I also have two templates for displaying lists of these things, one more or less full page and the other as a small block with reduced content to be placed on other pages. So far so good - I can get all the Events pages using $meeting_events = $pages->find("template=meetingevent"); Then I use a foreach to walk $meeting_events and pull out the date, title and description of each event, wrapping them in my markup as I go. The trouble is they're coming in in date-created order (based on the metadata of the Events pages, I guess) whereas I'd prefer to be able to sort them by the actual Event date (which is a field on the Event). I could of course pull the Events from $meetings-events apart and push the individual events into an intermediary array, sort that by the timestamp value, and then walk it to pull out the data into my markup, but I can't help feeling there's a better way. Is there a way to sort the $meetings_events array before running the foreach? I've tried $meeting_events->sort("meeting_event_date"); but that's having no effect. UPDATE - just needed to wait for the template to re-compile. Apparently that's not instantaneous...? I still need to understand caching in this environment. The sort() method above worked. Leaving this here in case it helps someone else.
  15. Smoo

    Thanks guys, I guess for now I'll just add an "Images" field to the template and have that be the container for inserted images. I'll admit I'm finding this a bit convoluted but we'll make it work for our users. @BitPoet - I'll check out your Media library module in addition.