Jump to content

Joss

PW-Moderators
  • Posts

    2,862
  • Joined

  • Last visited

  • Days Won

    47

Everything posted by Joss

  1. Having trouble with the date picker - it is not firing up at all. I am using the current dev. (2.4.4) I think it might be a script issue, but not sure. Tried with both FF and Chrome. I have tried it inline, on focus and on button click, but none of them are working. Any thoughts?
  2. So this reminds me of the joke about the man who asked is friend if the indicators (signals) on his car were working: "Yes it is, no it isn't, yes it is, no it isn't...."
  3. Okay, just stared at it too long and now I am feeling sick! Going to water my veggies.
  4. Maybe a general notification module that can be inserted into a dashboard (or perhaps can be used in a couple of ways) that looks at updates of modules too?
  5. oh, I am sure we can solve that problem ...... one way or another.
  6. @pleini Since you can create whatever fields you want you can also create whatever variants you want. On your template (not template file) you might want to have different tabs for different devices. However, since you want to have exactly the same data in all devices (wise choice), there is no need. You can do this as part of your template file, which is far more useful. Then the user does not have to worry about devices, the template files will sort that out. You can also use bits of php - so, for instance, you might want to break an article up into a series of iPhone sized swipeable pages, but just for phones. So, you use a bit of php to break your text up into the right sized junks and then use some sort of content slider to display them. On a Desktop, it would just show as one page. But this is all work you can do in your template files while leaving your templates/fields uncomplicated. I don't think Bootstrap has the equivilent of interchange, but I am sure there are plenty of jquery plugins out there that you could use. like response.js http://responsejs.com/
  7. Yes I can see issues with auto upgrade, though a new version available module might be useful for some. Of course, one of the things about how I use PW is that I really don't have a huge need to upgrade since the site is built round whatever the version was at the time. There is also not the pressure to upgrade unlike certain other systems.....
  8. Hi Ivan Nice to see someone else who has been the Seblod route get here! PW is everything I think Seblod would like to be, but probably never can be.
  9. Joss

    A local garage

    They actually bounce up and down, you know - well, gently move.
  10. Joss

    A local garage

    You will have to put up with screen shots for the moment. The poor client is having trouble getting his domain out from under his ex business partner and until he does, I can't link to it. This is, or rather will be, a simple website for a local service garage - a general sort of place that will service any car. Front end is built with elements from Foundation 5 and a couple of silly bits from me. It is fully responsive, some of the content being delivered in a different way for mobiles. For instance, the 4 features blocks on a laptop become an accordion on phones and small tablets. The site has the normal little news facility and a facility for creating blocks of promotional content that can be included into every page in various ways. The client can select background color, image, text, headline (display or not display) for each block. The client also has control over background images for certain panels as well as selecting top panel graphics. It is built with the current dev but it pretty straightforward. The main emphasis of the site will be to try and get it to score locally as the client has no interest in work from outside of his local area. With this in mind I am talking to him about how to link local promotions into the site and the possibility of doing radio and newspaper promos that are reflected with front page flash offers that he can control. The client has a very low budget, so it has been important that he can get his head round running the site as much as possible and make his own promotional decisions. Yes, it would be nice if I could do it for him, but although I do not charge very much for websites (undercharge hugely, probably), if a client wants to use my 35 years experience in advertising, my hourly rate skyrockets! Well, you have to have SOME stupid, useless pride, don't you? Anyway, screenshots below and once we do get the site up, I will add a link
  11. Matthew found it and then told me he would break both my legs if I did not abandon Joomla at once and start using it.
  12. There are two different approaches here: 1. You want to have the same content for both mobile and desktop users, but laid out differently 2. You want to have different content for each - maybe a less verbose description of something for the mobile users that takes up less space. Looking at number 2, you would need to create two distinct fields - obvious really since you will be adding different content! Then, using whatever frame work or a bit of jquery to recognise the browser type or viewport size, you can call up each field in their distinct way. One warning, however, it is unwise to deliver different content to users of different systems - just because they use different devices does not mean they are distinct market segments. Looking at number 1, in this case you can use the same information in more than one way. So, you can call $page->title and $page->body, for instance, but then lay them out in perhaps 4 different ways, using media queries or JS to select which one to use. Foundation, for instance, has a utility called Interchange for doing exactly this http://foundation.zurb.com/docs/components/interchange.html The point with ProcessWire is that it is versatile enough to server whatever content you need, however you need to use it - you just have to work out what you want to do with it. I suppose one thing you could look at for fun is the core language modules, but rather than trigger them depending on the language, trigger them depending on the device. I have no idea how that would work, but it might be an interesting way of looking at it.
  13. I am a bit of a gardener - not a very good one, but I try hard! My main thing is veg up at my allotment, but I have a crappy memory and can never remember what I am meant to be doing to what, when and how. So, I was pleased to see that the Royal Horticultural Society in the UK has released an "app for that." The RHS is internationally renowned for their huge knowledge on all things flora. Unfortunately, it turned out to be iOS only and I use a Kindle Fire (Android) They do like feedback however, so I duly fed back a note saying, "please, please, please, can we have an Android version?" This morning, I had a chatty little reply from them opening with "Dear Joss" and closing with "RHS Webmaster." So nice to know they can't be bothered to say their name. The reply says: "Unfortunately, at the moment we do not have any immediate plans to release an Android version, since Android is still used by relatively low numbers of people in the UK." WHAT??? Which complete idiot is advising them? A sales rep for Apple perhaps? A dev who does not know how to develop for Android so is spinning them rubbish? I have quoted to them two facts: At the end of 2013, iOS made up 47% or the existing UK market and Android 35% When it came to new sales at the end of 2013, Apple made up 29% and Android 54%! Which part of those figures indicates that the number of Android users is too few to consider? By relying on false statistics and bad advice, the RHS is ignoring a minimum of 35% of their potential market, and probably a lot more. Advising clients as to what they need to consider is a vital part of any advertising strategy, whether it is web design or local press or TV, but if that advice is inaccurate or plain rubbish or worse, based on self interest, then the client might as well be throwing their money down the sewer. Meanwhile, my veg are growing, despite the lack of good communications from the RHS.... http://www.foodloversdiary.com Joss
  14. Well, so does ProcessWire - it is the page tree. When developing locally, it is worth always installing as root, which means you either need to use the localhost root, or set up virtual hosts. I am guessing you are using MAMP by the 8888 - if so, I found this guide: http://sawmac.com/mamp/virtual/
  15. Joss

    Cookie Law

    Interesting that on their website they quote two British laws that are actually myths.
  16. My main headache (and this applies to both Mac and Windows) is that I feel as a desktop user that I am slowly being sidelined. As a writer, I use an ergonomic keyboard (not an extreme one, but I like the slight split) so I find laptop keyboards a pain. As a composer I use huge amounts of file space - my main work machine has 4 TB of storage for library files for VST instruments, half of that on SSD, that need to have as fast access as possible. I eat processing power for breakfast - I can melt an underpowered chip at 30 paces if I am in an OTT creative mood. I have no use for touch screens as I need large screens with workspace in front of them, so I would have to stretch forward to use them - it is important to me to see a lot of things all at the same time to work efficiently as I do this professionally and not as a game. I have no use for gesturing as my arms would start aching if I had to flap them around in front of me all day - a mouse is STILL the most versatile interface device I use, despite also having a large wacom tablet. From the GUI point of view, I am probably a potential Linux user since there are loads of simple, straightforward desktops available, but other than as a server, Linux is no good for the rest of my work at all .... it is highly unlikely that the professional tools I use will ever be ported to it as the market is just not there. In the long term my fear is that my hardware costs are going to spiral as my side of the user market contracts to business users only.
  17. If articles is your news listing page and a child of your home, why don't you just do: echo "<p>Return to: <a href='/articles/'>articles.</a></p>"; (Note: As Soma mentioned, whatch your use of quotes) It is shorter, no less customizable and uses the page tree structure. The API way of getting a url of a page is great for instance within a foreach loop where you are listing out the results from a query, but is not needed for a straight link. The API allows you to do things that are not straightforward; it is not intended as a replacement for ordinary actions.
  18. There really is no ProcessWire way to do this simply because what you are doing is wanting to link to a specific page. That page could be anywhere, really. So it is perfectly legitimate to create a direct link. You don't actually have to set up a news system the way I have - I picked a certain way of doing things to demonstrate a range of PW principles.
  19. And social engineer the people who use them!
  20. Years and years ago I saw a film, the name of which I have long forgotten. There was a recurring gag in the film of the lecturer who discovered that more and more of his students were being replaced by tape recorders, till he was the only one left in the lecture hall and the benches were littered with tape recorders of varying types. The last sequence returned to the lecture hall to find no one in the hall at all; the lecturer had replaced himself with a tape machine playing back his lecture to the waiting student tape recorders The temptation with google glasses is to do the same - if the audience insists on viewing via the google glass camera, perhaps the lecturer/performer should simply put up a cardboard cutout with a taped performance. if the audience cannot be bothered to enjoy the spectacle live properly, why should the performer bother?
  21. I always get nervous when people say it is simple - I start worrying whether I have answered the wrong question!
  22. Hi Dylan! The point with a function is that it can be kept in a separate file that is included with your templates and then can be used anywhere. So, to take a very simple example: lets create a file for functions: myfunctions.php Then include it at the head of our template (either directly or via a separate header file as I used in the tutorial): <?php include("myfunctions.php"); ?> Generally speaking, since this function file could be used for anything, you probably want it as the very first thing right at the very top of your template structure - otherwise it won't be useful if it has functions to do with the <head> or something. Okay, that was the first easy bit. Now, create a function that gets posts, based on whatever page is their parent: function myPosts($postnumb) { $posts = wire("pages")->find("parent=/postparent/, limit=$postnumb); } Right, here we are using a variable called $postnumb which we will use later to set the limit of the number of posts we want. Then we are creating a variable called $posts which will contain the array of pages grabbed by the find action. Obviously, the postparent will be whatever page is the parent of all your posts! (That could be a hidden page, or a page without a template file or it could be a published and displayed page - it doesn't matter really. You could also select posts based on their template, if you wished, and then it wouldn't matter what the parent was.... anything is possible) Now, we need to loop through them: function myPosts($postnumb) { $posts = wire("pages")->find("parent=/postparent/, limit=$postnumb); $out =""; // This just sets up the variable we will use for our result foreach($posts as $post){ $out .="<h3>{$post->title}</h3>"; } //end foreach return $out; } // end function There we go; i have just looped through the title, for the sake of an example. Also, I am returning the value of $out at the end. Now to add this to a page: <?php echo myPosts(5); ?> So, I am echoing the function (or more to the point, the value of $out) and I am saying that I want to limit the number of posts to 5. When the function is called, the 5 in the brackets is passed to the function as the $postnumb variable and then is used as the limit in the find selector. You can now reuse this function all over your site and change the number of posts each time. Does that sort of guide you in the right direction while still leaving you a bit to work out? Joss
  23. We tie mobile transmitters to albatrosses.
  24. 1. Someone remind me that $pages->get("/home/") does NOT get the root home page!!!!!! (However correct it might look...) Try $pages->get("/") instead..... or an id or something sensible. Any others?
×
×
  • Create New...