Jump to content


  • Content Count

  • Joined

  • Last visited

Community Reputation

24 Excellent

About LAPS

  • Rank
    Sr. Member

Recent Profile Visitors

955 profile views
  1. Hi @nbcommunication, I have no experience with campaigns too, but I think compaings work in a similar manner as tags (both are arrays). Also, I think a setCampaign() method is the way to go in order to set the campaigns for Mailgun.
  2. @MoritzLost thanks for the explanation, and I would like to know why tabs are stripped out from the log text while they are not stripped between the "standard" PW-added data such as 'showUser', 'showURL', 'user', and 'url'. It is because I would like to use offline the log data that is in a structured format.
  3. 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?
  4. Hi there, I propose to add the campaigns data to be supported in WireMailMailgun (in a similar way as made for tags data). 😃
  5. 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?
  6. LAPS


    I'm from Italy. Think to the Silk Road and the Belt and Road Initiative. Do... 2+2=4, and you are not wrong. .
  7. @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.
  8. @Zeka thanks for pointing me out. In which system-efficient place should the setting() function be stated?
  9. 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?
  10. 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, '')
  11. 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?
  12. @teppo Thanks for the clarification. Is there an dedicated place where I can submit a request for this to Ryan?
  13. 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?
  14. @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.
  15. 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!
  • Create New...