Jump to content

BFD Calendar

Members
  • Posts

    400
  • Joined

  • Last visited

Everything posted by BFD Calendar

  1. Can I make a field required based on the template where it's used? Field -> Input -> Required (yes) -> Required only if "template!=people". On www.birthfactdeathcalendar.net I have pages about 'events' that require a 'day', 'month' and 'year' value. They are page reference fields. I use the same fields for 'people' pages to store their birthdates, but since I don't always know them the fields are not required there. If I'm right it only works with a selector "field!=something".
  2. We use the search page mostly to check if a student attended the obligatory workshop to use a lasercutter. Every student page has a populated 'stu_programme' field. The search also finds other pages as well of course (tools, machines,....). I finally ended up with this: if($item->stu_programme) { $programme = "{$item->stu_programme->title}"; } else { $programme = ""; } @Zeka This helps of course, since not every student page has a populated 'workshops_list' field. So including both solutions passed all my tests for now, thanks!
  3. I'm getting an error from sending a search in the search box: "Notice: Trying to get property of non-object in /home/mekanoinsa/www/site/assets/cache/FileCompiler/site/templates/_func.php on line 45Fatal error: Uncaught Error: Call to a member function each() on null in /home/mekanoinsa/www/site/assets/cache/FileCompiler/site/templates/_func.php:49 Stack trace: #0 /home/mekanoinsa/www/site/assets/cache/FileCompiler/site/templates/search.php(42): renderNav(Object(ProcessWire\PageArray)) #1 /home/mekanoinsa/www/wire/core/TemplateFile.php(287): require('/home/mekanoins...') #2 /home/mekanoinsa/www/wire/core/Wire.php(380): ProcessWire\TemplateFile->___render() #3 /home/mekanoinsa/www/wire/core/WireHooks.php(723): ProcessWire\Wire->_callMethod('___render', Array) #4 /home/mekanoinsa/www/wire/core/Wire.php(442): ProcessWire\WireHooks->runHooks(Object(ProcessWire\TemplateFile), 'render', Array) #5 /home/mekanoinsa/www/wire/modules/PageRender.module(514): ProcessWire\Wire->__call('render', Array) #6 /home/mekanoinsa/www/wire/core/Wire.php(383): ProcessWire\PageRender->___renderPage(Object(ProcessWire\HookEvent)) #7 /home/mekanoinsa/www/wire/core/WireHooks.php(723): ProcessWire\Wire->_callMethod('___renderPage', Array) #8 /h in /home/mekanoinsa/www/site/assets/cache/FileCompiler/site/templates/_func.php on line 49 This is the code part in _func.php // markup for the text $programme = "{$item->stu_programme->title}"; $out .= "<div class='list'><div class='listtext'><span class='verdana_18_bold'><a href='$item->url'>$item->title</a></span><br><br><span class='verdana'><b>$programme</b><br>"; $out .= $item->workshops_list->each( "<font color='green'>| {title}</font>" ); // if the item has summary text, include that too if($item->summary) $out .= "<br><br>$item->summary"; // end markup for the text $out .= "</div>"; Weird, it doesn't happen all the time and I can't figure out what makes the difference....
  4. It looks like the Dev Map doesn't show. Safari, Firefox, Chrome on Mac.
  5. A few questions about this Gcal embed: I have more than one Google Calendar but on the PW page I can only see my primary calendar, which is private, but not a secondary. Is it possible to show it as well? Can I change the view from month to week? Is it possible to add or edit events from within PW?
  6. Am I right that this field cannot be used in a FormBuilder form? I'm trying to make a form with a start and stop button to calculate time students spend on one of our lasercutting machines. [edit] In the meantime I found it. Now I just wanted to know if I can have the time 'auto fill in' in a field 'laser_start' as soon as a new form is created, like I can with a Datetime field. And also have a button or picker to enter the time in a field 'laser_stop' when I edit the page created by Formbuilder. Another issue: the Time Format always jumps to 'Minutes (00-59) & seconds (00-59).' when I choose 'Hours (0-24), Minutes (00-59) & seconds (00-59)' upon save in the Details tab.
  7. Happy as it is now. All the covers of the mixtapes have their own vintage cassette image incorporated in one way or another, to pleasure cassette aficionados. Future project will be to put our full Club Moral Stocklist online, basically all cassettes: https://archive.org/search.php?query=club moral stocklist
  8. Just installed the new version and it works like a charm, drastically fantastically! One little thing is that on the Soundmanager demo (http://www.schillmania.com/projects/soundmanager2/demo/cassette-tape/) you can see the tape as a thin line moving from the left reel to the right, that isn't there in the module. I'm really happy with how it looks now. The first original Carl Cryplant thematic mix tapes I did in the 1980s were on real C-90 cassettes.
  9. The one in the tag looks good. It's the one coded in the template that doesn't have the right look. I prefer to have it in the template because it will always be just one audio file and it saves me a fraction not to put the tag into the text field all the time. In the template it says $sm2 = $modules->get('TextformatterSoundmanager'); $options = [ 'type' => 'cassette', 'cassette' => 'ma-r90', ]; $track = $page->audio->first(); echo $sm2->player($track, $options); Am I missing something there?
  10. The first one is the one generated in the template, the second one is generated with the tag '[smplayer tag=cryplant type=cassette]' in the description text field. As if the first one doesn't take the ma-r90-body-skin.png image along from the options.
  11. Ok, it's there ? (cassette does look a bit more basic than the '[smplayer tag=cryplant type=cassette]' version both here: https://www.performan.org/carl-cryplant/carl-cryplants-love-music-vol-1/ Thank you very much for all the help!
  12. All '_init.php', header and 'cryplant_sets.php' have <?php namespace ProcessWire; on line 1. Running PW 3.0.98 - PHP 5.6.38. $sm2 = $modules->get('TextformatterSoundmanager'); $options = [ 'type' => 'cassette', 'cassette' => 'ma-r90', ]; $track = $page->audio->first(); $content .= $sm2->player($track, $options); Above code in the 'cryplant_sets.php' template gives no error but no cassette either....
  13. I did just that, renamed my field to 'audio', just in case 'sound' would conflict with anything. Code in the template: $options = [ 'type' => 'cassette', 'cassette' => 'ma-r90', ]; $track = $page->audio->first(); $content .= $sm2->player($track, $options); Result: Error: Call to a member function player() on null (line 128 of /home/performaaj/www/site/templates/cryplant_sets.php) - where line 128 is "$content .= $sm2->player($track, $options);" In the module settings I have Default Single Player set to Page Player, no Bar-UI options, Cassette options to ma-r90, all Allowed Formats on. I installed Tracy Debugger but this is far beyond my skills to operate....
  14. Ok, solved the problems you mentioned and it looks as promised. The play button only acts as play and not as pause like I thought it should, during playback it acts as rewind. Clicking the cassette makes the sound pause and resume. echo "$sm2->player($page->sound)"; in the template gives just the filename of the soundfile... Also somewhat amazing is that the rewind and forward buttons actually jump to the next or previous song although the soundfile is a 44min mix of different tracks made with Traktor in 2006-2007. I suppose SoundManager analyses the file and finds differences in the spectrum or whatever.
  15. Ha! Looks a lot better now. The play/pause button doesn't work, pausing works when you click on the cassette however. Maybe the jscript isn't doing wat it should, like in the example on http://www.schillmania.com/projects/soundmanager2/demo/cassette-tape/. And for some reason the code "echo $sound->player($page->sound);" doesn't work in the template, gives "Error: Call to a member function player() on null (line 126 of /home/performaaj/www/site/templates/cryplant_sets.php)" . I have it in a text field now: [smplayer tag=cryplant type=cassette]. _init file has "$sound = $modules->get('TextformatterSoundmanager');" and my sound field is called "sound".
  16. In Header I have my normal stylesheet ref: <link rel="stylesheet" type="text/css" href="<?php echo $config->urls->templates?>styles/cryplant_sets_style.css" /> And added yours as: <?php foreach($config->styles as $style) echo "<link rel='stylesheet' type='text/css' href='{$style}' />\n"; ?>. The CSS and scripts are still in the module folder. .tape * { box-sizing: content-box; } went in the first one. Everything's there in Footer as well. I presume I'm messing things up...
  17. Thanks. Guess I solved a few issues but the cassette still doesn't look like a cassette because apparently it's missing something: [Error] Failed to load resource: the server responded with a status of 404 (Page Not Found) (ma-r90-mask.png, line 0) https://www.performan.org/carl-cryplant/christmas-music-vol-1/image/ma-r90-mask.png
  18. How do I get the cassette interface on a page? The text field has "[smplayer tag=cryplant type=cassette]", cassette options in the module are set to 'cutout' and 'green_color'. Result is: https://www.performan.org/carl-cryplant/carl-cryplants-christmas-music-vol-1/ filename, a play, rewind, forward and stop button. Also added all the scripts in header & footer, _init, etc. Probably missed out something somewhere....
  19. I finally solved the problem by setting PHP 7.0 from 'development' to 'production', it had nothing to do with my Mac.
  20. @adrian Ok, works again with Lister disabled in the Batch Child Editor. For some reason the site hoster doesn't want to upgrade PHP. Thanks
  21. I get a sudden error when trying to edit a page: Error: Using $this when not in object context (line 907 of /var/www/clubmoral_com/site/modules/BatchChildEditor/BatchChildEditor.module) It only happens with pages where the parent is hidden, pages are used for selectlists and don't need to be seen elsewhere. PW 3.0.98 PHP unfortunately 5.3.10
  22. Well I have over 4500 pages with map references (https://www.birthfactdeathcalendar.net/places/), so converting them to anything else than MapMarker and/or Google should be something that can happen sort of 'all at once'.
  23. Bernhard, yes this is definitely useful! For instance, I'm redesigning a calendar page for a modelbuilding workshop where I want to add appointment slots for lasercutting. I'm using the Recurme calendar module, but I need a title and page name for every new page while the only things that matter - and need to show up in the calendar - are the student's name, the machine they want to book and the time slot. Student's and machine name are page reference fields and time slot a recurme field. With RandomPageName I don't need to bother to invent a new (original) page name all the time.
  24. Thanks zoeck and Peter. Leaflet also uses Google, so I presume you'll run in the same problem sooner or later, no? For the Here maps, I assume it needs a bit of working under the hood of MapMarker to get it working? In the mean time it turns out everything now works after 48 hours of patience with Google and my provider (OVH)....
  25. Since Google introduced billing for Google Maps I get an error "This page can't load Google Maps correctly" on my maps. I have a working API key and enabled billing, do I need any changes in ProcessWire as well?
×
×
  • Create New...