Jump to content

Peter Knight

Members
  • Posts

    1,384
  • Joined

  • Last visited

  • Days Won

    5

Everything posted by Peter Knight

  1. The published field of a page is: {$update->blog_date} and outputs as 8 March 2013 12:00 am If I want to change the Date Format to March 2013, is it advisable to change this via PHP or directly via the field settings. I notice I can specify the Date/Time Output Format Code via the field the Details and Input tabs but I'd rather not mess around with the source info. I'm guessing I've to create a variable based on the published date and then use some filter to specify M, YYYY. Just looking for a point in the correct direction. Thanks.
  2. Ok, finally fixed it. I realised the second foreach loop needed to be way down the code. Once I figured out my list of brackets, semi-colons, quotation marks etc etc it worked Here's my code <?php $updates = $pages->find("template=blog-post, blog_tags=Studio Watch");//Get blog posts tagged Studio Watch echo"<section id=\"cd-timeline\" class=\"cd-container\">"; foreach ($updates as $update) { echo"<div class=\"cd-timeline-block\"> <div class=\"cd-timeline-img\"> <img src=\"img/cd-icon-picture.svg\" alt=\"Picture\"> </div> <div class=\"cd-timeline-content\"> <p>{$update->title}</p>";{ echo "<i class=\"fa fa-tags\"></i>"; foreach ($update->blog_tags as $t) { echo "{$t->title}"; } echo"<span class=\"cd-date\">Jan 14</span></div></div>" ;} } echo"</section>"; ?>
  3. Ok, closer to completion. I'm now not getting any duplicates after adjusting the nesting. Still only getting 1 tag on the Project Tag and Location Tag even though there should be two or three. <?php $updates = $pages->find("template=blog-post, blog_tags=Studio Watch");//Get blog posts tagged Studio Watch echo"<section id=\"cd-timeline\" class=\"cd-container\">"; foreach ($updates as $update) foreach ($update->client_location as $location_tag) ; foreach ($update->blog_tags as $project_tag) { echo"<div class=\"cd-timeline-block\"> <div class=\"cd-timeline-img\"> <img src=\"img/cd-icon-picture.svg\" alt=\"Picture\"> </div> <div class=\"cd-timeline-content\"> <p>{$update->title}</p> <strong>Tags:</strong>{$project_tag->title} <strong>Location:</strong>{$location_tag->title} <span class=\"cd-date\">Jan 14</span> </div> </div>"; } echo"</section>"; ?>
  4. Hmm, this is interesting. Im not sure again if my syntax is correct or nested badly but I'm only getting a single tag from each post and the page is outputting as follows Title of Post 1 Tags: Tag 1 Title of Post 2 Tags: Tag 1 Title of Post 2 (again) Tags: Tag 1 Title of Post 3 (again) Tags: Tag 1 Title of Post 3 (again) Tags: Tag 1 Title of Post 3 (again) Tags: Tag 1 <?php $updates = $pages->find("template=blog-post, blog_tags=Studio Watch");//Get blog posts tagged Studio Watch echo"<section id=\"cd-timeline\" class=\"cd-container\">"; foreach ($updates as $update) { foreach ($update->blog_tags as $project_tag) { echo"<div class=\"cd-timeline-block\"> <div class=\"cd-timeline-img\"> <img src=\"img/cd-icon-picture.svg\" alt=\"Picture\"> </div> <div class=\"cd-timeline-content\"> <p>{$update->title}</p> Tags:{$project_tag->title} <span class=\"cd-date\">Jan 14</span> </div> </div>"; } } echo"</section>"; ?>
  5. @Kongondo - Basically I'm using your blog system with some tweaks. I have *some* posts tagged as "studio watch" which are not so much full blog posts but mini updates consisting of A headline (which is blog title) Project Tags (which are the normal tags which come boxed with your blog Module) Location Tags (very similar to normal tags but a seperate parent folder for the pages created as tags). (Haven't got round to this bit yet) I'm then using a CSS Timeline I found and tweaking it to make it pull in the above.
  6. Thank you Kongondo. Thats exactly what I was looking for and I don't mind the duplicates right now. You seem to be nesting foreach statements there? Haven't seen that before but I guess it makes sense. I drastically simplied the first code example for the sake of outputting *something*. What I'd like to do is apply your code to my code example. Let me see if I can figure this out. Time to put kettle on and switch off the phone <?php echo"<section id=\"cd-timeline\" class=\"cd-container\">"; $updates = $pages->find("template=blog-post, blog_tags=Studio Watch");//Get blog posts tagged Studio Watch foreach ($updates as $update) { echo"<div class=\"cd-timeline-block\"> <div class=\"cd-timeline-img\"> <img src=\"img/cd-icon-picture.svg\" alt=\"Picture\"> </div> <div class=\"cd-timeline-content\"> <h2>Title of section 1</h2> ​ <p>{$update->title}</p> <a href=\"#\" class=\"cd-read-more\">Read more</a> <span class=\"cd-date\">Jan 14</span> </div> </div>";} echo"</div>"; echo"</section>"; ?>
  7. My template is blog-post. Have edited above. @Joss That gives me the same result as my original PHP. IE echoes the titles of the tags AND the titles of the pages containing those tags. Is there another way to do this so I am only outputting tag titles within pages based on that template.
  8. How would I refine this selector to list only my tags. Tags are simply an array of pages stored within a field called blog_tags? The following PHP partially works in that it lists all pages based on blog-post template. The problem is it lists outputs the titles of my tags and the blog posts too. <?php $mytags = $pages->find("template=blog-post");//All pages based on blog_post tamplate foreach($mytags as $taglet){ echo "Tags:{$taglet->title}";} ?> I've tried editing the selector to target the field with the template $mytags = $pages->find("template=blog-post, field=blog_tags "); but my syntax is clearly wrong. I then tried targetting the echo statement and that's wrong too echo "<strong>Tags:</strong> {$taglet->blog_tags->title}";}
  9. Surely say the learning curve is neglible? I mean apart from understanding how the Finder works and some basic navigation of the directories, there can't be much to learn. BTW I'm actually a Mac and PC man myself. Been building my own PCs for years (for gaming). I've nothing against PCs but think Windows is a nightmare.
  10. @Kongondo - I had a question about the directory structure and upgrade compatibility. Can I add my own custom fields to the default blog-post template and will it survive future upgrades? I need to create a second set of tags called Client Location. These tags will have their own folder into which I'll store those tags (pages). If I add this folder to your blog folder structure, will this survive future upgrades?
  11. Must check out ProCache and AIOM. Do you have any before and after stats on page speed?
  12. Pete - you need to get a Mac *runs for cover*
  13. Peter Knight

    Inbox by Gmail

    Cheers, thats nice. Did it take you long to get used to the UI? I like the way I can flick between Inbox and traditional Gmail app too
  14. @Nico Any updates planned to fix the problem when FormBuilder is installed? I can just uninstall MarkupSEO for the mo but it's a great module. Would love to have it functioning
  15. There's a wish list / feature request on the forums. You should add your requests there to make sure they aren't lost in the threads of...t i m e .....
  16. I see what you mean. I guess it comes down to perference. I never liked the icons. As a general rule, I think FontAwesome and font icons are over used anyway. Glad you like it though and welcome to the forums
  17. Hi Misan I'm genuinley interested in hearing why you feel processWire is "a bit clunky" and which version you are using. I felt the same initially but using 2.5 is important because it replaces TinyMCE with CK Editor. That makes the whole experience less clunky. Also, check out the RenoBird theme which is real nice UI redesign by RenoBird (Tom Reno). Try those and let me know how you feel about the experience?
  18. As a tech demo I think it's great. As a mechanism for turning browsers into leads, I'm not so sure it'd give you a great response. I don't think you have provided someone is at the stage where they know what they want or they're ready to divulge that info That's quite a gamble up front. IMO you want to start off with the broadest conversation possible with the least amount of fields. Before you start funneling people down into specifics you could have a form which asks for : Name: Email: Company: How can we help? This way people can free type in the "how can we help" field. If they have specific details at hand, they can tick a box titled I have project details ready (Yes/No) which loads the larger form. But make it clear to people that they don't have to go down this route.
  19. Cool. Missed that one. I notice it's still in BETA but I'll give it a shot. P
  20. @Kongondo Any plans to introduce a Comments link on the Blog dashboard. Clicking it would display a list of comments across all posts and have batch actions (approve, disapprove, block). Also, we might be able to filter between categories and further filter between approved, disapproved and spam? We don't ask for much, eh?
  21. Back to OP, I had reservations too when I first started using PW. It was the tree view I was concerned about too. IE I wondered how PW would handle a list of say, 200 sub-pages. Would users have to scroll way down a massive list of posts? Would the back end be slow? Once I started using PW, I realised this was a moot point as PW will paginate your pages within the admin every 50 or so pages. See screengrab of the PW Skyscrapers Demo and notice how the Architects pages are paginated and have very fast next/back arrows there too. PW is incredibly zippy and accessing any page takes no time even when you have to drill down into sections The admin search is very fast so you cna jump right to a page if you know the title or contents PW 2.5 has a Recent Pages link which is very handy Again, there's the Lister Pro module too which is an extra bonus
  22. Just a quick update to this older thread. I know it's still being linked to from some other posts. Another possible solution (paid) is to use the ListerPro module to display news posts in the admin area. I'm using it to create a paginated list of blog posts and I've another Lister view setup to display lists of posts with certain tags. Worth a look.
  23. Ha - I didn't mean to imply that. I think you've covered a few angles and have thought it through better within each scenario.
  24. All good ideas. I had a similar proposal in the past.
  25. So you have a select field which selects an item Category. And each Category is a page?
×
×
  • Create New...