-
Posts
11,085 -
Joined
-
Last visited
-
Days Won
365
Everything posted by adrian
-
Prevent display of description in default language
adrian replied to depone's topic in Multi-Language Support
@depone - I am still not the most experienced at multi-language stuff, but this will work: $page->images->first()->get("description".$user->language->id); This way you are explicitly stating that you want the description in the user's language with no fallback. Maybe someone else has another solution?- 5 replies
-
- multi-language
- image
-
(and 2 more)
Tagged with:
-
Prevent display of description in default language
adrian replied to depone's topic in Multi-Language Support
You can use this to check if it's not the default language and only display description in this case. if(!$user->language->isDefaultLanguage) { // display description }- 5 replies
-
- 1
-
-
- multi-language
- image
-
(and 2 more)
Tagged with:
-
Just added a new "Clear Session & Cookies" button in the ProcessWire Info panel: It's the new reset/reload looking icon. This will log you out and back in again, clear all cookies for the domain, and return you to the same URL you were on (along with the full query string). I have been finding this very handy with module development when it is manipulating parts of the admin that are cached (like menus etc), but it can also be handy for example when you change an Images field's "Default image grid mode" setting because you need to clear cookies to see these changes. I am sure you'll find other uses as well.
-
Hi @godmok - thanks for the report. Unfortunately I am having a trouble understanding exactly what the steps are to reproduce this. Is there any chance you could share a screencast of the problem in action? Also, might I have access to the server (if it's online) so I can test - although I think the screencast first still might be important. I don't think I have ever come across anything like this. Anyone else ? Hopefully we can get to the bottom of it though and get it fixed.
-
Hi @MilenKo - sorry for the silence of late - too much going on here. I just pushed some changes I made earlier in the week that should fix the comment datetime issues. When I get some more this week I'll take another look at the tags issue. Thanks for your patience!
-
There is no Users::added hook. Since users are pages, what you are doing looks to be the correct option.
-
Files should only be recompiled if their contents have been changed.
-
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?