LostKobrakai

PW-Moderators
  • Content count

    4,440
  • Joined

  • Last visited

  • Days Won

    92

LostKobrakai last won the day on June 20

LostKobrakai had the most liked content!

Community Reputation

4,229 Excellent

1 Follower

About LostKobrakai

  • Rank
    Excited Member
  • Birthday 11/29/1991

Contact Methods

  • Website URL
    http://www.kobrakai.de

Profile Information

  • Gender
    Male
  • Location
    Augsburg, Germany

Recent Profile Visitors

12,821 profile views
  1. If it works with pulling the selector out it's a different issue. My problem were literally missing rows in the table, which would make both your examples fail.
  2. cache

    You disabled everything for the fileCompiler, but wireCache and the fileCompiler are two totally different things. The first one is a multiple purpose cache for data you handle in your code. The fileCompiler is there to dynamically add the ProcessWire namespace needed in php files since pw 3.0, a.k.a. it's literally changing your php files and is not a cache for data at all. You could do this: // in config.php $config->cacheTimeMultiplier = 1 if($config->debug) $config->cacheTimeMultiplier = 0 // elsewhere echo $cache->get("hello-world", 3600 * $config->cacheTimeMultiplier, function() { echo "<p>Hello World</p>"; });
  3. I still don't fully understand what your platform should offer in the end, but to be honest I'm even more curious what you find so appealing in processwire compared to what you're writing about using a blockchain. ProcessWire is a quite nice, but comparatively simple CMS, whereas a blockchain implementation is a highly complex thing for decentralized and trustless computation/storage. The latter is something where experts develop a non trivial amount of time to just get it running (maybe not for the blockchain per se, but also the implementation and business logic around it). You should not miss one critical factor in the blockchain equation, which is the computational cycles needed to calculate new blockchain hashes. That's the reason, why this stuff does work, because it's so (mathematically proven) hard to abuse/break. So I'd really suggest you to ask yourself, what benefits you'd get from using a blockchain, because building that will be an investment and it'll certainly limit your base of potential customers if you don't fully hide the blockchain technology from them (e.g. most likely run your own servers again).
  4. What's your usecase, which a blockchain would solve? I doubt it's anywhere near worth the time/complexity if you don't have a specific problem to be solved by this technology.
  5. And to expand on @Zeka a bit: $jsonTemplates = $templates->find("contentType=json"); $jsonPages = $pages->find("template=$jsonTemplates");
  6. I'm not really sure if it's worth the hassle to care for own servers' email reputation. Especially when running on a shared hoster or any cloud service your ip is shared with others – on cloud services some other customer might have had the ip before yourself – so the reputation is not only in your own hands. And even if that' not the case it might be easier to pay a service than to spend hours trying to get to the cause of the bounces.
  7. $page->data is a "remnant" of subclassing the WireData class. It's there to store any value assigned to a page: $p = $pages->get(1) $p->someRandomWhatever = 'Hallo'; echo $p->someRandomWhatever; // Hallo echo $p->data; // {'someRandomWhatever' => 'Hallo', …} Some fields do use this, but especially the native fields (parent, children, …) or others are implemented in different ways. It's at least not in any way specific to fields.
  8. Maybe use url segments for the whole url and just render the pages located elsewhere based in the infos supplied by the url.
  9. If you want to stay compatible with the 2.x branch I'd simply develop on a 2.8 or even 2.7 installation.
  10. There are various 3rd party modules around, which do allow for that kind of navigation. Please consult the modules directory and/or the modules subforum.
  11. $pages->find() in general does take a selector, but as a convenience it does also check if the supplied selector is a single ID as integer (and seemingly as string as well).
  12. Maybe here's a bit more information about it: https://processwire.com/docs/security/file-permissions/#securing-your-site-config.php-file Also the installer option for file/folder permissions wasn't present in earlier versions of processwire if I recall correctly(https://github.com/ryancramerdesign/ProcessWire/commit/f7c308566bebf0d39e8ec688d1e7795bf0c17f50) and it seems like it was only added to supply the values into the config.php and not to do any permission changes on installation. I think that's the confusion here: That modules/assets/templates weren't updated with the chmod setting supplied in the installer. Making the config.php readonly by default is not something i would advice, because it can firstly brick your installation and secondly it will prevent any runtime changes to this file and there are modules out there which do write to that file. So it would probably be nice to have the option, that the installer does also clean up any incorrect file/folder permission when installing – possibly even by default, because it'll show incorrect settings much earlier and not if the first file uploads do fail or something like that. Making the config.php readonly should still be considered a manual or at least a opt-in task.
  13. ProcessWire 3 changed to using namespaces. In places where processwire can control loaded files (like wireRenderFile() or template files) it does have a file compiler to add the namespace on demand into the file. This is not possible with include() because there's no place to change the loaded file on demand, because it's all handled by php. So if your really need to use include() for the reason of sharing the variable scope you need to make sure to add the namespace manually in the included files.
  14. foreach($posts->getValues() as $index => $post) { $is_large = $index % 6 == 1 || $index % 6 == 2 if($is_large) … else … }
  15. The file compiler, which adds the ProcessWire namespace in 3.0 does not touch (and even can't touch) files, which are included via include()/require(), but only things like modules / templates and files included by processwire functions like wireIncludeFile / wireRenderFile.