-
Posts
11,110 -
Joined
-
Last visited
-
Days Won
365
Everything posted by adrian
-
Looks and works great now - thanks!
-
I think the key thing is that when there is no position stored in LocalStorage, it should use the field's width setting (default or template context override) as it did before. Yeah, something like that sounds good.
-
Thanks, it works now, but it no longer honors the width setting defined in the template. I have it set to 50%, but now it starts about 70 / 30. It might also be nice if it were optional - in some cases it will be a great addition, but sometime it's just a superfluous bit of UI. Please don't take that the wrong way - it really will be awesome in many cases.
-
I have just posted a cleaned up (SVGO), monochrome version of the logo (from https://github.com/plauclair/PW-Branding) to the excellent Simple Icons repo: https://simpleicons.org/ Please add a thumbs up to the PR if you'd like to see it added: https://github.com/danleech/simple-icons/pull/364
-
Some new features just added. Yes, these are starting to get into the functionality provided by ModuleToolkit, but I am still playing with the user interface and workflow trying to find the most efficient scenario. Along with the interface that is added to each module's settings page, this screencap shows the new interface available from this module's settings page. It shows a list of all stored module setting backups and adds a new interactive interface for selecting modules whose settings you want to copy to another site. As you check/uncheck modules, their settings will be added to the Settings textarea ready to copy to another site. If you paste in settings from another site and check "Update All", these settings will be imported into this site. You can choose to be warned of version mismatches, or force the import anyway. Let me know what you guys think - am I on the right track with this, or is the ModuleToolkit approach better, or is there room for both? I still may combine the functionalities of both modules, or maybe even create a service that lets you manage your modules and their settings across multiple sites from once central dashboard.
-
-
Hi @grimezy - I hadn't ever used the default=pageid option before, but I just tested here and it still exports all rows. I am also running 3.0.56. If the site is online, is there any chance I could take a look? If not, could you post your table field settings, including the specific settings for the page select field, as well as a screenshot of all rows and also the CSV that gets exported. One more thought - what version of Table are you running? I am on the latest v15 beta.
-
PW #1 on Slant - never heard of Slant and none of the CMS options have many votes yet, but still https://www.slant.co/topics/5409/~php-cms
-
Hi @microcipcip - thanks for a really great commentary on PW, what frontend devs are looking for, and how PW can fit those needs. I am really excited to see your integration of GraphQL into your ProcessVue site profile - definitely planning on using it on an upcoming project. Thanks again for all your great work on this.
- 36 replies
-
- 5
-
-
- vue-router
- vuex
-
(and 2 more)
Tagged with:
-
Web designer gone; I need help changing home page.
adrian replied to AndreaPT's topic in General Support
It sounds like the logo is hardcoded into head.php or main.php or something like that. We don't need to start hacking anything just yet - we just need a login for the host (cPanel and/or FTP) and everything will be fine. If @AndreaPT's organization owns the domain and pays for the hosting, they should have those details somewhere. -
How to add own tab in Admin on edit page via API?
adrian replied to dotnetic's topic in API & Templates
@jmartsch - you can see how I have done this in the BCE module when the editor interface is added in a new tab: https://github.com/adrianbj/BatchChildEditor/blob/4cd7f64e28d166b1f78eb02e83167cd7af031e87/BatchChildEditor.module#L374-L421 -
Web designer gone; I need help changing home page.
adrian replied to AndreaPT's topic in General Support
Without superuser access we will need either FTP/file manager, or database access so we can edit the correct template file - I am assuming the developer has hardcoded the logo into the template code, rather than making it editable via the CMS. -
Web designer gone; I need help changing home page.
adrian replied to AndreaPT's topic in General Support
Hey AndreaPT, Do you have superuser access to the admin? Do you have FTP access to the server (or via a cPanel file manager type interface). Let me know about those and I'll see what I can do to put you on the easiest track to make the changes you need. -
@jmartsch - I have a mostly working hack for you: $this->wire()->addHookAfter('Page::viewable', null, function (HookEvent $event) { if(!$event->return) return; $page = $event->object; if (strpos($_SERVER['REQUEST_URI'], "admin-actions") === false && $page->name == "admin-actions") { $event->return = false; } }); With this, non-superusers won't see the Setup > Admin Actions menu item unless they are already on an Admin Actions page, eg: http://mysite.dev/processwire/setup/admin-actions/options?action=CopyContentToOtherField I was trying to limit the return false to a specific process, but couldn't make it work as expected. Honestly, I feel like the right way to do this would be to ask Ryan to make: AdminThemeDefaultHelpers::renderTopNavItems (https://github.com/processwire/processwire/blob/35df716082b779de0e53a3fcf7996403c49c9f8a/wire/modules/AdminTheme/AdminThemeDefault/AdminThemeDefaultHelpers.php#L416) hookable, but without that, I think this is the best option, but maybe someone else has a better idea. PS - If you are running the Reno theme, it turns out that AdminThemeRenoHelpers::topNavItems is hookable. Might be a good argument for making it hookable in the Default and new UiKit themes as well. It think that approach would make this much easier.
-
Sorry if it seems like I am hijacking this, but I used to be in the same boat - I would often use a "Testing" Hanna Code for testing code. Now I just use the Console Panel in Tracy - you can even save snippets that you use regularly. This might solve your problem without needing to hide codes from the HC Helper interface. If not, please excuse my interference
-
@Doc - the other option in Tracy is the ability to edit the page's template directly - you don't even need to post a different version: https://processwire.com/blog/posts/introducing-tracy-debugger/#template-editor-panel Just edit through the Tracy interface and click "Test". That will reload the page with the changes you have made without affecting how it looks/works for other users. Whether I use this or the Template Path Panel that tpr mentioned depends on the complexity of the changes I am making. The Template Path Panel option allows you to swap between various versions similarly to diogo's code, but through the Tracy debug bar GUI.
-
Ok, there is now a new config option that needs to be checked to show the action code. On an unrelated note, I also revamped the recent $noBackup option. This is a breaking change, but now you can set: protected $dbBackup = 'automatic' (or 'optional', or 'disabled') in your custom actions to override the default behavior as defined in the module config settings. Hopefully this will be a helpful change.
-
Ah, you're right - sorry about that - shouldn't do things in a rush. I think I am going to remove that option from the module completely. I'll see if I can find some time to answer the issue of hiding menu items another way in your other thread. It is only visible for superusers - is it still an issue for you knowing that?
-
getrandom() Make getRandom() give different results each time it is called
adrian replied to Nektar's topic in General Support
Here's a JS demo: https://jsfiddle.net/abdennour/oh3jL82j/ Not knowing your exact scenario, but I think a purely JS solution would be better unless you have a LOT of children that you are doing the getRandom on. If you really want to go the AJAX route we can help you further, but it's really a PHP issue, rather than PW so googling around would be pretty helpful. The only catch with PW and AJAX is that the URL for the ajax request can't be directly to a php file in /site/templates - the file either needs to be outside /site or you need to assign the file to a PW template and page call the url for that page. Sorry for the short answer - I am a little rushed at the moment. -
@jmartsch - I wasn't finding an easy solution to your menu problem (maybe just not thinking straight), so I added a new option to the AdminActions module. If you create a new permission: "admin-actions-hide-menu" and give that to those roles that you want to allow actions, but not via the Setup > AdminActions menu. Remember the user will need to logout and back in again to clear the cache of the menu. Let me know if it works ok.
-
getrandom() Make getRandom() give different results each time it is called
adrian replied to Nektar's topic in General Support
Because your click action is client side (javascript) and the getRandom is server side (php), you will either need to get all the options initially and do the random filter using javascript, or you would need to do an ajax call on each click and return another set using getRandom. Does that make sense? -
Listers are real pages - take a look - see the "Test Lister" at the bottom? Just move to directly under "Admin" Ok, so I guess it's back to the drawing board Let me take a look at your hook code and see if I can get it working for you.
-
Hi @jmartsch - good idea - I have changed it so that message is only displayed if there is no custom message defined. As for using $this->message or $this->error - I don't see any reason why you can't already use those if you prefer - please test and let me know. The reason I went with the other approach is to allow for a larger and more obvious response than the standard PW message/error interface provides. If you need any additional tweaks on this front, please detail them out for me. I didn't spend a lot of time on this part of the module because it was initially designed for superuser use, although I am myself starting to make actions available to other roles, so I would like to improve this experience. Cheers, Adrian
-
If I understand correctly you want to hide a parent menu item (Pages) but display one of its children (A Lister Pro page)? The only solution would be to move the Lister Pro page directly under the "Admin" parent in the page tree. Then you can go about hiding "Pages" without any problems.
-
@jmartsch - I feel like the easiest option might be to just make the Admin > Setup > Admin Actions page set to "hidden" status.