-
Posts
2,862 -
Joined
-
Last visited
-
Days Won
47
Everything posted by Joss
-
Or from fans of Slade - I used to work for their manager (Chas Chandler), so they were kicking round the studio a lot. I have never seen a rock band go through so much tea! Not really the rock 'n' roll image. Mind you, the area also produced Ozzy Osbourne and I ended working for his manager when he bought the studios from Chas. I think that is when I developed a taste for Bovril....
-
"Half" Brummy? Isn't that Wolverhampton? (Waits for deluge of abuse)
-
That's okay It is a bit of an off the wall subject because it is only a problem in a specific set of circumstances. Actually, it is not really a problem since the site will work just fine, but it is just making it all "appear" logical, even though you have bits all over the place!
-
Hi Adrian, After the code example, I explain that page_select is a page field that has been used to select a category for the post. So, you create a page field, make is a single select, and then define which pages you are selecting. For instance, you may have a common parent, or you may restrict your selection by template - something so that it is obvious what you are choosing from. In this case, where the categories are pages in the normal page tree, then the parent would be Home and the template would be category (or whatever the template is). This field would then be added to your post template so you can select the categpry and you can use it as a search parameter in the "find" statement. In my example I am retrieving the id of the current page and then selecting all posts where page_select (my page field) matches the id. The API will automatically make the right match whether you use page ID or page name. Its clever like that! Joss
-
Oh, don't worry. I have been. Many years ago I spent a very enjoyable night arguing with a café owner over the best way to charcoal grill a steak. I won! But I did have to cook twenty steaks for his customers as a result and his kitchen was tiny and hot! The next night I spent playing guitar, mixing the caustic local folk with some American folk/blues with some amazing singers who lived round there. They didn't speak any English and I didn't speak Portuguese, but it didn't seem to matter after several bottles of the local wine. It was some where around Vale De Lobo, but this was many, many years ago and there was not much there - the villa estates had not yet been built. It was a lot poorer in the area, of course (this was the late seventies) but I bet it has lost a lot of its charms now, buried beneath golf courses!
-
Okay, the coffee at that café does not sound right - I prefer Illy....
-
Yep, always interested! Anything from straight copy, to large corporate manuals and presentations to comedy and teasers. And, don't forget music! Joss
-
Oops. I missed this topic! Nice site mate! Joss
-
Wow, do people still say "easy peasy?" I haven't heard that in thirty years!
-
If I had a list that included things like Gin and Beer, I doubt I would be able to sort it by anything by the time I got to the end......
-
Page Fields These basically list and select pages, normally where you specify a parent or a template or some other limiting criteria. You can set it for single or multiple select, and you have the options of various ways of doing that - a simple select dropdown, browsing the page tree, or the asmSelect system that is used for adding fields to templates. There are countless uses for this field: Creating a select options dropdown (each page is an option - this is not overkill, as I said before, pages are just data containers/objects, so it is perfectly fine to use them like this and means you can change the options!) Using them to select pages that represent categories Using them to select pages that represent tags - you can also set the field to create a new page (just the title field) so you can create tags on the fly. You can find more info here: http://wiki.processwire.com/index.php/Page_Field And there is more in the API Templates First of all it is important to realise the difference between a template and a template file. If you do my Basic Website Tutorial, it all becomes clear, but briefly: A template is what you use to collect fields together and control aspects of how a page is created. It does not need to be associated to a template file (though the resulting page cannot be displayed directly without a template file). For instance, in the Basic Website Tutorial I create a settings template that has no file. The values of the fields are called directly and individually into the website rather than being rendered as part of the page. A template file is the HTML markup plus any JQuery and PHP logic that handles the output of a page made with the associated template. In its simplest form it is basic html where you use a very simple bit of php to output a field: <?php echo $page->title; ?> <?php echo $page->body?> Templates Files are up to you to design. You can add any markup you like or use a framework like Bootstrap or Foundation or whatever you like. You could even put the site together with FrontPage '97 if you were mad enough - it would work! (Though, I haven't tried adding Front Page extensions...) It can be surprisingly easy to reproduce really complicated Joomla Extensions like galleries, slideshows and so on. You just need to go and grab a useful JQUery (or other) plugin that you like and use it pretty much as the instructions say - you just grab the data using the PW API rather than write in static values. You might want to go and play with my Bootstrap Demo Profile (http://processwire.com/talk/topic/2411-bootwire-basic-twitter-bootstrap-profile/) - it demonstrated several basic ideas using the Bootstrap framework and you can see how simple the code is. Put it this way, I come from using Joomla and Wordpress and I am certainly not a php coder (I am a composer, in fact) - but I manage! Oh, and I think translations are always welcome!
-
A couple of tips when moving from Joomla. 1. Forget the idea of Categories and Articles. To be honest, Joomla is more of an Article Management System than a CMS (until you add tons of components) and so it has a very restricted way of looking at things. 2. ProcessWire uses pages as data containers - exactly what data is up to you. It could be a page made out of lots of fields, or pages could be lots of alternatives for a select field (pages field in PW), they are also users and all kinds of other things. So, try not to think of them like pages in a book or even web pages - though they can be both of those if you wish. 3. When you design a site with Joomla, the easiest way is to change your site to work how Joomla wants you to work. But, the best way to start with ProcessWire is to not think about PW at all, but just think of your website. Try and ignore how PW works and just work out how YOU want YOUR website to work. Once you have done that, you can work out how PW will help you achieve what you want. It really is that flexible. You can create anything that is familiar in Joomla in PW. For instance, Once you do the Basic Website Tutorial that Kongondo mentioned, there is a link at the bottom to the Simple News System. This shows how you can do Joomla type articles with categories. But you will quickly realise that this is only one way you can achieve that, and because you are doing it yourself, you can make it work anyway you wish. So, Welcome, and have fun!
-
Hi Kongondo I think the clue here is in the word "label" rather than "Description" A label on a field would not be a long description, it would be a short friendly label as opposed to using the actual field name. This is the same in this case - it is meant so you can have "Main Post Template" rather than "post-template-main-v1" or whatever your template is actually called. Edit: Damn ... Appy got their first!
-
Since I am in the media industry and therefore a lot of the sites I deal with have huge amounts of media embedded from elsewhere (like YouTube), I have learned to realise that I cannot do a perfect site - if for no other reason that on Chrome I get huge amounts of Script errors relating to iframes. There is also the small matter that If there can be an opposite to OCD, I am probably suffering from it - I am the most disorganised person I know and absolutely terrible when it comes to dotting Eyes and crossing Tees. But the site works and my clients seem to like it - more importantly, they like the show reels, and those are the only thing they and I care about. It is all about priorities.
-
Joomal? Nah.... Mambo, possibly.... Should I add a Marquee somewhere while I am about it? I have a love hate relationship with validators. I go to all the trouble of not putting alts on everything just to have them moan at me about it. But then, that is probably because I am a creative not a techy (don't be fooled by me being a sound engineer - that is surprisingly un-techy!) If it looks nice and works, I tend to stop while I am ahead!
-
I am not very worried about them to be honest.
-
Okay, when I say music website, this is actually my own company website. This is built starting with my bootwire starter profile. It has a couple of interesting bits: It uses the Mediaelements jquery plugin for the audio to make it cross browser compatible (each audio file is in both mp3 and ogg format). It uses the explode tip I put in another post for posting the audio, allowing me to post one or several audio slugs at a time. It has a modified version of Jack Moore's tabs to which I have added slideup and down for a more interesting look - that is used on the front page with the three images. Each page can have either the default top banner or a custom one. I have also used a bit of JQuery to create a TOC on the fly for a couple of the longer articles and then rendered it with the Bootstrap Affix plugin. This can be toggled on and off on a page by page basis. Couple of other bits. If the site is running slow, that is not ProcessWire, I seem to be having some network difficulties with Cloudflare at the moment. http://www.dancingbear.co.uk Joss
-
Hi Andreas That is really easy. Basically, it just boils down to choosing a JQuery lightbox of some description and using their instructions. I use colorbox since, unlike Fancybox 2, you can use it on commercial sites and Jack Moore is a really nice bloke and very helpful: http://www.jacklmoore.com/colorbox/ Download it and add the colorbox JS file to your js directory and the css file to your css directory. Make sure you call up the js and the css in your footer/header (after the jquery call) Now, to your foot (or in an external js file) add the following: $(document).ready(function() { jQuery('a.colorbox').colorbox({ opacity:0.3 , speed: 500, transition: "elastic", slideshow: false, rel:'group', previous:"<span class='colorboxnav'><</span>", next:"<span class='colorboxnav'>></span>", close:"<span class='colorboxnav'>X</span>", maxHeight: "90%" }) }); There are other options you can play around with - see the colorbox site. To create a light box on any image (including the bootstrap gallery) it is a question of just adding a couple of attributes to the <a> tag round the image in the functions file. $out .= "<a href='{$galleryimage->url}' title='{$galleryimage->description}' class='colorbox' ref='group'>"; You can also use a bit of jquery to add this to any image that you have added via TinyMCE where you have clicked "link to larger image" Assuming your posts are wrapped in a div called "post" then add this JQuery: $('.post img').closest("a").addClass("colorbox ").attr('rel', 'group'); That will add the class and rel to the <a> tag round the image, but only within the .post div. That should do it. All lightboxes work in similar ways, so just vary the above to suit whichever lightbox you choose. Joss
-
How can i integrate HTML Kickstarter with processwire?
Joss replied to siulynot's topic in Getting Started
Yes, Joshua hadn't really updated Kickstart for about a year, but he has got back to it recently.- 29 replies
-
- html kickstart
- html
-
(and 1 more)
Tagged with:
-
How can i integrate HTML Kickstarter with processwire?
Joss replied to siulynot's topic in Getting Started
The best way is to just go and get Kickstart from the kickstart website http://www.99lime.com/elements/ Then just add it to your templates folder as if you were doing a normal static site. I think he has now updated it to run with JQuery 1.9.1 - though I am not too sure. I was messing around with it and I changed a couple of things for myself - I replaced bxslider with flexslider and use Jack Moore's colorbox and a couple of other things. But I need to spend some time to see what Joshua has been up to really. It is on my growing todo list!- 29 replies
-
- html kickstart
- html
-
(and 1 more)
Tagged with:
-
Not exactly Fado music is it? At least, not like Mariza - that lady has one hell of a voice!
-
Thanks Teppo - I didn't know about that one. In fact, I think you could go as far as doing: <?php $cars = str_getcsv($page->my_textarea, "\n"); foreach($cars as $car) { $car = str_getcsv($car); echo "<h3>{$car[0]}</h3>"; echo "<p>Car Model: {$car[1]}</p>"; echo "<p>Car Colour: {$car[2]}</p>"; echo "<hr>"; } I haven't tried this though
-
OOh Not sure. I have them working using the right click context menu (less mess on the tool bar) Here is my standard set up: theme_advanced_buttons1 formatselect,styleselect,|,bold,italic,|,bullist,numlist,|,link,unlink,|,image,|,code,|,fullscreen,spellchecker theme_advanced_blockformats p,h1,h2,h3,h4,blockquote,pre,code plugins inlinepopups,safari,table,media,paste,fullscreen,preelementfix,contextmenu valid_elements @[id|class|style],a[href|target|name],strong/b,em/i,br,img[src|id|class|width|height|alt],ul,ol,li,p[class],h1,h2,h3,h4,blockquote,-p,-table[border=0|cellspacing|cellpadding|width|frame|rules|height|align|summary|bgcolor|background|bordercolor],-tr[rowspan|width|height|align|valign|bgcolor|background|bordercolor],tbody,thead,tfoot,#td[colspan|rowspan|width|height|align|valign|bgcolor|background|bordercolor|scope],#th[colspan|rowspan|width|height|align|valign|scope],pre,code Additional TinyMCE Settings paste_text_sticky: true paste_text_sticky_default:true (Those two settings remove all formatting when you paste) Third Party Plugins spellchecker : /site/tinymce/myplugins/spellchecker (I have installed the spell checker in the above path) Hopefully that should help! Joss
-
This is a little php tip that might come in useful for those who are new to this php stuff (like me) Repeater fields are wonderful in ProcessWire, but if, like me today, you are faced with a list of a hundred odd items, then they can become a little overwhelming to use. Sometimes all you want to do is put a list in a textarea and hope something wonderful will come of it. Well, Explode in php is just the wonderful thing you might want. In this example I am creating a simple list where each list item has three parts - a name, a type and a colour. Create a textarea field and add it to your template. Create a page and in the textarea add your list - something like this, perhaps? Ford Fiesta,1.3xl,red Morris Marina,GT,blue Hilman Hunter,1.6SE,green There are two delimiters here - a new line between each car entry (yes, those are all cars) and a comma between each detail of the car. On our template, we first grab our textarea and "explode" it to separate the lines into an array: $cars = explode("\n", $page->my_textarea); "\n" is the new line markup and we are identifying it within $page->my_textarea and then exploding at those points. We now need to loop through out array: foreach($cars as $car) { All familiar so far. However, we need to split up those comma delimited bits so we can deal with them separately. We will use explode again: $car = explode(',', $car); In this case we are identifying the comma within the string $car and exploding it. This has now created an array of bits that we can access with indexes. So here is a completed version: <?php $cars = explode("\n", $page->my_textarea); foreach($cars as $car) { $car = explode(',', $car); echo "<h3>{$car[0]}</h3>"; echo "<p>Car Model: {$car[1]}</p>"; echo "<p>Car Colour: {$car[2]}</p>"; echo "<hr>"; } ?> The indexes are within the square brackets and start from zero - though you can use them in any order, of course! And there you are - looping happily through your long list. I have just used the same principle to list 100 music tracks on my new site which I will showcase in a day or so. Obviously, you could have achieved the same thing with repeaters and had the luxury of being able to reorder them and edit them easily - but sometimes all you want is a silly list, and this method does silly lists very well. Joss PS: Thanks to Apeisa, because I stole this from his Thumbnails module!
-
What did your brain get engaged to? No, forget that - I doubt I want to know.