Jump to content

Jonathan Dart

Members
  • Posts

    51
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by Jonathan Dart

  1. Does anyone know of a twitter client that shows the oldest unread tweets first?

  2. FWIW ElasticSearch is a layer on top of Apache Solr. I've tried using Solr and it's much harder to use. ElasticSearch is like Solr + magic. Edit: Both Solr and ElasticSearch are built on the Lucene search engine
  3. I've updated the module to support typical pw style pagination: $search_results = $modules->get('ElasticSearch')->search('foo bar', $results_per_page); echo "Total results: " . $search_results->getTotal(); echo $search_results->renderPagination();
  4. ElasticSearch does a lot, but the part that is most interesting to me is that it does an amazing job of fulltext search. It's also crazy fast. It can be a bit scary at first so hopefully this module will make it more accessible. I threw together this module pretty quickly, it's more of a proof of concept than anything else at this point. I tried it out on a site with 400 bilingual pages and the search results are much improved over the normal search you would get doing like queries or fulltext queries in mysql. Github page: https://github.com/jdart/ElasticSearchProcessWire I'd love to hear some feedback on how it works for you. It's very new so expect bugs, in particular the mechanism that turns pages into data to be indexed by ES might have some surprises.
  5. Hi Guys, I'm trying to create an elasticsearch module for processwire and I'm trying to figure out the best way to loop through every page to get their field data to add that to an elasticsearch index. First off I'm not sure how to get all pages, $pages->find('') doesn't do the trick. Second of all does anyone have a way to do this while keeping memory usage under control? Thanks!
  6. Compiling all of bootstrap with the php implementation takes 3+ seconds which is an annoyance when developing themes, with the node.js implementation it's half a second. I agree that using less in the template being a great option. I think I'll set things up that way. Thanks David
  7. Would it be possible to provide an alternate less compiler for those with node available on the server?
  8. Hi David, I'll try out that change you mentioned, and I appreciate the whitelist feature - thanks! I'm trying to imagine a scenario where including a javascript/css/less file outside of the templates directory poses a security risk. How could that be exploited?
  9. Hi David, I've been playing around with bower to manage third party libraries, bower puts files in a directory called bower_components and my first instinct was to put that directory right in "site/". In _getFileInfoArray any attempt to reference a file outside the templates directory gets thwarted, is there a security concern here?
  10. Hi Guys, Based on some feedback I decided to favour the AIOM+ module over the Minify module, which means I no longer need the less compiler in Spex, I also removed all other 3rd party libraries to make it less opinionated. Starting with v0.8.0 the Spex module no longer bundles less.js, less.php, modernizr and jquery. Spex is actually a lot less code now which is fine by me. Check out the base template now: https://github.com/jdart/Spex/blob/master/example-site/layouts/_base.php vs before: https://github.com/jdart/Spex/blob/0dd56629232d68be4f6248555caf47f6972dad87/example-site/layouts/_base.php
  11. I'm loving the new admin theme, it's such a huge step up. The suits around here were always pushing for us to make a custom one but I think it's plenty attractive now. Amazing work!
  12. Hi Renobird, I assume you want to customize the breadcrumbs setup by ProcessPageAdd. I used a module for this particular project so it looks something like the below: class YourModule extends WireData implements Module { ... public function init() { $this->addHookAfter('ProcessPageAdd::execute', $this, 'pageAddExecuteAfter'); } public function pageAddExecuteAfter($event) { if($this->fuel('page')->process != 'ProcessPageAdd') return; //build your new breadcrumbs $breadcrumbs = new Breadcrumbs(); $breadcrumbs->add(...); //etc... $this->setFuel('breadcrumbs', null); // I forget if this is necessary, but it works. $this->setFuel('breadcrumbs', $breadcrumbs); } }
  13. Hi Soma, I was trying to use this with a pw2.4, and had to change line 180 of the module class to "foreach($this->database->getQueryLog() as $n => $sql) {" to get it working for query debugging. Just a heads up.
  14. I found I could listen to ProcessPageList::execute and just overwrite the breadcrumbs, that should do the trick.
  15. Hi Guys, I'm trying to customize how breadcrumbs work in the backend for a site where admin users are jailed to a certain branch of the pages tree. I've figured out how to change the root page shown in the tree, but overriding the breadcrumbs doesn't seem to be possible without changing the ProcessPageList class. Any pointers? Thanks, Jonathan
  16. Hi Guys, We're taking on a project that my instincts tell me should be built as a custom application rather than on processwire, but maybe you can prove me wrong. I'll try to boil it down to the most relevant parts. This website will have 2 roles of interest: "Mini site" operatorsThey will have predefined pages they can manage, photo albums, event calendars, and blog posts. They will not be able to edit content from other mini sites or the god user's content. They will also be able to add arbitrary subpages to one of the predefined pages. A "God" user that can manage the mini sites, and create content just like from the mini sites, but for the main site. My biggest concern is that I don't know of a way of restricting the processwire admin to only allowing the mini site operators to manage their own content. If you could control the root page shown in the admin to be something other than the real homepage, that could work but I have a feeling things could get hairy. What do you guys think? Does processwire sounds like a good fit for this project? Have you tackled a "portal" site like this before? Thanks, Jonathan
  17. RT @boagworld: Content is not king. Great post about content exists to support broader business objectives and strategy. - http://t.co/oyis…

  18. TV Is Dying, And Here Are The Stats That Prove It http://t.co/nKsQRAXt3I via @sai

  19. Hi Harmster, This is looking pretty cool. I made a module that does some of the same things yours does, I was able to work around needing to set appendTemplateFile by taking advantage of a couple hooks, you might find what I did useful: https://github.com/jdart/Spex/blob/master/Spex.module#L62
  20. Hey guys, The company I'm working for has launched two new pw's recently built with my Spex module, and there are more coming! http://www.deluca.ca/ http://alpine-animal.net/
  21. Try making $cd explicitly global. <? global $cd; $cd = "this is a test"; roo(); function roo() { global $cd; print "[".$cd."]"; }
  22. It's hard to say without more information. $txt isn't a standard processwire variable, do you know where $txt gets defined? Figuring out what $txt is might help you find your answer.
×
×
  • Create New...