-
Posts
11,102 -
Joined
-
Last visited
-
Days Won
365
Everything posted by adrian
-
Based on @Macrura's example - maybe just a personal preference more than anything, but I prefer the look of this. I do think it really helps to indent the code though function renderUkGrid($page) { return " <div class='uk-grid uk-grid-large'> <div class='uk-width-medium-1-3'> <div class='uk-panel uk-panel-box prodotto__panel-mod'> <div class='uk-panel-teaser'> <div class='uk-cover-background' style='background-image: url({$page->product_image->url});'> <img class='uk-invisible' src='{$page->product_image->url}' width='600' height='400' alt='Placeholder'> </div> </div> </div> <a class='prodotto__panel-links prodotto__panel-links-blue' href='{$page->url}'><span>Discover more</span></a> </div> <div class='uk-width-medium-2-3'> <div class='prodotto__descr'><span>{$page>product_options->title}</span> <h3 class='shadow-blue'>{$page->title}</h3> <p>".truncateText($page->product_description)."</p> <p><a href='{$page->url}'><i class='uk-icon-chevron-circle-right uk-margin-small-right'></i>Link</a></p> </div> </div> </div> "; }
-
Hi @mel47 - are you running the latest version of BCE? I did tweak some thing recently on this front - I believe it has to do with no EOL character, but I am now adding that so I think this shouldn't happen anymore. If you are running the latest version and still having problems I'll try to look into it shortly. Are you pasting the CSV, or importing from a file? Does it makes a difference using one way or the other?
-
Ah yes - try the latest version - those should also now be translatable. Sorry, in a rush, but hopefully that will work. Perhaps I can improve things in the future - I honestly haven't played around with module translations at all
-
If you have the filecompiler turned on, you usually shouldn't have to do anything to upgrade from 2.x to 3.x. If you don't want to use it, all you should have to do is add: namespace ProcessWire; at the top of your template files. Generally there should be no need to prepend all wire() calls like that.
-
The version I just committed makes those (and lots of other config settings option) translatable. OT - this version also includes lots of new options for adding/updating/overwriting images when importing a CSV file.
-
https://mpdf.github.io/what-else-can-i-do/images.html It looks like mPDF can handle dynamically generated images and base64encoded images.
-
Yes, Tracy shows the rendered HTML and all recipients. Back to your hook question, there is: getModuleConfigInputfields which may suit your needs, but haven't though into it too much, but it does seem to be what you were asking about. https://github.com/processwire/processwire/blob/35df716082b779de0e53a3fcf7996403c49c9f8a/wire/core/Modules.php#L3534
-
That will just set it to dev and proceed - it won't actually check the value of $config->env Just an option for you - TracyDebugger has a Mail Interceptor panel which which intercepts all outgoing emails and displays their content in the panel instead - might be a decent option for what you are trying to achieve?
-
Hi @Vlad - thanks for your feedback on this. Is there any chance you could provide an example of how to use ecwid in ProcessWire?
-
Just to add to @kongondo's code, if your site is not in English, you may want to consider: $p->name = $sanitizer->pageName($p->title, true); You can read more about that sanitizer option here: https://processwire.com/api/ref/sanitizer/page-name/ or: $p->name = $sanitizer->pageNameUTF8($p->title); https://processwire.com/api/ref/sanitizer/page-name-utf8/
-
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.