Jump to content

PWaddict

Members
  • Posts

    991
  • Joined

  • Last visited

  • Days Won

    3

Everything posted by PWaddict

  1. Is it possible to do this on site/ready.php without creating a module?
  2. Here is the css & js structure with the AdminThemeDefault: and here is with the AdminThemeUikit: So maybe it needs an extra hook that is specific to AdminThemeUikit in order for the files to be injected at the very end
  3. My custom js for AdminThemeUikit is still loading before the original files. This is happening only for js. The custom css loads properly.
  4. I'm trying to inject a custom js for AdminThemeUikit but it loads before the original AdminThemeUikit js files. How to make it load after the original files?
  5. How to hide the dropdown menu of "Pages" on AdminThemeUikit?
  6. I think @adrian's reply on a similar topic will help what you want to achieve.
  7. Chrome has been officially updated to 62.0.3202.62 and now the problem is gone
  8. I just found this one http://www.malevole.com/mv/misc/text/
  9. @maxf5 Did you installed the Page Path History core module?
  10. I'm already having the latest graphics driver. I don't think that's possible to roll back to an older version of Chrome but I've just installed the latest beta version of Chrome 62.0.3202.45 and the issue is gone. Btw the images are blurry on the beta so I will uninstall it and wait for an update on the stable version. At least now I know that they fixed it. I will post again on the next stable version.
  11. I've already disable all the extensions and the issue is still there. I tried both and the issue is still there.
  12. I've already updated to the latest nvidia drivers 385.69. I always have the hardware acceleration disabled. I forced vsync on Chrome but nothing is fixing the issue.
  13. Install the Admin Custom Files module. On site/templates/AdminCustomFiles folder create a css file named ProcessPageEdit.css and add the following code: .InputfieldImageButtonCrop { display: none !important; } Then on the Admin Custom Files module settings at the "Activate for process" section select ProcessPageEdit, (Page Edit).
  14. While I was developing a website in the previous week I notice a strange behavior on Chrome browser. When hovering on image links they were moving down 1px and sometimes getting vertical screen tearing. I couldn't find why this was happening. I googled about this issue and didn't find something similar. Then I saw the exact same issue on other sites too (not mine). It doesn't always happen, you have to scroll up/down first and try to hover on links or img links or even click on those links. I tried other browsers like Firefox, IE11 even the Steam web browser and everything is working fine there. In the previous week Chrome updated to 61.0.3163.100. Is any of you having this issue? Here is screenshot while I was hovering the navigation menu on the Steam site and the vertical screen tearing happened.
  15. @renobird Are you trying this on localhost or server? You should try both with the same installation.
  16. To always display the map at the center even if the browser resized or the full screen button pressed just use the below function: google.maps.event.addDomListener(window, 'resize', function() { var center = map.getCenter() google.maps.event.trigger(map, "resize") map.setCenter(center) });
  17. Here is my best solution so far. Now, when I click on the "a:not(.external)" links the pages are always load with "scrollTop(0)" and when I use the browser's back/forward buttons "popstate" I always get the saved scroll position. There is only 1 tiny problem with the "popstate". Once I press the browser's back/forward buttons I get instantly the saved scroll position on the current page and then the page gets replaced with the correct one. How can I make it to get the scroll position ONLY when the page gets replaced and not before? $(function() { $(document).on('click', 'a:not(.external)', function(e) { var replacePage = function(url) { $.ajax({ url: url, type: 'get', dataType: 'html', success: function(data) { $(window).scrollTop(0); var dom = $(data); var title = dom.filter('title').text(); var html = dom.filter('.ajax-container').html(); $('title').text(title); $('.ajax-container').html(html); } }); }; history.pushState(null, null, this.href); replacePage(this.href); e.preventDefault(); }); $(window).on('popstate', function() { var replacePagePopstate = function(url) { $.ajax({ url: url, type: 'get', dataType: 'html', success: function(data) { var dom = $(data); var title = dom.filter('title').text(); var html = dom.filter('.ajax-container').html(); $('title').text(title); $('.ajax-container').html(html); } }); }; replacePagePopstate(location.pathname); }); });
  18. @abdus It doesn't work and I don't know how to modify it but thanks anyway!
  19. bump
  20. There is only a small "downside" if the website is already online. All links from the default language (except homepage) will change so the Page Path History module MUST be installed to avoid 404 errors from previously shared pages, google search etc. Make sure to update your README.md with all these important info.
  21. @Mike Rockett nice "trick"! I don't remember seeing that option on LanguageSupportPageNames. I will definitely gonna use that. I'm currently using the language_iso_code field not only on my sitemap but also on site's navigation (hreflang) and the flag icons but I will delete it
  22. I'm currently using the Window Resizer Chrome extension.
  23. @Mike Rockett There are 3 problems with the module: 1. The iso for the default language as @maxf5 mentioned. 2. Some pages are completely ignored 3. Wrong sitemap markup. Each link must have it's alternate links not just the default one. I'm currently using the below method for a proper multi-language sitemap. 1st step Create a php file "sitemap-xml-multilanguage.php" with the below code and add it on /site/templates/ folder. <?php namespace ProcessWire; if (!wire('modules')->isInstalled('LanguageSupportPageNames')) throw new WireException('Missing module: LanguageSupportPageNames'); // Exclude pages here function selectors() { $selectors = array( '', // E.g. template!=variations ); return implode(',',$selectors); } function renderSitemapPage(Page $page) { $out = ''; foreach (wire('languages') as $lg) { if (!$lg->isDefault() && !$page->{"status$lg->id"}) continue; $out .= "\n<url>" . "\n\t<loc>" . $page->localHttpUrl($lg) . "</loc>" . renderSitemapAlternateLangs($page) . "\n\t<lastmod>" . date("Y-m-d", $page->modified) . "</lastmod>" . "\n</url>"; } return $out; } function renderSitemapChildren(Page $page) { $out = ''; $newParents = new PageArray(); $children = $page->children(selectors()); foreach($children as $child) { $out .= renderSitemapPage($child); if($child->numChildren) $newParents->add($child); else wire('pages')->uncache($child); } foreach($newParents as $newParent) { $out .= renderSitemapChildren($newParent); wire('pages')->uncache($newParent); } return $out; } function renderSitemapAlternateLangs(Page $page) { $out = ''; foreach(wire('languages') as $lg) { if (!$lg->isDefault() && !$page->{"status$lg->id"}) continue; $iso = $lg->language_iso_code; // Custom text field for ISO under system's language template $out .= "\n\t<xhtml:link rel=\"alternate\" hreflang=\"$iso\" href=\"".$page->localHttpUrl($lg)."\"/>"; } return $out; } function renderSitemapXML(array $paths = array()) { $out = '<?xml version="1.0" encoding="UTF-8"?><urlset xmlns:xsi="https://www.w3.org/2001/XMLSchema-instance" xmlns="https://www.sitemaps.org/schemas/sitemap/0.9" xmlns:xhtml="https://www.w3.org/1999/xhtml" xsi:schemaLocation="https://www.sitemaps.org/schemas/sitemap/0.9 https://www.sitemaps.org/schemas/sitemap/0.9/siteindex.xsd">'; array_unshift($paths, '/'); foreach($paths as $path) { $page = wire('pages')->get($path); if(!$page->id) continue; $out .= renderSitemapPage($page); if($page->numChildren) $out .= renderSitemapChildren($page); } $out .= "\n</urlset>"; return $out; } header("Content-Type: text/xml"); echo renderSitemapXML(); Note: The above code if I remember correctly is based on @ryan and @kixe code. 2nd step Add the new template "sitemap-xml-multilanguage" in PW and under URLs tab on "Should page URLs end with a slash?" select "No". 3rd step Create a new page under "Home" with the title "sitemap.xml" by using the "sitemap-xml-multilanguage" template. Final step Create a text field with the name "language_iso_code" and add it under system's language template under "Setup > Templates > Show system templates? > Yes. Then on each language under "Setup > Languages" you will have to add the iso name. This is useful for the default language. Here are the results I'm getting on http://localhost/mysite/sitemap.xml with my method: <urlset xmlns:xsi="https://www.w3.org/2001/XMLSchema-instance" xmlns="https://www.sitemaps.org/schemas/sitemap/0.9" xmlns:xhtml="https://www.w3.org/1999/xhtml" xsi:schemaLocation="https://www.sitemaps.org/schemas/sitemap/0.9 https://www.sitemaps.org/schemas/sitemap/0.9/siteindex.xsd"> <url> <loc>http://localhost/mysite/</loc> <xhtml:link rel="alternate" hreflang="el" href="http://localhost/mysite/"/> <xhtml:link rel="alternate" hreflang="en" href="http://localhost/mysite/en/"/> <lastmod>2017-09-02</lastmod> </url> <url> <loc>http://localhost/mysite/en/</loc> <xhtml:link rel="alternate" hreflang="el" href="http://localhost/mysite/"/> <xhtml:link rel="alternate" hreflang="en" href="http://localhost/mysite/en/"/> <lastmod>2017-09-02</lastmod> </url> <url> <loc>http://localhost/mysite/nea/</loc> <xhtml:link rel="alternate" hreflang="el" href="http://localhost/mysite/nea/"/> <xhtml:link rel="alternate" hreflang="en" href="http://localhost/mysite/en/news/"/> <lastmod>2017-08-27</lastmod> </url> <url> <loc>http://localhost/mysite/en/news/</loc> <xhtml:link rel="alternate" hreflang="el" href="http://localhost/mysite/nea/"/> <xhtml:link rel="alternate" hreflang="en" href="http://localhost/mysite/en/news/"/> <lastmod>2017-08-27</lastmod> </url> <url> <loc>http://localhost/mysite/parastaseis/</loc> <xhtml:link rel="alternate" hreflang="el" href="http://localhost/mysite/parastaseis/"/> <xhtml:link rel="alternate" hreflang="en" href="http://localhost/mysite/en/shows/"/> <lastmod>2017-08-07</lastmod> </url> <url> <loc>http://localhost/mysite/en/shows/</loc> <xhtml:link rel="alternate" hreflang="el" href="http://localhost/mysite/parastaseis/"/> <xhtml:link rel="alternate" hreflang="en" href="http://localhost/mysite/en/shows/"/> <lastmod>2017-08-07</lastmod> </url> <url> <loc>http://localhost/mysite/omada/</loc> <xhtml:link rel="alternate" hreflang="el" href="http://localhost/mysite/omada/"/> <xhtml:link rel="alternate" hreflang="en" href="http://localhost/mysite/en/meet-the-team/"/> <lastmod>2017-08-25</lastmod> </url> <url> <loc>http://localhost/mysite/en/meet-the-team/</loc> <xhtml:link rel="alternate" hreflang="el" href="http://localhost/mysite/omada/"/> <xhtml:link rel="alternate" hreflang="en" href="http://localhost/mysite/en/meet-the-team/"/> <lastmod>2017-08-25</lastmod> </url> <url> <loc>http://localhost/mysite/epikoinwnia/</loc> <xhtml:link rel="alternate" hreflang="el" href="http://localhost/mysite/epikoinwnia/"/> <xhtml:link rel="alternate" hreflang="en" href="http://localhost/mysite/en/contact/"/> <lastmod>2017-09-02</lastmod> </url> <url> <loc>http://localhost/mysite/en/contact/</loc> <xhtml:link rel="alternate" hreflang="el" href="http://localhost/mysite/epikoinwnia/"/> <xhtml:link rel="alternate" hreflang="en" href="http://localhost/mysite/en/contact/"/> <lastmod>2017-09-02</lastmod> </url> <url> <loc>http://localhost/mysite/nea/test-4/</loc> <xhtml:link rel="alternate" hreflang="el" href="http://localhost/mysite/nea/test-4/"/> <xhtml:link rel="alternate" hreflang="en" href="http://localhost/mysite/en/news/test-4/"/> <lastmod>2017-08-14</lastmod> </url> <url> <loc>http://localhost/mysite/en/news/test-4/</loc> <xhtml:link rel="alternate" hreflang="el" href="http://localhost/mysite/nea/test-4/"/> <xhtml:link rel="alternate" hreflang="en" href="http://localhost/mysite/en/news/test-4/"/> <lastmod>2017-08-14</lastmod> </url> <url> <loc>http://localhost/mysite/nea/test-3/</loc> <xhtml:link rel="alternate" hreflang="el" href="http://localhost/mysite/nea/test-3/"/> <xhtml:link rel="alternate" hreflang="en" href="http://localhost/mysite/en/news/test-3/"/> <lastmod>2017-08-11</lastmod> </url> <url> <loc>http://localhost/mysite/en/news/test-3/</loc> <xhtml:link rel="alternate" hreflang="el" href="http://localhost/mysite/nea/test-3/"/> <xhtml:link rel="alternate" hreflang="en" href="http://localhost/mysite/en/news/test-3/"/> <lastmod>2017-08-11</lastmod> </url> <url> <loc>http://localhost/mysite/nea/test-2/</loc> <xhtml:link rel="alternate" hreflang="el" href="http://localhost/mysite/nea/test-2/"/> <xhtml:link rel="alternate" hreflang="en" href="http://localhost/mysite/en/news/test-2/"/> <lastmod>2017-08-11</lastmod> </url> <url> <loc>http://localhost/mysite/en/news/test-2/</loc> <xhtml:link rel="alternate" hreflang="el" href="http://localhost/mysite/nea/test-2/"/> <xhtml:link rel="alternate" hreflang="en" href="http://localhost/mysite/en/news/test-2/"/> <lastmod>2017-08-11</lastmod> </url> <url> <loc>http://localhost/mysite/nea/test-1/</loc> <xhtml:link rel="alternate" hreflang="el" href="http://localhost/mysite/nea/test-1/"/> <xhtml:link rel="alternate" hreflang="en" href="http://localhost/mysite/en/news/test-1/"/> <lastmod>2017-08-11</lastmod> </url> <url> <loc>http://localhost/mysite/en/news/test-1/</loc> <xhtml:link rel="alternate" hreflang="el" href="http://localhost/mysite/nea/test-1/"/> <xhtml:link rel="alternate" hreflang="en" href="http://localhost/mysite/en/news/test-1/"/> <lastmod>2017-08-11</lastmod> </url> <url> <loc> http://localhost/mysite/parastaseis/test/ </loc> <xhtml:link rel="alternate" hreflang="el" href="http://localhost/mysite/parastaseis/test/"/> <xhtml:link rel="alternate" hreflang="en" href="http://localhost/mysite/en/shows/test/"/> <lastmod>2017-09-04</lastmod> </url> <url> <loc> http://localhost/mysite/en/shows/test/ </loc> <xhtml:link rel="alternate" hreflang="el" href="http://localhost/mysite/parastaseis/test/"/> <xhtml:link rel="alternate" hreflang="en" href="http://localhost/mysite/en/shows/test/"/> <lastmod>2017-09-04</lastmod> </url> </urlset> and here are the results from your module: <urlset xmlns:xsi="https://www.w3.org/2001/XMLSchema-instance" xmlns="https://www.sitemaps.org/schemas/sitemap/0.9" xmlns:xhtml="https://www.w3.org/1999/xhtml" xsi:schemaLocation="https://www.sitemaps.org/schemas/sitemap/0.9 https://www.sitemaps.org/schemas/sitemap/0.9/siteindex.xsd"> <url> <loc>http://localhost/mysite/</loc> <lastmod>2017-09-02T05:37:50+03:00</lastmod> <xhtml:link rel="alternate" hreflang="home" href="http://localhost/mysite/"/> <xhtml:link rel="alternate" hreflang="en" href="http://localhost/mysite/en/"/> </url> <url> <loc>http://localhost/mysite/parastaseis/</loc> <lastmod>2017-08-07T09:51:08+03:00</lastmod> <xhtml:link rel="alternate" hreflang="home" href="http://localhost/mysite/parastaseis/"/> <xhtml:link rel="alternate" hreflang="en" href="http://localhost/mysite/en/shows/"/> </url> <url> <loc> http://localhost/mysite/parastaseis/test/ </loc> <lastmod>2017-09-04T11:06:36+03:00</lastmod> <xhtml:link rel="alternate" hreflang="home" href="http://localhost/mysite/parastaseis/test/"/> <xhtml:link rel="alternate" hreflang="en" href="http://localhost/mysite/en/shows/test/"/> </url> <url> <loc>http://localhost/mysite/omada/</loc> <lastmod>2017-08-25T20:27:09+03:00</lastmod> <xhtml:link rel="alternate" hreflang="home" href="http://localhost/mysite/omada/"/> <xhtml:link rel="alternate" hreflang="en" href="http://localhost/mysite/en/meet-the-team/"/> </url> <url> <loc>http://localhost/mysite/epikoinwnia/</loc> <lastmod>2017-09-02T04:10:51+03:00</lastmod> <xhtml:link rel="alternate" hreflang="home" href="http://localhost/mysite/epikoinwnia/"/> <xhtml:link rel="alternate" hreflang="en" href="http://localhost/mysite/en/contact/"/> </url> </urlset> I hope it can help you fix your module.
  24. @horst @tpr After closing the modal the hover tooltip appears and it feels like a glitch cause it also half-cover the button preview. I fixed it by replacing the 34 line on InputfieldCroppableImage3.js with this: items: 'a:hover' Thank you very much guys for your work
  25. Works great. One small fix from me. After saving the page or revisiting it I'm seeing a previous cached icon-size thumb. This happening even on localhost. So, I fixed it by replacing the 155 line on InputfieldCroppableImage3.module with this: $out .= $warning ? '' : " <img src='{$pagefile->getCrop($suffix)->height(48)->url}?nc={$pagefile->mtime}' alt='' />"; // added a small indicator thumb to each crop-button
×
×
  • Create New...