Jump to content

SiNNuT

PW-Moderators
  • Posts

    1,011
  • Joined

  • Last visited

  • Days Won

    8

Everything posted by SiNNuT

  1. TinyMCE will be replaced as the default RTE with a current version of CKEditor in the next release of ProcessWire. The development branch, which is available via Github, has already made the switch. I agree that TinyMCE was/is not looking vey sexy. It's worth noting that CKEditor is also available for current ProcessWire, so you can switch if you want to. About Redactor: i don't think this available as a module atm but there have been discussions about it on this forum. Edit, too slow, one of those days
  2. So which option did you take? Text as well as Integer both are fine, but Integer might make more sense. If you chose the Text solution and use the regex of blad i would still add assertions for start and end of string to that, because if you literally copy/pasted that, customers would be able to enter something like '09201409' into the field. Of course this might be obvious to you. ^(19|20)\d\d$
  3. I'm not sure but i think your out of luck with a Datetime field. As far as i know this will always require some form of date input, not just a year (which of course isn't a date). Maybe someone who has done more with Datetime fields can verify or prove me wrong. What i would do however is simply make a field of Type = Text. When you have saved the field you can go to the Input tab and use a pattern of your liking. For example if you wanted to only allow years in the range 1900-2100 you could use a pattern like this: ^(19[0-9]{2}|20[0-9]{2}|2100)$ When a customer tries to enter anything that falls out of this range and hits save there even is a nice client side inline error message (in capable browsers) or else there will be server-side validation. Of course, you should make a regex that suits your needs. You will be able to sort pages according to year via such a setup, in the page tree as well as on the front-end using PW selectors. EDIT You can also use the Integer type, where you can optionally set (on the Input tab) the Numeric Input Type to Number (HTML5) and set a Minimum and Maximum Value. This gives a nice input to the customer and with the same nice html5 validations. The Integer type might be preferable, because of the nice input but also database efficiency.
  4. I believe this is set in /wire/core/ProcessWire.php on line 80 (at least on latest dev branch) /** * Populate ProcessWire's configuration with runtime and optional variables * * $param Config $config * */ protected function config(Config $config) { $this->wire('config', $config, true); ini_set("date.timezone", $config->timezone); ini_set('default_charset','utf-8'); if(!$config->templateExtension) $config->templateExtension = 'php'; if(!$config->httpHost) $config->httpHost = $this->getHttpHost($config); $config->https = (!empty($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) == 'on') || (isset($_SERVER['SERVER_PORT']) && $_SERVER['SERVER_PORT'] == 443); $config->ajax = (isset($_SERVER['HTTP_X_REQUESTED_WITH']) && $_SERVER['HTTP_X_REQUESTED_WITH'] == 'XMLHttpRequest'); $config->cli = (!isset($_SERVER['SERVER_SOFTWARE']) && (php_sapi_name() == 'cli' || ($_SERVER['argc'] > 0 && is_numeric($_SERVER['argc'])))); $config->version = self::versionMajor . "." . self::versionMinor . "." . self::versionRevision; $this->setStatus(self::statusBoot); } Not sure if this would also be the place to add what you are planning, that is a bit beyond me. Using Sublime and i'm guessing most other editors you can very easily do a 'Find in Files...' for 'config->ajax' to see where it is used in the whole codebase. But it is defined in ProcessWire.php
  5. A SEO 'cheatsheet' would never be limited to PW. The same rules apply to more or less everyone. Just put your title and description meta tags in good shape and make well formed and to the point (html) content and you should be fine. Take care of heading levels and such and do not ever underestimate the power of Google and the like. Most of times it is some kind of specificity and traffic kind of magic. For further SEO tips and tricks there's plenty to go around if you just Google. No amount of trickery (apart from maybe sponsored ads ) will get you on top op of Google for example 'harry potter books', unless you're Wikipedia, Amazon or author sites.
  6. In answer to the original question: Imo in the open source world a lot of the Content Management Systems are build with PHP, because, despite its shortcomings, it is: A) a pretty good fit, with a low entry level, B) has a long history in the web world, C) due to various reasons PHP has an insane presence in the shared hosting world compared to any other language. In the world of the more 'enterprisy' and/or closed source CMS'es i have i feeling there are more Java or C#/VB ASP.NET systems out there. When it comes to a general purpose CMS/CMF, Node.js is not the first thing that comes to mind. Commonly mentioned use-cases for Node are real-time applications, like a chat app, or building heavily used API's on top of maybe a nosql document store. That is not to say there aren't any Node CMS'es around.
  7. I haven't tested the module but looking at the code you are aware that the way it is now, the publish date get's emptied when you 'unpublish' (via the relevant Status checkbox) a page? When republishing it get's populated with the current time, in fact changing the original publish date. This seems to be in contrast to your thoughts in the above quote, unless i am misunderstanding you. Thinking a bit more about this subject i begin to wonder if this shouldn't be something available in core. I know there's already the SchedulePages module, but if you think about it there are quite a lot of use-cases for scheduled content and it probably wouldn't be that big of a deal adding it (but maybe i'm wrong ) So if you just go publish a page via the corresponding button it sets the status to published but also sets a field like 'publish_from' with a default of time(), and a field like publish_until with default empty. If you wanted to 'schedule' the page you would need to go to the settings page where you could maybe pick the dates via date pickers for publish_from and publish_until.
  8. For the publish-unpublish-republish scenario you could also make it configurable via a "retain publish date when unpublished" option? Because i can see cases for both.
  9. SiNNuT

    ED DESIGN

    That pause solution works fine. About the font: I tested this on my Win 7, 17 inch laptop (1920x1080). For me it's looking pretty good on Chrome, although it's has less weight than how it is displayed in FF and IE. I threw together the schreenshots. I also noticed that in IE the menu bar is always grey. https://dl.dropboxusercontent.com/u/14376901/ed-works.png
  10. SiNNuT

    ED DESIGN

    Chrome on Windows always has horrible webfont rendering is my experience, even common stuff like Open Sans looks quite bad. If you take for example the new minimal site profile that comes with PW dev; it uses <link href='http://fonts.googleapis.com/css?family=Lusitana:400,700|Quattrocento:400,700' rel='stylesheet' type='text/css' /> On FF and IE it looks fine but on Chrome it looks quite bad. This is a known issue and there are some workarounds that can work out pretty nicely but you gotta try which one works best on a case by case basis. It's been a while since i had to deal with this issues but there's enough info if you google for 'windows chrome webfont rendering fix' or something like that. In the past i've had quite good results at putting the webfont locally and changing the order so that Chrome gets a svg webfont. http://www.dev-metal.com/fix-ugly-font-rendering-google-chrome/
  11. SiNNuT

    ED DESIGN

    Great looking site! Some observations from a 5 inch (xperia z) smartphone, android 4.4.2 and chrome and firefox: - The top language menu is quite hard to operate due to it's small height. When i tap precisely i can operate it in FF, in chrome however, when i do get the language menu to open up i at the same time seem to be hitting a home link, making it impossible to switch languages. - When i open and then close the main menu the background color remains grey. Not sure if this is intended because in the initial closed state the menu background is just white, in line with the rest of the page. - The project images that rotate on the homepage have different heights, causing the funny effect (at least to me) that the content that comes beneath it keeps getting nudged up and down. That concludes my quick points, written while hunting for bloodthirsty mosquitos that are keeping me from sleeping
  12. > I don't think anyone has proposed or suggested that? We're proposing a supplement/alternative, not a replacement. At least I would never suggest that, and I don't think that's what rajo was trying to imply. I think that it was in reply of mvolke's post, which suggested using (.yml) files for defining content structure as the best option. Apart from that, this is a an intetesting discussion. The idea of some sort of centralized facility to keep track of template and field changes, opening up a lot of options for dev work, seems quite nice. I have yet to look into the other tools posted here, which take a different approach.
  13. I've modified the topic title and your first post to reflect the fact that it is about the $childTemplates property of a template. You would want to do something like this? $templateID = item_info->id; // id of the item_info template $templates->find("childTemplates=$templateID") // find templates that have $templateID in childTemplates array I don't think this is possible. Not entirely sure though. But what is wrong with foreach-ing the templates? This would not be too costly i think.
  14. TS already set that value if i read his post correctly
  15. You could check via phpinfo() what the value of the "Loaded Configuration File" is. This will point you to the active .ini file. Also, you can check double check the current default timezone on the phpinfo page (search for "Default timezone") After you set date.timezone in the correct .ini file i think you need to restart Apache for the change to take effect, or contact your webhoster to do this for you. If that still does not work maybe the value is overridden by some additional .ini files that are parsed. Another thing you could try is date.timezone with single quotes or no quotes.
  16. I'm no SEO expert but i think none of the major search engines pays attention to the meta keywords tag anymore. Can't look it up right now but there should be plenty of resources, including videos from Googles Mat Cutts. In fact, if you abuse it (intended or unknowingly) it may hurt your rankings. In most cases it's probably best to focus on adequate meta titles and descriptions and don't bother with keywords. -- EDIT For future reference; some info here: http://www.metatags.org/google_ignores_meta_tags_in_ranking
  17. SiNNuT

    World Cup 2014

    A couple of years ago i would have never thought i would say this, but i'm hoping Germany will win.
  18. SiNNuT

    World Cup 2014

    That was an absolute crappy match. It was hurting my eyes. Not too gutted about the loss. It's a miracle we have gotten to the semis with a team like this and to be honest quite bad football.
  19. SiNNuT

    World Cup 2014

    That was a pretty gruesome game. Shocked by Brasil's performance, but extremely well capitalized by Germany.
  20. What would you want to do with session data? I'm not sure what it stores for by default, but i'm pretty sure it does not keep track of/count visited pages for all users, including your anonymous visitors. So i don't see how you would put it to use for frontend-counting. Is there any "auto" deletion of expired/old session data going on somewhere in PW? If i remember correctly both the default filebased sessions as well as database sessions depend on/use PHP's built-in garbage collection. This means that roughly after a certain amount of time ($config->sessionExpireSeconds = 86400;), PHP starts cleaning up after itself, removing stale session data.
  21. Wouldn't it be better to do this with a $pages->find()? $pages->find("template=mytemplate, title|name|headline=$q");
  22. SiNNuT

    World Cup 2014

    Based on second half i don't think it was pure luck. But not one of the best performances (especially first half). You don't hear me complaining though
  23. I'm strapped for time but let me just say quickly that PW seems a perfect fit for this out of the box, apart from the images/media part. PW doesn't have some sort of centralized media library/manager like others. Instead files are basically attached/uploaded on a page by page basis. Some attempts have been made (can't find them right now) but none that would seem like an ideal fit. Other will prolly elaborate more
  24. The instructions in PW's .htaccess are pretty clear: # ----------------------------------------------------------------------------------------------- # Set an environment variable so the installer can detect that mod_rewrite is active. # Note that some web hosts don't support this. If you get a 500 error, you might try # commenting out this SetEnv line below. # ----------------------------------------------------------------------------------------------- SetEnv HTTP_MOD_REWRITE On It appears that your hoster, apart from upgrading PHP, has also made some changes in Apache's config, in this case the mod_env module seems unavailable. You can comment it out, because you don't need it for PW to function correctly. Of course you do need mod_rewrite. It would indeed be better to add this to the .htaccess: <IfModule mod_env.c> SetEnv HTTP_MOD_REWRITE On </IfModule>
  25. I just noticed another strange thing that maybe is related to the admin theme problems described here. If i do a fresh install i get to the last installation screen. On that screen are two buttons; one says "Login to Admin", the other "View Site". If i click on the "Login to Admin" button i am then presented with the 'old' login screen. When i click "View Site" and then click the admin link in the top navigation (head.inc) i get the new login page. This is also the case when i close the browser on the last install screen and then later visit mysite/processwire Small detail: the update notices seem to be different on the old and new loginscreen. I have not been able to pinpoint the problem but i got a feeling that maybe this has something to do with the systemupdater (6?) and/or the newly added caches feature and corresponding db table. This seems to contain a module cache.
×
×
  • Create New...