-
Posts
7,473 -
Joined
-
Last visited
-
Days Won
144
Everything posted by kongondo
-
Try this: https://processwire.com/api/ref/paginated-array/get-pagination-string/
-
How to change the published date in the page dialog?
kongondo replied to RuiVP's topic in Getting Started
@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 :-). -
I understand Please do. You're welcome :-).
-
module Module ImageReference - Pick images from various sources
kongondo replied to gebeer's topic in Modules/Plugins
Seems like someone left in a Tracy debug call in there ?. -
Fetch latest posts from another PW site (same server)?
kongondo replied to Roych's topic in General Support
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. -
Excellent! Glad you got it sorted. ?
-
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...
-
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.
-
Fetch latest posts from another PW site (same server)?
kongondo replied to Roych's topic in General Support
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. -
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 : '';
-
Is there a reason you are overwriting the API variable $page?
-
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.
-
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/
-
And actually, maybe it shouldn't be possible: https://processwire.com/docs/front-end/include/
-
Fetch latest posts from another PW site (same server)?
kongondo replied to Roych's topic in General Support
RESTful APIs...eg. https://modules.processwire.com/modules/app-api/ -
Possibly due to this?
-
Google Pay picks Flutter to drive its global product development
- 35 replies
-
- 1
-
Like this? https://github.com/ryancramerdesign/ProcessHannaCode#using-hanna-code-from-the-api
-
[SOLVED] Add dynamic filtering content with dropdown in Skyscrapers
kongondo replied to gregory's topic in API & Templates
Glad you resolved it ☺️. Please mark the thread as solved, thanks. -
What plugin is used to create this draggable menu
kongondo replied to activestate's topic in Themes and Profiles
This one: https://github.com/processwire/processwire/blob/dev/wire/modules/Process/ProcessPageList/ProcessPageList.js So, jQuery mainly and some vanilla JS.- 1 reply
-
- 2
-
[SOLVED] Add dynamic filtering content with dropdown in Skyscrapers
kongondo replied to gregory's topic in API & Templates
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. -
Maybe end game for electron? ?
- 35 replies
-
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
- 35 replies
-
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 ?.