Jump to content

Soma

Moderators
  • Posts

    6,798
  • Joined

  • Last visited

  • Days Won

    158

Everything posted by Soma

  1. Problems solved, post removed
  2. You could also debug the render time of your page with at the very beginning of your template code: $renderTime = Debug::timer(); and at the end of all when everything is output. echo "rendertime: " . Debug::timer($renderTime); And see what you got.
  3. Yeah that's easy for them to blame your CMS Well you can try and for example save your homepage html to a static file, and upload that to your server and load it and see. (this would be same like using ProCache) I think we can't rule out ProcessWire, but most likely it's not but rather the server being busy with other things or some database connection lagging etc.
  4. Your server response time has nothing to do with ProcessWire perse. This could have many reasons. Since I get response times from 300ms to 3000ms, it looks like your Server sometimes is busy. This could be database or other general server process running. You should ask this question to your hosting support. Template cache only works for not logged in users, as it shows on the template cache option settings.
  5. Wouldn't it be nice to get update notification of installed modules via ModulesManager? There you go http://t.co/FteCrNmjNw #processwire

  6. Ok there you go. Just added a new module to ModulesManager 2.1.0. You'll just need to update the ModulesManager, after that you'll find the new module ready to install. Modules Manager Notification 0.1.0 Sends out update information for installed modules to an email This module required LazyCron core module installed Note this is something you want to run like once a week When the lazy cron is running the request will be blocked for a few second, this is currently due to how the lazy cron works. Maybe we will be able to optimize this in future. After install you need to define the interval, an recipient email, subject and optional a "from" email address. There's also a checkbox to activate/deactivate the module running the lazy cron job. Note that this requires someone to hit your website (or admin) to get executed, so interval times can vary. It will then refresh the module feed from modules.processwire.com on your installation and check for new modules. If any found it will send out an email notification to the email specified in the form of: Found following updates for installed modules: Module: TextformatterHannaCode v0.1.4 Found new version available: v0.1.5 More infos at: http://modules.processwire.com/modules/process-hanna-code/ –––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––– Module: InputfieldCKEditor v1.1.3 Found new version available: v1.1.4 More infos at: http://modules.processwire.com/modules/inputfield-ckeditor/ –––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––– It will also save a notification log modulesmanager_notification_log.txt with an entry when the lazy cron was executed in your site/assets/logs/ folder.
  7. Found this also today. Yiiipi. Lots to explain
  8. It's not only about "updates" it's about conveniently search download and install modules. It's also not about core features updates. Latest Additions is always the one on top, sorted by "Added". User favorites is not in feed, but likes, which is shown already. I'm working on a ModulesManagerNotification module for ModulesManager that you can install if you like and specify the lazy cron interval. Just need to test a little more.
  9. a foreach = ? $floortypes = array('fliesen','stein','teppich'); foreach($floortypes as $floortype) { $page->floortypes->add("/floortypes/$flootype/"); } If you have the page referenced setup under /floortypes/fliesen/ etc
  10. This code would work, but not really getting random entries but rather a random slice out of them. And query times are about the same. Strange thing is in my test I get a longer execution time of that code when I use $results = $pages->find("template=basic-page, start=$startOffset, limit=1"); // ~0.08 than with $startOffset = rand(0, $pageCount-4); $results = $pages->find("template=basic-page, start=$startOffset, limit=4"); // –0.03 Not sure why.
  11. I don't really get your setup. Pretty exotic. What about /site/templates/ ? I'm not sure, but if you don't have your PW installed in a subfolder /5gum/ then it shouldn't include in it urls. But as I said I don't really get your setup here. Could be that you have the /5gum/index.php rendering something? Why do you have it this way? To your problem of the image url. It's simply because you do this in a bootstrap and there's no output formatting happening there. So if there's no output formatting any image field will be an array, regardless of the image field settings (set to max 1). So this will get your image echo $brand->meta_image->first->url;
  12. I just did this random query over 45k pages and don't see any slow down. $pa = $pages->find("template=basic-page, sort=random, limit=4"); With 43k pages random query time: 0.0474 With 720 pages random query time: 0.0326 Almost as fast as a $pages->count()
  13. I'm not sure I can follow but want to mention an easy way current PW version has You could use .. echo $widgetpage->render(); .. In the widgetpage you then have a $options array with some things in it. $options["pagesStack"] // an array with the page from where the widgetpage is rendered. You can also use some options on render() echo $widgetpage->render("custom_template.php", array("somevar" => "a value")); Then your widget page is rendering with the custom_template.php and will also have the custom var $options["somevar"]
  14. You can filter them already enter "new version". About updates: The only thing would be using lazy cron to trigger something, that refreshes cache and looks for new versions. I can take a look at how exactly. Shouldn't be too much work. I like the idea. I think it's not something I want to use, cause most of the time updates to modules aren't really necessary to always update. Only if there's a security fix or other fix. Also some updates or more critical updates shouldn't be done on a live productive site anyway. What I also see possible is a general feed from modules.processwire.com one could subscribe to with updates.
  15. I would just use random sort: $pa = $pages->find("template=basic-page, sort=random, limit=4"); findRandom is more for in memory or image arrays. As for the cache. No they won't get through, that's the purpose of cache. You could load them via ajax and inject them, after all they're at the bottom nobody will see they're loaded after.
  16. Updates to ModulesManager (now 2.0.0) to use jQuery DataTables, and more convenient updates http://t.co/DB91VZWn7E #processwire

  17. I thought I did. But maybe a clarification wouldn't hurt. Also I'm maybe going to delete the DataTables module..
  18. There's no old and new one. DataTables was a proof of concept integrating it in a admin page. It included the jQuery DataTables plugin, but unfortunately it may wasn't a good way to. JqueryDataTables is a js module like Fancybox. It is a "integration" of the jquery plugin for developers to use datatables in their modules. It won't be loaded unless you do so. An example would be the ModulesManager. They can coexist if you will.
  19. if(!$this->modules->isInstalled("JqueryDataTables")){ $this->error($this->_("ModulesManager requires 'JqueryDataTables' module since version 2.0.")); return; } The one who can read is clearly advantaged
  20. If this message shows up JqueryDataTables isn't really installed then. I just installed update to various installs and works fine. That first message is rather strange.
  21. I'm proud to announce a "major" update to 2.0.0. I spent most of the weekend to make some changes, that makes it more convenient to browse, download, update, install and edit module from within ModulesManager. Change log 2.0.0 added jQuery DataTables to list modules. This enables convenient browsing with pagination, live search filter and sorting. State saving via cookies is enabled so if you come back it shows the table how you left it. added iframe modals for download, update, edit and install links. So you can now install modules without leaving the ModulesManager page. This is using Magnific lightbox by default, if installed, otherwise it will take the older Fancybox. some more translations added Update Note: This version requires you to install JqueryDataTables module before you will be able to use the new 2.0.0. I hope I haven't forgot something on the way. My tests so far went well and everything still works as before, just a little more awesome Thanks and enjoy the rest of the weekend.
  22. That's actually cool! Even more if you would give me a like!
  23. That was just a proof of concept back then that included the datatables plugin which doesn't allow other modules to use it. This now is a plugin integration so everybody can use it without including datatables on their own.
  24. jQuery DataTables 1.9.4 This module adds the great jQuery DataTables plugin for use in ProcessWire. You can load the module in the admin from any of your module using: $this->modules->JqueryDataTables; This will load the module and add CSS and Javascript from DataTables. This mostly would be used by a custom admin Process module. Note: Loading this module will just attach the necessary files to the admin. To use it you would need to add your own jQuery scripts and init the DataTables with something like. $("#mytable").dataTable(settings); For more informations on the DataTables options and API refer to http://datatables.net/ Download: http://modules.processwire.com/modules/jquery-data-tables/ https://github.com/somatonic/JqueryDataTables I included only the necessary files, and removed examples and docs from the package. NOTE: To avoid confusion, THIS module has nothing to do with my ProcessDataTable module for ProcessWire! ProcessDataTable was a proof of concept integrating it in a admin page. It included the jQuery DataTables plugin, but unfortunately it may wasn't a good way to. JqueryDataTables is a special js module like Fancybox. It is a "integration" of the jquery plugin for developers to use datatables in their modules. It won't be loaded unless you do so. An example would be the ModulesManager. They can coexist if you will.
×
×
  • Create New...