Jump to content

BFD Calendar

Members
  • Posts

    407
  • Joined

  • Last visited

Everything posted by BFD Calendar

  1. I would like the markers on my map link to the event page that features the location instead of the location page itself. The location is related to the event by the field 'bfd_events_places_id_list'. Tried this but it doesn't work.... $features = $pages->find("parent=/events/ | /the-eyes/, bfd_month.name=$month, bfd_day.name=$day, sort=bfd_day, sort=bfd_year, sort=name"); $markers = new PageArray(); foreach($features as $feature) { $markers->add($feature->bfd_events_places_id_list); } if ($markers && $feature->bfd_day) { $map = $modules->get('MarkupGoogleMap'); $options = array('width' => '100%', 'height' => '500px', 'markerLinkField' => '$feature->url', 'markerTitleField' => '$feature->title'); echo $map->render($markers, 'MapMarker', $options); } else { echo ""; };
  2. Always eager to learn something new! Unless it's beyond my comprehension....
  3. Thanks all. Horst's solution did the trick. I tried <?php header("location: http://www.your-site.com/page-url-with-mail-script/"); before but it didn't work. <?php file_get_contents("http://www.your-site.com/page-url-with-mail-script/"); however worked. Teppo, the page I'm calling is indeed hidden because I'm using it only to send my daily array to Blogger. As soon as it runs smooth Blogger is configured to accept and post automatically. And of course the page shouldn't be reachable otherwise.
  4. Horst, the 'tasks scheduler' only allows me to enter the url of a script/page on the server and fix a time when it should be executed. I can't edit the cronjob itself (or I haven't figured out where to do it). Adrian, 'bfd_mailer.php' is the template that has the mail script. Load it in a browser and the content is sent. 'wire('pages')' didn't do the trick. LazyCron looks promising, but I see Captain Hook luring around the corner again. Still gobbledegook to me but I guess I'll have put my teeth in there sooner or later. I kinda get the idea behind it but applying it is something else.... Basically the hook says 'myFunc' is sending the email (script in template) 'everyDay'? Or is 'myFunc' finding the pages AND sending the email? And it should be not just 'everyDay' but every day at 1.00 am. So should I distill it all from http://processwire.com/api/hooks/ and http://processwire.com/api/hooks/captain-hook/ or are there more practical examples out there? Anyway, thanks until now.
  5. I have a template that includes a php mail script sending the results of an array. It works fine when I load the page in a browser, it sends the page content like it should. I want this to happen every day at 1.00 am, so I have a Cron Job (Tasks Scheduler on my server) scheduled to perform the script. Command executed : /usr/local/bin/php.ORIG.5_3 -c /usr/local/lib/php.ini-2 /homez.183/birthfac/www/site/templates/bfd_mailer.php But I get a PHP Fatal error: Call to a member function find() on a non-object on line 51: $features = $pages->find("parent=/events/, bfd_day.name=$todayday, bfd_month.name=$todaymonth, sort=bfd_year"); So I presume the doesn't understand the ProcessWire code "parent=/events/".... Any suggestions for a workaround or solution?
  6. I'm obviously a beginner....
  7. And, you have to put it into html to show the image instead of the filename <img src='{$page->imageK1->first(2)->url}' /> (or adapt Soma's solution to this).
  8. It took me a while too: $image = $page->imageK1->first(2);
  9. I'm going for a different approach.... Since I was also looking for an easy solution to update my long time blog I figured I could do that by sending my daily ProcessWire query by email to Blogger, set it to automatically post and then let MailChimp and Twitterfeed pick up the Blogger RSS to send it to my MailChimp daily subscriber list, to Twitter and to some Facebook pages. All that can be scheduled to happen say between 1.00 and 2.00am, making people believe I never sleep. So far so good. In my newsletter template I added $to = "performan.org.##mycode##@blogger.com"; $headers = "From: ddv@birthfactdeathcalendar.net\r\n"; $headers = 'MIME-Version: 1.0' . "\r\n"; $headers .= 'Content-type: text/html; charset=ISO-8859-1' . "\r\n"; $subject = $jaargang . $jaargangst . " year - N° " . $daynumber . " " . $today; $body = "<html><body>" . $headtxt . $counttxt . $bfdtxt . "</body></html>"; where $bfdtxt is the output of my query. Works fine when the page is loaded in a browser, but only the last '$feature' is featured in the email while all are listed on the webpage. When I call this page from the 'task scheduler' on my hosting server nothing happens.... If anyone could direct me on the right path that would be great.
  10. Ah hooks.... seems like I will have to boldly go where no me has gone before. Thank you Soma, I'll try to screw this into my template, start the engine and see if it works.
  11. I tried "$rss->itemDateField = date(DATE_RFC2822);" where I assume "date(DATE_RFC2822)" is today in the format needed for an RSS feed. It would mean that the creation date is tricked into today and the posts look as if they are created today. MailChimp checks the RSS at 3.00am, finds the 'new' pages and sends them out. The pages found in my array sent to the RSS template lists events that have a 'bfd_day' field that matches today's day and a 'bfd_month' field that matches today's month. The 'bfd_year' field is of course different for every event. So I don't think it would be necessary to add another field. Perhaps another approach is this: $day = $feature->bfd_day->title; $month = $feature->bfd_month->title; $year = date("y'); $rss->itemDateField = new DateTime('$year-$month-$day'); What do you coders think of it?
  12. Ok, my RSS feed is NOT a feed of recently CREATED pages. My RSS feed is a list of events where the field 'bfd_day' is today and the field 'bfd_month' is this month, aka the day the RSS feed goes out. The pages can be made anytime beforehand. Right now I'm making pages for 24 May, they should appear in the RSS feed on 24 May and not in the RSS feed of tomorrow. So somewhere "$rss->itemDateField = 'created';" should be replaced by a date function 'today' rather than 'created' for each item. My guess is "$rss->itemDateField = date(DATE_RFC2822);". Trial and error and I'll wait and see again if and what MailChimp will send me at 3.00am in the morning.
  13. I also think the PubDate is the culprit. I presume the MarkupRSS module gets that date from the creation date (itemDateField) of the post, under 'Render individual RSS item' in the module code. if($this->itemDateField && ($ts = $page->getUnformatted($this->itemDateField))) { $pubDate = "\t\t<pubDate>" . date(DATE_RFC2822, $ts) . "</pubDate>\n"; } else { $pubDate = ''; So basically I could change that into something based on the search criteria to find the posts that need to go into the daily RSS, $todayday = date("d"); $todaymonth = date("m"); $features = $pages->find("parent=/events/, bfd_day.name=$todayday, bfd_month.name=$todaymonth, sort=bfd_year"); and somehow insert those as PubDate. If that makes sense, should I change that in the module itself or in the RSS template? And uhm, it would be nice to direct me towards how as well....
  14. Nope, MailChimp doesn't send http://feeds.feedburner.com/birthfactdeathcalendar either.... While I have one configured in exactly the same way http://wheniwasbuyingyouadrinkwherewereyou.blogspot.com/feeds/posts/default?alt=rss that works fine. But on Blogspot the articles are published as 'new' every day. Perhaps adding a 'tricked' publish date might help?
  15. I moved my site from the working folder upfront and live. And yes I updated the feed @ MailChimp. Got a new url @ FeedBurner and have set up MailChimp to send at 3.00am in the morning. Hopefully I'm happy when I check my mail tomorrow morning. I'll see how it ends up html-wise. I know it's Landrover Owner Style Thanks again.
  16. Adian, I installed ProcessRedirectIds. It looks like a definite improvement for what I want. I'll keep you posted if anything comes up. Thanks, DDV
  17. Still wrestling with this.... My daily RSS feed works fine when viewed in a browser or RSS reader, but for some reason MailChimp doesn't pick it up as RSS feed. My five cents is that it doesn't because the posts in my query are not 'new', instead they are a set of existing pages matching search criteria. $todayday = date("d"); $todaymonth = date("m"); $features = $pages->find("parent=/events/, bfd_day.name=$todayday, bfd_month.name=$todaymonth, sort=bfd_year"); Any ideas someone?
  18. I still wonder why internal page links are not referring to page ids instead of urls. As soon as something in the url changes the whole site can turn into a mess. I have a list with lots of names that I refer to, mostly by page relations, but once in a while also as link in a text area. Sometimes you find out after a while that a person is called Johnsson and not Johnson. Since the title field and url are based on 'Name, Surname' url 'name-surname' everything is fine when it comes to page relations, but not when it comes to url, it means searching the whole site - or my physical memory - to find out where the misspelled name was used. Or maybe one day I might decide it's better to put the names under parents A, B, C, etc instead of just all under parent 'people'. Then every text link to a name would need to change. The above mentioned modules are a workaround in some cases but not a solid solution. And apart from that, a PageAutoComplete field would be so much easier to search through 500 people, 900 places and 1000 dates for now....
  19. Not too much of a Belgian beer enthousiast myself, but Icthegem’s should definitely be Ichtegem's (www.brouwerij-strubbe.be/start/historiek/en).
  20. Thank you Marc. It's amazing to find that many pictures, not only of people but even of events. 25 years ago all my information came from books, magazines or newspapers. I still have a huge collection of shabby black & white pictures enlarged by use of photocopying to bloating A4 images. I still need to scan those to add them as another bonus. And the pictures do stir some additional imagination. In 2012 my BFD blog even had a daily video about some event, also kind of crazy to see what's available on YouTube. I'll add some of those sometime too.... Regarding genealogy I guess you'll encounter some date problems too. I wonder how much these calculations are reliable to be sure that 17th of March 0763 was a monday. And it gets worse when you're going bc. I was born on the day Brion Gysin 'invented' the cut-up technique, so I guess that was my lucky star in heaven to gift me with a creative 'bolting' style....
  21. Amidst all the fireworks, celebrations and yesterday's parties around the globe, I silently launched my Birth(+)Fact(x)Death(-)Calendar to the world. Although to most programming gurus on this forum it will probably not be a real 'showcase' to eat your heart out. As mentioned before, I'm not a PHP Grandmaster and I'm not a CSS wizard but just a simple creative artist doing what the uncontrollable urges make me do. Birth(+)Fact(x)Death(-)Calendar is a now 29-year-old project that has lived several lives, re-birthing from simple written notebooks to Commodore 64 cassette storage, several database systems and finally the World Wide Web. When a Zen Buddhist friend hinted me to ProcessWire and I saw the Architects demo I thought "Yeah, this is it!" But soon enough I hit the limits of my programming skills and gave up. I even admit that at a certain moment I thought Drupal was a better option. However, after a while I had the impression I was building a five storey garage building with a ton of complex tools and facilities while basically all I wanted to do was change the oil in the gearbox, grease some joints and keep up with routine repairs on an old LandRover. Things you usually do with a piece of wire, silicone and rock'n'roll tape. Last summer I encountered the unfortunate meeting of my left leg with a yellow car while driving my bicycle in Antwerp, leaving me captured to a couch in the living room and short walks on crutches to the kitchen for a cup of tea. Although thoughts and creativity were also somewhat crippled by the situation I knew I was going to have time on my hands for several weeks and months to say the least. So I went back to ProcessWire and thought "This must be it, get on DDV!" Now I know that this is it. Thank you Ryan for making something 'simple' that even I can manage to do what I've been dreaming to do for quite some time. Thank you also, along with all other hardcoders here to help me get over my beginners' mistakes and help me along the path to coding Nirvana where everything just simply works like simple earthlings want it to. I am sure most of you will either pull some hairs, burst out laughing or just stare with an open mouth at some of my coding solutions. But remember, I'm a mash-up, collage, cut-up, ex-cook, carpenter, welder, painter, teacher, bus driver, manager of a tattooed pig farm in China, visual artist doing my stuff with what I can find, and doing it LandRover owner style. Birth(+)Fact(x)Death(-)Calendar is also a work in progress. It grows day by day and I'm sure many new features will be added along the way. Right now my concern is to have the basic framework functioning from day to day. That's what Birth(+)Fact(x)Death(-)Calendar is about. Serving you a fine selection of events to inspire your day. Check Birth(+)Fact(x)Death(-)Calendar every morning for tips on which book to read, what movie to watch, where to go, maybe what to eat or drink, all based on events for the day. Today (2 January) you could perhaps read 'Suicides' by Guy de Maupassant, take a walk along Rue Le Sueur in Paris, listen to 'She was a Visitor' by Minimal Man, watch the fantastic movie '10 Rillington Place' with a stunning Richard Attenborough or just let your heart skip a beat for Philip Blaiberg. Check for events on your favourite day in the 'events' section. I'm filling in some events for most days of the year, but my collection of events is beyond 10.000, bear patience because I probably have a long way to go. If you like what you see and have suggestions to add new features, new paths, new possibilities, new abilities, better performance, better interfaces, cooler scripts, gadgets, etc,.... please tell me. And even better, also show me the 'how to' as well. The title for this post? It refers to a 1978 song by the Mekons, 'Where Were You?', and it was also the title of a blog I kept about my Birth(+)Fact(x)Death(-)Calendar for several years. Apart from collecting events I also archived where I was in pictures since 1999. Before on another blog The Eyes Have It, but now also integrated into Birth(+)Fact(x)Death(-)Calendar. And finally, post your requests for favourite days here! I have about 25 to 40 events for every day of the year. Any request posted here will be added in the next couple of days. And now.... enjoy Birth(+)Fact(x)Death(-)Calendar! DDV
  22. Happy New Year to all Saturday 1st of January 2000 The first sunrise of the New Millenium as seen from my quarters in Taling Chan, Central Thailand, Thailand
  23. Tried this but it didn't work for me. I can't select my 'newsletter' from the list and upon send there are several errors: Skickar Till BFD RSS Test Unable to Create New Campaign! Code=311 Msg=subject - Please enter a value Unable to Send Campaign! Code=300 Msg=Invalid Campaign ID: 429365 Any special type of MailChimp campaign I should make first? I basically want to send out the content of the home page every day.
  24. Upon moving ProcessWire into the root folder like mentioned above I get an error: Parse error: syntax error, unexpected T_VARIABLE in /www/index.php on line 105 line 105 says: $config->paths = clone $config->urls; Anything else I need to change to get it back working? Edit: fiddling with .htaccess solved the problem.
  25. Ok, thanks. I'll first put my site where it will be and then work out what's the best way to get this working smoothly. I'm not in such a hurry to have all the content in place, having the framework right and working is more of a concern. There are still about 5000 names to add so I have plenty of time to test and find the best solution.
×
×
  • Create New...