Jump to content

Joss

PW-Moderators
  • Posts

    2,870
  • Joined

  • Last visited

  • Days Won

    47

Everything posted by Joss

  1. Inspired by that, I should have added: Windmills of the mind Here I go again And this that I did for a commercial: http://dancingbear.co.uk/site/assets/audio/single-jingles/liecestershire-parknride-full.mp3
  2. Yeah, always likes that! I remember the original by Trent Reznor
  3. Good grief - I got something right! You might also find this useful: http://processwire.com/talk/topic/4991-sub-arrays-dates-times-and-pure-hell/#entry48484 This was about taking the date, splitting it into years (looping it), splitting it into months, then days .... The result can be seen here: http://harlestonanglingclub.co.uk/fixture-list/
  4. Okay, this is not an area that I am great at.... but assuming your date field is called "date" I would think you need to do something like: $todaysdate = time() $posts = wire("pages")->find( blah blah .... date>$todaysdate .... ):
  5. hmmm - like this. Could neaten up some of my image fields....
  6. Not sure about "favourite" programming music, but I did think of a few that are possibly appropriate; Tears of a Clown Puppet on a string (think about it...) All the burning bridges still I held my head up high Suicide is Painless Brand New Toy (Tom Paxton) After Midnight (The late great JJ Cale) All by Myself I cant get no (Satisfaction) Wont be fooled again Pigs on the Wing Is there anybody in there? The entire "Tommy" album And just about anything by Leonard Cohen
  7. Okay, first of all, I have not done that with websites - well, I did many, many years ago with a large community site, but that was chaos! However, I have managed huge event productions and video productions where you have a lot of different talent supplying different technical skills with a lot of overlaps. I also have a nephew who is a lead developer on several very large games. The trick I have found is to try and reduce overlaps and to make sure the main development parameters are set in stone BEFORE anyone starts coding, drawing or anything else. So, everyone should know what it is meant to look like, understand every aspect of the brief (not the client brief, but the one you write as project manager) and know exactly what their responsibilities are right down to what scripts or functions they should be writing. AS part of that process it is worth having a short lived debate on style and structure, then put that in the brief too. Then, when someone goes sick or drops out, their work can be understood. That project brief document is important and is often neglected. The last time I did one was for a community zone for an online game where the community applications would need to talk in detail with the game application. Horrendously complicated! The final project bible for that was 40,000 words long - but nothing was missed out and in the writing of it, we solved huge amounts of tech problems and knew what it would look like, how it would feel and had even tested out how it would work with players and what they thought. It just needed to be manufactured - and it would have been if the people behind it had actually coughed some money up! I am often amazed how many large projects are created on the hoof - but then, going by how many IT projects end up as camels (a horse designed by committee) , it is probably no surprise at all. Imagine Ford walking onto his first production line and saying, "Okay, guys, we are going to make the first mass-produced private vehicle. No, sorry, I have no idea what it is going to look like or how it will be put together, but I am pretty sure it will be called the Model ... er ... something. Right, turn the production line on!"
  8. I know this may sound very obvious, but with field, templates, template files and so on I try and use nice, easy to understand names, remembering that sometimes you may want to sort alphabetically Since from the website point of view, it only ever sees page names, I can call the rest what I like - so I might as well chose things I have a fighting chance to remember! When it comes to actually coding, I don't have any fixed way of laying things out, but I try and remain consistent throughout a project - so I will comment in the same style, or tab in the same way and so forth. This makes debugging much easier. I also sometimes break things down a bit. If I have a lot of functions being kept in an include file, I might break those up into multiple files just while I am working, then stick them back together for production. Again, it is really just helping me find my own way about. Not that anything I do really gets very complicated! I am a bit influenced by a PERL magician who helped me put together a very early web 2.0 style community site in the 90s. Almost the entire site was in a single file called index. It was scary to work through, but very efficient!
  9. Hey, Mr Stevens, glad to see Foundwire helped someone. Rather than go to the trouble of installing Ruby and the rest, either go grab Scout or PrePros Scout is free and PrePros has a free and paid version. PrePros has the advantage that it will handle less and sass as well as minify JS, HTML and the rest. Nice clean site, btw
  10. Joss

    principlededu.com

    Nice one Neeks and thanks for demonstrating so clearly the difference between WP and PW (see what I did there?) when it comes to developing for the actual client. Nice graphics and site, too.
  11. oh, probably adding my PS
  12. Jees - I swear you guys managed to "like" that post while I was still writing it!!!!
  13. I am not a dev, but as I said before, all they are doing is using a line of JQuery to put the url of the linked-to page into the address bar. If you look at the source, the modal is in a div with the class "module Closeup canClose" This div is written (using ajax, I would guess) into a div called appendedContainer, which remains on the page unpopulated if you don't click on anything - it is simply a target for the retrieved page The css for the the closeup div is: .App .appendedContainer>.Module { -webkit-overflow-scrolling: touch; overflow-y: scroll; bottom: 0; left: 0; position: fixed; right: 0; top: 0; z-index: 680;} As you can see, it positions itself over the home page content with a z-index to put it on top. The actual homepage which is being overlaid is in a div called "ajax HomePage Module," just for interest and to help you find your way through the source. sooooo... What needs to be done here (by some nice person who can write a couple of lines of code) is for your link to call, by ajax, an actual PW page using its own template (possibly render() - though you would need to get rid of header and footer bits), write it into a div as above and at the same time, pop the URL of that page into the address bar. I am pretty sure that is how Pinterest are doing it, though foolishly, without PW It is probably about 4 lines of code and a couple of lines of JQuery to sort out the address bar bit. I am really not certain how to do it as I am an ajax virgin, but someone should be able to do it on the back of what I have just written. By the way, I do not see any SEO advantage to this method - the page is only called in by ajax when the user actually clicks on the image/link and the address bar is only populated at that same point. From a Search Engines point of view, it will just look at the link on the image, whether or not it has a nice flash popup Does that help steer you in the right direction? I am sorry I don't quite know enough to post the actual few lines of the solution. I could probably work it out eventually, but that would just be by asking everyone here how to do it! haha. PS: It is very definitely NOT an underpop - though I love that term! It is an overlay.
  14. Looks interesting Dave - I will play with it later! (after some gardening...)
  15. I never get error free validation - css3 tends to fail all over the place. I was amused to notice that even stackoverflow is full of errors Thankfully, none of my low value clients even know what wc3 is. Interesting blog posts, SiNNut
  16. Okay, not sure if this helps, but PW is sort of built on top of arrays - called wirearray For your purposes, just about anything can end up in an array unless you tell it not to. So, if you shove the children of a page into a variable: $myarray = $page->children; Then you have created an array - you can foreach through it to your hearts content! If you have an images field, if you have set the max number of images to be anything other than "1" then you will have an array - when you set it to 1, you can treat it as if it is not. When you go find() anything, you will end up with an array, even if you only have one thing in it. apeisa is right - the blog profile is pretty advanced, mostly because Ryan neatens everything down to as short as possibly which makes it hard to follow. If you have done my basic website tutorial on the wiki, and then moved onto the simple news system, however, that is pretty blog-like (if rather basic) and has lots of looping in it!
  17. Hi Jason - I am currently writing a loooooonggggg tutorial for people like you, but it is a long way from being finished. However, to get you started: Your template file (as opposed to a template) is just html with some bits shoved in it. So the best way to get started is to create a template file called something.php and make sure it is inside the site/templates/ directory. For the moment, dont worry about headers or footers, but just write a bit of very ordinary html. Now, to get around you really need some navigation, but to get you started we will even forget about that. In admin, go to setup > templates and create new. You will see your something.php listed. Click on it and save it. Now, go to Pages, click on Home and click on new. Call your new page, My Page (why not?) and select the template that you have created. Save it, then publish it. Now, to to the front end of your website and in the address bar type yoursite.com/my-page/ And your page will come up - completely blank. But it is a start! Most of this you already know, but there is a good reason for reminding you - when you are lost, it is easier to start with the basics. Now, open your template file something.php in your editor. Somewhere in the body you need to tell the template file to use the fields that are in the associated template in the backend. At the moment, you only have one field: title. So, open a php statement: <?php and we then need to echo out the title: $page - that says we want a field directly related to this page -> tells the system that we are going to define something title - that is the name of the field (not the label, but the actual name) so .... echo $page->title; and end the php with ?> The final thing can be written in one line <?php echo $page->title; ?> Save that and reload the page and you will see the title appear. From this point on, basically EVERYTHING you do will use this workflow: Field > Template > Page > Template file. Now, admittedly it gets a bit more complicated after a while but the principle remains the same - in the template file (or in any file you are including into the template file) you simply retrieve the data you have in the fields and you echo them out so you can see them. Now, that is very, very basic - but that principle is core to the way you will work and once you have understood that, everything else is just variations on a theme!
  18. Fun! Nice one Diogo
  19. At which point exactly does it simply explode?
  20. Oh, one little tip if you like using JQuery plugins. The default PW installation comes with Styles and Scripts folders inside of templates. However, a lot of frameworks and JS plugins use css and js as folder names. When I start a new PW project, the first thing I do is change the names to css and js - I get less puzzling surprises that way!
  21. It might be worth you just doing one of the easy tutorials - they are a bit like being taught to suck eggs (sorry, I tend to write like that) but they will give you a good idea of how to think your way through the process. Again, they are just one way of doing things, but they are very clear. http://wiki.processwire.com/index.php/Category:Long_Tutorials The basic website tutorial is as a good a place as any.
  22. Oh, I told my text editor that .inc is the same as .php - it tried to go all logical and objectionable on me but I beat it into submission in the end.
  23. Okay, three four of us posted at once! There is a good reason for that, however. The reason we all love working in PW is it is a little like wandering off to do some nice happy HTML with a powerful database and API attached. For instance, I use Bootstrap and sometimes Foundation and lots of JQuery plugins - but none of them have to be changed to suit PW, you can use them out of the box, just as you would in a static site. This makes it incredibly powerful - nothing is off limits or requires someone to produce the "PW" version of something as you would in Drumlapress. So, just write your templates, or bits and pieces to be included into templates, as you would any other html page - but do it with the PW API supplying the content.
  24. Hi Mike and welcome! The thing about PW is that it really does not have any fixed structure - it is up to you how you want to work. There is one fixed rule, however - for a file to be available as a template file is must have a php ending and it must be directly in the templates folder. And that is it. After that is is up to you. For instance, I tend to have my main templates like home, basic-page, gallery - whatever I think I need. But things like my header and footer I put in an includes folder within templates and the just include them into the file. Likewise, I split out much of my logic into functions in one or more functions.inc files and stick those in the includes folder. It doesn't make any difference to PW itself, but it help me think my way through it. PW is a lot less restrictive than drupal!
  25. Take a tip from the PW tutorial I am currently writing: Make a coffee, get a huge piece of paper, a pencil and an eraser, lie on the floor and get planning. You will get your approach worked out ten times as fast as you will on some new-fangled computer gizmo!
×
×
  • Create New...