-
Posts
868 -
Joined
-
Last visited
-
Days Won
1
Everything posted by DaveP
-
If you have shell access you can use grep, otherwise (so long as file size & bandwidth allow) download the whole lot and search locally,
-
-
https://github.com/BBC-News/Imager.js/
-
Aaah, I understand. A variation on Pete's way might be to create a hash and save that for future comparison. Something like this to save (pseudopwcode) $page->hash = md5($myjsonUnsanitised); $page->json = $sanitizer->text($myjsonUnsanitised); $page->save(); And then use the hash as selector later $hash = md5($jsonToFind); $query = "template=whatever, hash=$hash";
-
https://gocardless.com/ does subscriptions, I think.
-
If the only 2 valid possibilities for the content of the "myjson" field are either empty or containing json output, a simple boolean will work- $query = "template=mytemplate, myjson!=''" if($pages->count($query)){...
-
@Neeks 500 errors are most often caused by .htaccess problems. Have a look at your .htaccess - does it need updating for 2.4? Also try commenting out any non-PW entries and see if you see an improvement.
-
Seeing one possible issue in CSS for h1,h2 etc - font stack is 'Gilda Display', which isn't loaded (on home page, at least), whereas Open Sans & Julius Sans One are.
-
Very nice. Corporate-looking without being too obvious (if that makes any sense). And a great example of a site built on a CSS framework that doesn't look like it is.
-
Module: AIOM+ (All In One Minify) for CSS, LESS, JS and HTML
DaveP replied to David Karich's topic in Modules/Plugins
Looks good. I really like the idea of domain sharding built in. -
Don't understand a word of it myself.
-
Exactly my own thoughts when I first discovered PW. 'It can't be that easy.' (I came from a mostly Mambo/Joomla & Wordpress background and found it unbelievable that a CMS existed that didn't enforce rigid field & template structures on the user.)
-
Damn, you guys are quick. What Martijn said. Oh, and I use tpl-filename.php or inc-filename.php because Files then sort into type easily Notepad++ knows they are php
-
At last, a menu in html, not pdf! Great looking site, and reasonable prices for food, too.
-
Just looked back at that (abandoned) project. The way I did it at the time was to have each product as a page (in an appropriate hierarchy), with fields like description, image and price, and show the add to cart button with <?php echo $modules->get("ShoppingCart")->renderAddToCart(); ?> As I recall, it all worked as expected. <Edit> Just tried it, and it still works. Checkout page is quite like cart page <?php /** * Page template * */ include("./head.inc"); include("./navbar.inc"); ?> <div class="container"> <?php echo $modules->get("ShoppingStepsMarkup")->render(); ?> <?php echo $modules->get("ShoppingCheckout")->renderCheckout(); ?> </div> <?php include("./foot.inc");
-
https://github.com/vhf/free-programming-books/blob/master/free-programming-books.md#php You're welcome.
-
I realise that Marty and many others fully understand the issues here, but for anyone else with similar problems, here it is in a nutshell... PW selectors use mySQL fulltext indexes (indices? I'm never sure) mostly, as they are very fast. However Fulltext indexes miss out some common words (stopwords) because they are too common to influence search results meaningfully for the most part. And Fulltext indexes ignore words shorter than 4 letters, unless you have enough control of the server to change that default behaviour. (Think VPS or better.) However PW's %= selector operator uses mySQL's LIKE operator, which while slower than a fulltext search, is still very fast (certainly on fewer than several thousand records) and isn't restricted by stopword lists or word length.
-
I'm getting wait times of around 1 second before a new page starts to load and around 500 milliseconds on a reload from the UK. Certainly looks like geography is against you! Getting 304 responses on cached elements now, though.
-
Not especially related to programming, but I just learned of Finnish band Ultra Bra, and considering I speak no Finnish whatsoever and understand not one word of their lyrics, they sound wonderful. I'm just a few years late... (The only other band I really enjoy even though I don't speak the language is Runrig, who sing in Gaelic.)
-
Just been chasing my tail for a few minutes over new the admin theme. Downloaded PW dev branch today and upgraded an existing live site, then tried to change the admin colour scheme per instructions in this thread, but to no avail. Eventually realised that the admin theme is now a module, even though wire/templates-admin still exists within the download. Turns out that PW was using this for the theme and only when I renamed it was I able to change colours (through the module).
-
Looks just as good on desktop as on mobile, which I commented on earlier. And good luck to all on this new venture - here's to a successful new year!
-
Automatic logo resizing. (Solved)
DaveP replied to Martijn Geerts's topic in Module/Plugin Development
I think the crux of my method was that a very thin landscape image +--------------------+ | | +--------------------+ should be allowed to be wider than an image with the same area, but square or squarer. +----------+ | | | | | | | | +----------+ so long as they both have about the same pixels, eg 100 x 20 or 40 x 50 are both 2000 pixels. This seemed to give a reasonable 'visual balance'. Disclaimer - I am not a designer and have no idea why some things look better than others. Maybe one of the designers here could offer some insight. -
Automatic logo resizing. (Solved)
DaveP replied to Martijn Geerts's topic in Module/Plugin Development
I did something like this some time ago (in a previous job, so I don't have access to the code any more). It was to come up with a method of showing rows of manufacturers thumbnails in an e-commerce setting. The problem was that they were all very different shapes and it was hard to make them look 'balanced'. The theory I came up with was that, regardless of shape, the same pixel area (say 2,000 pixels) would look right whether the logo was square, a landscape rectangle, or a portrait rectangle. As I recall, it was a matter of working out the width to height ratio and applying that to the required total pixel area. Dunno if that helps, but it might give you something to think about... -
It seems to me that there are two different ways to look at this, and from two different perspectives. One is the client/developer relationship, where you can describe PW as anything you feel will get you the job. The other is from the point of view of a new, possibly inexperienced, adopter, where there is a need to manage expectations - PW is not WP or Joomla.
-
Loving both the site and the subject. Looking good on mobile.