Jump to content

flydev

Members
  • Posts

    1,355
  • Joined

  • Last visited

  • Days Won

    48

Everything posted by flydev

  1. Hi @webhoes Try the following corrected hook : // /* to figure out */ $this->addHookAfter('AdminThemeFramework::getUserNavArray', function(HookEvent $event) { // Get the object the event occurred on, if needed $AdminThemeFramework = $event->object; // An 'after' hook can retrieve and/or modify the return value $return = $event->return; /* Your code here, perhaps modifying the return value */ $navArray[] = array( 'url' => '/My studbooks/', 'title' => $this->_('My studbooks'), 'target' => '_top', 'icon' => 'eye', ); // merge the return value with your own nav array $return = array_merge($return, $navArray); // Populate back return value, if you have modified it $event->return = $return; });
  2. @kkalgidim read my post again ?
  3. Hi, Did you installed the following core module ? : LanguageSupportPageNames It allow you to define a specific page name for each language and editing them in the tab Page > Settings of a page. (I think you are missing this one). To answer your question : If you have URL Segment enabled on the template then you can do the following : $segments = $input->urlSegments(); echo end($segments); or $segments = explode('/', parse_url($page->url, PHP_URL_PATH)); echo end($segments);
  4. FYI , there is a really good language-pack for French : https://github.com/v-maillard/pw-lang-fr All work already done ?
  5. Nice website done @MarcoPLY . The trad in french still show some menu in English. Another issue with the trad is the core phrase from the InputfieldPassword.
  6. @Wanze please force the module directory update ??
  7. You can give a try to Duplicator (do not forget to use the "dev" branch).
  8. @thibaultvdb I think that by default on XAMPP your ProcessWire installation is in a subdir, and I bet that the module is giving you as api endpoint something like : /subdir/api instead of the /api endpoint. You should ask your friends to help you to setup your localhost environment to use a domain like http://mylocalwebsite.local To get started, you can follow the second answer here : https://stackoverflow.com/questions/16229126/using-domain-name-instead-of-localhost-in-with-https-in-xampp or follow this tutorial to use AcrylicDNS (the best solution IMO, do not be afraid, it's really easy to setup) : https://www.ottorask.com/blog/automated-apache-virtual-hosts-on-windows/ Good luck.
  9. Hi @Crawford Tait First of all, did you tried the official upgrade method explained here https://processwire.com/docs/start/install/upgrade/ - result ? About using the RestApi module, I think it "complicate" the whole thing, and this module is only available for ProcessWire => 3.0.98.
  10. You can use sort() on WireArray derived objects : $search_options = $templates->get("catalog_item")->fields->sort("label"); // or sort("-label")
  11. Hi Louis, 1- In the form, change the name of the input : <!-- from --> <input type="file" id="preview-name" name="preview-name"> <!-- to --> <input type="file" id="preview_name" name="preview_name"> 2- In your JS code, use FormData() and add the contentType prop to the $.ajax call (that's the key here) : $('#submit-preview').click(function(e) { e.preventDefault(); title = $("#preview").val(); image = $('input[name=preview_name]').prop('files')[0]; // modified form_data = new FormData(); // added form_data.append('preview_name', image); // added form_data.append('title', title); // added console.log(title); console.log(image); $.ajax({ type: 'POST', data: form_data, url: '/development/upload-preview/', contentType : false, // added processData : false, // added success: function(data) { console.log("Woo"); }, error: function(xhr, ajaxOptions, thrownError) { alert(xhr.responseText); } }); }); 3- The ajax template file look good. The main reason that WireUpload doesn't work here, is because it couldn't find the right field name (form input name) : $u = new WireUpload('preview_image');
  12. Just to let you know that the idea is brillant and your module come in handy. I am sure we will have some feedback and pull-requests in the next weeks. To give some more visibility to the module, you could show us how/why to use it in conjunction with the others SEO modules existing here. Thanks again mate ? ?
  13. I remember to had this same issue with PhpStorm. Open templates with Notepad, unwanted char (��) will appear or use SublimeText 3 with encoding UTF-8 without BOM.
  14. Look like you are using the default "sitemap" page/template rendered by the renderNav function. FYI, it's just a template which render a dummy navigation. If you want a sitemap.xml, you have to code it yourself, or use a module. To get started, check this thread : Modules : MarkupSitemap https://modules.processwire.com/modules/markup-sitemap/ SeoMaestro https://modules.processwire.com/modules/seo-maestro/
  15. I tested your setup in a VM but with a Linux distribution instead of a Windows and as a result , ProcessWire run smoothly on it, even the default search feature. I will install a Windows server today just to see if there is an extension which could mess the setup. Stay tuned..
  16. ProcessWire currently might not be compatible with this version of MySQL as the RegEx engine is not the same between MySQL 5.x and MySQL 8.x. Could you paste the full call-stack ?
  17. Looking at the error you got, you could fix it by enabling zlib.output_compression in your php.ini. ps: to be clear, you have a server issue.
  18. Thanks @Robin S I see, anyway I just tested to call this function, it works fine on ProcessPageEdit but when I switch to, for example, on a ProcessModule (a config module page) the breadcrumbs isn't rendered : <!-- MAIN CONTENT --> <main id='main' class='pw-container uk-container uk-container-expand uk-margin uk-margin-large-bottom'> <div class='pw-content' id='content'> <div class="uk-breadcrumbs"> <?php if ($layout != 'sidenav' && $layout != 'modal') echo $modules->get('AdminThemeUikit')->renderBreadcrumbs(); // echo $adminTheme->renderBreadcrumbs(); ?> </div> [...] Result on ProcessPageEdit : Result on ProcessModule (Breadcrumbs's module config page) :
  19. More info on this threads : Welcome ?
  20. I can't work on the backend without this module ? Just sent a pull request to be able to use this module inside a custom admin theme. I just added an option where we can set our custom hooks. https://github.com/Toutouwai/BreadcrumbDropdowns/pull/5
  21. Hi @cjx2240 I am pretty sure that your $user->get() call return an NullPage, and that is what confuse you. Try this : if($users->get("$newuser->userid")->id) { // user exist } else { // user DO NOT exist }
  22. I don't know if you call an ___executeXYZ() function in RockCRM to get back your answer, but in one of my app, I have to send the answer from my ProcessModule with : header('Content-Type: application/json'); return json_encode($data); to avoid the first HTML char of the <!DOCTYPE html> string being returned.
  23. @NorbertH you could give a try to a theme I made but still not released: https://github.com/flydev-fr/AdminThemeGitKit Still not finished but already cool. To make the theme more condensed, in the theme settings, you can use the following options : - Layout + Interface > Inputfield column width > Select option B (percentage-based) - Forms + Input > Select option Small - Primary CSS file should be set to : site/modules/AdminThemeGitKit/uikit/dist/css/uikit.git.min.css Feedbacks welcome ?
×
×
  • Create New...