Jump to content

LAPS

Members
  • Posts

    258
  • Joined

  • Last visited

Everything posted by LAPS

  1. Hello there, I'm trying to log some text that includes horizontal tabs (\t), this way: wire('log')->save("log-file", "{$data['one']}\t{$data['two']}\t{$data['three']}") However, when I download and open the log file then tabs are not included i.e. tabs changed to white spaces. Maybe, it happens because of this. How should I write tabs to log files?
  2. Hi there, I propose to add the campaigns data to be supported in WireMailMailgun (in a similar way as made for tags data). ?
  3. According to this old post, I'm trying to use the PW cache feature: $my_page = $pages->get($pageId); if($my_page->viewable()) { $content = $cache->get("my_page"); if(!$content) { $content = renderCustom($my_page->children); $cache->save('my_page', $content, 3600); } echo $content; } function renderCustom(PageArray $items) { foreach($items as $item) { echo $item->title; // ... heavy content loading } } After loading the page which renders the above code, in the admin I can see something was cached (note: I'm using ClearCacheAdmin) : But when I reload the page the cached value seems do not be used and the page loads slowly. The result of doing var_dump() is the following: var_dump($cache); // return object(ProcessWire\WireCache)#20 (0) { } $content = $cache->get("my_page"); var_dump($content); // return string(0) "" What could be the problem?
  4. LAPS

    COVID-19

    I'm from Italy. Think to the Silk Road and the Belt and Road Initiative. Do... 2+2=4, and you are not wrong. .
  5. @Zeka Files such as ready.php and _init.php do load each time a page is requested. Since settings would not change over time I'm looking for a system-efficient place where to state those settings.
  6. @Zeka thanks for pointing me out. In which system-efficient place should the setting() function be stated?
  7. Hi there, I have an array-list of static email addresses that I would like to use throughout all the system e.g. in PW hooks and templates. Is there a system-efficient place where to put its statement e.g. in a file that doesn't load each time a page is requested?
  8. To make the renderField function to work for fieldset fields you must specify a $value to render that is not null. For example, using the /site/templates/fields/fieldName/$file.php (using $file argument): $page->renderField('fieldsetName', $file, $value) $page->renderField('fieldsetName', $file, '')
  9. Can you confirm that the function renderField for fieldset fields, even having the file /site/templates/fields/fieldName.php or /site/templates/fields/fieldName/$file.php (using $file argument), does not render anything as expected? $page->renderField('fieldsetName') // returns nothing ... or am I wrong on something?
  10. @teppo Thanks for the clarification. Is there an dedicated place where I can submit a request for this to Ryan?
  11. Hi there, this post would be similar to the one posted in the VIP support relating the FormBuilder module but here is more general. I would like to add a custom method to a namespaced class, say FormBuilderForm. So in my ready.php file I added (and tried) wire('forms')->addHookMethod('FormBuilderForm::myMethodName', function($event) { // $forms->addHookMethod('FormBuilderForm::myMethodName', function($event) { // wire('forms')->addHookMethod('FormBuilderForm::myMethodName', null, function($event) { // $forms->addHookMethod('FormBuilderForm::myMethodName', null, function($event) { // wire()->addHookMethod('FormBuilderForm::myMethodName', function($event) { // $wire->addHookMethod('FormBuilderForm::myMethodName', function($event) { // wire()->addHookMethod('FormBuilderForm::myMethodName', null, function($event) { // $wire->addHookMethod('FormBuilderForm::myMethodName', null, function($event) { // wire('forms')->addHook('FormBuilderForm::myMethodName', function($event) { // $forms->addHook('FormBuilderForm::myMethodName', function($event) { // wire('forms')->addHook('FormBuilderForm::myMethodName', null, function($event) { // $forms->addHook('FormBuilderForm::myMethodName', null, function($event) { // wire()->addHook('FormBuilderForm::myMethodName', function($event) { // $wire->addHook('FormBuilderForm::myMethodName', function($event) { // wire()->addHook('FormBuilderForm::myMethodName', null, function($event) { // $wire->addHook('FormBuilderForm::myMethodName', null, function($event) { // function implementation... }); but by calling the myMethodName method for FormBuilderForm objects e.g. in a template file $form = wire('forms')->get('my_form_name'); $form->myMethodName(); I'm getting the error Fatal Error: Uncaught Error: Call to undefined method ProcessWire\FormBuilderForm::myMethodName() How can I solve the error in order to properly add the method myMethodName to the class FormBuilderForm?
  12. @nbcommunication It may be useful to add the below text to the README documentation, if the case: Optional If WireMailgun is the only WireMail module you have installed, then you can skip this step. However, if you have multiple WireMail modules installed, and you want WireMailgun to be the default one used by ProcessWire, then you should add the following to your /site/config.php file: $config->wireMail('module', 'WireMailgun'); In a similar way as made for WireMailGmail.
  13. One of my doubt is about how WireMailgun does work. For example, how it supersedes the core WireMail functionality? I confirm that ProMailer gives you the option to choose which WireMail module to use, and I assume that WireMailgun will be the option!
  14. @adrian So, it looks like that the WireMailgun module (not the WireMailMailgun one) is "not invasive" and "mostly compatible". That is, I can use WireMailgun "on demand"/"activated per request" and it works with ProMailer and other Email/WireMail modules - Wire Mail SMT - except the WireMailMailgun modules developed by plauclair, gebeer and outflux3 (from README: WireMailgun is not compatible with these other versions). Please confirm this or correct me if I'm wrong.
  15. Hi @nbcommunication and @adrian, I'm evaluating to use WireMailgun both throughout my ProcessWire website and in combination with ProMailer, and would like to know some more about it. In the WireMailgun module README is written: Extends WireMail to use the Mailgun API for sending emails. My question is: once installed, will WireMailgun be used on demand ("activated" per request, so I can continue using PW WireMail normally and benefit of Mailgun features through WireMailgun only when needed) or will it someway substitute or replace PW WireMail functionalities at all (so I have to explicitly "deactivate" WireMailgun in all cases I don't need Mailgun features)?
  16. @Robin S OK for $myVar1 and $myVar2 (string variables) ? ... but it seems do not work when I pass a PW Page ? // rendering file $myPage = $pages->get(12345); $body = $files->render('emails/myfile', array( 'myPageVar' => $myPage )); // rendered file emails/myfile.php isset($myPageVar); // returns false Strange ?
  17. Hi there, I'm working on an email message template and would like to render a custom one to be sent. I tried to use $files->render() this way // rendering file e.g. a template file or a hook statement in ready.php $body = $files->render('emails/myfile', array( 'myVar1' => $var1, 'myVar2' => $var2, ... )); but $vars seems to be not accessible from within the rendered file. That is, $vars seems to be not set: // rendered file emails/myfile.php $myVar1 = $vars['myVar1']; // is not set $myVar2 = $vars['myVar2']; // is not set ... // is not set How can I get the $vars so to properly render the custom message template for sending the email? Notes: By using $files->include() the $vars is accessible but I cannot use this method because I should retrieve the output $body as a return value for sending the email later. So, I'm still looking to render the custom message using $files->render(). This thread is someway related to this one.
  18. Hi there, in ProcessWire I've installed two modules for sending emails: WireMail SMTP and WireMail Mailgun. I would like to use the WireMail Mailgun for sending an email just for a given case. When I use the following $mailer = WireMail(); $mailer->from('sender@email.com'); $mailer->to('receiver@email.com'); $mailer->subject('Testing Mailgun'); $mailer->body('Just testing.'); $mailer->send(); then the email is sent by the WireMail SMTP module. How can I send the email using WireMail Mailgun?
  19. @ukyo The new version of the module works. ? Thanks ?
  20. I'm here to support you as a tester. ??? Everything will work out ?
  21. Linux CentOS 7 - Apache 2.4 - MySQL 5.7 - PHP 7.2 - PW 3.0.148
  22. Steps I performed: 1. FieldtypeFontIconPicker files uploaded. 2. Admin > Modules > Clear compiled files run. 3. Admin > Modules > Refresh run. 4. Browser cache cleared (one never knows). 5. Steps 2 to 3 repeated once again, and again. Result: It doesn't work: in the Edit Field > Input > Icon library the libraries (IconPicker.*.php) are not loaded as described in the original issue. ?
  23. @ukyo For sure! Just reassure me on what to make possibly without uninstalling the module since it's used in many templates and populates many pages e.g. can I just copy-paste the files from the repo to the /.../site/modules/FieldtypeFontIconPicker folder?
  24. N.B.: The module is not working. ?
×
×
  • Create New...