Smoo
Members-
Posts
22 -
Joined
-
Last visited
Recent Profile Visitors
The recent visitors block is disabled and is not being shown to other users.
Smoo's Achievements
Jr. Member (3/6)
4
Reputation
-
That did it - thanks. $page->meeting_event_pdf_attachment rather than $page->files in my case - just in case anyone else is reading this. Cheers.
-
Rusty newbie here... I have a template called MeetingEvent, to which I've added a file field to allow uploads of multiple PDFs. The field is called meeting_event_pdf_attachment. Users may attach any number of files to this field, and it's set to provide an array of items (for simplicity). I'm having trouble getting the filename and path out of the supplied data - surely I've forgotten some bit of PHP syntax here. If I do var_dump($page->meeting_event_pdf_attachment); I get something that looks like this: object(ProcessWire\Pagefiles)#415 (2) { ["count"]=>; int(1) ["items"]=>; array(1) { ["accessibility.pdf"]=>; string(17) "accessibility.pdf" } } (In this example, my attached file is called "accessibility.pdf") var_dump($page->meeting_event_pdf_attachment->count); outputs int(1) as expected. var_dump($page->meeting_event_pdf_attachment->items); outputs NULL. I was expecting ->items to be an array - it sure looks like one. I need to be able to walk through "items" and grab the URL for the things listed there, but with it being NULL, I'm kind of perplexed as to how to do that. Should I be using a repeater instead? Any advice appreciated.
-
$sanitizer truncating text field - defaults are set where?
Smoo replied to Smoo's topic in Getting Started
Thanks guys - that's exactly what I was looking for. -
Hi folks. I'm finding our email contact form is truncating messages, whose body is coming from a text area, to 50 characters. Turning off sanitizer for that field removes the problem: //$message = $sanitizer->text($input->post->message); -- truncates $message = $input->post->message; // -- passes full text However I'd still like to have some cleanup performed on user-generated input. Is there a way to set a higher character count for this field? TIA...
-
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.
-
module Recurme – Processwire Recurring Dates Field & Custom Calendar Module.
Smoo replied to joshuag's topic in Modules/Plugins
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. -
module Recurme – Processwire Recurring Dates Field & Custom Calendar Module.
Smoo replied to joshuag's topic in Modules/Plugins
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 {original.name}">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. -
module Recurme – Processwire Recurring Dates Field & Custom Calendar Module.
Smoo replied to joshuag's topic in Modules/Plugins
The fix seems to be to set all events as recurring, and use a count of one for events that don't actually recur. -
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.
-
I'll check this out - thanks
-
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...
-
Thanks, guys - I'll try Soma's module first. Cheers
-
Hi folks. Is there a way to disable caching entirely during development?
-
module Recurme – Processwire Recurring Dates Field & Custom Calendar Module.
Smoo replied to joshuag's topic in Modules/Plugins
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} • <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. -
Got it. Thanks - this community thus far has been quite pleasant and welcoming. Cheers