Leaderboard
Popular Content
Showing content with the highest reputation on 03/02/2017 in all areas
-
7 points
-
3 points
-
As adrian pointed out, in multilanguage environment you have to put setlocale() in init.php, ready.php or admin.php since language support module will overwrite locale settings in config.php. Still waiting for response from Ryan about that.3 points
-
I would also love to see this - I think it would be great if we could define it in a Github repo changelog.md file and have the automatically imported into the text in the modules directory, and perhaps even displayed in the module info within a PW install. Perhaps it would even be nice to have a way to add a flag about breaking changes that would show up in the ProcessWire Upgrades module so you are warned before upgrading. @ryan - any thoughts on this? I'd be happy to work on it - obviously I could do the PW side of it from the repo, but would need access to the php files for the modules directory to make that side of things work.3 points
-
Hi everyone, This is the new official thread for the module that was previewed some time ago here: https://processwire.com/talk/topic/14117-module-settings-import-export/ Big thanks to @Robin S for help testing and feature suggestions! http://modules.processwire.com/modules/module-settings-import-export/ https://github.com/adrianbj/ModuleSettingsImportExport Module features Ability to copy and paste settings from one PW install to another Optional automatic backup of module settings on uninstall and ability to restore settings if you reinstall the module Backup current settings at any time Restore backed up settings at any time Import option checks module name and version number and warns if importing settings from a different version As always, let me know if you find any problems or have any suggestions!2 points
-
As fas as I know, currently there is no way for a module developer to include a changelog in a way that enables us to check out the changes in the admin before upgrading.2 points
-
do you have TracyDebugger installed? you probably need to walk through the code and bd() or l() some variables and such until you can see what is failing. you might want to try bd($mo->folder); bd($f); in their respective locations to see if they are failing; what is $mo->folder?2 points
-
PS, if you need hook documentation, you can get Captain Hook offline with Tracy: http://processwire.com/blog/posts/introducing-tracy-debugger/#captain-hook-panel2 points
-
https://processwire.com/api/modules/api-explorer/ API Explorer, always uptodate with your used PW version. Its a ProModule. EDIT: Oh, @adrian was faster.2 points
-
maybe just a missing echo? foreach($page->content_repeater_matrix as $content){ if($content->type == "hero"){ echo $content->render(); break; } }2 points
-
2 points
-
Dude it was so much vanilla ProcessWire that it was like plain cheating, heads up to @joshuag who had the actual idea!2 points
-
https://github.com/adrianbj/ProcessModuleToolkit It allows bulk automated migration installation and upgrading of modules (and their config settings) from one PW install to another, so it should be very handy in setting up new sites with your standard collection of favorite modules and settings. Allows includes batch installing by a list of module class names. Go to the Setup > Module Toolkit and follow the prompts. During the import, you can choose which modules from the collection to import. You can optionally import the module config settings from the source install. The one caveat is if a particular setting includes a reference to a page, template, or field ID, it won't work, but you can easily update this setting on the destination install. Batch install new modules directly from the modules directory with a list of module classnames or URLs to module zip files. You can optionally, automatically update all of the imported modules (if they are in the ProcessWire modules directory) to their latest available versions. It copies the module files so you can use it to migrate modules that are not available in the PW modules directory, or on Github. Great for all those custom helper modules you've created. Full restore feature in case something goes wrong / you change your mind. I maintain a dedicated test PW install for installing and configuring modules which I can then export for use in my projects using this tool. Please test and let me know what you think!1 point
-
Hi, this is a textformatter-module to globally set all kinds of YouTube and Vimeo options to embedded videos. It works well with TextformatterVideoEmbed and I think also with TextformatterOEmbed - https://github.com/blynx/TextformatterVideoEmbedOptions ... this is my first module - so I hope the code is acceptable ... ; ) What do you think about the way I implemented the configuration? I Seperated all the config and defaults into a JSON file and generated all fields automatically ... I was wondering if this was already possible or a good idea at all here: https://processwire.com/talk/topic/11155-create-inputfields-from-json-array/ Looking forward hearing your feedback! Cheers, Steffen1 point
-
FieldtypeFields Fieldtype for storing field references with various filter possibilities. See Modules directory Download at GitHub1 point
-
In this case, maybe pages also, but good to know for the future. Interesting read. Would need to go through that a number of times, but good to have such information in one place. With that and some other examples, problem solved. In case anyone else needs to know about this, to get what I needed (or close enough), I used the Page field type with Input type as PageListSelectMultiple, then added multiples selections to pages created to be the different groups. Thanks all for the help.1 point
-
@k07n Makes sense, I will update this and release a new version tomorrow. Cheers1 point
-
as explained above, but do not forget, you can always use a decent site grabber for your OS to get what you need, such as (macOS): http://ricks-apps.com/osx/sitesucker/index.html I would probably grab these https://processwire.com/about/ https://processwire.com/docs/1 point
-
I recently had a revelation when building HTML emails, what's the difference between HTML emails, and HTML web pages? Other than the horrible table syntax, the result is the same, it's still HTML. This got me thinking why not use a CMS to help generate the HTML emails based on a template? Just like we using a CMS to help generate HTML web pages. We started by setting up ProcessWire (our usual CMS of choice) and added the relevent fields for the sections of the email. Then we took a previous email moved the content into ProcessWire and hooked up the code to pull that content back into the correct places. Repeater fields allowed us to have repeatable sections that are easy to add too, change order of or remove, giving us huge flexibility when a client changes their mind last minute. The speed of setting up and dealing with ProcessWire allowed us to go from concept to working prototype within a day. To use the emails, we just view source of the generated page, and copy and paste into the email system. Sometimes Litmus inliner is required to allow the email to work in Outlook, but we can run it through that before pasting into the email system. Future development could be integrating a css inliner into the generation step, to avoid using litmus inliner. Hope this helps show how ProcessWire can be used in a different scenario.1 point
-
1 point
-
And if the course options (like Adult Courses) are going to be just options, not entire page (with fields), you can use the Options fieldtype as well.1 point
-
Not free, but probably the best way: https://processwire.com/api/modules/api-explorer/1 point
-
Reading the error, it says you have a type error. It expect an Object of type Page, but it got passed an object of type PageArray. So, it has nothing to do with your sort of include, I believe. So, somewhere in your (template ??) code you have called ukEventPost() and passed it a PageArray instead of a Page. Please refer to the other error lines until you found which file / line raised it, and change this, that it passes a single Page, and not a PageArray.1 point
-
Thanks for your comments, I also reviewed how Ryan implemented it, from there come my idea. I currently use a Latte Engine Module, but for 90% of the web pages my clients need is too much of the view/controller model, it's a lot of work for simple things. That's why I like what Ryan did, but I need regions that be more versatile in defining where to place it in the document, that not use the classes/ids directly and be less complicated in terms of the number of directives and tags variants. Just do it simple. An illustration example: https://processwire.com/talk/topic/15582-markup-regionsidea-for-another-placement-attribute/1 point
-
@Robin S Thanks for pointing on this. I will make an update soon.1 point
-
1 point
-
If Language Support is installed but no additional languages created then there is a PHP error: PHP Warning: Division by zero in ...\FieldtypeSelectExtOption.module:504 Probably not something that happens very often.1 point
-
1 point
-
OMG! Of course, I forgot about this possibility) Thank you, this works perfectly!1 point
-
One has to parse those comments blocks out of the html, recursively, identify/skip real comments, follow inheritance tree, protect against vuln xss foo etc... The parsing is currently done in WireMarkupRegions.php which has a lot hardcoded and html specific stuff, so it's hard to wrap around. If you really want this syntax, you should stick with an existing template engine like twig or mustache and replace the template tags with your custom comment-tag. Also consider FileCompilerModule... I personally use plates...1 point
-
Is it possible to use relative paths in storageLocation? I have different environment on local/live servers and it would be nice to have same value. Something like this: //$storageLocation = rtrim($field->get('storageLocation'), '/') . '/'; $storageLocation = realpath($field->get('storageLocation')) . DIRECTORY_SEPARATOR;1 point
-
It's fully functional. I'll PM it to you to try out. I'd be curious to get your feedback, and then maybe I'll just release it, maybe on its own, or maybe packaged with Module Toolkit, along with core module support to address @tpr's request.1 point
-
Thanks, will check it. Yes, you can copy the settings.php file to the new site, but first check the checkbox and save AOS, then uninstall, and only then copy it over. Then if you install the old settings should be loaded. A better method that I use recently is the Module Toolkit module where you can export modules with their settings to the new site. There's a JSON copy to clipboard option so all you need is copy-paste that. Modules are re-downloaded from the modules directory so core modules are not supported atm but it's still an incredible time saver.1 point
-
@szabesz - firstly, sorry for renaming that setting on you I just posted a response in that Wishlist thread - I agree that we need this badly - I have added some suggestions for how, and also to include a "Breaking changes" flag in the ProcessWire Upgrades module, which I also think is important.1 point
-
I wish there was a supported way to display a simple CHANGELOG that comes with a module. Other CMSes utilize this dead simple but very useful feature. I wonder why we have to live without it. Once I pointed this out, but only four of us seem to care including @adrian, of course Why are people are so uninterested in this? Strange. Last time I spent at least 5 minutes to find the "Admin Style" option of Tracy because it was renamed to "Server Type Indicator". A simple message like "Admin Style was renamed to Server Type Indicator" would have saved me the hassle. There are so many settings of Tracy that I often get lost, especially when things are renamed or moved around.1 point
-
Drop the code in a file ready.php and place it in your /site/ folder.1 point
-
FYI - I had to add it to init.php on certain servers: https://github.com/processwire/processwire-issues/issues/184#issuecomment-2800798551 point
-
1 point
-
It's also perfect for xml, json, [insert any datatype] .... .1 point
-
Nice to hear others are using this technique too. For my case the emailing system we were required to use has an "editor" but it's terrible, with PW i can add condition switches in the CMS to arrange partials in the email to a particular order etc. So much potential.1 point
-
Hi everyone - @tpr has done a great job on changing the way the ML info tooltip is displayed - it's now part of a hidden row. Here is his screencap of it in action! This and all the other recent ML changes are now committed to Github. Please test carefully and let me know if you find any problems, and don't forget the AOS language switcher for changing between languages!1 point
-
1 point
-
I do something similar, but instead of styling the page for the email, I have a separate template file for emails that builds the html for the email using tables and inline css and sends that directly to the list of subscribers. In my case, a monthly enewsletter is composed of several different articles (each a separate child page). The template for these child pages has a field to select what month/year the article belongs to. The email sending script queries matching articles, compiles, and sends. The possibilities are endless really1 point
-
My guess why PW isn't listed in the most popular CMS systems is because it ain't visible in HTML right away. In my opinion we're lucky about that so any type of hacking is therefor also very limited (look at WP ).1 point
-
Andrey, With adapted code stolen from Soma here: https://processwire.com/talk/topic/4476-validating-field-before-page-save/ (post #2), you can do something like below in an autoload module. Be sure to read Soma's explanations as well in that post/thread. <?php class ValidateEmail extends WireData implements Module { /** * Return information about this module (required). * * @access public * @return array module info * */ public static function getModuleInfo() { return array( 'title' => 'Validate Unique Email', 'summary' => 'Ensure Uniqueness of Emails across site', 'author' => 'Kongondo, Soma', 'version' => 001, 'singular' => true, 'autoload' => true, ); } public function init(){ $this->addHookAfter("InputfieldEmail::processInput", $this, "validEmail"); } public function validEmail($event){ $field = $event->object; if($field->name == 'mail'){ $page = $this->modules->ProcessPageEdit->getPage(); $oldEmail = $page->get($field->name); $newEmail = $field->value; #$this->message("old value: $oldEmail"); #$this->message("new value: $newEmail"); $existEmail = $this->wire('pages')->get("id!=$page->id, template=basic-page, mail=$newEmail, mail!=''"); if($existEmail && $existEmail->id > 0) { $field->value = $oldEmail; $field->error($this->_("That email $newEmail is already taken mate; go fishing! :-)")); } } } } This will save if unique, keep old value if not unique and show error. I am not sure what you mean by admin gets error notification; you mean send them an email or log the error? I'll let you Google that1 point