-
Posts
11,210 -
Joined
-
Last visited
-
Days Won
373
Everything posted by adrian
-
Do translatable strings are functional anywhere ?
adrian replied to Doc's topic in Multi-Language Support
I am not a big ML user, but I ended up with a Table field on the home page for sitewide translations. I use a 'name' field for the first column and a textAreaMultilanguage for the second column. This makes it really easy to add new strings and edit via the admin. I wrap the Table field in a fieldsetTab called "Sitewide Translations" to keep it separate from the main content. -
There are 6 10 38 episodes now, so I'll just link to the channel: https://www.youtube.com/channel/UCAC6bGszwXecqp1Nq2qn1Sg
-
A couple of comprehensive looking video tutorials in Polish by the folks at: https://xtras.pl/
-
@Nukro - what you are after is certainly possible, but I am not sure the best way to make it handle everyone's need and not break current functionality for existing users because at the moment the module doesn't consider anything other than the page ID being somewhere in the URL. This allow ultimate flexibility in the URL, but obviously prevents detection of URL segments. I guess it could be a module config option to consider everything after the ID as segments that should be parsed. Anyway, for now I have attached a version that should do what you want. Please test thoroughly and let me know how it goes. If it's working fine at your end, I'll probably make the urlSegment detection optional and release it. ProcessRedirectIds.module
-
Typically the way to do this is define $i=0; before the foreach loop and then at the end (just inside) do: $i++ This lets you check which iteration of the loop you are at, so if $i==0 then "continue;" Hope that helps - it's not a full code example, but hopefully it will help you to understand what is required.
- 9 replies
-
- 3
-
-
- onepage
- navigation
-
(and 1 more)
Tagged with:
-
Sounds like you must have something incorrect because I know that technique has been used by many people. Maybe if you explain how you set it up we can help?
-
Maybe I am not really this properly, but doesn't this take care of things?
-
Sure, but he asked for when the site is "updated" - surely a change to a page is an update Just noticed that he wrote: "just send an email with the link to the new page" - so yes, Pages::added would be much better
-
I would do it on a page save hook. You might find some useful code to "borrow" from this module: http://modules.processwire.com/modules/process-field-change-notifier/
-
[SOLVED] Can't add image in certain situation
adrian replied to Harmen's topic in Module/Plugin Development
Does the Errors panel on the Tracy Debugbar show any warnings/notices? Because of the way Tracy intercepts notices/warnings, sometimes it can cause code to work that would have otherwise failed. As far as I can tell this only happens with AJAX events where the notice would break the script because of header issues or just polluting of a JSON response. The key thing though is that with recent versions of Tracy, the notice/warning will always appear in the Errors panel so you are notified that something needs fixing.- 15 replies
-
- importpagesprestashop
- field
-
(and 2 more)
Tagged with:
-
Just send through whenever you are happy with things - definitely looks like a great improvement - much appreciated!
-
That is looking really nice - I agree, the default styles from the Tracy core are ugly as - really looking forward to your final version - thanks! BTW - nice seeing that you are making good use of the console Snippets While you're in the mode for tackling this stuff, if you feel like it, it would be incredible if you'd be willing to take a look at this: https://github.com/nette/tracy/pull/241 As it mentions, that PR is a work in progress, but it looks like it's going to do more harm than good in my opinion. From my initial experiments, it's going to make it very difficult to get the ACE editor styles into the Console panel. In particular, have a read of my comment here: https://github.com/nette/tracy/pull/241#issuecomment-273268211 - most importantly, note that I always hack the Tracy core's /tracy-master/src/Tracy/assets/Bar/bar.css to change line #23 from #tracy-debug * { to #tracy-debug-bar * { Perhaps we should talk about this more via PM if you are interested in helping to get everything working with that new approach that is in the works. PS - no pressure - I am sure you have lots of other things to do. I have been putting it off for the moment myself
-
Yep, of() is just a shortcut for the full setOutputFormatting() method.
-
Yeah, you will need something like this: $u = $users->get($sanitizer->username('username')); $u->of(false); $u->addRole("moderator"); $u->save(); You should have received an error that mentions specifically that you need to turn of output formatting. Do you have debugmode on and/or TracyDebugger installed?
-
Sounds like a good idea to me. @bernhard actually mentioned here as well many pages back, but I never got around to it. @bernhard - do you have the latest version of the code available somewhere?
-
Another update! There is now a "Toggle All" button which may come in handy if you want to search for a method (CTRL/CMD + F) to see the classes it exists in. Tip: search for "___save", rather than "save" so it doesn't find it twice on each row. Another update, unrelated to Captain Hook - now each panel in the Selector Panel has an info iconℹlinked to the relevant section in the "Introducing Tracy Debugger" blog post so you can get quick information about what each panel does.
-
Hi @cybromancy - welcome to the forums! You are assigning the user's ID to the $changeRole variable. You need to keep the full user object assigned to it so that addRole() can do its thing! Let us know if you have anymore troubles.
-
"Page Tree" or "Page List" ?
-
New Captain Hook version just posted! Changes: I have rewritten the file parser so that it uses token_get_all, rather than a regex. This makes it much faster and it also makes it easier to exclude functions that are commented out. Please let me know if you notice any files/hookable methods that aren't listed. Added a new column which has the className::hookName formatted and ready to copy/paste. Hooks for site modules will be automatically added when a new module is installed. Cached version is now stored in the DB cache table, rather than on the filesystem.
-
-
Great - thanks! I agree and have been contemplating it, but not sure the best approach. Do we need to filter just the filenames, or do we need to filter to the method name? If it's the former, then CTRL/CMD + F is possibly just as easy as a filter. If we also want method names then things will obviously get a bit trickier - do we need to add the name of each method to a data attribute for each file so it can be filtered? Do we want to automatically expand filtered files? Any thoughts?
-
You can (I believe should in most cases) store the child pages for a PageTable in an external branch of the page tree - perhaps: Admin > PageTableBlocks You should also take a look at the RepeaterMatrix pro field (https://processwire.com/api/modules/profields/repeater-matrix/). If you decide to go with the PageTable field, also take a look at the PageTableExtended (http://modules.processwire.com/modules/fieldtype-page-table-extended/)
-
Thanks @tpr - that helps. Could you please try the latest version. Hopefully I have fixed that and the problem @Robin S was having. I have also added /site/modules/ so it is also scanned for hookable methods. This means the list of files/hooks will now also include all your installed 3rd party modules.
-
I can't see why it's there either. I have removed here and it's still working fine (although it was working fine for me with it also). Does it fix the problem at your end? Do you have anymore details on this error. There isn't actually an is_file() call in that CaptainHookSearch.php file. Maybe if you sent me your open_basedir restrictions it would help me to reproduce.
-
New Captain Hook panel just added! Features: The hooks are parsed directly from the files in your PW installation, so they will always be up to date. They are cached, but will be updated whenever you upgrade your PW version. If you have your Editor Protocol Handler properly configured for Tracy, clicking on the Line Number will open to the method in your code editor. This panel uses @owzim's Captain Hook generator: https://github.com/owzim/PWCaptainHookCLI Please let me know if you have any problems or suggestions.