alan
Members-
Posts
854 -
Joined
-
Last visited
-
Days Won
1
Everything posted by alan
-
I am trying to use the Admin i/f to upload a .PDF (or .DOC) and it seems I can as long as the file is 128KB or less. I have edited php.ini for a website and now phpinfo(); reports: post_max_size = 32M upload_max_filesize = 24M max_execution_time = 60 max_input_time = 60 memory_limit = 128M I tried uploading files of gradually decreasing size and it worked for one that was 127KB but failed for one that was 132KB (and for all those larger) — the upload bar moves as expected to 100% but then does not prompt for a file description and when saving the page the file is no longer seen. I am running PW 2.2.2.1. Any ideas anyone pretty please?
-
Spell checking works in other contexts in Chrome but is missing in TinyMCE in Chrome, so I think the browsers spell checker is not allowed in to the TinyMCE textarea (at least this is what seems to be happening here in Mac Chrome).
-
It looks like it is possible and I believe it's possible to customize TinyMCE under PW, but I've not tried it yet.
-
Lars I do the same as you (jQ adds a div, uses the alt). I thought I'd thought of a solution but I just realized it wouldn't work :/ Sorry I can't help, a good question, I like to keep to one source for information (DRY) and solving this would be useful to me too. Will keep thinking (don't hold your breath )
-
Add link to PW in the footer.
-
I cheated and added it as plain text via the admin, so far this is how this section will be fed though so I don't feel too bad for doing that way And thanks again for the feedback
-
Thanks diogo Good Idea, I'll do that, much better than tumbleweeds like it is now
-
If you helped me here in the forums, thank you. This site has undergone a total re-make from ANO CMS to PW. 'Soon' I'll convert it to HTML5 but for now this was enough work. http://33sigs.org/
-
Migrating ProcessWire from localhost to web host
alan replied to tinacious's topic in General Support
Thanks for the question @tinacious and answers @all, it's a reminder for me to do this stuff before I go live, can't have too many of them... Thanks for the list @formmailer, the only two I would add are: don't forget that you can have two config files, one to control your local (MAMP XAMP etc) environment (inc' db credentials etc) and another for the live/remote, see Maintaining a separate development configuration file. This is not really a thing to do at go-live time, but seemed worth noting in this context once you have two config files, for your local file only, enable "$config->debug = true;" — I have just started doing this and already it uncovered something slightly dirty in my PHP for me to tidy up. This ability to maintain local and remote configs is for me yet another differentiator for PW where something small yet really useful in the real-world has made it into production, a testament to the thought and care gone in to this product. PS: UPDATE: I just remembered that assuming you use the above dual config files setup you need to configure your FTP client to not transfer a file called config-dev.php or the remote env' thinks it is a dev env I just tripped myself over with that. -
Update: The code I ended using was: $out = preg_replace('#<[^>]+>#', ' ', wordLimiter($page->get("body"), 160)); // All two space-runs to single space runs $out = preg_replace('/\s+/', ' ',$out); // No leading or trailing spaces. $out = trim( $out ); echo $out; ...but I just noticed that if 'body' opens with an image tag with a large ALT description taking up a total of, say, 150 characters then you end up with only 10 characters. So this is the improved version: $out = preg_replace('#<[^>]+>#', ' ', $page->get("body")); $out = wordLimiter($out, 160); // All two space-runs to single space runs $out = preg_replace('/\s+/', ' ',$out); // No leading or trailing spaces. $out = trim( $out ); echo $out; Perhaps it's a shame the ALT tag copy is not part of the meta description, but hey, this is automated content creation, which is why for the SEO-sensitive you can (I do) switch on the contents of a dedicated field, if populated it's content becomes that page's meta description and if not, then the auto code makes the meta description.
-
Soma I owe you a lake full of coffee. Thank you very much indeed. That solved it and this is the full working code: if($page->parent->isHidden()) { foreach($page->parents as $parent) if(!$parent->isHidden()) echo "<li><a href='{$parent->url}'>{$parent->title}</a></li>"; } Brilliantly easy (with PW and friends like Soma )
-
I have these pages: /fruit/ <- 'fruit' is not hidden /fruit/apples/ <- 'apples' is hidden /fruit/apples/green-apple/ <- 'green-apple' is not hidden I want 'fruit' to appear in the nav, it does, it's not hidden, all good. I want 'green-apple' to not appear in the nav, it doesn't, it's parent is hidden, all good. I want the contents of 'green-apple' to be findable by search, they are, it's not hidden, all good. When I click a search result link to 'green-apple' I see the page and no nav is 'lit-up' as this page's path into the nav is interrupted by the hidden page, no problem, I use this code to detect if the page displayed is under a hidden parent and if it is, display a breadcrumb: if($page->parent->isHidden()) { foreach($page->parents as $parent) if($parent->viewable()) echo "<li><a href='{$parent->url}'>{$parent->title}</a></li>"; } The problem I am seeing is that although the 'apples' page is set to Hidden, it is shown in the list of $parents, so it looks like I am misusing 'viewable()' in some way. Any pointers as to why this is happening and/or what I might do to fix? As ever, any comments most appreciated!
-
git general rule of thumb — keep up to date or wait for scheduled?
alan replied to alan's topic in Getting Started
Ryan, brilliant! -
I can't believe I missed this [Field-Template Context]. It's cool enough that the admin allows for varying width fields and so allows you to compose rows of associated fields, but now (or from a while back, I'm not sure) you can not only do it at the field level (so relevant for all new uses of that field) but also at the use-of-that-field-in-any-given-template level. And as the video and note beneath point out, also the Title and Description can be custom per template-use. Fantastic for making the admin experience as intuitive and neat as possible for a client!
-
git general rule of thumb — keep up to date or wait for scheduled?
alan replied to alan's topic in Getting Started
Ryan, if an update requires an install script is run (e.g. the db needs modification), will that be in some way highlighted, such as the comment in the github commit note? -
Welcome Steve
-
Soma, Steve, thanks again you guys! Because I use SourceTree.app to download from github things likes modules etc (and so keep them up to date and see when there are updates v.easily) I was keen to keep the installed Flourish 'standard' so rather than move the classes (I had missed that I was calling classes and they were represented by those files in that folder — DOH) I just edited the path in the loader to $flourish_root = wire('config')->paths->root . 'site/.flourish/classes/'; and of course it all works! Thanks
-
Steve, sorry to bug you o_O I've added Flourish, used it and am getting an error. Any clues you can kick my way? https://gist.github.com/2763197
-
Steve, is there a special reason for making the directory hidden? DOH! Guessing this is 'cos it hides it from HTTP
-
Doing a very lightweight events system so _thank you_ Steve + Pete for this perfect thread to help me get started. I don't know if I am adding Flourish for a weak reason (I'm not strong at PHP date manipulation (or anything else PHP ) but even if I am, it will team me some stuff I am sure.
-
nikola, great, thank you, I'll watch git for the update I temporarily switched back to the standard theme, which is good in it's own right, but I must say I am missing yours a lot.
-
@Nikola The revised theme has been great to use. I've just run in to one bug, when moving a top-level page to underneath a different top-level page, I was unable to make the move and had to refresh after the fail to allow the default select-ability of pages to return. I switched off the theme and all was OK, so I am pretty sure it's not me being dumb. If I can do anything to help debug, just let me know.
-
Yet another super-helpful forum post, solved my problem, thanks guys!