Jump to content

Joss

PW-Moderators
  • Posts

    2,862
  • Joined

  • Last visited

  • Days Won

    47

Everything posted by Joss

  1. Joss

    Markdown Tables

    Useful resource if you are using markdown for documentation or for Somas notes module: http://www.tablesgenerator.com/markdown_tables Paste in your table or write it up and it spits out nice neat markdown. Saves a ton of time hitting the space bar!
  2. Joss

    Hanna Code

    Separate Listing Permission Not sure if this would be totally useful or not to everyone, but it might be nice to have a separate permission for just viewing a list of hanna codes for authors. No editing, or viewing of code, but just a list. To make this work properly, they would also need descriptions, I would think. This is really just so that contributors to the site know what codes are available and where they can be used.
  3. To be honest, this is hard work on an editor, but the ideal solution for a news site would be something like: Title: just used for backroom records. Example: Man gets eaten by tiger Main Headline: Used for full article. Example: Escaped Tiger attacks jogger in park Sub: Used for full article - optional lead: Example: 20 year old man is badly injured on Hampstead Heath after being savaged by Tiger, the striped domestic cat Short Listing headline: This is a much shorted headline for things like sidebar listings where you are short of room. Example: Tiger Eats Man Short Listing Summary: This is used in the same way and again, needs to be very short. Example: 20 year old thought critical after Hampstead Heath attack Large Listing Headline: This would be for more of a blog listing idea. Example. Man attacked and injured in Tiger attack. Large Listing Teaser: This is much more like the traditional Summary. Though still succinct. Example: A man has been rushed to St Mary's Hospital and is reported to be in critical condition following an attack on Hampstead Heath. Police are searching for a Bangal tiger that escaped while being transported from London Zoo. So, all those use various key words in a variety of ways and find fresh ways of leading people to the article without being cut off or having to write the beginning of the article in a strange way. To be honest, I can think of a proper alternative to this that does not compromise the value of the service to the visitor, even though it does exercise the brain. Still, that is why an editor gets called an editor. And the front of the full article: A man was rushed to hospital in suspected critical condition after being attacked by a large cat on Hampstead Heath. The unusual striped cat, a crossbreed tortoiseshell Called Tiger, was later comforted by its owner and is now back safely at home and curled up in bed. The man was later released after it was discovered that most of the blood was the remains of his ketchup sandwich which he had been eating when he fell asleep on the park bench. In a separate incident, Kahn the tiger from London Zoo was recaptured following his escape from his keepers arms. The six week old tiger cub hit the headlines two weeks ago after he fell asleep on the lap of TV wildlife presenter....... Dont you love working on news?
  4. It is worth getting an editor to think in this way. On sites like the BBC they may have three or four different intros to an article, depending on whether is is sort list, headline grabber and so on. It makes for a very rich experience for the reader. Really, systems like Wordpress do not take into account anything approaching a true editorial process and risk dumbing down good news presentation.
  5. One thing I notice is that you are trying to truncate to a number of characters. The problem with this is that is really doesn't look very nice if you end part way through a word. Generally, I think it is better to have a separate summary field so that you can tailor make the summary to look good on the site. But if you are going to truncate, then you can work it out on a word count. So: <?php $maxpostlength = 50; $text = implode(' ',array_slice(str_word_count($page->body,1),0,$maxpostlength)); echo $text; I can't remember how I put that together now - it was a couple of years ago, but very useful. You probably ought to also strip out any tags too. Using that, you can also change the maxpostlength depending on layout and things like that, which can be useful when going responsive.
  6. Joss

    Grey Contrast

    Quite. I started of by pasting in a little bit off scss to use as a guide that had the variable $dark-gray - seemed a sensible name, so I kept it. That was about four weeks ago. Today I return to my little project and decide to use the variable. Of course I spell it the way I have always done grEy. In my post you can see the difference - in a whole line of variables it was not quite so obvious. Nope, definitely scss - the clue was on the first line ....
  7. Joss

    Grey Contrast

    So, just updated a bit of scss to be told, "There is a bloody undefined variable, you useless excuse for a pathetic human being!" (Don't you wish error messages were more fun?) I looked at the supposed undefined variable, "$dark-grey" Well, looks fine to me. Went and looked at my colour scheme, "$dark-gray" Well, look fine to me too. So why isn't it working? Seems I have tripped over a language barrier.......
  8. Joss

    Inbox by Gmail

    It is working with Google Apps? I still have the original free one with up to 50 users ...
  9. Live briefing. The head honcho is giving a press briefing and started by saying, "we have landed, in the right place..... yes, we have got the right comet....!"
  10. http://www.bbc.co.uk/news/live/science-environment-29985988 I love this sort of thing
  11. Creating a template always feels odd, except that it allows the creation of several at one. Maybe a bit of logic so that if it is only creating one you go straight to edit. Not sure.
  12. Yeah, I ummed and ahhed over AsmSelect Well, to be honest, I didn't think through any of these very hard, kind of just scribbled them down. It was only meant to be three originally... I was trying to work out whether it is easier to look at a list and say "oh, I will have that one, and that one, and maybe those two over there..." Or whether it is easier to select from a drop down.. Certainly, when adding multiple fields to multiple templates, then that is definitely a job for the usual system so you can change the order and so on.
  13. Yes - you have import for both fields and tables as part of the core and there is also a module that does a combination. Actually, I need to find that - I need it for something Edit: this was it https://processwire.com/talk/topic/4420-migrator/ Still a bit experimental I believe
  14. hahah- yes, as I said this is rather over the top. It comes from me finishing off what is a rather over complicated site and suddenly realising I need an extra field added to ten templates. Not a huge problem, but then I thought, well, it could have been worse. And if it was worse, how would I get round it easily It kind of snowballed from there!
  15. I was just thinking that myself, Pierre. Also, for anyone else picking up on this, that tutorial (pretty old now) is just one way you can organise articles or anything really. There are a huge number of ways you can do it and lister pro opens up some opportunities, especially with the ability to sort and search. And just to answer the scaling worry - well, depending on the server, going up to several hundred thousand pages should be no issue at all. But like any news system, how you manage that number of pages needs some creative thinking. However, unlike certain well known Article Management Systems, ProcessWire would allow the imaginative some very powerful content management options.
  16. They wouldn't be duplicate templates - just share a lot of the same fields.
  17. Okay, so we all like to think we are super organised when it comes to planning our ProcessWire site, but sometimes life is not like - we are uselessly lazy and can't even make our coffee in the right order (is is add the whisky first or second?). So, here are a couple of really lazy ideas to make everyone feel better about messing up. First Lazy idea Oh, I forgot to create a field! (or two, or three....) On the template edit page where you add the fields, how about a Create New Field button that allows you to create a field and add it to that template. Probably opens a modal window to create the field. Second Lazy Idea OH, why didn't I create the field BEFORE I created all these templates? No Problemo! On the field Info tab where you can see which templates use the field, what about having another box that lists all the templates that do NOT use the field and are displayed in columns with little check boxes next to them - tick the boxes and save to add the field to those templates. Third Lazy idea Adding a group of fields to a group of templates. I have actually just changed this from what I was going to suggest because my original idea was not lazy enough - far too much work for the user. So, you get a new button at the bottom of your list of fields and a check box next to each field. Hit the check box and the button gives you the option to Add fields to Template. A modal opens where you can change the order of the fields and select which templates you want to add them to. In addition, you get the option to add them within a tab set or field set and give that a name. Click Add and all those fields are added to the templates in the order you have set them. (Note, if any of the fields have already been added to any of the templates, then it either does not add those fields and tells you which were not added to which templates, or it fails completely and tells you which were not and so on.) Fourth Lazy Idea Lazy blokes template creation with fields. So, you suddenly realise you need 20 more templates with 18 existing fields each but you haven't got a handy dummy template with the right fields in. Don't panic. On the new template screen, simply select the fields you want, complete with tabs, field sets, and the right order, then choose the templates you want to create as normal and done! Wow, that was lazy! Fifth Lazy Idea I can't remember what I am doing where, why and when! So, this is a new screen under set up called something like Field Matrix. Basically it is a large, scrollable chart that has fields down the Left and templates across the top. From this chart you can now see which fields are being used on which templates shown by ticks and crosses. PLUS! You can actually add and remove fields from templates by clicking on their tick or cross to change it. THIS IS REALLY DANGEROUS (and probably a bad idea) but it is also wonderfully lazy! Doesn't all that laziness feel good? So there you go: Five lazy ideas to help tired, overworked, and disorganised web people get through their day, Joss (I know, far too many changes in one go - but I enjoyed thinking about them!)
  18. Hi Felix I get fed up of liking your showcase posts - you keep doing really nice websites! Can you do a terrible one so I don't feel forced to like it?
  19. There is an up and downside as an input field. The up is that conflicts should be non-existent. The down is that you cannot add it to an existing field. Maybe there is a way to do it where it targets very specific fields rather than just hitting all textareas. That way it might also play with text fields as well? (is that possible?) for instance when you want to limit a title length.
  20. That might explain why it is happening in my front end form. I have tried that edit and it seems to work. I haven't checked thoroughly whether it causes any other issues in the process, though I cant think what problems it would cause. boundaryfunctions - you should be able to check those yourself okay because it is not a question of having form builder installed. Thanks guys!
  21. That's because you are one of the good guys!
  22. Nope - it is just throwing that error when I use formbuilder. It is when debug is on. When you save a form that includes a textarea, you get the error and when you use the form in the front end I also get the error. But this is happening simply because the counter module is installed on the system, not because I have tried to include it in a form. Ryan's comment is here: https://processwire.com/talk/topic/2343-char-counter-for-texttextarea-fields/?p=22901
  23. I wasn't sure it had been changed - I noticed a post from Ryan a couple of pages back about making it compatible. I am not actually trying to use it with formbuilder at all - it is just generating the error all on its own
×
×
  • Create New...