Jump to content

LostKobrakai

PW-Moderators
  • Posts

    4,956
  • Joined

  • Last visited

  • Days Won

    100

Everything posted by LostKobrakai

  1. There are only two options from the network perspective. Either you're giving the customer the real location in some way or your routing the whole thing through another server, which checks for access rights, but then the file has to travel though this server each time.
  2. You'll get a integrity constraint violation everytime you try to save stuff to the database with duplicated keys, e.g. duplicated page id's or other things which should only exist in a single row in the db. It's about the integrity of the database tables and uniqueness of keys, not about security. But your error still comes from a attempt to save something like this, so you should still have a look, what's causing the error.
  3. The guest user is automatically assinged to every user of your page, who isn't logged in. So someone / something (bot, seo crawler) visited your 404 page and triggered the following exeption, which just says, there was somehow a duplicated entry in what seems like the notifications field. Edit: I don't know for how long, but some time ago processwire started to send emails to the admins if a site throws errors.
  4. Performancewise Chromium just beats Firefox. And it has a kiosk mode, too. From the cli "chromium --kiosk".
  5. This can be done since this update: http://processwire.com/blog/posts/processwire-core-updates-2.5.16/#set-page-references-from-title-string So you need to run at least version 2.5.16
  6. I you're searching for a more flexible way to include snippets / not always whole sites, maybe this is a more appropriate function: // returns the output of snippets/contactform.php // the second argument is optional and will be passed to // the called file as multiple variables with the name of the key // also all api varables are available by default wireRenderFile("snippets/contactform", array("stuff" => $something ));
  7. This should do the job. $shop = $pages->get('/shops/mr-big'); $temp = $config->appendTemplateFile; $config->appendTemplateFile = ''; $mainContent = $shop->render('partials/shop-intro.php'); $config->appendTemplateFile = $temp;
  8. If the field your settings a value for is not reserved or found in the templates fields it's just added to the object as runtime property. $page->notAAssingedField = "Hello"; echo $page->notAAssingedField; // outputs: Hello If you'd need more specific additions you could also use hooks to extend the page object or even make a own object, extending the existing page object. This new object can then be assinged to specific templates in the backend. Edit: As you've said you'll export it to JSON: A page object has lots of properties, which I don't know if you need all of them. So I would suggest taking a look at the json so it's not bloated with stuff you're not using, especially if it's for something like ajax.
  9. In CoreUpgrade you can always click on the name in the first column to "redownload" the current installed version.
  10. Doing a refresh in the modules section should be enough to get permissions working.
  11. Your code is probably implemented into another php file so this would look something like this: <?php // Modules include <div class="…"><!-- Your HTML --></div> This would cause an error without the closing ?> and it would makes sense not to expect everybody to open a php hanna code with <?php .
  12. Seems like you've chosen the wrong type of hanna code. It contains php, so you need to choose php as type not html. Html code will be plain inserted and not compiled by php, that's why it's landing directly in the source code. A small thing I noticed. // why the $body variable if you're not using it? <?php $body = $page->body; echo $page->body; ?> // this does the same thing <?php echo $page->body; ?>
  13. I'm currently working on a Pi A+ model and I can see, why people strive for a little more power. But as I'm trying to build a digital picture frame for my creative stuff like processing or as of late preverably openframeworks sketches I don't have the space to fit in the bigger Pi 2. You really have to build your stuff with as less overhead as possible to work with these. I just had experimented with a processing sketch, which mimiced this site: http://whatcolourisit.scn9a.org/. As processing is based on Java it needs X11, JVM and the sketch to run, so I got around 20-30 fps for this simple thing. Built the same thing in openframeworks, which is c++ based and compiles down to raw machinecode, it hardly drops below 57 fps.
  14. Yeah, was to eager to do the comparison of available tags and new tags in lowercase. Should have been only in the if statement and not for the whole value. I've uploaded a fixed version, so it should work now.
  15. There's really no difference. $page->child internally calls $page->child(). You really only need to use the function if you want to specify additional selectors like this: $page->child("template=basic-page"); // First child matching this selector
  16. The only one I know of is this: http://processwire.com/blogtest/ , but I don't know if you can get into the admin area in this one. There are also lots of user submitted site profiles to be installed on your own servers. Otherwise there lots of resources only focusing on parts of the templating process, as ProcessWire doesn't force you to do it one way.
  17. As long as WebmentionArray extends WireArray you're free to use all the methods of WireArray. add() is just one of them.
  18. You should take a look at this: https://processwire.com/talk/topic/8697-module-jumplinks/
  19. The templating system even gives you the ability to do this yourself. If I understand this correctly it's just a plain php function which sends the output which is already generated at this time. You can freely choose when to use it in your template. But this won't work very well with the delayed output approach, as the most computation takes place before even the header is seen.
  20. It would be nice to have those features and I would second your proposal of standardized language names. It's just consistent.
  21. I don't know about all the other inputfields, but chosen is based on the exact multi select inputfield, which asmSelect is built on. I don't know about the performance of the library itself, but the base DOM containes all elements for both inputfields.
  22. @Sephiroth Both css "frameworks" I mentioned have nothing to do with preprocessors other than plain using it. It's more about finding out how to abstract patterns in websites which can be reused as good as possible. The most well-known example would be the media object, which is shown here: http://www.stubbornella.org/content/2010/06/25/the-media-object-saves-hundreds-of-lines-of-code/ I don't want to copy the whole story into this forum post.
  23. I know these, but I don't think one can pack such things in something called framework. For me these are based on project-per-project decicions. Take for example visual hierarchy. On this site (http://www.mediamarkt.de/), there's a big solid red slider on the top. And it has to be bright red, as the whole page is full of things courting for attention. In stark contrast something like my portfolio (http://kobrakai.de/). A basic headline just double the base font size draws the attention. I honestly can't see how frameworks could help me with this much more than a h1–h6 hierarchy.
  24. Yeah the code to to distinguish between "still options available" and "definitely a new page" is not working perfectly. For now I've updated it to just use TAB to create a new one and ENTER for choosing from the dropdown.
×
×
  • Create New...