-
Posts
10,902 -
Joined
-
Last visited
-
Days Won
349
Everything posted by adrian
-
That's a good point - this isn't foolproof for sure. Remember though that it's only config settings that are being exported/imported (which are stored in a json object in the "modules" db table), so nothing should be critical - there are no db schema impacts or anything. New settings should be added in when saving the settings page again. I guess an option to mitigate any confusion might be to add the version of the module to the json file so that it can be compared on import and if the version is different then warn that there might be new settings might be lost and should be reviewed. The other issue to consider is when a module's config settings reference a page, template, or field - these won't match on different PW installations because their IDs will be different. Nothing can really be done about this. I guess I am just trying to make configuring of complex and commonly used modules simpler. Maybe there is no complete solution possible?
-
@szabesz - that sounds like a great idea - let me think on this to figure out the best option. @Rudy - I was thinking that perhaps the functionality of this module could be improved it bit. Notice in the screenshot that now you can control activating and deactivating different languages at once, as well as leaving certain languages untouched. When you use this, please let me know if you think these options work well, or if you think it could be improved still.
-
Done!
-
For those of you who are experienced with the PW API (and those looking to learn), there is now an "Action Code" viewer that shows the executeAction() method of the action you are about to execute. It is of course collapsed by default and only available to superusers. Anyway, hope you'll find it useful and either reassuring (if you're worried about what code it about to be executed on your site), or informative as to what can be done with the API.
-
-
Your easiest option might be to install @tpr's AdminOnSteroids module. It adds a filter box to the top of the edit view in BCE. Take a look at his screencast here: Another option, would be to use the "Page Manipulator" action in my new Admin Actions module that will let you use the selector field type that is used in Lister to filter pages and then delete all matches: Would that work for you?
-
pages->find not returning value other than default language
adrian replied to antpre's topic in Multi-Language Support
-
I know this is old, but in case new users stumble across this, the Console Panel in TracyDebugger is what you are looking for http://processwire.com/blog/posts/introducing-tracy-debugger/#console-panel The other option for @muzzer's specific request of: $p = $pages->get("template=test"); $p->of(false); $p->set( 'fieldx', 'this is a default value' ); $p->save(); is to check out the "Field Set Or Search And Replace" action in the new AdminActions module which provides a GUI for setting the value of a field on many pages at once:
-
It's now available in the modules directory: http://modules.processwire.com/modules/process-admin-actions/ It also includes a few new actions. The first post and the Github ReadMe give a small description of each action. Hope you all find something useful among them. Again, please feel free to contribute some actions, or if you have an idea but don't know how to build, let me know and maybe I can put it together.
-
Ah thank you - I didn't see that! Just an FYI - adding aos_column_break to a tab actually does seem to work - just of course only for that tab
-
Just a request for when you're bored. I think it would be nice to have more than one: "aos_column_break" field available. If you are making use of fieldset tabs it would be great to be able to break up the fields on each of the tabs. Maybe if it was just possible to manually create "aos_column_break_1", "aos_column_break_2" etc.
-
If anyone with php <5.4, be aware that the short [] array index won't work for you. You'll need array().
-
Maybe I don't fully understand what works and what doesn't in your case, but typically with hooks on after page save you can end up with recursion when you include $page->save inside the hook function. Typically you need to make it a "before" hook, or do: $page->save("index"); so that you are just saving the specific field (not the entire page), so that the hook won't be triggered again.
-
How do we enable html tags in fields setup "description" box?
adrian replied to Zahari M.'s topic in Getting Started
Another option is to use the "Allow HTML" setting in this module: http://modules.processwire.com/modules/dynamic-description-notes/ -
I would just like to mention that I think the easiest way for most users to upgrade these days is with this module: http://modules.processwire.com/modules/process-wire-upgrade/ It handles the PW core as well as any modules you have installed.
-
That error means that you didn't select a db in PHPMyAdmin before clicking the Import or SQL tabs. The 500 error could be several things. Make sure you have debug mode on and read through this: https://processwire.com/docs/tutorials/troubleshooting-guide/ and this: https://processwire.com/docs/tutorials/installation-moving-and-troubleshooting/
-
The admin user's email address suggests the developer is Greek. I won't share here, but if you're curious....
-
Textfield max length still allows saving page past max
adrian replied to SamC's topic in General Support
@SamC - please see ryan's response: https://github.com/processwire/processwire-issues/issues/96#issuecomment-264145798 Perhaps reply there if you want to discuss with him further. -
Well you should get to work on one then Send me a PR with a new action and I can work on the ajax response to suit your needs and we'll take it from there!
-
SeaVuel | Hotel CMS / template : http://seavuel.com/ | http://demo.seavuel.com/ Whose handiwork is this? It looks ryan-esque to me
-
Ok, this functionality is ready, although please test carefully at this stage. You can populate the option parameters via URL parameters. You should split multiple values with a "|" character. There are two options: 1) You can either just pre-populate the options values, but still showing the options page where you can make changes via the options form GUI: http://mysite.dev/processwire/setup/admin-actions/options?action=TemplateFieldsBatcher&templates=29|56&fields=219&addOrRemove=add 2) or you can execute immediately with the passed options values: http://mysite.dev/processwire/setup/admin-actions/execute?action=TemplateFieldsBatcher&templates=29|56&fields=219&addOrRemove=add Note the "options" vs "execute" as the last path segment before the parameters. Please try it out and let me know what you think. Do you think it might also be nice to have an option to redirect to another page after it has executed, rather than showing the results page? With your suggestion of linking from other places in the admin are you thinking about maybe an ajax call to an action, rather than loading the page? I haven't tested this yet, but it might be a nice option. I might even be able to return a JSON formatted response if called via ajax?
-
You can manually install it, like any other module - just copy the file into your site/modules/ directory, do a modules refresh and click install. You might want to check out @mr-fan' s version in that thread I linked to as I think he extended it to also work with file fields (not just image fields), which you will want for audio clips.
-
Looks like your field is returning an array of author options, so try: <?php echo $page->author->first()->fullname ?> You can also use: last(), or eq(n) The other approach is to foreach through each author: foreach($page->author as $author) { echo '<p>'.$author->firstname.'</p>; }
-
Ok, the optional author links are now available. These are the current options: protected $authorLinks = array( 'pwforum' => '985-adrian', 'pwdirectory' => 'adrian-jones', 'github' => 'adrianbj', );
-
Let me think about this a little more - even in a dev environment restoring to a really old backup could be disastrous if you're still developing the site. I guess that's the responsibility of the dev to be smart about things though. I like it - I think giving authors proper credit will hopefully promote more contributions. I have gone with PW developer directory link, PW forum profile, and also Github account, with linked icons. I could maybe provide the option for the author to fully customize their links, but don't want things getting too ugly. Any thoughts?