Jump to content

All Activity

This stream auto-updates     

  1. Past hour
  2. I stopped at 200k, that's enough for my performance tests for now (RockTabulator) created 1000 pages in 52.123s, 0.052s per page, used 15.16 mb memory deleted 1000 pages in 5.759s, 0.006s per page, used 19.35 mb memory On my setup it would take 6*15 = 90seconds to delete 15k pages. Maybe you have some hooks running? That's always a pain and slowing down things when you need to modify huge amounts of pages... Code used: <?php namespace ProcessWire; $time_pre = microtime(true); include("../../../index.php"); // bootstrap ProcessWire function convert($size) { $unit=array('b','kb','mb','gb','tb','pb'); return @round($size/pow(1024,($i=floor(log($size,1024)))),2).' '.$unit[$i]; } function showTime($time_pre, $num) { $time_post = microtime(true); $t = $time_post - $time_pre; $m = memory_get_usage(); echo "processed $num pages in " . round($t, 3) . "s, " . round($t/$num, 3) . "s per page, used " . convert($m) . " memory\n"; } $num = 0; foreach($pages->find('parent=/data,id>257975') as $p) { $p->delete(); echo "deleted $p\n"; gc_collect_cycles(); $num++; } showTime($time_pre, $num); return;
  3. Today
  4. I would like to know this too. For example in my case I would like to sort pages by the number of their references. It would be great, if you could to that or has somebody please a hint for me how to do this otherwise? Regards, Andreas
  5. This seems like a really nice ux update. I really like you improving existing functionality. Thanks!
  6. Hi Robin + Adrian, thank you, will have a look and if I come up with something, will PR. cheers, Tom
  7. Imho, This functionality really should be in the core Gideon
  8. After forgetting the class name of the wonderful AdminPageFieldEditLinks module for what feels like the 100th time I decided I needed to give my failing memory a helping hand... Autocomplete Module Class Name Provides class name autocomplete suggestions for the "Add Module From Directory" field at Modules > New. Requires ProcessWire >= v3.0.16. Screencast Installation Install the Autocomplete Module Class Name module. Configuration Choose the type of autocomplete options list: "Module class names from directory" or "Custom list of module class names". The latter could be useful if you regularly install some modules and would prefer a shorter list of autocomplete suggestions. The list of class names in the modules directory is generated when the Autocomplete Module Class Name module is installed. It doesn't update automatically (because the retrieval of the class names is quite slow), but you can use the button underneath when you want to retrieve an updated list of class names from the directory. The "fuzzy search" option uses custom filter and item functions for Awesomplete so that the characters you type just have to exist in the module class name and occur after preceding matches but do not need to be contiguous. Uncheck this option if you prefer the standard Awesomplete matching. Custom settings for Awesomplete can be entered in the "Awesomplete options" field if needed. See the Awesomplete documentation for more information. https://github.com/Toutouwai/AutocompleteModuleClassName https://modules.processwire.com/modules/autocomplete-module-class-name/
  9. As @Robin S mentioned, I'd be happy to accept a PR for this enhancement!
  10. TemplateFile::render does seem to be a good place to tweak the markup right before it goes into the MarkupRegions class. Is that one not working? Here is where the template is rendered: https://github.com/processwire/processwire/blob/master/wire/modules/PageRender.module#L514 Here is where the markup regions are populated: https://github.com/processwire/processwire/blob/master/wire/modules/PageRender.module#L524
  11. Yesterday
  12. I am using Markup Regions in Templates and they are awesome . I would like to use them also in Hooks/Modules, but here I am having some troubles. When placed in a Template File this simple snippet works perfectly. It pre-pends and combines with the main header section. The same snippet in Page::render or TemplateFile::render hooks does not work as expected. It renders but without pre-pending and combining to the header. In the html source, pw-prepend directive remains visibile, like if Processwire had not processed the markup region. May be these two events are fired too late to take benefit of markup regions? Do I need to use a different hook ? It would be nice to find some examples documenting how to use markup regions inside hooks/modules.
  13. How about deleting thousands of pages using the API? Right now I'm using this hackish approach, but it's only when syncing my live db to my dev db, so even though it's not clean and may leave orphan records (which aren't causing any problems if they are even there), it's ok for my purposes: Github Request: https://github.com/processwire/processwire-requests/issues/131
  14. Anything that can be done with the API can be turned into an executable action with @adrian's Admin Actions module. And you can make an action available to non-superusers too. There's a built-in "Copy Field Content to Other Page" action that you can use as a starting point. This action doesn't work out-of-the-box for Files or Images fields but it wouldn't be difficult to get it working, especially now that you can use Pagefiles::add() with a Pagefile object so that descriptions and tags get copied over automatically. And if you update the action maybe submit a pull request to the module repo with your changes...
  15. jarik

    Hanna Code

    Thank you very much for your reply! I feel a bit silly right now haha. Your solution worked, it's working now. Thanks!
  16. @flydev I just followed all the instructions, but after adding the providers (copy/paste) nothing happens, according to your video it should ask me to install oauth2-google o whatever, right?
  17. Yeah, I just don't want to code something that will have to be changed each time this module is enhanced...
  18. @bernhard Thanks for these tips and tests. How long did finally this 1 million page-creation script take?
  19. Ok, in theory you can circumwent this by creating the missing .latte file and in there include the SeoMaestro module's php file.
  20. My programmers prefer to seperate views and controllers, so they configured this in config.php $config->paths->templates = $sitePath . "templates/controllers/"; //$config->paths->views = $sitePath . "templates/views"; The SEO module was working perfectly well with this until the new version. I will ask in the Latter forum.
  21. I see. Unfortunately I don't have this issue but perhaps it's a version mismatch or a result of your template setup (I see "controllers" in the path). I can try to reproduce if you tell these details. Anyway, it's sure not SeoMaestro module's fault, maybe this thread could be merged to the main Latte one?
  22. As said, this does not work for me.
  23. In the Latte module settings add the template name to the excluded templates list.
  24. Hi @Wanze Since your breadcrumb addition (0.8), your module is no more compatible with Template Latte Replace module. While I can, in theory prevent the structured_data_breadcrumb template file in the Latte module, this doesn't function. Any idea how to circumvent the problem?
  25. Here is an example of enabling Hanna Code on a textarea field (this one is called body):
  26. kongondo

    Hanna Code

    Welcome to the forums @jarik. Make sure you've enabled Hanna Code as a text formatter for the textarea field where you want it to work. I am in a bit of a hurry. Have a look at the settings of your textarea field (details tab).
  27. jarik

    Hanna Code

    I hope someone can help me with the issue I'm facing when using Hanna Code. I've installed Hanna Code using the instructions and I've made a couple of Hanna Code's. For example: one HTML Hanna Code with an image, so that I can easily show the same image on different pages within the content, so I also can change it easily. But right now, the results of the codes just doesn't show. Hanna Code shows them when I view the Hanna Code's preview, but the shortcode ( the [[name here]] codes) don't turn into something else. I've an example here: https://smartranking.nl/blog/oude-berichten-weer-hoger-in-google-laten-verschijnen/. The shortcut remains "[[cta-seo-consult]]". Is anyone known with this problem? How can I fix it? I hope someone can give me the solution for it. I already tried different text formatting, but that also doesn't help.
  28. True. In my case, I used $log to save the memory usage results to file to get an average. After that, I switched to Tracy but was well aware of how much memory my script was actually using vs any additions from Tracy :-).
  1. Load more activity
  • Create New...