Jump to content

kongondo

PW-Moderators
  • Posts

    7,473
  • Joined

  • Last visited

  • Days Won

    144

Everything posted by kongondo

  1. Try this: https://processwire.com/api/ref/paginated-array/get-pagination-string/
  2. @bilioso, Welcome to the forums and to ProcessWire. Before you start, please backup everything, especially the databases. Secondly, do the import on test site first, whether a local or remote site, but don't try this on the live/production site. Once you've tested things went OK, you can do the import on the live server. For backups, in ProcessWire, there are several options. The simplest I think is this module by Ryan. https://modules.processwire.com/modules/process-database-backups/. You can use it to make backups at different points in your tests. Use that to make a backup of the ProcessWire site before you changed the dates. This will allow you to always be able to go back to that point whenever you need. I am assuming this is SQL executed via ProcessWire? Template file could work. You would add the code to a template file and visit a page that uses that the template that template file belongs to. You would do that once then remove the code. However, a better approach is to use TracyDebugger's code console. You can then run the code there and comment it out or delete it once done. TracyDebugger is really useful to developers. You can get it here: https://modules.processwire.com/modules/tracy-debugger/ Let us know how it goes :-).
  3. I understand Please do. You're welcome :-).
  4. Seems like someone left in a Tracy debug call in there ?.
  5. Oops. You didn't need to do that, especially if there is some sensitive info there. Just needed the PHP version :-). The error seems to suggest that this is the issue. Hmm.. Have you tried on a local site? Does it work? On the remote installs, does the reverse work? i.e., accessing contents of the 'second' site inside 'main' site.
  6. Yes. This will be more versatile. Alternatively, if you were working with a known set of icons that won't change or wont' change much, you could use the separate value|title feature of FieldtypeOptions. Looks a bit hacky but you could do something like this (assuming you are using font awesome): fa-coffee|Breakfast fa-cutlery|Ristorante fa-bed|Bed fa-wifi|Wifi fa-car|Car Park fa-wheelchair| Accessibility // OR... coffee|Breakfast cutlery|Ristorante bed|Bed wifi|Wifi car|Car Park wheelchair| Accessibility You would then be able to access the icons names using $item->value. Obviously this means it is only the developer who will be able to determine and set icons (which may not be a bad thing actually). Just a thought...
  7. I see. However, I still don't get where the icons are coming from. For instance, where have you stored your wifi icon? Where is the icon for Piscina? Etc..Unless it is a new feature I am not aware of, FieldtypeOptions doesn't store icons.
  8. Do you have Functions API enabled? If yes to #1, if you turn off Functions API, does it work? ProcessWire version? Multilingual? Server environment (just in case)....PHP, MySQL No. It should just work.
  9. I'm not sure if you mean a ProcessWire field icon that can be set in the Advanced Tab when editing a field? If yes: $f = $fields->get('name_of_field_with_the_icon'); $icon = $f ? $f->icon : '';
  10. Is there a reason you are overwriting the API variable $page?
  11. I see two potential suspects here; Windows IIS and MySQL 8. I haven't tested MM in Windows IIS. However, I think we have reached a point where it is best that I have access to a test server. This could either be a test site where you can reproduce the problem or the production site itself. I have never been able to reproduce the issue, albeit I have not tried in a Windows IIS environment. I don't have access to such an environment either, sorry. No other users have reported similar UNRESOLVED issues, so I have nothing else to go on regarding your particular case. That's not great! Please consider giving me temporary access to a site where I can debug the issue. Thanks.
  12. I think the backend uses pageName with the argument/option 'beautify'. You can either use this: https://processwire.com/api/ref/sanitizer/page-name-translate/ Or this, with beautify argument: https://processwire.com/api/ref/sanitizer/page-name/
  13. And actually, maybe it shouldn't be possible: https://processwire.com/docs/front-end/include/
  14. RESTful APIs...eg. https://modules.processwire.com/modules/app-api/
  15. Google Pay picks Flutter to drive its global product development
  16. Like this? https://github.com/ryancramerdesign/ProcessHannaCode#using-hanna-code-from-the-api
  17. Glad you resolved it ☺️. Please mark the thread as solved, thanks.
  18. This one: https://github.com/processwire/processwire/blob/dev/wire/modules/Process/ProcessPageList/ProcessPageList.js So, jQuery mainly and some vanilla JS.
  19. Do you mean how you can build the selector for the options field? Carrying on from above, do you mean how to build the selector? If yes, just append a SANITIZED value (from $input->tipologia) to query your options field as well. E.g. $selector .= "name_of_options_field={$sanitizedTipologiaSekectorValue}". Typed quickly in browser and untested.
  20. Announcing Flutter Windows Alpha ? https://medium.com/flutter/announcing-flutter-windows-alpha-33982cd0f433 Flokk – How we built a Desktop App Using Flutter Windows fun with Dart FFI Flutter Client App for Aartos, Desktop + Mobile
  21. Or a hook like this? (not tested much). in site/ready.php $wire->addHookAfter('ProcessPageAdd::getAllowedTemplates', function (HookEvent $event) { $allowedTemplatesArray = $event->return;// normal PHP Array $allowedTemplatesWireArray = new WireArray();// create new WireArray() for sorting convenience $allowedTemplatesWireArray->setArray($allowedTemplatesArray);// populate the WireArray with data // whatever sort you want -> id, name, or multiple props, etc // maybe even a $int = $template->getNumPages(); ? PERFORMANCE ISSUES? (would require looping through all templates) $allowedTemplatesWireArray->sort('-id'); // sorting by ID DESC $allowedTemplatesModifiedArray = $allowedTemplatesWireArray->getArray();// get PHP Array back from sorted/modified WireArray $event->return = $allowedTemplatesModifiedArray;// give it back for passing to ProcessPageAdd -> buildForm() }); You could also use PHP's sort functions to sort the $allowedTemplatesArray but it is simpler to user WireArray sort instead ?.
×
×
  • Create New...