Jump to content

kongondo

PW-Moderators
  • Posts

    7,476
  • Joined

  • Last visited

  • Days Won

    144

Everything posted by kongondo

  1. 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
  2. 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 ?.
  3. Yes, it's a known issue that I've never gotten round to fixing (although several fixes exist, a number of posts in this thread). I'll get to it at some point. Sorry for the pain.
  4. Hi @Eduard, Thanks for an excellent first post and welcome to the forums ?.
  5. I don't know what this means :-). However, you can always get the raw date and format it as you wish. $dateUnformatted = $page->getUnformatted('date');// e.g. 1576236300
  6. Moderator Note @franciccio-ITALIANO. I moved your topic to Dev Talk.
  7. Dynamic Selects version 007 (released (23/09/2020)) Glad to announce that the latest release of Dynamic Selects is now available for Download/Purchase. Changelog Multilingual column labels (see screenshots/demos below). Repeaters and Repeater Matrix support (not tested Repeater Matrix though!). Selected Page/File/Image URLs (only supported in FieldtypeDynamicSelects for now). Thanks to @hollyvalero for request and testing ?. Various bug fixes. Screenshots/Demos Multilingual Column Labels Selected Image (in dynamic selects column) URL Selected Pages (in dynamic selects column) URL Thanks
  8. https://stackoverflow.com/questions/61224060/sqlstatehy000-general-error-1-cant-create-write-to-file-var-www-html-new
  9. I would love to see a screenshot please as I am not sure I know what you folks are talking about ?. Thanks!.
  10. This comes from WireUpload.php, here as result of PHP error described here. You could perhaps use try catch blocks to customise notices.
  11. Yes, it has always been like this since I can remember. I don't think this is a ProcessWire issue, but a CKEditor one. So unless they fix it on their side, a new version will not help unfortunately.
  12. Nope. It's never been possible. You must be confusing this with something else. Nothing to do with ProcessWire. Many (most?/all?) languages have variable scope. $config is outside the variable scope of myfunction(). myfunction() doesn't know what config is. You have to tell it. Having a namespace declaration has nothing to do with it. namespace ProcessWire; // alternative 1: use the global wire() function - @see: https://processwire.com/api/ref/functions/wire/ function myfunction() { echo wire('config')->paths->assets; // no error } // alternative 2: pass in $config function myfunction2($config) { echo $config->paths->assets; // no error } alternative 3: functions API - e.g. https://processwire.com/api/ref/functions/config/ @see also: https://processwire.com/api/ref/functions/
  13. Unless you have changed your _init.php or something in this file has changed since I last checked, this is redundant/verbose since the _init.php that ships with ProcessWire already includes _func.php // Include shared functions include_once("./_func.php"); Why not put them in a .css file? Hard to read this crystal ball without some sort of clue please? What errors are you getting? Are you using this skyscrapers-profile?
  14. Glad you got it sorted! Are you able to elaborate more so we can all learn from it? Thanks.
  15. Just include the func.php file where you need it, I suppose in search.php, at the top. require_once('path/to/func.php')
  16. Did you confirm file permissions are OK after the restoration? The restoration could have run as a user in a different user group? Is ProcessWire able to read and write where it needs to? Check the server errors logs for more details about what 'this resource is'. What file/folder is it pointing to?
  17. @AndZyk are we going to see this in the showcase? :-)
  18. No worries...but no need to apologise though ?. It's just a 'community' recommendation not a rule.
  19. @Roych The menu you want cannot presently be achieved by using the render() method. For instance, looking at your <li> tags, going down the levels/depth, they have different classes. This is currently not possible in MB but I will add it to my todo list, e.g. a 'levels class'. For custom menus such as yours, it is better to use the getMenuItems() method together with a custom recursive function. Below is an example recursive function that will output the example menu you provided. You can adapt it to your needs if you find it useful. It might need a bit of polishing.
  20. @webhoes it is recommended to use the spoiler tags to wrap very long text. I've done this for your post above. Thanks.
  21. @Roych. OK. Thanks. I'll have a look.
  22. I thought this was the output from echo $menu->render(1022, $options);, hence the confusion. In that case then, please post the 'messy/broken' output that results from echo $menu->render()....
  23. Probably. Please copy paste here the original menu HTML that you are trying to replicate.
×
×
  • Create New...