Jump to content

BFD Calendar

Members
  • Posts

    400
  • Joined

  • Last visited

Everything posted by BFD Calendar

  1. 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.
  2. 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.)
  3. Since I started a complete new install of PW it shows up all well now. I guess my FTP application was the culprit.
  4. 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.
  5. Thanks. It was indeed an old version of FieldtypeMapMarker which I presumed would update as well while updating MarkupGoogleMap.
  6. Simpler solution was this: <ul> <?php $features = $pages->find("bfd_events_people_id%=$page->id, sort=bfd_year"); foreach($features as $feature) echo "<li><a href='{$feature->url}'>{$feature->title}</a></li>"; ?> </ul>
  7. Since another new clean install everything works fine. Also switched to a different FTP appliation....
  8. I solved it like this http://processwire.com/talk/topic/4615-categorisation-vs-relation/#entry46406
  9. I solved it like this: <?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>"; ?>
  10. In the meantime I changed my approach.... I have a category/template 'events' that calls fields from a category/template 'people' and one 'places'. $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>"; Before I was using "$namepage = $pages->get("template=bfd_people, title=$page->bfd_events_people_title");". To facilitate input I wanted "bfd_events_people_title" to be a select field (field as page and inputfield as AsmSelect). For some reason the titles showed up in the selectlist, I could select one but it disappeared upon save. Using 'id' as reference proves better because 'title' can change in the course of time. So to rephrase my question, could the AsmSelect field use the child pages (that have multiple fields) of the 'people' category as select items? And one step further, could I have an AsmSelect list that shows the 'title' fields as select items but yet input their 'id' in the 'bfd_events_people_id' field?
  11. I would like to have a navigation list of related pages (events) on a certain page. find("template=bfd_events, bfd_events_people_id%=$page->id") Where do I put the find option? In $rootPage = $pages->get("/events/"); or in options -> 'selector' => '',?
  12. <?php $map = $modules->get('MarkupGoogleMap'); echo $map->render($page, 'MapMarker', array('height' => '350px')); ?> results in Error: Call to a member function render() on a non-object while the MapMarker field is called 'MapMarker' to keep things simple.... Why?
  13. Getting back to my places problem above. I have a 'places' template with 'name', 'street', 'district', 'city', 'state', 'country' and Mapmarker fields. Cities, states and countries are select fields. How can I get these fields into an 'event' page by referencing them to either the title field or a unique ID field? Something like having the title or ID from the 'places' page as a select list and pull the other fields from that page into the 'event' template, including the Mapmarker map.
  14. Apart from a default value it would also be nice to have a field that generates a unique ID with numbers counting like 'name0001', 'name0002', etc.
  15. Does the PageListSelect (or AsmSelect) also work with pages that have multiple fields? When I use PageListSelect I can see the children pages from the parent page but when I select one it's gone when I save the page. When using AsmSelect the select menu is tiny and shows no items at all. The page field has the title field set as label field and single page as dereference. It works fine when I have a list of children pages that only have a title field.
  16. Actually I want to use different fields from the 'people' template in a text field on the 'events' template. The 'people' template has beside 'firstname', 'lastname' also 'profession', 'alias',.... fields that are sometimes used and sometimes not. They will be used when 'event' text is 'Explorer David Livingstone meets explorer John Stanley' but not when '(victim of Albert DeSalvo) Mary Sullivan is strangled by (Serial Killer) Albert DeSalvo aka The Boston Strangler'. Perhaps using a combination of the Page reference field and the Hanna Code module might do the trick? 'Event' in these examples should get field info from three different pages, two from the 'names' template (A meets B) and one from the 'places' template. To make it even more complex, it would be ideal if 'profession' is called from a template 'professions'. It wouldn't be necessary to have duplicate fields for every explorer or serial killer in the 'people' pages, and easier to produce a list of all explorers or even all events involving explorers. Ahum, just trying to get the most out of PW....
  17. With renewed optimism I installed again from grabpw.php. Everything keeps working. I switched to a different FTP application and had no troubles so far. Moving files up and down I ended up with a corrupt site folder so I'll have to start from scratch again. Perhaps that's a good thing, forced to think over categorisation before I start entering data.
  18. Since upgrading to ProcessWire 2.3 I had numerous problems accessing my site. Upon advice here I replaced my 'wire' folder with a new one. It worked until I tried to access the admin pages. Today I decided to do a complete clean install from the 'grabpw.php' file. Everything went smooth, all green flags, until I tried to access the site and/or the admin pages. Always getting stuck with this error: I have 'RewriteBase /bfd_processwire/' in my .htaccess as I want to work on the site but keeping it off the homepage until it works.... Where to look and how to solve the problem?
  19. ProcessBatcher is in site/modules. I removed all Modules files from the site/assets/cache. Went to the admin modules page and ProcessBatcher was in the list so I happily clicked 'install. Then this happened: The logged error says: And now the complete website, admin and public are unavailable.... I just replaced the wire folder with a new one because of a previous error....
  20. Replaced the wire folder with a new one and the problem was solved. Thanks.
  21. Upgraded to PW 2.3 two days ago. Perhaps something went wrong in the ftp-transfer. I'll re-up the wire folder tomorrow and let you know.
  22. What is going wrong? I can't edit any page with this fieldtype anymore.
  23. ProcessBatcher is in my 'site/modules' folder but doesn't show up, not in 'modules' nor 'setup'. Logged in as Superuser PW 2.3. Checked for new modules, logged out & in again, all to no avail...
  24. Hm, a person is generally connected to several places. Few people die in the same place as where they were born. 'Places' should definitely be linked to 'events'. Regarding to the listing, there can also be several places in one city. The good thing with MapMarker is that you can really pinpoint to exact locations. So I have fields for country and city, but also state, district, street and name, where name could be the name of a hotel, hospital, school or whatever. I'm also an avid visitor of 'places of interest' myself so I want the location of events to be as precise as possible. On rare occasions the exact same location appears twice in history 'by chance'. Mama Cass of the band The Mamas & The Papas died of a heart attack in 1974, in the same apartment where Keith Moon of The Who overdosed in 1978. When importing from the database I still have to check and update coordinates anyway. Since a lot of my information dates from pre-Google Maps era it's quite fun to update certain places with 'new' technologies.
×
×
  • Create New...