Jump to content

Sergio

Members
  • Content Count

    522
  • Joined

  • Last visited

  • Days Won

    11

Sergio last won the day on June 16

Sergio had the most liked content!

Community Reputation

738 Excellent

2 Followers

About Sergio

  • Rank
    Hero Member
  • Birthday 04/13/1979

Profile Information

  • Gender
    Male
  • Location
    Leiria, Portugal

Recent Profile Visitors

8,202 profile views
  1. Your code seems to be missing one line: $wire->addHookAfter("Pages::saveReady", function(HookEvent $event) { $page = $event->object; //this line if($page->template->name != 'mytemplate') return; $defaultLang = wire("languages")->get("default"); $page->title->setLanguageValue($defaultLang, "New Value"); });
  2. 25,000 per hour/day/week? It all depends. From what you described about the app, even 25k users a day should be fine to start with a VPS with 2GB of RAM. If its usage increase a lot you can move the database to another VPS on its own AND/OR increase the VPS CPU and RAM resources very quick. My advice is to keep things simple and not try to over-engineer the application performance from the start. But if you feel "adventurous" 🙂 or think that the project will have this many users right away on day one (which I doubt) you can start with a "serverless" approach where the infrastructure is scaled on-demand, using https://vapor.laravel.com/ and you don't have to worry. There's a course about this approach that is very interesting: https://serverlesslaravelcourse.com/
  3. Although doable, I'd only recommend a system like this to be implemented using ProcessWire if the rest of the project must (or already is) be highly coupled with PW and it doesn't make sense to decouple it for whatever reason. Otherwise I'd recommend you to implement it using another framework. PW shines in the content management part, and I love it, but it may present you with some limitations in its developer-experience department when you need to implement some business logic that relies heavily on integration of payment systems, user data input, generation of reports and especially tests. There's also a myriad of similar systems like this already implemented that you can use as a base, like this one https://github.com/LaravelDaily/Laravel-Test-Result-PDF (demo: https://www.youtube.com/watch?v=GmLFHGud7I8).
  4. Try to unpublish the page where you put the iframe using the API or directly on the database 'pages' table by changing its status to "2049".
  5. Strange problem. Can you try increase the maximum memory for PHP (memory_limit) by editing the file php.ini in your server directly or using a control panel? Look for a line like this: memory_limit = 512M
  6. Hi @Youbility, yes I did. It's working on production at https://www.brightline.org/ Here's a slightly different version of that one: https://gist.github.com/sjardim/d74fae71b5bfe6a44ab88efc9aaa5279 Hope that helps!
  7. Actually, ignore that! After closing Chrome and opening it again the font-weight 300 is fine! So it was a cache on its end. The real problem seems to be my local Rubik version like you suspected!
  8. Good call. I checked and I had Rubik installed so I disabled it but the problem remained, maybe I need to restart the computer to work, but I can't do it right now. But I also checked again the website and the only problem appears to be on 300 font-weight. 400 or more are fine ( I changed it to 400 on the Body as a test, screenshot attached).
  9. Nice project! Congratulations! Is there feedback from the client about Processwire? They knew it before this project? On thing that I noted is that on Chrome / Windows 10, the font rendering a bit off, making it hard to read (especially the lower "a" and s). Could you check?
  10. Hi @kongondo, sure, but he mentioned "logged-in users can publish posts" so I think he can capture the user timezone settings on the server side, and/or, give the user to overwrite this preference on admin. EDIT: sorry, I misread it. You are right, @kongondo! my bad!
  11. I would go with the great Carbon library and handle the timezone conversion in PHP. https://carbon.nesbot.com/docs/#api-timezone $tz = new CarbonTimeZone('Europe/Zurich'); // instance way $tz = CarbonTimeZone::create('Europe/Zurich'); // static way // Get the original name of the timezone (can be region name or offset string): echo $tz->getName(); // Europe/Zurich echo "\n"; // toRegionName returns the first matching region or false, if timezone was created with a region name, // it will simply return this initial value. echo $tz->toRegionName(); // Europe/Zurich echo "\n"; // toOffsetName will give the current offset string for this timezone: echo $tz->toOffsetName(); // +02:00 echo "\n"; // As with DST, this offset can change depending on the date, you may pass a date argument to specify it: $winter = Carbon::parse('2018-01-01'); echo $tz->toOffsetName($winter); // +01:00 echo "\n"; $summer = Carbon::parse('2018-07-01'); echo $tz->toOffsetName($summer); // +02:00 // With no parameters, a default timezone is created: echo new CarbonTimeZone(); // UTC echo "\n"; echo CarbonTimeZone::create(); // UTC
  12. You can filter by dates like so: $events = $page->children('limit=50, date<=today, sort=-date'); Also check this thread to see more details: date_start>=today date_start>=1365436783 date_start>=2013-04-08 date_start>=4/8/2013 date_start>=8.4.2013 date_start>="April 8, 2013"
  13. Here's my version: <?php // Cache all topics $template = $templates->get("topics"); $topics_children = $cache->get("all_topics", $template, function($pages) { return $pages->get("/topics/")->children(); }); //Topic1|Topic2 $search_topics = explode("|", $input->whitelist->topic); //Get Topics from cache foreach($topics_children as $topic) { $checked = (is_array($search_topics) && in_array($topic->title, $search_topics)) ? ' checked ' : ''; echo "<label for='{$topic->title}'><input type='checkbox' name='topic[]' $checked value='{$topic->title}' id='{$topic->title}' /> {$topic->title}</label></br>"; } //On my search template if($input->get('topic')) { $value = $sanitizer->selectorValue($input->get('topic')); $selector .= "topics=$value, "; $input->whitelist('topic', $value); } ?>
  14. I'm happy that you found the solution 🙂
  15. My bad, I misread it. Maybe this will help you:
×
×
  • Create New...