Jump to content

BFD Calendar

Members
  • Posts

    420
  • Joined

  • Last visited

Everything posted by BFD Calendar

  1. I installed them manually. Uploaded the zip file and expanded it there, removed "-master" from the folder name. There are no extra file extensions. Let me (hopefully) install the Module Manager and see if that helps. Edit: ModuleManager doesn't show up either What about the 'built-in installer? I'm in ProcessWire 2.3.0.
  2. To you it probably does.... I'll give it some trial and error or perhaps a night sleep and see if it does to me as well. Thank you for the encouragement <a href='{$img->page->url}'><span class='newspapersubtitle'>{$img->description}</span></a>
  3. This works excellent for something I'm doing. Just wondering if you can also grab the url of the page where the random image resides. To make the image clickable and go to the page, not the image itself.
  4. If using the 'new PageArray()' where or how do I tell it to show the markers that I want? echo $map->render(new PageArray($pages->find("template=bfd_places, MapMarker!=''")), 'MapMarker', array('height' => '400px', 'zoom' => '2', 'lat' => '50.923813', 'lng' => '4.431493')); It's probably obvious for seasoned programmers but I can't find any reasonable or understandable examples or explanation. (Hints or directions towards sources are welcome)
  5. The HTML Purifier looks like an OK option. But.... the 'MarkupHTMLPurifier' folder is in site/modules but it doesn't show up in the list of modules after a 'check for new modules'. So $purifier = $modules->get('MarkupHTMLPurifier'); $purifier->set('HTML.ForbiddenAttributes', 'p'); results in 'Error: Call to a member function set() on a non-object' By the way, I also have 'RandomImages.module' in my site/modules not showing up in the list either. Others work fine after uploading them to site/modules. Unzipped on the server so there should be no ftp errors.
  6. Is it possibly to sanitize only one tag? I want to include a textarea in a template without the paragraph formatting, but keeping all other formatting and links. What I want is "Here's a template that includes text from a <textarea> within the template text" What I don't want is "Here's a template that includes text from a <textarea> within the template text"
  7. The options are working alright but no markers show up. Do you mean it will only work with one marker? If so then how to get the markers from a 'find' show up on the map? Basically just like in the 'skyscrapers' website. As far as I can tell you've done it totally different there.
  8. Getting an error Error: Call to a member function getRandomImages() on a non-object on line $image = $helper->getRandomImages(1, "images", 1847); where '1847' is the parent of pages with an 'images' field. And the module doesn't show up in the list of modules although it's in the modules folder.
  9. Happiness comes from small things Now find a Good Samaritan who solves the GoogleMaps problem....
  10. $todaymonth is 11 indeed. That's what it should be because in my 'bfd_month' pagefield I selected '11' for events happening in november.
  11. Trying to get a list of events that happened 'today' results in nothing.... I have a number of 'events' pages with day, month and year fields. Getting the information from 'day' and 'month' I want to list them, and show the locations on a map. $todayday = date("d"); $todaymonth = date("m"); $features = $pages->find("template=bfd_events, bfd_day=$todayday, bfd_month=$todaymonth, sort=bfd_year"); foreach($features as $feature) echo "<li><a href='{$feature->url}'>{$feature->title} {$feature->bfd_case->title}</a></li>"; $items = $pages->find("template=bfd_events, bfd_day=$todayday, bfd_month=$todaymonth, MapMarker!='', sort=title"); $map = $modules->get('MarkupGoogleMap'); echo $map->render($items, 'MapMarker', array('height' => '400px', 'zoom' => '2', 'lat' => '50.923813', 'lng' => '4.431493')); 'bfd_day' and 'bfd_month' are Page fields while MapMarker is fetched to 'events' with a 'get("template=bfd_places, id=$page->bfd_events_places_id_list")'. Using selector 'title*=November' works.
  12. For some reason the only array item working here is the height.... echo $map->render($items, 'MapMarker', array('height' => '400px', 'zoom' => '15', 'lat' => '50.923813', 'lng' => '4.431493'));
  13. All that is done. Perhaps I can make you a temp admin so you can add an entry and try to figure out what happens?
  14. Enter address 'city, state, country' in the MapMarker address field. Clicking outside and Lat, Lng and map appear. Upon publish the page is accepted without an error but the MapMarker address, Lat, Lng and map are empty. Entering address again and save publishes successfully.
  15. Trial and error. There was a conflict between two googleapis scripts 'maps/api/js' and 'maps/api/js?v=3'. Seems to work on first geocoding now. Edit: The error is back.... Enter 'Leipzig, Sachsen, Germany' in the MapMarker address field. Lat and Lng appear automatically when clicking outside address field and the map is rendered correct. On clicking 'publish' I get: Added page /selectlists/cities/leipzig/ Added page /selectlists/states/sachsen/ Saved Page: /places/leipzig-sachsen-germany/ (4 changes) - Cannot be published until errors are corrected Error geocoding address The MapMarker field, Lat and Lng entries and map have disappeared. I re-enter 'Leipzig, Sachsen, Germany', click outside address field and everything appears again. On 'publish' I get 'Error geocoding address' again but now the MapMarker field entry is still there while Lat and Lng are zero and the map doesn't show. Below the map it says 'over query limit'. Clicking in and out MapMarker field and publish again finally renders the map. head_inc has <script type="text/javascript" src="<?php echo $config->urls->templates?>scripts/jquery-1.9.1.min.js?>"></script> <script type="text/javascript" src="<?php echo $config->urls->templates?>scripts/main.js?>"></script> <script type="text/javascript" src="<?php echo $config->urls->modules?>FieldtypeMapMarker/InputfieldMapMarker.js?v=203?>"></script> <script type='text/javascript' src='https://maps.googleapis.com/maps/api/js?&sensor=false'></script> Using Firefox 24.0 on OSX 10.8.5 - ProcessWire 2.3 - MapMarker 2.0.3
  16. I have that working fine for 'related events' on the individual 'people' and 'places' pages. Thank you. What I was actually referring to is the search box. If you enter 'ballard' in the search box it only returns the 'people' page for ballard, not the events pages related to ballard. On the 'events' page the names are called from the 'people' page by referring id. $namepage = $pages->get("template=bfd_people, id=$page->bfd_events_people_id_list"); Would a Concat field offer some kind of solution? But I guess you can't do that with fields from one template on another.
  17. When everything fails, in the end trial and error always works....
  18. Thanks, I found out about that and made a 'simple' list for now. With a little bit of exercise, or by trial and error for that matter, I hope to putter some more complex find navigation list together sometime soon.
  19. Operator '~=' is not implemented in (in /homez.183/birthfac/www/bfd_processwire/wire/modules/Fieldtype/FieldtypePage.module line 377) How about a simple "=", it works for now....
  20. Cool, got it working now. Dumbfounded why it didn't before. ProcessWire is pleasing me a little bit more every day!
  21. As you can see in the php code from the 'event' template the 'people' and 'places' information is not stored there but called from the 'people' and 'places' templates respectively. $pages->get("template=bfd_people, id=$page->bfd_events_people_id"); In the example above "ballard" is only in the 'title' and 'bfd_people_name_last' fields of the 'people' template, and "london" is only in the 'title' and 'bfd_places_city' fields of the 'places' template. They only meet in the 'event' template when their 'id' matches. A basic relational database situation I would say.... In a relational database the 'event' would be a calculation field, with values calculated 'on demand' only, but still searchable. I wonder if this is possible in ProcessWire.
  22. Example: http://www.birthfactdeathcalendar.net/bfd_processwire/search/?q=ballard returns only one page, from the category 'people'. However, in the category 'Events' there are three pages that also refer to 'ballard' (they are listed as related events on the individual 'people' pages). In the 'event' template the names are called from the pages in the 'people' category by matching the page id: <?php $namepage = $pages->get("template=bfd_people, id=$page->bfd_events_people_id"); $occupation = ucfirst($namepage->bfd_people_occupation->title); if($namepage->bfd_people_original) { $originally = ", originally " . $namepage->bfd_people_original; }; if($namepage->bfd_people_alias) { $alias = " aka " . $namepage->bfd_people_alias; }; echo "<b><a href='{$namepage->url}'>{$occupation} {$namepage->bfd_people_name_first} {$namepage->bfd_people_name_middle} {$namepage->bfd_people_name_last}{$originally}{$alias} </a></b>"; ?> Is there a way to also find the three 'events' from the search box? More complex: http://www.birthfactdeathcalendar.net/bfd_processwire/search/?q=ballard+london shows no results. While there is an event about Ballard in London: http://www.birthfactdeathcalendar.net/bfd_processwire/events/3-april-1970/.... (Sorry for the quirky design, I want to have the site structure working first.)
  23. Since I started a complete new install of PW it shows up all well now. I guess my FTP application was the culprit.
  24. Nevertheless I have another bothersome issue.... When I add a page with a MapMarker field I need three saves before it actually saves. When I input 'city, state, country' in the MapMarker field and click outside it, the Latitude, Longitude and Zoom fields and the map all appear. Upon save there's a geocode error and the page could not be saved. The MapMarker field is empty. When I enter 'city, state, country' again, it saves without error but without Latitude, Longitude, Zoom and map. Then the MapMarker field remembers the 'city, state, country' info. Only upon a third save (and clicking in and out of the MapMarker field once more) it saves with all info in the right fields and rendered map.
  25. Thanks. It was indeed an old version of FieldtypeMapMarker which I presumed would update as well while updating MarkupGoogleMap.
×
×
  • Create New...