Jump to content

Peter Knight

Members
  • Posts

    1,465
  • Joined

  • Last visited

  • Days Won

    10

Everything posted by Peter Knight

  1. Would love to see them. Multi-column listings were one of things I most missed about MODX after a brief fling with Expression Engine and it's Channels concept. I've used Craft a few times and agree, the UI is very tight.
  2. Hey Tom. Does ListerPro not cater for this?
  3. I'll contribute too. ($100). Would love to see an integrated image optimisation module if there's agreement on the fundamentals. I know there are some upcoming improvements with the image UI on the horizon. I wonder are there plans for this type of service as a native or paid module. I also think that both support and maintenance need consideration. Some good approaches here http://www.mobiloud.com/blog/2015/02/10-best-image-optimization-plugins-speed-wordpress-site/
  4. @Kongondo I'm going to come back to this next week. Due to a deadline, I had to push an interim lo-fi version. Hoping to grab some time at the weekend or early next week instead. Appreciate all the help though
  5. Thanks Martijn My understanding of the images API is that I can set just a width and the height will be proportional so I'm not sure why thats throwing an error. At least I'm happy it's not causing my issue. Can anyone actually try on their own install to output a list of comma separated image tags from a page? I've never seen it done before and there's not much evidence on the forums that it's been tried.
  6. Not yet but I've been meaning to. Love those NAS Are you running DSM 6.0.2 Beta or one of the stable V5s ?
  7. Thank you both. str_replace looks useful. Since neither example was working, I did some digging and here' what I found. 1. The Div which is supposed to hold the comma separated image tags is outputting just the following around every image. <div data-uk-filter=","> That seems odd to me when the images field is called images and do have tags within. 2. I turned on error logging and found perhaps a more basic error which may be stopping the tags working? Warning: Missing argument 2 for Pageimage::size(), called in /Users/peterknight/Sites/site2.co.uk/site/templates/Portfolio.php on line 56 and defined in /Users/peterknight/Sites/site2.co.uk/wire/core/Pageimage.php on line 240 I don't think this is the issue though as the Images themselves are successfully outputting both thumbs and larger modal versions. At this stage, I think I've managed to output almost every kind of data from messing around with the code examples. I'm pretty sure at one stage I even had next weeks winning Lottery numbers on the page
  8. Don't forget if you're using Pete's XML site map Module that it auto adds new pages to the site map. But ... "It also adds a field called sitemap_ignore that you can add to your templates and exclude specific pages on a per-page basis. Again, this assumes that you wish to ignore that page's children as well."
  9. AFAIK Set to hidden in ProcessWire only means that pages are hidden within PW when searched via the front end via a PW search. They've no relation to Googles index. I've always thought that Hidden: Excluded from lists and searches should be split into three Hidden: Hide from menus and PW selector calls (unless explicitly over-ridden) UnSearchable: Doesn't display in search results performed via the website Don't Index: Hide from Google bots and don't display in Google's index I'm probably approaching this from a method I used in another CMS
  10. Hmm. Not sure what I'm doing really. I'm reluctant to use code that I don't understand but want to wrap this up. Granted, my code doesn't work so I can't use it anyway :-/ Any pointers on where I'm going wrong? Part 1 (works): Output a list of image tags with no duplicates <?php $out = "<ul class='portfolioFilter'>"; $duplicates = array(); foreach($page->images as $image){ // rather than count words, let's just explode each string into an array (even if only one word) $tagsArray = explode(' ', $image->tags); foreach ($tagsArray as $t) { if(in_array($t, $duplicates)) continue;// skip duplicate tags $out .= "<li class='' data-uk-filter='{$t}'>" . "<a href='#'>{$t}</a>" . "</li>"; $duplicates[] = $t; } } $out .= "</ul>"; echo $out; ?> <ul class="portfolioFilter"> <li class="" data-uk-filter="Sitting-Room"><a href="#">Sitting-Room</a></li> <li class="" data-uk-filter="Kitchen"><a href="#">Kitchen</a></li> <li class="" data-uk-filter="Home-Office"><a href="#">Home-Office</a></li> <li class="" data-uk-filter="Gym"><a href="#">Gym</a></li> etc... </ul> Part 2 (no working): Wrap each image in a DIV referencing the image tags in a "data-uk-filter". Unlike the LIs above, each image can have many tags separated by commas <?php foreach($page->images as $image){ $tagsArray = explode(' ', $image->tags); foreach ($tagsArray as $t2) $large = $image->width(800); $thumb = $image->size(380); echo " <div data-uk-filter=\"$t2\" > <a class=\"fancybox-portfolio port-item\" href=\"$image->url\" rel=\"gallery1\"> <img src=\"$thumb->url\" alt=\"$thumb->description\" class=\"portfolio-thumb\"> </a> </div> ";} ?> It works in the sense that it's outputting everything correctly but I'm only getting a single tag per image. Most images have more than 1 tag. The output is <div data-uk-filter="Sitting-Room"> <a class="fancybox-portfolio port-item" href="/site/assets/files/1082/006---dc3420.jpg" rel="gallery1"> <img src="/site/assets/files/1082/006---dc3420.380x0.jpg" alt="Sitting room by Ensoul Interior Architecture" class="portfolio-thumb"> </a> </div> but it should start <div data-uk-filter="Image-Tag1, Image Tag 2">
  11. Is there something wrong with the following redirect syntax ? <?php $session->redirect($page->get(1184)->url); ?> I've used this (below) to successfully redirect to a child URL so thought I was on the right track. <?php $session->redirect($page->child->url); ?>
  12. @Kongondo - thanks for the examples. It does but I have it in a separate PHP call. Not sure if that matters. At the moment it's not working but leave it with me for a few hours. I'd like to fine comb it and try figure it out.
  13. Sorry - that was me typing/thinking out loud. :-/ Thanks for the sample. I'm set up and at the moment the LIs correctly produce <li class="" data-uk-filter="Kitchen"><a href="#">Kitchen</a></li> <li class="" data-uk-filter="Bedroom"><a href="#">Bedroom</a></li> <li class="" data-uk-filter="Bathroom"><a href="#">Bathroom</a></li> <li class="" data-uk-filter="Sitting-Room"><a href="#">Sitting Room</a></li> etc Now I need to apply image tags to a DIV surrounding an image. In UI Kit, each filtered item (my image tag) separated by a comma: <div data-uk-filter="filter-a,filter-b">...</div> or <div data-uk-filter="Bedroom,Gym,Basement" >...</div> I've spent the last few hours goofing around with some code LostKobrakai gave me before which implodes an array but that was based on Page tags <div data-uk-filter='{$tags->implode(", ", "tags")}'</div> and then some code from your own example (which explodes!) $tagsArray = explode(' ', $image->tags); and i'm not getting anywhere. So just to rewind a bit, here's my current base code which works but doesn't separate the image tags with a comma <?php foreach($page->images as $image) { $large = $image->width(800); $thumb = $image->size(380); echo " <div data-uk-filter=\"{$image->tags}\"> <a class='fancybox-portfolio port-item' href='$image->url' rel='gallery1'></a> </div> "; } ?> I know in my mind, what I need to do but cab't translated that to working code when using image tags Vs page tags. Worst case scenario, I can save each image as a page but I've a programming itch now I need to scratch :-/ Any tips after your 3am Media Manager marathon?
  14. Looks amazing. Looking forward to purchasing. Are you looking for any feedback at this stage or would you rather keep developing it? Can we get BETA access?
  15. I've just tried that and it works in terms of outputting a list with no duplicates. You're right though about commas within the LI. <li class="" data-uk-filter="Gym Basement"> <a href="#">Gym Basement</a> </li> Unfortunately, this means the UIKit filtering is broken as "Gym Basement" doesn't match images which are "Gym, Basement".
  16. Thanks K I'll give it a go. Er, no idea. I think it was a code block in a quote
  17. Hi guys Trying to output a series of image tags in surrounded by an <li> a I've been partially successful in that the tags are displaying BUT they're repeating. IE the following code ... will output Sitting-Room Kitchen Kitchen Home-Office Gym Basement Bedroom Gym Basement There's repetition in there. I only need a tag listed once. There's also a case where an image has 3 tags IE Bedroom Gym Basementis actually 3 separate tags. That's the first 2 parts of my problem
  18. Just noticed there's quite a few videos and screenshots in the docs using very old Admin themes. Screenshots should be relatively easy to update once a theme is accepted (default or Reno). Videos are going to be tricker. But as someone who initially looked at PW and then bounced off due to the look of the early admin (bloody designers!) I think these first impressions are vital and should be updated.
  19. Really impressed. For some reason (before you built this) I assumed the Monitor app would be accessed via a private web page. Of course, it would naturally be part of the Admin as you've done. Not sure why I jumped to that conclusion :-/
  20. Yes - good points Martijn. In this case, I am developing for my own skills / curiosity but I'll definitely keep that in mind. I have an earlier post bookmarked too regarding sanitizing entered data etc,
  21. Thanks guys. That gives me a direction at least. Much appreciated.
  22. Hi guys. I want to learn something new but not sure where to get started or what the technique is even called. I have a page inside the PW admin with several fields. I'd like to present this fields (not their values) on the front end of a web page. Populating them (front end) would create a new PW page in the admin with the values etc. I'll start looking at some kind of form hooked up to the PW API but I wondered if fields such as auto complete and page select were possible or would rely on several 3rd party libraries? Just looking for point in right direction as opposed to code etc. thanks.
  23. Ryan - you're the twinkly fairy atop our ProcessWire Christmas tree. But seriously, I wonder if you should include a screen grab from GoogleTrends too? It does a great job of showing the increase in Searches for ProcessWire on Google. BTW, your clarity and openness here just highlights the WTF-fest surrounding another platform I use. Nobody knows the number of the next version, they can't agree on the product name, there's no public (if any) roadmap and it's probably over a year since there was any type of public info. I wish them well but reading great posts like yours on how solid PW is and how bright it's future (and present) is, clarifies for me that banking on PW has been the right decision for my business and clients too. And that's not because the other CMS is headlining at Confusion-Palooza but because PW on its own merits has a bright, long road ahead. You've written too a post which I'll happily send clients to when they ask "well, what is ProcessWire"?
  24. I think a central manager (ProcessWatch ?) is a great idea and something I've needed in the past. My collection of PW sites is growing rapidly and a birds eye view if all of them would be a real bonus as we manage more and more. Are there recent developments with PW3 which allows it to share data with other PW sites? Maybe the time has never been better to have a central PW install with the: 1. Ability to see which version is running and what latest Dev and Stable version is 2. Ability to upgrade , backup database etc 3. See a modules installed and their version. See if a new version is available 4. See the health of a site (some kind of ping or status - live or non responsive) 5. See who is logged in per site 6. See latest changes per site I think all of the above are already available within a PW install via native functions and Module so I wonder how they could be harnessed on a central console.
  25. Hmm, I'm not sure what mean. Possibly I've misunderstood what you're trying to do. Initially I thought you were trying to make a 1-level / linear menu but you may be trying to nest items? Why don't you create a simple mockup of how you want this to look on the front end of your site? I'd have a better idea then. It maybe a case that Somas navigation module might be better if you are building a hierarchy instead of a flat nav menu although I don't think that allows you to cherry pick what items are included.
×
×
  • Create New...