Jump to content

Leftfield

Members
  • Posts

    66
  • Joined

  • Last visited

Everything posted by Leftfield

  1. @netcarverYes, it is for me (Thanks for helping me). I tried with php.ini, but nothing. Set 10800, waited a bit and was logged out. :( I see my cookie wires_challenge says: 2024-06-01T15:04:30.853Z but if was same as before asking question session.cookie_lifetime = 10800
  2. Is it because I ate two cakes and ice cream yesterday that the cookies don't love me anymore? Or maybe it's something else entirely, like needing to clear the cache (I did, deleted cookies too)? This keeps logging me out after about 30 minutes, which is super annoying! Can you help? $config->sessionExpireSeconds = 432000;
  3. This is my first module. It is primitive, like my neighbor who loves to fire up his new Makita breaker hammer after 21:30h. Please, feel free to do whatever you want. I don't promise I will add better functionality but maybe... If you do, please ping and send me back. Thanks! It loads on every page in the backend. It calculate the text width in two fields, in my case the fields are named "seo" and "desc". First one for meta title and the second one for meta description. If you have other names for these two fields, you have to edit JavaScript file and manually change part of IDs. Hope it will help! If there will be any updates, I will post it here. Happy ProcessWiring! PS: this measures are for desktop and Google' SERP. SeoTextWidth.zip
  4. Resolved. public function init() { $this->addHookAfter('ProcessPageEdit::buildForm', $this, 'addResources'); } public function addResources(HookEvent $event) { $page = $event->object; $this->config->styles->add($this->config->urls->SeoTextWidth . "SeoTextWidth.css"); $this->config->scripts->add($this->config->urls->SeoTextWidth . "SeoTextWidth.js"); }
  5. I created this as a hook and it's working great, so I decided to turn it into a module to share. We have option in the backend to calculate number of characters but this script is calculating the width of the text as it should be displayed in Google's SERP for the meta title and meta description. However, it's not working for some reason (that I can't identify). This (primitive) module should load on the (any) page edit in the backend. As you can see, it's supposed to load two files. I'm not sure why it's not functioning. // Module: SeoTextWidth.module class SeoTextWidth extends WireData implements Module { public static function getModuleInfo() { return [ 'title' => 'SEO field Text Width module', 'summary' => 'This module is calculating width of text in the fields named seo and desc.', 'version' => 1 ]; } public function __construct() { parent::__construct(); } public function init() { $this->addHookAfter('ProcessPageEdit::render', [$this, 'addResources']); } public function addResources(HookArgs $args) { $output = $args->getOutput(); $page = $args->wire('page'); // Check if we're on the page edit view for a valid page if ($page && $page->editable()) { $jsUrl = $this->config->urls->scripts . 'SeoTextWidth.js'; $output->append("<script src='$jsUrl'></script>"); $cssUrl = $this->config->urls->styles . 'SeoTextWidth.css'; $output->prepend("<link rel='stylesheet' href='$cssUrl' />"); } return $output; } }
  6. Thank You! Ah, the Privacy Policy! It is a fascinating bedtime story, the legalese equivalent of watching paint dry. But not Terms and Conditions @OLSAbecause you would ping me for a beer next to the sea.
  7. It's long overdue for a refresh of a personal website. At least it was built on the fantastic ProcessWire! Pats website awkwardly. I gave this poor thing a makeover before it got mistaken for a museum exhibit. I hope for positive comments, but I would rather listen to what the critics say to improve. It is not yet tweaked to the details (I am on the heroin run for the proper images for service pages), but it is something I can brag about. Here is the link: Digital Marketing Montenegro
  8. @Denis SchultzWhile we can't control the exact moment a user accepts cookies, it has a minimal impact on meaningful paint. If a user accepts quickly, the script might load from another page since it's typically placed in the <head> and you know this so IDK why we are delving. @wbmnfktr While IDK the exact percentage, around 35% of all websites are built on WordPress and tend to be slow due to overloaded scripts and CSS files. Google previously (long time ago) de-emphasized speed as a direct ranking factor because of that. However, considering the potential impact of improved user experience with faster loading times, it's possible Google might develop ways to measure and potentially re-evaluate speed (Speculative Loading as a solution) in the future.
  9. Hi @Denis Schultz, thanks for your input. I'm from Europe too and very familiar with GDPR law. Side story: On the landing page, users first need to accept cookies. Having them accept a GDPR-compliant agreement there eliminates the need to accept it twice. Main story: Loading certain fields before the user clicks can improve page load speed, regardless of caching. However, module should load the parts of cached version in this case. This is a whole new philosophy.
  10. Hey @MarkE, Here is my solution and proposition what to look for:
  11. Last week, WordPress introduced a performance plugin promising "Near-Instant Load Times." While I won't comment on my personal experience with WordPress (let's just say it hasn't been ideal), or speculate on potential security implications (with which WP is super proud) of this plugin and how it will kill server resources on share hosting accounts, the focus on improved performance is certainly commendable. After all, ProcessWire was built with speed and efficiency in mind. This brings me to an interesting proposition: the development of a Speculative Loading API module for ProcessWire. My proposition is that this module would allow users to selectively load only the fields they require, further optimizing page load times. Example, problem and solution: The WordPress plugin reportedly loads the entire page, including Google Analytics code. This triggers a visit registration in Google Analytics, even if the user didn't see the page. Ideally, for better performance and to avoid this kind of problem, only essential elements like body field (with its images) and a few essential (by someone needs) choosable fields would be loaded initially.
  12. I just found out about your Recipes website today, and I love it!

  13. I'm an SEO guy (and all the alarms went off after I viewed the dates in sitemap), not a coder. I can understand PHP code reasonably well and make modifications, but I wouldn't consider myself a skilled programmer (it's been a decade since I've coded regularly). These custom modules were all created by @OLSA and then modified by me to suit my needs. Thanks to his help, it was much easier to fix the problem.
  14. Found the problem, and it was me, not ProcessWire, but... Here's why this issue might occur for anyone who encounters it: I have a module with a hook that triggers on page save (thanks to @wbmnfktr's for pointing it out). This module's function is to update its fields in the database whenever a post is liked on the page. Simple: someone likes the page, so it counts as one more like. The problem arises when both ProcessWire cache and silent page save are enabled. In this scenario, the changes aren't reflected on the front page. To ensure updates of the field are reflected on the frontpage, silent mode needs to be disabled. With silent mode off, the modified field updates whenever a post is saved from the hook. Here's the code snippet which is solving issue with modified BUT in my case making the problem when the cache is on: @$this->page->save($data['field'], array('quiet' => true)); @wbmnfktrI don't own you a beer, I own you at least a dinner man!
  15. I'm wondering why this only happened on one template, although all the modules (fields) are loaded on all the templates. I don't know the time frame of the issue yet, so I'll need to check when this happens and then begin shutting down the modules.
  16. OK. More than few I see now :D All In One Minify, Email Obfuscation, Database Backups, Send Mass Email (inactive), Video embed for YouTube, Convert JPG/PNG images to WEBP, and 3 custom (super uber decently coded I guarantee) ones for backend. All modules load on every single template except for Email Obfuscation, which loads only on the contact page.
  17. No, I don't have that module (I am using just few modules). Yes, I only have one hook in the ready.php file that calculates reading time and updates one field on page save. Thanks for helping me out @wbmnfktr
  18. I am encountering an unexpected issue where the "Last modified by" field shows "guest," and this modification triggers a sitemap update, potentially signaling changes to search engines like Google. This is concerning as there have been no recent content updates. To clarify: I am the sole administrator with access to the website, and no unauthorized modifications have occurred. No new installations have been made on the system. No editing happened. The content remains unchanged. This issue only occurs on blog pages (using a specific template) where I manually modified the code for the Twitter share button. Is that it!?!? If that's it, then it's a problem. ProcessWire 3.0.184 (I am updating right after this post to the latest stable version). I would appreciate any insights you may have on the cause of this unexpected modification. PS: I apologize for the duplicate post. I felt it necessary to create a new one for better explanation. Thank you for your understanding!
  19. @kongondoI was thinking that exporting to JSON would be faster but caching menu is pretty good answer.
  20. Hi, I have init.php file where is called a lot of pages for links in the navigation. Navigation has dropdowns and the links are not placed the same as in the backend. $variableone = $pages->get(1100); $variablegtwo = $pages->get(1101); $variablethree = $pages->get(1102); $variablefour = $pages->get(1103); ... Is there a better way to speed up this queries?
  21. @wbmnfktryou are right. I totally forgot autosmush module. When turned off and webp enabled via hook it flies. Thanks mate!
  22. ProcessWire 3.0.165. PHP 7.2, 7.3 and 7.4 Tried webp like this but it slows down the pages for about 10 seconds and more. Tried cache, same result. <?= $page->images->eq(0)->size(500,300)->webp->url;
  23. Hi @all, hi @ukyo. Thanks for the module! I made custom .php file, loading nicely but I have lost fonts-awesome and backend is looking like this:
  24. @Jan Romero no. It made row for every new data. Tested now, it is OK.
×
×
  • Create New...