-
Posts
436 -
Joined
-
Last visited
-
Days Won
17
Everything posted by jploch
-
Coming back to this, I found out that this is just affecting my local dev environment with laravel valet. On a live server this is not an issue. So never mind ?
- 14 replies
-
- pagetableextended
- pagetable
-
(and 1 more)
Tagged with:
-
since updating to the latest version (v4.21.34) Iam getting this error on my frontend, when tracy is enabled (localhost environment): TypeError: strpos() expects parameter 1 to be string, boolean given in /Users/janploch/sites/michael-bader/dist/site/modules/TracyDebugger/tracy-2.8.x/src/Tracy/Bar/assets/loader.phtml:17 Stack trace: #0 /Users/janploch/sites/michael-bader/dist/site/modules/TracyDebugger/tracy-2.8.x/src/Tracy/Bar/assets/loader.phtml(17): strpos(false, '?') #1 /Users/janploch/sites/michael-bader/dist/site/assets/cache/FileCompiler/site/modules/TracyDebugger/tracy-2.8.x/src/Tracy/Bar/Bar.php(114): require('/Users/janploch...') #2 /Users/janploch/sites/michael-bader/dist/site/assets/cache/FileCompiler/site/modules/TracyDebugger/tracy-2.8.x/src/Tracy/Debugger/Debugger.php(299): Tracy\Bar->render() #3 [internal function]: Tracy\Debugger::shutdownHandler() #4 {main} (stored in /Users/janploch/sites/michael-bader/dist/site/assets/logs/tracy/exception--2020-12-16--16-24--7e3166bc41.html)
-
@adrian looks good! thanks for the update. Will implement a solution as soon as I find some time.
- 52 replies
-
@adrian the save button in this theme is actually at a fixed position in bottom right corner of the screen (the save button on the top is hidden). So tracy is overlapping the button when open. If you could set a class when tracy is open or enabled, I could position the button differently. The open panels seem to open with a margin to the bottom, so the button is still visible when a panel is open...
- 52 replies
-
that would be a good solution. maybe @adrian can implement this in tracy someday ? done ?
- 52 replies
-
- 1
-
-
@flydev ?? I just pushed an update. Can you try the latest version (0.12) and see if it fixes the issue?
- 52 replies
-
- 1
-
-
@flydev ?? still can't reproduce this. The modules I tested so far seem to work. Where can I find this Profiler module you are talking about? Can you send me a classname or github link to a module with this bug?
- 52 replies
-
I never used Padloper, so not sure what is causing this, but Iam happy to accept a pull request. Or you can post the css to fix this here and I will update as soon as I find some time.
- 52 replies
-
@flydev ?? you are right, I also noticed this. You can temporarily close tracy with the small arrow to make the save button visible again, but it's inconvinient. I might make the position of the save button configurable via the module settings. Since I also removed some of the save options (like save and next) for a simpler UI, this could also be an option. Not sure how others feel about the old save dropdown functionality, but I always felt it was to complicated and I never used it.
- 52 replies
-
- 1
-
-
Thx! Warnings will display with a yellow (#ffe299) and errors wth a light red (#f8ada5) background
- 52 replies
-
- 2
-
-
Thats a bummer. The changes to the orginal theme php files are minimal (2 files, and a few lines of code have actually changed), they enable me to change the main navigation into left and right with dopdown positions working (On the left the page related navigation and on the right the rest). The tree rendering in the page nav and all other changes are already done using jquery/js and css only (e.x. triggering the ajax button and moving the page tree inside the first level of the page navigation), Iam still using the same for each loops in php, the default theme is using. With the dropdown problem solved (they need special classes to trigger javascript to set the positions) I think it would be possible to make this js/css only and just extend the original uikit theme like admin theme boss is doing it. But that would be a challenge Edit: @adrian Does that mean you always stick with the default theme, because of potential compatibility issues? I'm just curious what the best practice is. I might go the route and make this js/css/less only and extent the original theme. But what would happen when Ryan applies changes to the original uikit theme php files, that could also break my theme. Having a copy of these files, at least makes sure my theme is not breaking when changes are applied to the original theme. These changes would have to be merged to my theme, but at least its still working. Also there is always the option to just change back to the original theme, when you are not happy with the features, with just a click on the admin profile page. So far I never had any compatibility issues with updating the core, thank to PWs well crafted architecture. But its a very valid point I want to make this as future proof as possible. My experience with PW is also that changes to the core admin themes are not that frequent, but of course it could happen.
- 52 replies
-
My theme is still extending the default admin theme and updating uikit is not a big deal, however changes to admin theme uikit php files would need to be done manually. I cloned the admin theme uikit to have more control of the markup. I plan to support this if people are interested, Iam using it for all my new sites. A version that extends the uikit theme like admin theme boss does would then rely on Javascript and CSS to manipulate the dom right? Using a hook could be an option. Maybe someone better with hooks could colaborate ?
- 52 replies
-
- 2
-
-
Admin Theme Canvas DEPRECATED: I am no longer supporting AdminThemeCanvas. Now that the new native KONKAT theme is part of the ProcessWire core, this module is largely redundant. Thanks to everyone who used and supported it!. This repository will remain available for legacy projects but will not receive further updates. To make the KONKAT theme behave more like this one you can install the AdminQuickTree module, which gives you direct access to the page tree navigation. A minimal admin theme with optimised page editor UI, based on Uikit 3. Currently this is close to stable, but users are advised to be cautious and test thoroughly. This theme is tested in all major Browsers including IE 11, Edge (>85), Chrome (>85), Firefox (>81), Safari (>11). If you find any bugs or have ideas for improvements, feel free to post your feedback. Download from Github Download from Modules Page Features Minimal black and white admin theme Fixed masthead navigation Direct access to page tree navigation inside page dropdown Less distraction for editors (when editing a page, the tabs are displayed as a dropdown menu inside the main navigation) Options to customise the ui Less distraction for editors Direct access to page tree navigation inside dropdown Page tree Options to customise the ui Login (inspired by AdminThemeBoss) Requirements Process Wire 3.0.100 or greater Installation Go to “Modules > Site > Add New“ Paste the Module Class Name “AdminThemeCanvas“ into the field “Add Module From Directory“ Click “Download And Install“ On the overview, click “Download And Install“ again… On the following screen, click “Install Now“ Go to your user profile page and change the theme to Admin Theme Canvas
- 52 replies
-
- 20
-
-
-
Hey! When using this great module with the delegate template approach (setting a new subfolder in field settings "Path to template"). Iam still getting warnings inside the backend, that the file doesn't exist. Everything else works as expected. Any ideas how to fix this or disable the warning? TemplateFile: Filename doesn't exist: /Users/janploch/sites/michael-bader/dist/site/templates/block_icon.php Putting this inside every template file from my subfolder, works but I would like to avoid that: $page->template->filename = $config->paths->templates . "blocks/" .$page->template->name. ".php";
- 14 replies
-
- pagetableextended
- pagetable
-
(and 1 more)
Tagged with:
-
the rendering works fine now with this in my template files: <div class="grid"> <?php foreach($page->grid_ext as $item): ?> <div id="pteg_<?= $item->id ?>"> <?php echo $item->render($config->paths->templates . "blocks/" .$item->template->name. ".php"); ?> </div> <?php endforeach; ?> </div> However the PageTable who renders the items in admin still throws an error, that the file is not found. TemplateFile: Filename doesn't exist: /Users/janploch/sites/michael-bader/dist/site/templates/block_icon.php Since Iam extending PageTable with my own module i have this in my module to render the items (based on PageTableExtended, extending render methode ___renderTable, shortened code) foreach ($pagesToRender as $p) { $layoutTitle = $p->template->label ? $p->template->label : $p->template->name; $ext = "." . $this->config->templateExtension; $template_name = $p->template->altFilename ? basename($p->template->altFilename, $ext) : $p->template->name; $templateFilename = $this->config->paths->templates . $this->pathToTemplates . $template_name . $ext; $parsedTemplate = new TemplateFile($templateFilename); $parsedTemplate->set("page", $p); $parsedTemplate->set("isAdmin", 1); $parsedTemplate->options = array('pageGrid' => true); $p->template->filename = $this->config->paths->templates . "blocks/" .$p->template->name. ".php"; $p->of(true); $iconClass = "fa-angle-down"; $activeClass = "pte-open"; $statusClass = ""; if ($p->is(Page::statusUnpublished)) $statusClass .= " pte-unpublished"; if ($p->is(Page::statusHidden)) $statusClass .= " pte-hidden"; if ($p->is(Page::statusLocked)) $statusClass .= " pte-locked"; if ($this->collapseUnpublished && $p->is(Page::statusUnpublished)) { $iconClass = "fa-angle-right"; $activeClass = "hiddenOnStart"; } // add class for permisssions if(!($this->user->hasPermission('page-edit', $p))) { $statusClass .= " pte-locked"; } if($this->user->hasPermission('pagegrid-drag')) { $statusClass .= " pgrid-item-draggable"; } if($this->user->hasPermission('pagegrid-resize')) { $statusClass .= " pgrid-item-resizable"; } //if ($p->colorpicker && $p->colorpicker!='transparent') $colorstr=' style="background-color:'.$p->colorpicker.'"'; else $colorstr=''; $layout .= '<div id="' . $this->sanitizer->attrName($p->title) . '" data-id="' . $p->id . '" class="'. $this->sanitizer->attrName($p->title) .' pgrid-item-' . $p->id . ' pgrid-item ' . $p->template->name . $statusClass . '" data-template="' . $p->template->id . '"> <div class="pgrid-item-header"><span title="'.$this->_('Move').'" class="renderedLayoutTitle ' . $activeClass . '">' . $layoutTitle . '</span> <input class="focusdummy" id="focusdummy' . $p->id . '" type="text"> <a class="InputfieldPageTableSave" title="'.$this->_('Save Text').'" data-id="' . $p->id . '" href="#"><i class="fa fa-save"></i></a> <a class="InputfieldPageTableEdit" title="'.$this->_('Edit').'" data-url="./?id=' . $p->id . '&modal=1" href="#"><i class="fa fa-pencil-square"></i></a> <a class="InputfieldPageTableDelete" title="'.$this->_('Mark for deletion').'" href="#"><i class="fa fa-window-close"></i></a> </div>' . $parsedTemplate->render() . $imageUpload . '</div>'; } I don't understand why the render method still throws the exeption that the file is not found. When I put this in my template file for the items: <!--Supress render warning--> <?php $page->template->filename = $config->paths->templates . "blocks/" .$page->template->name. ".php"; ?> the warning disappears. It would be great if the user of my module do not have to put this in every template file, when using the delegate template approach. Any Ideas how to solve this?
- 8 replies
-
- render
- delegated template approach
-
(and 2 more)
Tagged with:
-
[SOLVED] Access inputfield config data
jploch replied to jploch's topic in Module/Plugin Development
ok I think a understand now. This is giving me the data from the field settings page in pw: $default = $this->wire("fields")->get('fieldname'); $default->gridMaxWidth; While this is just giving me the defaults from the inputfield module: $default = $this->wire('modules')->get('InputfieldPageGrid'); $default->gridMaxWidth; It all makes sense ?- 1 reply
-
- modul
- inputfield
-
(and 1 more)
Tagged with:
-
Hey folks, Iam working on a module that extends InputfieldPageTable. I use PageTableExtended as a starting point and all went well so far, except I can't access my config values outside of the module file. The config values allways return the defaults, and not the values in the pw field settings. Here is the code that sets the defaults inside my inputfield module file: public function init() { parent::init(); // defaults $this->set('gridMaxWidth', '1600'); $this->set('gridColumns', '12'); } Here is how I add the config field: public function ___getConfigInputfields() { $inputfields = parent::___getConfigInputfields(); $fieldsetGrid = $this->modules->get('InputfieldFieldset'); $fieldsetGrid->label = $this->_('Default Grid Settings'); $f = $this->wire('modules')->get('InputfieldText'); $f->attr('name', 'gridMaxWidth'); $f->attr('value', $this->gridMaxWidth); $f->label = $this->_('Container max width'); $f->description = $this->_('Grid container max width in px'); // page name format description $f->notes = $this->_('default is 1600'); // page name format notes $fieldsetGrid->append($f); $inputfields->append($fieldsetGrid); return $inputfields; } Accessing the values outside my module files like this (this gives me the default: 1600, even if I insert another value in the backend field settings): $default = $this->wire('modules')->get('InputfieldPageGrid'); $default->gridMaxWidth; Any Ideas?
- 1 reply
-
- modul
- inputfield
-
(and 1 more)
Tagged with:
-
@kongondo Thanks! This worked very well. With your help I implemented a setting to use my admin theme for the login. It works only if I also set the guest user to use my admin theme. This needs to be done manually in the profile settings, in addition to the module settings. For better usabillity it would be nice to set the guest user admin theme via api as well. I know that "$user->admin_theme" gives me the name for the admin theme of the current user but I have no Idea how to set the theme for the guest user. Any ideas?
-
This seems to be it. The problem is that I don't know how to change that setting. My admin theme is based on reno and is not extending 'AdminThemeFramework' like the Uikit based themes, but the original 'AdminTheme'. So I could not integrate that setting in my theme. I tried this in my theme (taken from AdminThemeFramework.php), wich resets the login settings on all the admin themes, but then it switches back to AdminThemeUikit as the default: $class = $this->className(); foreach($this->modules->findByPrefix('AdminTheme') as $name) { if($name == $class) continue; $cfg = $this->modules->getConfig($name); if(!empty($cfg['useAsLogin'])) { unset($cfg['useAsLogin']); $this->modules->saveConfig($name, $cfg); $this->message("Removed 'useAsLogin' setting from $name", Notice::debug); } } In the docs I found this: AdminThemeFramework::useAsLogin
-
Thx Kongondo! I already tried to find the code inside the AdminThemeUikit module files, but could not find this setting. I will take another look and repost my findings
-
Hey folks, Iam working on a new Admin Theme, based on AdminThemeReno, which I would like to release for the public soon. Now I want to style the login page to fit the look and feel of the backend. After some research, I found out that I have to set the "$config->defaultAdminTheme = 'AdminThemeName' " inside my site config.php file to load all the styles from my admin theme on the login page instead of the default ones. Is it possible to set this via api from my Admin Theme settings, without the need of editing the config file?
-
good to know. Never mind than ? Somehow I never saw "Premium Modules". Should have looked more carefully
-
Great news! Currently I work on a rather complex module, that I would like to be able to support for a longer time. So Iam thinking to release it as a commercial module. As far as I know there is no place for community made commercial modules on the processwire website. While I really appreciate all the awesome open source modules that the community is making, sometimes a commercial module makes sense and is actually helping the developer to be able to put more resources into it. So I wonder if the new modules directory could also list commercial modules, to give developers more exposure and motivation to build complex modules.
-
Thanks for this module! After I implemented the banner into a client website. A client complained recently that the visitor numbers drop to circa 1/4 of the usual numbers from Google Analytics. Now I need to verify that nothing is wrong with my implementation. Iam using pro cache on the website and implemented the GA code with the "pwcmbAllowCookies" check like this inside the head of my main template ("my UA Number" is replaced with the real number on my live site, I just removed it for this post) : <script> if (localStorage.getItem('pwcmbAllowCookies') === 'y') { window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', 'my UA Number'); } </script> Is this the correct way of implementation, could the cache somehow cause trouble? EDIT: Never mind! I forgot to also fire the cookies right after the "accept cookies" button was clicked. The tracker was only fired once the browser reloaded, so the first visit wasn't tracked, even if the user clicked accept.
-
@Robin S this is perfect! Works like a charm. Thank you!! EDIT: After some testing I realized that the icons disappear once a new item is added to the pagetable. So I guess the ajax call and update of the pagetable removes any changes to the buttons? Do you know how to hook into the add item action and reset those icons after the ajax update is finished? EDIT2: Got it. I had to put the hook inside the init instead of ready function. Now it works!