Jump to content

gmclelland

Members
  • Posts

    577
  • Joined

  • Last visited

  • Days Won

    7

Everything posted by gmclelland

  1. @adrian - Thanks for adding that new feature. I just tested the new version and noticed a few of issues. 1. I don't think the "Hide debug bar by default" setting is working for me anymore. I swear it was working before. Now, the debug bar always shows expanded when enabled on the frontend or backend. 2. Maybe add checkboxes for a "Hide debug bar by default on the frontend" and "Hide debug bar by default on the backend" settings? 3. I don't think the padding got applied to the toggle when the bar is in a collapsed state when viewed on the backend. I'm using the default admin theme. You can see this by toggling the bar. The height of the toggle button doesn't match the height of the debug bar. It looks fine on the frontend though.
  2. Thanks, but I actually found the hook priorities using your awesome TracyDebugger module! ?
  3. Ok, on line 294 of TracyDebugger.module, I changed it to $this->addHookAfter('Page::render', $this, 'addCustomStuff', array('priority'=>'100.7')); After I did this, I started seeing the toggle link on the frontend. The templateEngineFactory module (Page::render() TemplateEngineFactory::hookRender()) had a priority of 100.5. TracyDebugger had a priority of 100.4, so it ran too early. What do you think is the best way to fix this?
  4. The site that is having a problem is using the Twig template engine using https://github.com/wanze/TemplateEngineFactory and https://github.com/wanze/TemplateEngineTwig. I wonder if it is because the TracyDebugger module is using a hook to add the javascript? I'm not very familiar with hooks, but maybe the hook doesn't run after Twig has compiled the markup?
  5. No js errors in the console. Tried in different browsers as well. I see the old 'X' button, I just don't see the new toggle button. Sorry, the site is local. I'll keep looking into it.
  6. Thanks @adrian that's exactly what I was asking for. I like the configuration as well. I upgraded Tracy on two local sites, one site works correctly on the frontend and backend. The other site doesn't show the toggle on the frontend, it works fine on the backend. I'm not sure why yet. I have tried uninstall/reinstalling the module. I tried clearing the browser caches. I tried refreshing the PW modules. All I see on the frontend is the old Tracy debug bar. Do you have any ideas what is causing this?
  7. @adrian The tracy debug bar takes up a lot of screen real estate, how about adding an option for collapsing the tracy debug bar by default into a "Debug" toggle link that shows fixed in the bottom right hand corner? When a user clicks the "Debug" link, it would show the entire bar. Currently a user has to refresh the whole page to bring back the toolbar if a user click's the "x" to close the toolbar. With a toggle link it can appear or disappear. Just a thought..
  8. Just curious, how are you using twig on your site? Are you using a module to do this?
  9. Many thanks @adrian
  10. Looks like the latest version of TracyDebugger 3.5.1 always seems to show up in the backend even though it is unchecked in the TracyDebugger settings. PWDebugMode is off. 3.5.0 works fine. I'm on ProcessWire 3.0.45. Hope that helps
  11. I read up on latte and liked it, but Twig is so widely used in other CMS systems like Grav, Drupal 8, CraftCms, Bolt.Cm and others. It seemed better to invest my time learning something a bit more portable. Thank you for the suggestion though. I also like the Tracy debugger module. I haven't tried yet, but I wonder if that can be used with twig somehow?
  12. Thanks again @Wanze. Merry Christmas to you as well.
  13. I have a few more questions because I'm stuck 1. I need to install http://twig.sensiolabs.org/doc/extensions/index.html#extensions-install so I can use the truncate filter, but when I go to my site root and run composer require twig/extensions it will also load the latest version of twig as a dependency. This dependency conflicts with the version included in the TemplateEngineTwig module. Should twig be removed from the module and managed via composer only? If I then comment out the autoloader in TemplateEngineTwig module so that PW3 can just load twig from the site's vendor directory, I get the following Error: Exception: Unknown "truncate" filter. 2. Is the __() functions recognized? I get Error: Exception: Unknown "__" function when I try to use it. 3. If would be helpful if you can add documentation to module's readme.txt on how to load additional twig extensions, macros, filters? Thank you for any help you can provide.
  14. For me, MarkupSEO stopped working when I upgraded from 3.0.44 to 3.0.45. Here is the issue https://github.com/nicoknoll/MarkupSEO/issues/33
  15. Thank you @Wanze and @microcipcip.
  16. Can't talk much right now, but this might help
  17. Yes, in your view's .twig file there is {% extends './partials/base.html.twig' %} Maybe in my view's .twig file I can just do the following? if ($config->ajax) { {# Load without header and footer #} {% extends './partials/ajax.twig' %} } else { {# Load with header and footer #} {% extends './partials/base.html.twig' %} } Or, maybe I need something like what is posted at: Anyways, I would still like to hear how other people are using this module with Ajax.
  18. Hello, I'm new to this. Can anyone tell me how to use a different Twig template when ajax is used? In some cases you only want the content without the header and footer. In other ajax cases you might want the content encoded as json. I'm not sure how to achieve this. if ($config->ajax) {...} By the way for anyone else wondering: This module works with PW3. To get the Twig dump function you will need https://github.com/justb3a/processwire-twigextensions and $config->debug = true; in your site's config.php file. You can use a _init.php to globally set twig variables for your templates. Just set $config->prependTemplateFile = '_init.php'; in your config.php and then $view->set('headline', $page->title); In your view's twig file you can print the variable with {{ headline}}
  19. Not sure if this helps, but the diffing reminds me of the popular https://www.drupal.org/project/diff module in Drupal. The 7.x version uses http://cgit.drupalcode.org/diff/tree/DiffEngine.php?h=7.x-3.x a file from phpwiki The 8.x version uses https://packagist.org/packages/mkalkbrenner/php-htmldiff-advanced
  20. I believe that was in Processwire 2.x. It's not in 3.x.
  21. In Drupal, that reminds me of the https://www.drupal.org/project/computed_field module. If you interested in something like that you can see how it works by spinning up a new instance at https://simplytest.me/project/computed_field/7.x-1.x and creating a computed field. I know they are totally different systems, but maybe ideas from one can be used on another?
  22. That's a good work-a-round. It worked. Thank you for all the help.
  23. I also tried this, but it didn't work either $field = new InputfieldURL(); $field->set('name', $this->attr('name')); $field->set('value', $this->attr('value')); $field->set('class', 'InputfieldAssistedURL'); $field->set('prependMarkup','<div class="InputfieldAssistedURLWrapper">'); $field->set('appendMarkup','</div>');
  24. Yes, that is what I noticed. To fix it, I thought about using this technique to keep the button next to 100% width input... https://boulderinformationservices.wordpress.com/2011/02/02/input-field-and-submit-button-on-the-same-line-full-width/ In order to do that, I need to add the div around the input field.
  25. Thank you @Robin S. Yes, that code I showed is coming from the render method. I tried your code, but it added a div around the input field and the button html tags. I'm trying to just add the div around the input html tag itself. My ultimate goal was to fix the styling of the module and submit a patch or PR back to the project. Here is the issue I'm talking about https://github.com/marcostoll/processwire-fieldtype-assisted-url/issues/2
×
×
  • Create New...