Jump to content

Joss

PW-Moderators
  • Posts

    2,862
  • Joined

  • Last visited

  • Days Won

    47

Everything posted by Joss

  1. Just thinking about what Ryan says about the real (or perhaps old) place for the line should be so that the devs also take care of html and css as well as serverside leaving the designer to come up with the concept. Working like that does open the doors for great design to be sourced from outside of the web design world, bringing in some of the older or more specialised but brilliant designers that have not got involved because they know nothing about html (and have no time/interest in learning) Years ago I applied for a job doing sound for a games company. My CV includes sound credits on several feature films, work on massive launches for X-Files movie and British Airways, sound-effects design for TV, film, radio drama (which is probably more applicable) and more, and voice director on thousands of productions. Plus, I am a credited music editor and composer. BUT, I don't know any C++ or C# and so on. Sorry, said the idiot at the company, noting my lack of programming skills, we don't see what relevance your experience has to games. Their loss (and their subsequent game sounded awful), but it did demonstrate how easy it is to lose out on valuable knowledge, skills and creativity if you put the importance of technology above the needs of the product. So, perhaps Ryan's observation has huge relevance even today. Personally I still believe the pencil and paper is still the most powerful concept design tool there is.
  2. Joss

    Url Segments

    Yeah sure - any ideas what I should call it? And any thoughts on a breadcrumb code that builds on this? It is the one, rather glaring hole in the solution
  3. Just a thought about legalities, on certain sites there may be either a legal requirement or necessity to keep old versions for ever. For instance, records about users may be required to kept so that changes in user details are recorded, and news sites may want to keep old versions in case of legal disputes over the accuracy of published information.
  4. Joss

    Url Segments

    The next trick, of course, is make the breadcrumbs work in the same way!
  5. Joss

    Url Segments

    Hi Diogo I have just written this up on the wiki at the end of Ryan's URL Segments post. Can you pretend you don't know how it works and check if it makes sense? http://wiki.processwire.com/index.php/URL_Segments#Example_-_Using_URL_Segments_to_link_catgories_to_posts
  6. Joss

    Url Segments

    I forgot about the existence of render() Thanks a million both of you. My boostrap/themable/ultra blog profile is now one step closer!
  7. Joss

    Url Segments

    Ah, okay, I am beginning to understand how this works now. I am suffering from reading too many posts about this and it has turned to mush. So.... I now return the post title on a blank page. Do I put all my post template code at that point, or do I use the post template in some other way? Thanks chaps!
  8. Joss

    Url Segments

    Where I am getting confused is that I am starting with a FIND to get the array of posts that have this category as the one selected in post_category_select. I have an array variable called $posts and I am looping through that, as in my original post. That is all working fine and I am listing posts correctly. What I cant work out is how to translate what you guys are saying into my foreach loop so that it actually links to my post. This is probably me not understanding how the UrlSegments system is meant to work. Joss
  9. Joss

    Url Segments

    Thanks Thomas, unfortunately that does not work. Although it looks right, there isn't actually a post at /news/politics/political post. So it just does nothing because it has nothing to link to. That is why I need to use URL segments (I think).
  10. This should be interesting. I tried to modify that file my self to see the implications, but all I managed was to scare next doors cat EDit: Okay, I think mine is still another issue. Well, worth a try!
  11. Joss

    Url Segments

    Hi Thomas The problem is my URLs rather than finding the posts. Because the actual posts are stored out of the tree, my category URL is: domain.com/news/politics/ But my political post which is linked to the politics category is domain.com/content-management/posts/political-post So I want to end up with: domain.com/news/politics/political-post Joss
  12. Hi Soma - can I test this somehow? I am wondering whether it is the same issue that effected by actions button, because that also meant that when you selected "move" you hadn't actually selected the row first (which I hadn't thought about before).
  13. I cant speak from the web development world, but having been in the advertising, film and music worlds for 35 years I can speak for the web's great ancestors. I think there is a huge difference between specialisation and isolation. In the industry I come from, although we do have dedicated technical roles, most roles are specialisations out of choice from people that start from pretty much the same point - a runner, mostly! So, the the recoding engineer, voice over director, video editor, film writer, producer, advertising creative director, could have all been the same person originally. That sort of evolutionary career path produces something that is vital in some of the huge, multi-million dollar projects I have been involved with over the years (often just in tiny way) We all understand what each other does. That does not mean we could do each other's jobs, but we can bring our particular specialisation as a perspective. So as a sound person, I might pick up a visual edit that has not worked. An editor might notice a glitch on the sound track that I have missed. This is all despite the fact that the unions over the years have tried to stop people knowing (let alone doing) each others work. So, basically I believe that there should be a team - between the client, the developer and the designer (and possibly the often neglected marketing/pr guru). And although each should bring their specialisation to the table, they should appreciate each other's perspectives and career-informed opinions. To communicate those it helps if they understand each others work. And if that means the designer phoning the developer and saying "how can I grab that bit of data so I can play with it," then all the better. Sometimes treading on each other's toes is the beginning of being able to dance together... Joss (2013)
  14. (Note, this might be aimed at the overworked Soma, simply because he has done posts on this before! - http://processwire.com/talk/topic/2519-nested-categories/?hl=segment#entry24077 ) I am trying to work URL segments into a function for getting posts belonging to categories in a tree. This is my current code (with some rubbish kicked out) function getPostsbyCategory() { $thisCategory = wire("page"); $posts = wire("pages")->find("post_category_select=$thisCategory, post_featured_category=0"); foreach ($posts as $post) { echo "<a href='{$post->url}'><h4>{$post->title}</h4></a>"; echo "</div>"; } } The actual posts are to be found at /content-management/posts/POST-NAME - so the post name is three down. The templates can vary. The categories are in the normal page hierarchical structure and all have the same template of "category" with URL segments on. I am assuming that I need to capture the url segment within the foreach, but I have confused myself as to how and what to do with it. My attempts have so far only thrown errors, so I wont even repeat those here. Any clues would be very nice! Joss
  15. I have never seen any flat rate taxes (the only other kind) applied to goods, at least not those sold online. We used to have a window tax, but that was abolished a couple of centuries ago. There can be two ways of including the tax, either as an addition or as part of the price. Really this is down to best practice and local laws. In the UK, when selling retail, the price you quote MUST include VAT. When selling wholesale to companies, it is normal to quote the price without the VAT since the buying company can probably claim it back. The way round it is to have a Price box, a dropdown for the tax (with a default or you will annoy people who have hundreds of products to add), and then a check box for "price excludes tax." Again, the other way around in annoying since most ecommerce is retail and therefore includes tax. As for the regional variations, I am not sure how that works. I suspect it is sometimes taken care of by the payment gateway, because I often find that that is the point when it changes. But I am really not sure at all. By the way, this is interesting, because the client for whom I have just re-templated his site wants to jump to a new solution in 18 months or so. His is a very basic shop (as in, it is all hard goods and nothing complicated), but he has 13,000 products spread across about 10,000 categories. So we might have a big challenge in the future! Joss
  16. HI Soma First works perfectly - and I have learned a lot from that, thanks Second one was more problematic. It didn't do anything initially, but I have changed is slightly because in your foreach I think you mean $posts not $page->children? Changing it worked but I ran into a problem when I tried it on a page that is at the end of branch - it kind of listed everything including most of the contents of the British library! So I added an IF which I think is right? Anyway, here is the final function getChildCategoriesPosts($page=null) { if(!$page) $page = wire('page'); $out = ''; $categories = wire("pages")->find("has_parent=$page,template=category"); if($categories->count()){ $posts = wire("pages")->find("post_category_select=$categories, sort=-modified, limit=10"); if($posts->count()){ foreach($posts as $post) $out .= "<li><a href='{$post->url}'>{$post->title}</a></li>"; } else { return "<li>No Posts found/p>"; } } return "<div><ul>$out</ul></div>"; } Thanks again!
  17. ummm Try uninstalling the module Forget that - I just read your post properly
  18. Listing the taxes and including them is not the complication - it is just values from pages. But knowing WHEN is a little more complicated. For instance if you are exporting out of the EU you would not charge VAT but you would if you are selling within your own country. I am not completely sure how that all works, but there will need to be some checks once the user has entered the shipping/billing information. I suppose that means you also need to tell the software where the shop is!
  19. Using the standard admin theme? Check in the modules directory, see if it is there? Go to setup > Module manager and refresh and see if it does anything? Not a problem I have had, unfortunately, so I am not being much help.
  20. Thanks Soma, I will go and play with those! Joss
  21. Herr Luis! Strange you should say this. My company: http://www.dancingbear.co.uk (Warning, NEVER go to the dot com. It used to be owned by a lady who sold knitting patterns, but then it got bought by a porn company. Damn it!)
  22. "Do the ProcessWire And get your Profits higher Do the ProcessWire Do the ProcessWire "Your coding's on fire With ProcessWire Do the ProcessWire Do the ProcessWire"
  23. I Have a working function (Yippeee!) Well, it should work, I just stole it from sitemap. Basiclally, I am using it to display all the children from any point in my page tree, downwards. The function (which is in an included page) goes: function getChildCategories($page) { echo "<ul>"; echo "<li><a href='{$page->url}'>{$page->title}</a> "; if($page->numChildren) { foreach($page->children as $child) getChildCategories($child); } echo "</li>"; echo "</ul>"; } and I call it like: getChildCategories($page); I want to do a couple of things to change it, and that is where I get stuck. One For my other functions, I am using wire("page") rather than $page as suggested by Soma. But I cant get that to work here. For consistency, how can I change it so I don't need to pass the $page variable? Two I want to wrap it in a div as part of the function. This is also to be consistent with what I am doing elsewhere. I am assuming I need to get an output somehow and then return it with divs wrapped round the output. I tried changing echos to $out .= , but I think I got stuck in a never ending loop! Anyway, my lack of knowledge has defeated me. Three (oh, I meant three) I want to do something similar for calling posts. So, I have three pages in my tree which are being used as categories - each the child of the other. My posts use a page field for the category and I grab the posts simply by comparing the page field with the current $page - normal stuff. I want to now find all the posts that match the children of the current page, all the way down the tree till I fall off the end. And then, return the 10 most recent ones, or something like that. But initially, just get hold of them. I am assuming something recursive has to happen to return an array that I can then use find() with? Again, lack of knowledge ..... Thanks to any of the usual Gurus! Joss
×
×
  • Create New...