Jump to content

BFD Calendar

Members
  • Posts

    400
  • Joined

  • Last visited

Everything posted by BFD Calendar

  1. Yep, 'images' instead of 'image' was the culprit. Thanks!
  2. I just used your code. The name of the image field on the slide template is 'images'. When I show the slide pages in a list the images show up. The images are all 1000px wide but a different height (733, 725, 762,...). <?php $cf = wire('modules')->get('MarkupCrossfade'); $settings = array( 'pages' => wire('pages')->get("template=slides")->children(), 'title_xforms' => "scale(1.0) translateY(300px)\nscale(1.0)\nscale(1.0)\ntranslateY(300px)", ); ?> <html lang="en"> <head> <meta charset="utf-8"> <title>Slideshow</title> <style> @font-face { font-family: 'BebasNeueRegular'; src: url('<?php echo wire('config')->urls->assets; ?>fonts/BebasNeue-Regular.eot'); src: url('<?php echo wire('config')->urls->assets; ?>fonts/BebasNeue-Regular.ttf') format('truetype'); font-weight: normal; font-style: normal; } body { background-color: #333; overflow-x: hidden; padding: 0; border: 0; margin: 0; } <?php echo $cf->renderCss($settings); ?> .markup-crossfade li div h3 { font-family: 'BebasNeue Regular', 'Arial Narrow', Arial, sans-serif; font-size: 36px; letter-spacing: 2px; } </style> </head> <body> <?php echo $cf->renderHtml($settings); ?> </body> </html> I would also use the slideshow on different pages with different images for an artist website. Like the films page could have a slideshow of film stills and the drawings page could have a slideshow of drawings and so on. But now I'm just testing what's possible on my local server.
  3. netcarver, Error I get is: "Notice: Trying to get property of non-object in /site/modules/MarkupCrossfade/MarkupCrossfade.module on line 93".
  4. I'm getting no images in Firefox Developer nor Chrome on a Mac. Text animations work fine.
  5. I have a list of pages with quotes. The quote is in the headline of the page, other stuff like author etc goes into other fields. On the home page the code is $randomtxt = $pages->find('parent=/resources/quotes/, headline!="", sort=random')->getRandom(1); echo "<br><br><center><b>{$randomtxt->headline}</b></center>"; http://www.performan.org - text under video. Before that I used an old script 'GetRandomText' that just grabs text from a text file with all your quotes. http://www.clubmoral.com/ddv - text at top of page. here the image also changes randomly.
  6. It's also worth to check which PHP version you host is using. I had to add an extra line in .htaccess to set it to PHP 5.4 before I had my site working.
  7. In 2.5.8 I still don't get the the Core or dev upgrades in my list. Even after a modules refresh.
  8. Yes it works, and the link was helpful. It was also helpful as I said because it reminded me to look where I probably should have looked in the first place: the image field stuff. But I was too much fixed on the if elsif else stuff because I had that working somewhere else already.
  9. Ah, I guess when desperate one probably forgets to look in the first place where one should look....
  10. I'm trying to show an image on a page. There are three possibilities 1. get an image from the page, 2. if there isn't any, get an image from an image_url textfield on the page, 3. and if there isn't any, get a random image from the homepage. It seems I'm missing something in my 'if elsif else' logic.... Only the image from the page - if there is one - shows up, nothing else. if($page->bfd_people_picture) { $images = $page->bfd_people_picture->getRandom(2); foreach($images as $image) { $thumbnail = $image->width(300); echo "<div id='images'><img class='photo' src='{$thumbnail->url}'></div>"; } } elseif($page->bfd_image_from_url) { $webimage = $page->bfd_image_from_url; echo "<div style='max-width:300px'><img src='{$webimage}' align='right' style='width:100%; height:100%' /></div>"; } else { $homeimage = $homepage->images->getRandom()->width(300); echo "<div id='images'><img class='photo' src='{$homeimage->url}'></div>"; }
  11. Ok, what would you recommend if I want a grid with only images 400x300 and nothing else, and a list with images 40x30 + number + title + duration + year? There will be about 100 films. This is the script to switch between grid and list: <script type='text/javascript'>//<![CDATA[ $(function(){ $('button').on('click',function(e) { if ($(this).hasClass('grid')) { $('#gridlist ul').removeClass('list').addClass('grid'); } else if($(this).hasClass('list')) { $('#gridlist ul').removeClass('grid').addClass('list'); } }); });//]]> </script> and the css #gridlist ul { list-style: none; } #gridlist .buttons { margin-bottom: 20px; } #gridlist .list li { width: 100%; border-bottom: 1px dotted #CCC; margin-bottom: 10px; padding-bottom: 10px; } #gridlist .grid li { float: left; width: 20%; border-right: 1px dotted #CCC; border-bottom: 1px dotted #CCC; margin-bottom: 10px; padding: 20px; } So I reckon on the template I have a div for grid view and a div for list view where the script switches from one to the other?
  12. Unfortunately the javascript on the fiddle page was not complete.... it took me a while to figure that out. And yes, the grid view should have nothing else but the screenshot while the list view should have title, duration, year etc. To me Ajax was predominantly known as a football club from Amsterdam. I kind of get the the idea what Joss is saying, making it work however....
  13. That is definitely a good point. http://jsfiddle.net/v57JF/ looks fine but 1. it doesn't work when used, 2. it has identical data in grid and view while I want a grid with images only and a list with title, duration, year,.... Rabotheater and Firebug are somewhat above my skills to comprehend and adapt. Same for another example I was recommended. Quite a few container and list classes are already defined by Processwire so it's a bit of a Mikado game when throwing the whole lot into an existing site. I admit my style tends to be more oldskool Landrover owner instead of nowadays programmer, so I'll rest my case for a while now and and let it simmer until the sky brightens and a miraculous insight is shining right in front of me. Then, like a thief of fire I'm sure I'll get there. All the ideas above have definitely helped me to wander off in the right direction.
  14. The Rabotheater solution was exactly what I was thinking of. I gathered it would be along those lines but it's always good to be hinted in the right direction. The CSS is somewhat above my amateur capabilities for now. So I'll crack my head for a while and see how far I get by putting some examples on the dissecting table.
  15. For convenience I wanted to have a copy of my live site local. Installed Processwire on Localhost, made a new database everything works fine. Then used a recent backup with ProcessDatabaseBackups to add the data from the live site to the local. Works fine until I try to login into admin: 'Login failed'. Processwire doesn't accept my user/password combination although they are exactly the same. Apart from admin interface the site works fine locally. Any ideas to reset or resolve admin login?
  16. For a list of film pages I'd like to have the ability to change between two views of the list: one as a list with clickable titles, one as a collage with clickable screenshots. Is there a way to let the user switch from template 'films_list_titles' to 'films_list_images', both accessing the parent page 'films', or do I need other technology to manage this?
  17. Some update. When I changed the Admin theme from default to Reno, the core stable and dev updates showed up. And worked flawless to update from PW 2.5.3 to 2.5.8. Edit: and now it also works in the default Admin theme.
  18. I have the same issue as tobaco. In two installations I can see several modules in the upgrade list, including 'Upgrades', but not the core stable and dev versions. PW 2.5.3 & Upgrades 0.0.2. At some point they were there however, because I used Upgrades to upgrade from 2.5.0 to 2.5.3.
  19. Riz, it took me a while to get things going. Here's the (working) code I use on my home template: // MAP echo "<div style = 'width:85%'><br>"; $landmarks = $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($landmarks as $landmark) { $myentry = $landmark->bfd_events_places_id_list; $myentry->markerUrl = $landmark->url; $myentry->markerTitle = $landmark->title; $markers->add($myentry); } if ($markers && $landmark->bfd_day) { $map = $modules->get('MarkupGoogleMap'); $options = array('width' => '100%', 'height' => '500px', 'markerLinkField' => 'markerUrl', 'markerTitleField' => 'markerTitle'); echo $map->render($markers, 'MapMarker', $options); } else { echo ""; }; ?> </div> "bfd_events_places_id_list" is a page field in every "event" template. It refers to pages that have the actual MapMarker field and other info as well (placename, street, district, city, state, country,...). Maybe you can adapt it to your situation. And probably some guys here can smooth it all out or compact it. DDV
  20. Apparently there are some changes in Processwire 2.5 when new pages are added. When adding a page with a title that already exists, Processwire automatically changes the page name to 'pagename1'. Before, Processwire would tell me that the title/name already existed and forced to use an other name. For my website the new behaviour is rather awkward. When I add a new 'place', say 'Processtown, Wirestate, Forumland' to the already 2000 present, Processwire will add a new page, which I don't want. So now when I want to add a new place I have to check before if it already exists. Worse is when I add a new 'event', say '30 September 2014'. When it already exists, Processwire will add a page '30-september-2015', which is not what I want. Processwire warns me that a different pagename was used, but still it's confusing and could easily lead to unwanted errors. Perhaps it's possible to change this setting somewhere I don't know of....
  21. Yes! Space was the Place to look for.... https://www.youtube.com/watch?v=djBKQNVj5Cc
  22. Here's one that doesn't work (anymore): $todayday = date("d"); $todaymonth = date("m"); $features = $pages->find("parent=/events/ | /the-eyes/, bfd_day.name=$todayday, bfd_month.name=$todaymonth, sort=bfd_year");
  23. Since upgrading to 2.5 I get an error Error: Exception: Unknown Selector operator: '' -- was your selector value properly escaped? (in /www/wire/core/Selectors.php line 247) I don't see any difference with 2.4 but maybe something changed under the hood? Just replaced the 'wire' folder, index.php and .htaccess files and changed nothing else.
  24. Uhm, published.... I guess not. All other locations show up with the same settings however.
×
×
  • Create New...