Jump to content

BFD Calendar

  • Content Count

  • Joined

  • Last visited

Community Reputation

71 Excellent

About BFD Calendar

  • Rank
    Sr. Member
  • Birthday 09/20/1959

Contact Methods

  • Website URL

Profile Information

  • Gender
  • Location

Recent Profile Visitors

5,374 profile views
  1. 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
  2. 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!
  3. 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>
  4. 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/.
  5. @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.
  6. 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.
  7. @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
  8. @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.
  9. 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
  10. 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.
  11. @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/
  12. 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.
  13. 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.
  14. 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.
  • Create New...