Jump to content

Marty Walker

Members
  • Posts

    629
  • Joined

  • Last visited

  • Days Won

    3

Everything posted by Marty Walker

  1. Hi Hani, No I don't have that one installed. I'm sure it's just something small that's causing it. To be expected with a new version of PW Regards Marty
  2. That's a great addition Pete. Thanks! Antti, the only issue I have is not being able to see the thumbnail previews when hovering over the thumbnail names in that field. Regards Marty
  3. Pete, Bravo on the new forums! It looks just as good on my iPhone. Regards Marty
  4. Hi, I tend to use more than just the body in my pages so I code my own (http://www.smd.net.au/rss/). It outputs the body and then my project images which matches the order on my site. Here's what it looks like: <?php header('Content-Type: application/rss+xml; charset=utf-8'); ?> <?php echo "<?phpxml version=\"1.0\" encoding=\"utf-8\"?>\n"; ?> <rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom"> <channel> <title>stillmovingdesign</title> <link>http://www.smd.net.au/rss</link> <description>RSS Feed</description> <?php $featured = $pages->get("/work/")->find("template=work, sort=sort, limit=999"); foreach($featured as $feature) { $image = $feature->images->first(); $h = $image->height(); $w = $image->width(); $thumb = $image->size(310,0); echo "<item>\n<title>{$feature->title}</title>\n<link>http://www.smd.net.au{$feature->url}</link><dc:creator>stillmovingdesign</dc:creator><guid isPermaLink=\"false\">http://www.smd.net.au{$feature->url}</guid>"; echo "<description><![CDATA["; echo "<p>" . $feature->summary . "</p>"; foreach($feature->images as $featuredimages) { $large = $featuredimages->width(650); echo "<img src='http://www.smd.net.au{$large->url}' title='{$feature->title}' alt='{$feature->title}' />\n"; } echo "{$feature->body}"; echo "]]></description>\n"; echo "</item>\n\n"; } ?></channel></rss> As an aside I use twitterfeed to automatically tweet each job I publish to Twitter. It works really well. Regards Marty
  5. Hi, I've used big background images on a couple of sites with PW. <? if($page->background_image) { echo "{$page->background_image->url}"; } elseif ($page->rootParent->background_image) { echo "{$page->parent->background_image->url}"; } else { echo "{$pages->get("/")->background_image->url}"; } ?> Because I go down a couple of levels if the current page hasn't got a background image use it's parent page bg image. If that parent doesn't have one use the bg image set on the home page. You could of course just set a fallback image to be any non-pw referenced image. I'm using the code above with Backstretch (http://srobbin.com/blog/jquery-plugins/jquery-backstretch/). background_image = custom image field Regards Marty
  6. Hi Nikola, I use this to detect what device a user is coming from: http://code.google.com/p/php-mobile-detect/ Then in your templates: <?php if ($detect->isMobile()) { include ('./mobile-specific-template.inc'); } eg: If it was for navigation you could do this: <?php if ($detect->isMobile()) { include ('./nav-mobile.inc'); } else { include('./nav-desktop.inc'); } Regards Martin
  7. Hi Alex, I think your image src line needs a "->url": src='{$image->size(200,200)->url} That way it'll pick up the path to the smaller image. Regards Marty
  8. Hooray, Another Australian! I was starting to feel like I was the only one here. I've done a couple of artist portfolio sites (example: http://illo.clientsite.net.au) and almost never use the image description field. I usually put each artwork on its own page. You don't really need a template file for each image so long as you have the fields you want set up. There's a few ways to display images as I've discovered with PW. It all depends on the design. Cheers Marty
  9. @formmailer: Thanks. It was only in the admin I was having an issue. @soma: That's it. I will wait patiently for a solution then
  10. Sorry to drag this up again. I have a "publish_date" field setup with input set to d-m-Y (European/Australian), user date picker checked. I can select and set a date fine. If I go to change that date the picker date defaults to a US format. Eg: If i set my date in the picker as 10 Dec 2011 (1-11-2011) and then go to change it afterwards the picker displays (Jan 11 2011). Am I missing something? Regards Marty
  11. The way Ryan has wrangled TinyMCE makes it easier to insert (and resize) images, link to other pages with your site. This is quite unintuitive with both Markdown and textile. martkItUp!(http://markitup.jaysalvat.com/home/) might be nice to have when using textile and Markdown (especially when it comes to using custom styles), Ryan's implementation here wins me over.
  12. Hi all, New site up for The Infants' Home: http://www.theinfantshome.org.au/ Made with PW of course. Regards Martin
  13. That's a really great idea. I've been thinking about all the sites I've done over the past couple of years and there'd only be 2 or 3 that PW wouldn't have been a good fit for. But having built some in Textpattern and others in ExpressionEngine, I'm amazed at how much PW covers without resorting to a plugin or module.
  14. Thanks Antti and Soma. I think I was over thinking it - if that's possible.
  15. Thanks Soma. That's exactly how I had it set up. It's the code that's always a mystery to me. This is (basically) what I have so far: <?php if($page->side_panel) { $side = $pages->get("/side-panels/")->find("limit=1"); foreach($side as $s) { echo "<p>{$side->title}</p>"; } }
  16. Hi, I had this crazy idea that I could setup a page field in my template that references a couple of unlisted pages - sort of like sidebar content. I wanted to test that the page field is populated and be able to display that pages content. Is that even possible? Regards Martin
  17. Sure. I think the solution here works really well. Nothing simpler than pasting in a url and deciding what code to put around it
  18. I see adding videos from all the major services (YouTube & vimeo) as as commonplace nowadays as making text bold or inserting an image. I don't know why TinyMCE makes this so difficult. The media plugin is pretty much useless for this and I don't like modding the wire install of TinyMCE to do something so basic. Regards Marty
  19. Thanks, I'll give it a go. I really appreciate your help.
  20. Sorry I spoke too soon. It break if I use a url with a dash in it: eg: It looks like YT links aren't created equal.
  21. Soma, thanks so much mate. Works perfectly. I'm going to go broke over the amount of beers I owe people on this forum.
  22. Everything in the body field where I'm putting the YouTube link is getting completely replaced by the iframe code. eg: text text text text youtube link text text text text <?php if(strpos($page->body, '<p>https://www.youtube.com') !== false) { $replacement = '<iframe width="480" height="360" src="https://www.youtube.com/embed/$1" frameborder="0" allowfullscreen></iframe>'; $page->body = preg_replace('#<p>.*https://www.youtube.com/watch\?v=(\w{11}).*</p>#is', $replacement, $page->body);
  23. Thanks so much Soma, Is there a reason why it replaces the entire body field? Regards Marty
  24. The iframe code (preferable) that Youtube likes contains this style url: https://www.youtube.com/embed/rEKDj1OOkhI <iframe width="480" height="360" src="https://www.youtube.com/embed/rEKDj1OOkhI?rel=0" frameborder="0" allowfullscreen></iframe> But the easiest URL for a client to copy in is from the browser url area which would be: So I need a way to go from: https://www.youtube.com/watch?v=rEKDj1OOkhI to <iframe width="480" height="360" src="https://www.youtube.com/embed/rEKDj1OOkhI?rel=0" frameborder="0" allowfullscreen></iframe> Regards Marty
  25. I might be wrong but I don't think mobile Safari even allows it.
×
×
  • Create New...