-
Posts
868 -
Joined
-
Last visited
-
Days Won
1
Everything posted by DaveP
-
Try $pages->find('parent=/widgets/')->filter('id=1020|1069|1070|1071|1072|1073|1074|1075|1076')->getRandom(); Might work. <edit>Removed non-working guess to avoid confusion in future.</edit>
-
Try this- $keywords = preg_split("/[\s-]+/", $q); $selector = ''; foreach($keywords as $kw){ $selector .= "Meta_keywords|DMCcontact_Country|DMCcontact_Address_2|DMC_Email~=$kw, "; } $selector .= "template=dmc, limit=50"; //echo $selector; $matches = $pages->find($selector); You can uncomment the penultimate line for debugging (and/or understanding) purposes. That won't help with the regex, but, essentially the important bit is within the square brackets, where \s means a space (or similar) and the dash after means literally a dash. You could add others there. Note Written in browser, but should work. (Now where's that fingers-crossed emoticon?)
-
+1 for producing markup-agnostic output. I think most (all?) modules that generate markup should have at least the option of having them output an object rather than specific markup.
-
This might be the finest big, data-heavy PW site (aside from some of Ryan's sites obvs ), I've seen. Great work, and please keep us up to date on future developments.
-
Given that the kiosk browser won't have an address bar, you could use a GET query string (like example.com/?kiosk=true) and use that to decide which template to show. That way, you wouldn't be relying on IP addresses and if anyone did attach that parameter in their regular browser, they would just get the kiosk version.
-
I think you need to tell renderAddToCart() which product it should add, i.e. $contentThree .= "<span class='sc_add'>" . $modules->get("ShoppingCart")->renderAddToCart($product). "</span>"; See https://github.com/apeisa/Shop-for-ProcessWire/blob/master/ShoppingCart.module#L78
-
Once you register your domain with them, they crawl your server for elements that they can cache for you. I use CloudFlare, too, and it's very good. And the free account is exactly the right price!
-
You might find this interesting - http://codepen.io/anon/pen/yHiho - it lines up the buttons.
-
AIOM SelectorTest PageDelete PageClone MarkupSimpleNavigation
-
I can confirm that videokid's error does exist and can be reliably triggered by judicious use of the browser's <Back> button.
-
mike131 Welcome! I had a similar issue after running my blog through CloudFlare. Is there any possibility that users' (effective) ip is changing (are they on mobile)? You can easily test/cure by editing /site/config.php $config->sessionFingerprint = false; If that cures the problem and you are happy to leave fingerprinting off, fine. If you would prefer the higher security, then find out how/why ips are changing and proceed accordingly. (For CloudFlare, for example, I set no caching on mysite.com/processwire/ in a rule thingy they have.)
-
Glad you got it sorted out. Useful to document this here, in case anyone faces the same issue in future.
-
Brilliant - http://www.explainxkcd.com/wiki/index.php/Main_Page
-
Might be worth opening https://github.com/ryancramerdesign/ProcessWire and comparing your index.php to the original.
-
Really don't like the look of '14fk4pd5jgte0811d.php'. Arjen beat me to it, but the file calling those files listed is the place to start.
-
I think it's just about presentable, so here is, my own blog, http://dpreston.com. It uses Kongondo's excellent blog module (which I butchered somewhat in the process) and a couple of others as noted in this post, and takes advantage of a CloudFlare free account to benefit from spdy and https. Nothing fancy, but I'm reasonably happy with it.
- 1 reply
-
- 9
-
-
One approach that can work (and can scale) is using native mySQL - like soundex - to find a subset of results and then applying some php processing to them. For example, @teppo's original results in his opening post, sorted by Levenshtein distance ascending in php, would give very good results very quickly. And with a 'limit' in the selector, you can be sure of scalability.
-
@Kongondo Very kind of you to say so - couldn't have done it without your hard work!
-
One problem I have had on a recent migration with fields apparently not existing in the db is that names are shown in PascalCase in the error while in the db itself they are all lower names. Changing the field name in the db through phpMyAdmin (to e.g. FieldtypeMapMarker rather than fieldtypemapmarker) worked for me, but your mileage may vary. No idea why it's a problem on some servers, though...
-
You can always do something like this... echo str_replace(array('<h3>','</h3>'),array('<h4>','</h4>'),$modules->get("MarkupBlog")->renderArchives($archives)); for a bit of control over output. (It just fits in a bit better in the sidebar of my blog which is now powered by PW and Kongondo's excellent module. BTW it isn't finished yet (probably never will be) but it is live.)
-
mySQL fulltext searches 'WITH QUERY EXPANSION' are really fun/rad/useful. (@sforsman I didn't think mySQL had native support for Levenshtein distances without adding modules/triggers/routines etc? PHP does, so post-processing search results that way works.)
-
I love the way the menu works - never seen that done before. Good luck with the project.
-
@Joss it seems that there are some similarities between visual and aural rhythms. (Entirely beyond my comprehension, all of it.)
-
A couple of CSS font size/calculator/designer thingies - type-scale.com and gridlover.net/app for your font scaling pleasure.