Jump to content

BFD Calendar

Members
  • Posts

    400
  • Joined

  • Last visited

Everything posted by BFD Calendar

  1. What do you want to know? We have about 1800 students, about 350 have attended a Lasercutting Workshop. Between Jan-Jun 2019 there were over 800 laser sessions on two machines. Eventually the reservation system can be extended to two CNC machines and one 3D printer. As soon as someone makes a reservation - only by staff at our desk, not by students online - it should show up on the calendar so we know a slot is taken. Reservations are standard one hour ex 9-10 or 15-16 etc. Ideally the form also checks if the student has attended a workshop and if the slot for that machine is free for a given time/date.
  2. We're looking for someone who can make an addon for our website using Formbuilder and publishing the pages to a Google Calendar instantly. The use is a setup for laser reservations for a modelbuilding lab, see www.mekano.info to have a bit of an idea. On the 'calendar' page you'll find a linked Google calendar that lists all events per day. These events are now all added by staff members in a shared Google calendar. Underneath the calendar is a list of recent use of our lasercutters, generated by a form where user, machine and start time are entered and duration is calculated by editing that form. I have a likely form to add a reservation to enter user, machine and time/date but we want them to go into our shared Google calendar 'immediately'. If you look at early June in the calendar you can see how it should look like. I know there are simple solutions to make this happen but haven't figured a working out. We want Google calendar so all our staff can subscribe and see the calendar on all their devices. On the other hand we want to keep a list of students who made reservations because at some point they are limited. If you're interested I can give you a login to see a bit more behind the curtains. Part of the website is public for students and guests, quite a few functional pages are only visible when you're logged in.
  3. I'll install it and pm you when done.
  4. Great. I can give you a login and you can export what's needed.
  5. The hosting is by OVH. I have five sites there, two with a lot of pages and three 'simple'. In the last year they moved servers to new locations which caused a few problems but apart from that I'm satisfied. At birthfactdeathcalendar.net all images apart from a few exceptions are linked to other sites like Wikipedia and such. This probably makes pages load slow as well. And the code used to make the a-z listings for 'people' and 'places' are maybe loading a lot that isn't used. As mentioned some of the resources are copy paste and definitely not optimised for Processwire. Any help or direction to improve things is most welcomed. The site is still growing, I'm close to 29.000 pages now, means that I added about 4.000 in eight months time....
  6. Can't even see if it's full: Error: Connection timed out after 20 seconds of inactivity Error: Failed to retrieve directory listing But my FTP program says it was only modified on 07/02/15. /site/assets/files was modified 09/04/19 but then I didn't add any files, just pages last night. And getting the listing fails as well. Last cached file is LazyCron.cache 09/05/19 13:02:54 But Hurray! site is back now – without doing anything at all :)
  7. The most recent items are 2019-09-05 12:21:59 guest https://www.birthfactdeathcalendar.net/rss/ Error: Uncaught Error: Call to a member function getRandom() on null in /home/birthfac/www/site/templates/bfd_rss_feed.php:174 Stack trace: #0 /home/birthfac/www/wire/core/TemplateFile.php(287): require() #1 /home/birthfac/www/wire/core/Wire.php(380): ProcessWire\TemplateFile->___render() #2 /home/birthfac/www/wire/core/WireHooks.php(723): ProcessWire\Wire->_callMethod('___render', Array) #3 /home/birthfac/www/wire/core/Wire.php(442): ProcessWire\WireHooks->runHooks(Object(ProcessWire\TemplateFile), 'render', Array) #4 /home/birthfac/www/wire/modules/PageRender.module(514): ProcessWire\Wire->__call('render', Array) #5 /home/birthfac/www/wire/core/Wire.php(383): ProcessWire\PageRender->___renderPage(Object(ProcessWire\HookEvent)) #6 /home/birthfac/www/wire/core/WireHooks.php(723): ProcessWire\Wire->_callMethod('___renderPage', Array) #7 /home/birthfac/www/wire/core/Wire.php(442): ProcessWire\WireHooks->runHooks(Object(ProcessWire\PageRender), 'renderPage', Array) #8 /home/birthfac/www/wire/core/WireHooks.php(822): Pr (line 174 of /home/birthfac/www/site/templates/bfd_rss_feed.php) and 2019-09-05 12:32:09 ? https://www.birthfactdeathcalendar.net/?/ Error: Exception: SQLSTATE[HY000]: General error: 2006 MySQL server has gone away (in /home/birthfac/www/wire/core/WireSaveableItems.php line 168) Yesterday evening everything was working fine.
  8. @dragan Only read your post now... Sure I'd want to optimise my site a bit. It's the first one I made with Processwire so I can imagine a lot of my coding is sluggish and outdone, also pieced together from different sources. Where should I start? Knowing that I'm more of an enthusiast and not an experienced coder. Just now I have a sudden 500 Internal Server error and can't even get on the site anymore....
  9. How can I give permission to import pages from csv? I have an 'administrator' role that can add, create and edit pages but 'Import Pages From CSV' doesn't show up under 'Setup'. PW 3.0.98
  10. A specific page, or list of pages for a specific day of the year is exactly what I'm using Processwire for with https://www.birthfactdeathcalendar.net/. I'm definitely not a PHP crack either. On my home page of course I only search for events on this day and month: $todayday = date("d"); $todaymonth = date("m"); $features = $pages->find("parent=/events/|/the-eyes/, bfd_day.name=$todayday, bfd_month.name=$todaymonth, sort=bfd_year"); To me id is more reliable than title and/or page name, because at some point it happens I find out a title (like a person's name or even a street address) was misspelled. When I change the title and/or page name I'd have to re-code every reference to it, while the id just stays the same. I have over 26000 pages by now and everything still runs very smooth for several years now. With help from dedicated members here I also learned a lot. Most of what I use is in Processwire itself, hardly using any modules apart from MapMarker. Good luck!
  11. No new editor, browser, keyboard, computer or whatever. But apparently a Safari (Mac version) update is to blame. On https://www.birthfactdeathcalendar.net/events/dates/april/24-april/ the item about Willem de Zwijger was added in Safari, the one about Daniel Defoe was added in Chrome, no spaces there. Safari 12.1 was installed on 29 March. In the admin interface the newline characters appear (invisible) in the textarea space in Safari 12.1. The source of an empty text area in Safari looks like this: <p>&nbsp;</p> <p>&nbsp;</p> <p>&nbsp;</p> <div data-extension-version="1.0.4" id="ConnectiveDocSignExtentionInstalled">&nbsp;</div> <div data-extension-version="1.0.4" id="ConnectiveDocSignExtentionInstalled">&nbsp;</div> while in Chrome it's empty. Edit: with the ConnectiveDocSignExtension off it still says: <p>&nbsp;</p> <p>&nbsp;</p> <p>&nbsp;</p>
  12. All of a sudden I see spaces appearing in text output where they shouldn't be and weren't before. Check this example: https://www.birthfactdeathcalendar.net/events/dates/april/23-april/ In the item about Æthelred the Unready there are about three spaces before the item text, and an empty paragraph after it. It's an item I added today. The next items were added months ago and look normal, until the one about William Wordsworth, same thing again. The item about the Rhythm Club dance hall fire was added months ago but edited today, same appearance of empty spaces. I suspect empty textarea fields in the templates to be the culprit. But how come they show up with newly added pages and not with older ones, while nothing has changed to the templates nor the php code to generate the pages? Nothing has changed to my settings, and it didn't happen three weeks ago, when for example the item about Pope Julius III was added among others on https://www.birthfactdeathcalendar.net/events/dates/march/23-march/.
  13. @wbmnfktr after // STUDENT the student's name is found from the id that was filled in on the lendout-form (page-field select). Then the list of tools this student borrowed are found from the id(s) that was filled in on the lendout-form (page-field check boxes). Lendout time is filled in automatically when the form is published. Return time is filled in by editing the form/page with a script by @Soma. If you want I can give you a login to have a better idea how things work.
  14. True, students can only see some results of what happens. On the calendar page they can see if a laser machine is busy and the last 10 entries of users (I had 15 users today and it's a rather quiet day). On the lendout page they can see the tools that aren't back. As admin we can see the list with links to the pages, where we can mark the tool as returned and make is disappear from the list. The template for the lendout page looks like this: <?php namespace ProcessWire; // LENDOUT LIST TEMPLATE include("mekano_header.php"); ?> <div id='main'> <!-- main content --> <div id='content'> <span class='verdana_18_black_bold'><?php echo $page->summary; ?> <hr> <?php header( "refresh:600;" ); $features = $pages->find("template=lendout, return_time='', sort=-lendout_time"); echo "<div class='verdana'><ul>"; foreach($features as $feature) { // STUDENT $studentspages = $pages->find("template=students, id=$feature->student_name"); foreach($studentspages as $studentspage) { }; // RESULT ADMIN if($user->isLoggedin()) { echo "<li> <a href='{$feature->url}'><span class='verdana'>{$feature->lendout_time} -> {$studentspage->title} "; // LIST OF TOOLS LENDED $toolspages = $pages->find("template=tools, id=$feature->tool, sort=title"); foreach($toolspages as $toolspage) { echo "<style> ul#menu li { display:inline; } </style> <ul id='menu'><font color='green'><li>| {$toolspage->title}</span></li></font></ul>"; }; if($feature->lendout_notes) { echo "<ul><font color='green'><li>{$feature->lendout_notes}</li></font></ul>"; }; echo "</li></a>"; } // RESULT STUDENT else { echo "<li> <span class='verdana'>{$feature->lendout_time} -> {$studentspage->title}</span> "; // }; // LIST OF TOOLS LENDED $toolspages = $pages->find("template=tools, id=$feature->tool, sort=title"); foreach($toolspages as $toolspage) { echo "<style> ul#menu li { display:inline; } </style> <ul id='menu'><font color='red'><li>| {$toolspage->title}</span></li></font></ul>"; }; echo "</li>"; }; }; echo "</ul></div>"; // NEW FORM if($user->isLoggedin()) { echo "<hr>New"; echo $forms->embed('tool-lendout'); } ?> </div> <?php include("mekano_footer.php"); ?> So you have an idea how some pages work behind the curtains.
  15. @dragan Nothing happens when you add something to the cart because only admins can operate the shop. We sell stuff at a counter and students pay right away. I can give you a working login if you want. I made the site myself with bits and pieces, starting from the basic multi-language sample. Since 2015 adding and replacing and removing several modules, maybe leaving debris. And on a few occasions I had PW users here solve problems beyond my limited capacities. _init and _func are virtually unchanged from standard values. And I have no idea where this x-iplb-instance comes from, don't have it in my header or template.... x-iplb-instance: 28111
  16. @wbmnfktr Well maybe I don't need all the script stuff on every page, but I do on the pages we use most. And probably some stuff added up over the years and might be obsolete, but hard for me to decide. @dragan Maybe too much is cramped on one page as I want a lot of information at the same time. Out of a list of over 1800 students what they've borrowed and when, when they used a lasercutter and for how long, if they attended a lasercutting workshop, got a pair of safety glasses, etc. And then there's three forms on one 'student' page, each adding the name automatically, the time and with just one click when they start using a laser or borrow a tool. So I could clean up the header part for some pages, but then still have to wait on the pages we use most. Or create more different pages for different purposes, making it more difficult for my staff to find what's where.... I have Tracy Debugger on but don't really know at first sight where to find the slowness causes.
  17. I'm experiencing annoying slowness on www.mekano.info. Pingdom.com tells me it takes 74.7ms to load the http and then 5481.6ms to load the https. I have the impression it's been better before. We use the website a lot to manage our tool lendout system and lasertime with Form Builder and selling materials with Padloper, so we roughly add 100 pages a day. 5 clicks for a Padloper sale (add to basket -> checkout -> confirm -> verify & add -> back to list) add up to a lot of waiting.... Anybody who can direct me to the culprit? Using PW 3.0.98 PHP 7.1
  18. You have to place this "<script src="https://maps.googleapis.com/maps/api/js?key=[your_API]"></script>" in the <head> part of your template or "head.inc" or whatever. But you also have to register your site(s) with a Google Cloud Platform https://console.cloud.google.com/apis/credentials for it to allow the API on that site.
  19. @Tom. For what it's worth, this is how I solved my problem, maybe it helps you to find your solution. // DATE CALCULATION $laserdate = date('d F Y', strtotime($feature->lendout_time)); $lasertimestart = date('H:i:s', strtotime($feature->lendout_time)); $lasertimestop = date('H:i:s', strtotime($feature->return_time)); $start_time = new DateTime($feature->lendout_time); $since_start = $start_time->diff(new DateTime($feature->return_time)); $minutes = $since_start->h * 60; $minutes += $since_start->i; $lasertime = gmdate("H:i:s", strtotime($feature->return_time) - strtotime($feature->lendout_time)); // RESULT if($feature->return_time) { echo "<li><span class='verdana'>{$laserdate} -> {$studentspage->title} | {$feature->machine} => <b>{$lasertimestart} -> {$lasertimestop}</b> = {$since_start->h}:{$since_start->i}:{$since_start->s} or <font color='green'><b>{$minutes} minutes - done</b></font></span>.</li>"; } else { echo "<li><a href='{$feature->url}'><span class='verdana'>{$laserdate} -> {$studentspage->title} | {$feature->machine} => <b>{$lasertimestart} -> <font color='red'>busy</b></font></span>.</a></li>"; }; You can see it working here below the Google calendar: https://mekano.info/en/calendar/
  20. I tried it before and it didn't work. Just now made a new api key and set it everywhere and it seems to work. Of course now anybody can get your api key.... I did restrict the usage in credentials but still.
  21. Well I'm wrestling with this already for some time and just gave up for a while. I have an api key in the module configuration, I have billing enabled, my credit card is valid,.... no idea what's missing where.
  22. Just celebrated the creation of my 25000th page on the first website www.birthfactdeathcalendar.net I made with ProcessWire, about five years ago. 25000 pages means over 17000 individual public pages and a few thousand as selectlists (cities, states, countries, occupations,....). All of this would never have been possible with the great support of members here. Thank you all! And the lucky winner is Sabine Pass, Texas, United States, where Jiles Perry Richardson aka The Big Bopper was born on 24 October 1930.
  23. If you want to move an existing PW site to another server I suggest http://modules.processwire.com/modules/process-export-profile/. I just used it for a site and it worked perfectly, copied all files, database, templates, modules and assets. And it's just about fool proof simple. I used Soma's install script (https://processwire.com/download/core/), easiest way to get going.
  24. Ah, got that. It wasn't obvious that the field requirement change on the template would only affect the field on that template and not on another. Phew, all those hidden treasures in PW, I could fill a BFD calendar with discovering just those....
×
×
  • Create New...