-
Posts
407 -
Joined
-
Last visited
Everything posted by BFD Calendar
-
Second thought: if the link is kept as text instead of page id I have a bit of a problem.... I'm working on my site in a separate subfolder until I decide to put it online. So it's in something like www.mysite.com/temporary now. Hopefully in a week or so it will go to www.mysite.com - which means all the links in textarea fields are worthless or what?
-
Browse and copy the link would be a good option. Is it really the link (as text) that is used or is it the page id? If it's the link as text then I could be in trouble if a name turns out to be written differently and is changed later on, after the link is made. I assumed ProcessWire would use the page id which is shown as a link.
-
I'm using a lot of internal page links on my website. When they are in fields they are easy to fetch with asmSelect fields. But I also use them in textarea fields. Adding a link brings the pages menu, but then the hassle starts.... I have a few hundred names and I want to link to one of them, it means guessing where the letter H or S will be in the list of pages. For H start at page 12 or something and then click next, next.... For S definitely go to the last page and click previous, previous.... Is there an easier way that I haven't found out about perhaps?
-
Thanks. My brief career as Tattoo Pig Farm manager is documented here: DDV in China. And if everything goes as expected I should be halfway the healing process of my leg by now. My daily RSS feed is based on content from different pages: 'event' pages that match 'day' and 'month' of the date the RSS feed goes out. Basically the same query as the home page. But I guess it should be possible to get that into a summary field using CSS. Something else bothering me is that now all the 'summaries' go out as individual posts whereas I want them all together in one post. I don't want people subscribing to the RSS feed by mail (MailChimp) to wake up with 30 messages every day.
-
I'll start with saying that I'm not a 'coder' by far and sometimes I have the impression that most people here are and suppose that everybody is one. Being a 'performance artist' you could say I'm the opposite I need nothing else but my body to do my work. www.performan.org Nevertheless I've used the internet as a means to make my work public, since 1994 when Netscape 1.1 was released with the major introduction of frames. The Jockel Project Since 1985 I've kept a database of events that I find interesting, in notebooks, in a Commodore 64 environment, in a FoxPro database, in a Filemaker database, as a blog When I Was Buying You a Drink Where Were You? and now finally (and hopefully working from 1 Jan 2014) in a searchable website thanks to ProcessWire. Apart from that I worked as a cook, a carpenter, a welder, a painter, a teacher, a bus driver, manager of a tattooed pig farm in China and currently at an architecture school operating CNC machines and lasercutters but also unloading wood, card- and fiberboard or simply bricks from delivery trucks. And more actually I'm painstakingly recovering from a complex leg fracture since the unfortunate meeting of my left leg and a yellow car while driving my bicycle in Antwerp last summer. So yes, PHP and XML are hard work for me, but I'm willing to learn. And I'm happy to have discovered ProcessWire and appreciate the help I've had so far from anybody responding to posts and questions. Some things just aren't obvious, and even when searching the forums you don't always find what you want. Or sometimes something doesn't even looks like a solution until someone tells you to look at it in a different way - which you did, thank you. Oh, and if you're looking for some electronics to listen to while you're coding, our complete catalogue of electronic music since 1980 (vintage analog synthesizers, tapeloops and voices only!) is available for free at the Internet Archive.
-
Ahum, as if we are 'simply' capable of doing so, while still wrestling to get ProcessWire under my thumb....
-
I already have a running setup and a bunch of subscribers with MailChimp, so I want to stick with that if possible.
-
Any progress with this module so far? I'm looking for something to send out a daily newsletter with MailChimp that has a list of events for the day. $todayday = date("d"); $todaymonth = date("m"); $features = $pages->find("parent=/events/, bfd_day.name=$todayday, bfd_month.name=$todaymonth, sort=bfd_year"); I tried linking the ProcessWire RSS module and MailChimp RSS newsletter function but they don't seem to match....
-
Would it be possible to set this up from an RSS feed as well? I want to send an RSS feed with posts matching criteria every day. It works fine with a feed from Blogger but I can't manage it to work from ProcessWire. The integrated RSS module is set up properly and feed readers get it, Mailchimp doesn't....
-
I have an rss feed that searches for pages with today's date (day and month). $todayday = date("d"); $todaymonth = date("m"); $features = $pages->find("parent=/events/, bfd_day.name=$todayday, bfd_month.name=$todaymonth, sort=bfd_year"); Is there a way to have the feed go out once every day, say at 2.00 am? And, can someone direct me towards formatting the feed, or is this dependent on the reader used? $feedtxt = "<li> <table><tr><td width='200' valign='bottom'> <div style='max-width:200px'> <img src='{$webimage}' align='right' style='width:100%; height:100%'> </div></td><td width='15'></td><td valign='bottom'> <span class='nobelbold_32px'>{$feature->bfd_case->title}</span><span class='nobelbold_24px_grey'><br>{$yearsago}<p style='line-height: 18px; margin: 0 !important;'></span><span class='nobelregular_18px_grey'><a href='{$feature->url}'>{$datetxt}</a><br><br>{$sanitizer->textarea($feature->bfd_text_before, $options = array('allowableTags' => '<a>, <em>, <strong>'))} {$ageoldtxt}{$nametxt} {$eventtxt}{$atagetxt} in {$placetxt}.<br>{$extratxt}</span></p></li></td></tr></table><hr>"; For instance, in Firefox the images don't scale, in Vienna RSS reader they do but none does any formatting except <em> , <b>, etc. The css url points to the CSS stylesheet used for other templates on the site.
-
I have the same issue when entering a location and saving a page, the location is gone. Usually it works to enter the location again and save once more.
-
That helped. Thanks! It still needs some polishing to get 'Monday 7th of December 0043bc' show up as 43bc but I'll figure that out. In case anybody's interested, calculating people's age in bc times results in negative numbers, my solution is: $atagetxt = str_replace('-', '', ' at the age of ' . ($eventyear - $birthyear));
-
I click on the field, then type the numbers I want and hit return. Same for text, type the first few letters and the field moves to what I want, hit return.... On a MacBook Pro.
-
I'm using three fields to calculate the date of an event, bfd_day, bfd_month and bfd_year. All are 'integer' fields. When 'bfd_year' is less than 100 the date turns into the 2000s. Cicero, died in 43bc suddenly died in 2043bc.... Would it make a difference if 'bfd_year' is a text or float field? And if so, will I keep all my data if I change the field from integer to text? Here's what I use to calculate the date: $day = $page->bfd_day->title; $month = $page->bfd_month->title; $year = $page->bfd_year; $fulldate = new DateTime("$year-$month-$day"); echo "{$fulldate->format("l jS \of F Y")}"; if(trim($page->bfd_date_bc->title)=='bc') { echo "bc"; }; $thisyear = date("Y"); if(trim($page->bfd_date_bc->title)=='bc') { echo $thisyear + $page->bfd_year . " years ago"; } else { echo $thisyear - $page->bfd_year . " years ago"; }; The 'years ago' calculation works fine, it says Cicero died 2056 years ago today.
-
$features = $pages->find("parent=/events/, 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', 'zoom' => '4'); echo $map->render($markers, 'MapMarker', $options); } else { echo ""; }; When there are two identical markers (two events happening on the same day in the same place in above example), the map is not rendered.
-
There appears to be a small bug with an AsmSelect input field. I have a list with numbers 01 to 31 as a 'day' field. Instead of scrolling down to numbers > 19 I type the number and hit return. Works fine with any number except '22'. Typing '22' results in '21' getting entered. To enter '22' I need to type '222'. A Catch 22 or an Easter egg?
-
To pick this up again, I'm using twitterfeed.com to get a feed from a Blogger page and then send it to Twitter and several Facebook pages. I also get the feed with mailchimp.com and send it out as a daily mail to subscribers. All automatically as soon as a new post is added to Blogger. The posts at Blogger are scheduled to publish every day between 1.00 and 2.00 am to make sure everybody wakes up with suggestions for some celebrations of the day. I'm hoping to do this from ProcessWire from 1 January 2014 onwards, if possible also send the feed to Blogger as well.
-
Huh, less is more I guess. Anyway, it works. Thank you! One more (additional) question: how do I keep the 'class' 'on' for months when events are shown? $class = $child === $page ? " class='on'" : ''; Keeps the parent 'on' but it should keep the parent of parent 'on' as well to have a better idea of the navigation. ps @ gebeer -> http://www.birthfactdeathcalendar.net/bfd_processwire/the-eyes/1-january-2000-bangkok-thailand/
-
When I'm on '/events/months/january/january-02/' $page->parent->name=january I added a bit of code on the page to make it visible: <?php echo "<br><br>page name = {$page->name} / parent name = {$page->parent->name}<br>"; if ($page->parent->name==months) { echo "parent=/months/<br>"; } elseif ($page->parent->name==january) { echo "parent=/january/"; } else { echo "nope"; }; ?>
-
In the same line of thought.... I have a menu with months and a submenu with days for every month. The idea is to click on a month's name, then a day's number and see a list of pages that have a matching 'month' and 'day' field. 'months' is a parent with 12 children (january, february,....), every month is a parent with 29, 30 or 31 children (january_01, january_02,....). When I'm on the 'months' page I see the '12-months' menu, when I click on a month I see the 'days menu'. But when I click on a day, the 'days menu' disappears. While the list of items for that month and day shows up correct. In the code below, where is my 'days menu' disappearing? <!-- NAVIGATION FOR MONTHS --> <div> <ul id='topnavmonths'> <?php $monthpage = $pages->get("/events/months/"); $children = $monthpage->children; foreach($children as $child) { $class = $child === $page ? " class='on'" : ''; echo "<li><a$class href='{$child->url}'>{$child->title}</a></li>"; }; ?> </ul> </div> <br> <!-- NAVIGATION FOR DAYS --> <div> <ul id='topnavmonths'> <?php if ($page->parent->name==months) { $daypage = $pages->get("/events/months/$page->name/"); } else { $daypage = $pages->get("/events/months/$page->parent->name/"); }; $children = $daypage->children; foreach($children as $child) { $class = $child === $page ? " class='on'" : ''; echo "<li><a$class href='{$child->url}'>{$child->bfd_day->title}</a></li>"; }; ?> </ul> </div> For a (not) working example: http://www.birthfactdeathcalendar.net/bfd_processwire/events/
-
YES! Thank you very much. I would never have thought of anything like this. Any idea where/how I can pimp by low/moderate php skills to handle such situations?
-
When passing $features there is no map at all.... The MapMarker field is called into 'events' by a matching id, 'bfd_events_places_id_list' is the page id of a 'place' page. A 'place' page can be used for more than one event. When the id matches the fields from the 'place' page (name, street, city, state, country, MapMarker) are shown on the 'event' page, with the correct map. echo "{$placepage->MapMarker}"; shows the individual 'MapMarker' data in the foreach list but I can't find how to enter it in the $map->render(), except that it only shows the last marker.
-
Trying to get multiple markers on a map. All found MapMarker entries show up in the list, but only the last one from the list shows up on the map. How do I get them all to show up on the map? $features = $pages->find("parent=/events/, bfd_day.name=$todayday, bfd_month.name=$todaymonth, sort=bfd_year"); foreach($features as $feature) { $placepage = $feature->bfd_events_places_id_list; echo "{$placepage->MapMarker}"; }; $map = $modules->get('MarkupGoogleMap'); $options = array('width' => '100%', 'height' => '400px'); echo $map->render($placepage, 'MapMarker', $options);