Jump to content

ryan

Administrators
  • Posts

    16,772
  • Joined

  • Last visited

  • Days Won

    1,531

Everything posted by ryan

  1. I've not seen that error before. Do you have any other context of when it happens?
  2. Required is not supported by most fields at present. So you only see the option if you've got the $config->advanced turned on. It's best to leave $config->advanced turned off, because it's easy to break things with it on and there are some things shown where support is inconsistent. That advanced setting is really meant for when we're developing or adding features to PW, and it's troublesome otherwise. Though we will be having full 'required' support for all fieldtypes soon, perhaps in 2.2, and at that time the 'required' option will show up without advanced mode being on.
  3. This thread has been really helpful to read. It's interesting to hear how you all found ProcessWire, and it's different than I would have thought. Among other things, It makes me think we should target things like custom fields in our keyword strategy rather than things like jQuery. For instance, terms like 'custom fields cms' seem appropriate, and we don't appear for those right now. We do show up for 'jquery cms' (top of page 2, google) but that's not really a driver of traffic and more clear now that it's not what people are looking for. I don't think this is a quick fix. I don't see a way around the problems with the system unless you tie the votes to accounts or reviews. What they are doing is tying it to an IP address and that's it. So all you need is a rotating IP (remember AOL?), proxy server, or even a cell phone, and you can vote as many times as you want. If you want to down/up vote something fast and en masse, then you just take that same concept an existing site with traffic and point a hidden iframe and image src to the voting mechanism... then every user unknowingly becomes a voter. It's a hugely flawed system. But not any more so than any others that allow anonymous votes. So it's not technically opensourcecms.com's fault, other than that they've chosen to accept the compromises associated with such a system. And those compromises are not obvious to most people that visit. What it gets down to is that I think we're conditioned to give more legitimacy to such ratings than they deserve. For me, that's because I rely on Amazon's star ratings for when I buy stuff. But their system is pretty good– If someone wants to upvote or downvote something en masse, it's a bit hard to do because every vote has to be tied to a real person with a credit card number. It's easy for me to forget that other star-rating systems aren't nearly as legitimate as that. Someone suggested earlier in the thread that they should tie every rating to a real review, and I agree with that. That would prevent automated attacks on the ratings system and make it a real pain for someone to try and manipulate the ratings. I think that's the only way you can give legitimacy to an anonymous 5-star ratings system like this. I didn't realize it was viewed that way before you wrote it, but it's really quite a powerful metaphor and definitely makes me think a little differently about the software. I do wish they had asked for permission before taking the logo and pasting it into the ads. On the other hand, they are still providing a good service to the community by hosting all the CMS demos and I know it can't be cheap and they've got a business to run. My opinion is that if they have to use those ads, then they should only use them on the CMSs they are hosting the demos for… because presumably they are using that hosting service to host the demos. I hope I can get in contact with someone there because it seems like they are overall a good service that is just making a few mistakes and maybe they just don't know how they are perceived. I also want to clarify that this is multi-language support in the admin so that people can see PW's tools in their own language. This isn't a new solution for a multi-language web site on the front end. Though there is some crossover and some may find the additions handy for front-end stuff too. But this would not replace a full multi-language solution on the front end (like what LorGG is working on).
  4. ryan

    Happy birthday Ryan!

    Thanks-that is great!! it actually makes a pretty nice looking bottle of wine. And some smooth photoshop work. The branded glass is a nice touch too. If it really were a ProcessWire bottle of wine it would be a jammy zin with 22% alcohol and a patented energy blend of caffeine powder, yohimbe extract, adderall, wheatgrass, partially hydrogenated 5-hr energy, hemp seed oil, nyquil, sodium benzoate (for freshness) and essential vitamins and minerals. A good house wine for any time of the day.
  5. Just turned 37 this week and always get a little depressed for a bit every birthday. But these comments and reviews really made my day, and made it a great week! So thanks for that. Also, @slkwrm your in-depth review was really well thought and gives me new perspective. The weightlifter/ballerina concept is intriguing, flattering, disturbing, and hilarious! Especially after seeing Soma's images. This is easily my favorite thread yet. Opensourcecms.com is a bit of a disappointment because we legitimately rose to the #1 spot there over the period of a week with real users and real votes. Then, in the matter of an hour, someone gave us the slapdown with 50 1-star votes. Apparently someone was threatened by PW's placement there. Over the same time (seemingly at least), Joomla rose to the #1 spot despite having a high percentage of bad reviews. To make matters worse, they are using the PW logo in ads on their site so that it appears we endorse their advertisers. And I have no idea why they aren't posting your reviews--I've heard this from a few people now. In fairness, the slapdown may have not been their fault, but their voting system is flawed to the point of being useless. After taking a closer look at it, I learned that it could be manipulated quite easily with less than 10 lines of PHP, a strategically placed iframe and some CSS to hide it all. Place the code on any site and every visitor unknowingly becomes a voter (circumventing the IP restriction), whether doing a slapdown or a boost. Clearly such a technique was used to slapdown PW and [i'm guessing] boost Joomla. One could inflate any rating to #1 or last in a matter of hours. I put together a test case to try it once (submitting 1 vote for PW) and, sure enough, that's exactly what appears to have happened. I would never use something like that because I view it as cheating. But it made me feel a little better to at least know how it was done and that the folks at opensourcecms.com weren't out to get us (I'm hoping not, anyway). But if anyone shares my curiosity let me know and I'll PM you what I found (just don't use it). The good news is that PW has already climbed quite a bit out of that slapdown hole legitimately. Honestly I wouldn't care about any of this except I've held that site in such high regard for so many years (and waited a long time to post PW there), that I was just a little disappointed to see the ratings system I used to take seriously is just a joke. But I probably should have known better. I'm still holding out hope that they will post everyones reviews, as that is where the real value is there and there's no joke about real reviews from real people. Also, made good progress with PW 2.2 today and admin multilanguage support! I'm posting from a cell phone in the middle of the night (woke up and trying to get back to sleep) so apologize if this post is poorly written, crazy or incoherent.
  6. Thanks for sending over the site profile. Just wanted to let you know I've got it installed here and hope to have it figured out by next week.
  7. Michael, thanks for testing that. I have updated the instructions on this page (under the 'How to export a profile' section) to account for this. It now includes the /site/modules/ directory as an optional inclusion. And the same applies to /site/templates-admin/ and /site/config.php. Everything has to be ready-to-go in the import profile before the PW installer is run.
  8. @apeisa, great question, I'm definitely interested to hear more about this too. @Diogo, that sounds like exactly the same way I would read documentation too. That's interesting to hear about it being too-personal. I had never made a video of this sort before so didn't really know what I was doing (and still don't) but am learning. This is good feedback and perhaps i should try another room next time. The room I work in (and did the video in) is a large loft-type room with wood floors and it tends to echo a lot in here when talking. So I briefly considered recording the narration in the bathroom for less echo. Glad I didn't do that–that would have definitely been too personal. ;D @formmailer do you recall what words you were searching for? I've not really been sure what to target from an SEO standpoint. But as we do major upgrades to the site in the near future, we'll probably want to start considering more strongly the words that people search for to find us.
  9. I'm guessing you mean "create, but not publish a post." In which case, I agree – this is actually already on my short-term to-do list: https://github.com/ryancramerdesign/P21/issues/27
  10. I agree! I hadn't worked much with Google Calendar before, but am really liking it. I'm looking forward to finishing up this module.
  11. ProcessWire's templates-admin/styles/main.css has an @include(JqueryUI.css) at the top of it, so also a good chance that Firebug is just showing it as part of main.css.
  12. Trash has always been accessible to the superuser only. When other users delete stuff, it goes into the trash. But only superuser can see what's in there or pull stuff out.
  13. Here is a link to the upgrade module for those that were interested in helping to test: http://processwire.com/talk/index.php/topic,583.0.html
  14. PROCESSWIRE PROFILE EXPORTER This module serves two purposes: To enable exporting of ProcessWire 2.0 sites to a profile that can then be imported into ProcessWire 2.1 (i.e. to upgrade to 2.1). To enable exporting of ProcessWire 2.1 site profiles for sharing or distribution with others. In either case, the profile exporter does not touch your existing site. It just creates files in a directory (/site/install/) that can then be used for a fresh installation of ProcessWire. PLEASE NOTE: Consider this module alpha test only. It has not had a lot of use or testing yet so it's advisable to use it in a test environment and not on a production server at this time. I am posting this for those that indicated they wanted to help test the PW 2.0 to 2.1 upgrade process. HOW TO INSTALL Download at: https://github.com/r...ssExportProfile Place the file ProcessExportProfile.module in /site/modules/ Login to your admin, click "Modules" at the top, and click "Check for new modules" Click "install" for the Process > Export Profile module. It will create a new page where you can access it under the Setup menu. HOW TO EXPORT A PROFILE A profile consists of your site's database, files and templates. To create a profile, Go to Setup > Export Profile. Read the instructions and continue. Once the profile has been created, you can copy it somewhere else, zip it up, or [if performing an upgrade] copy it directly into your PW 2.1 directory as indicated in the 'upgrading' section below. The profile consists of files in these directories: /site/install/ < required /site/templates/ < required /site/modules/ < optional: use only if you have custom modules to include in the profile /site/templates-admin/ < optional: use only if you have a custom admin theme to include in the profile /site/assets/ < optional: use only if exporting all of /site/, and it should be left empty like PW's default profile* /site/config.php < optional: use only if you want to specify custom config settings, leave out otherwise** These directories collectively form the entire /site/ structure of a ProcessWire installation. If using the profile to upgrade ProcessWire from 2.0 to 2.1 then you'll only want the first two directories above (install and templates)–see the 'Upgrading' section following this one, as the instructions for upgrading are a little different than if you were exporting profiles for distribution. If you intend to share/distribute your profile with others (as opposed to upgrading), you'll want to ZIP them up into an archive (or use something like GitHub). You may want to make your profile include the entire /site/ directory for easier installation by others. If using the entire /site/ directory as your profile, then just copy all the /site/ files from ProcessWire's default uninstalled profile and replace the directories/files that you want to. For instance, you'll always want to replace the /site/install/ and /site/templates/ directories, but if your profile doesn't include plugin modules or configuration file changes, then you'd keep the default /site/config.php file and /site/modules/ directory from ProcessWire's default profile. *Any time you are including the entire /site/ directory as your profile, you'll want to include the /site/assets/ directory exactly as it is in the default ProcessWire uninstalled profile. That means the directory is empty, minus an index.php file. During installation, the installer copies files from /site/install/files/ to /site/assets/files/ and ensures they are writable. ProcessWire's installer also creates several other directories under /site/assets. But you don't need to worry about that. **If you ever do include a /site/config.php in your profile, make sure to remove the last 5 lines that contain confidential information about your database and user system hash. Once you've saved your profile somewhere else, you should delete the files that this module saved in /site/install/ (they might be consuming a lot of disk space). You'll see a link to do this after you've finished exporting a profile. UPGRADING FROM PROCESSWIRE 2.0 TO 2.1 This upgrade process is a little different from what you may have seen before. We won't actually be upgrading your current site. Instead we'll be exporting a profile of it, and using it to install a new/fresh copy of ProcessWire 2.1. To make this work, you'll have to install your copy of ProcessWire 2.1 in another location or another server. Once you've completed the installation and verified that everything is how it should be, you may then replace the original ProcessWire 2.0 site with the new one. It should be noted that this upgrade does not cover user accounts or access control. You will have to re-create any user accounts and access settings in the new system. This was necessary because PW 2.1 uses an entirely different user system and access control than PW 2.0. Should you have a lot of user accounts that need to be converted, let me know more in the PW forums and I can guide you through how to handle your specific case. Performing the upgrade 1. Export a site profile as described in the previous section. 2. Download the latest copy of ProcessWire 2.1 at http://processwire.com/download/ and install in a new location. If you are installing on the same server in a different directroy, then don't use the same database as you did in 2.0. Instead create a new database that you will be using for 2.1. 3. Before starting the 2.1 installer, copy these directories from your ProcessWire 2.0 installation to your ProcessWire 2.1 files (completely replacing the directories in the 2.1 files): /site/install/ => /site-default/install/ /site/templates/ => /site-default/templates/ 4. Now run the ProcessWire 2.1 installer by loading the URL to it in your browser. If all goes as it should, you'll see your 2.0 site now running 2.1. There are some likely issues that may occur, so read the following section about troubleshooting whether you think you need to or not. 2.0 TO 2.1 UPGRADE TROUBLESHOOTING I installed 2.1 using the new profile but now I get a 404 Not Found for every page If you run into this problem, login to ProcessWire 2.1 (/processwire/), edit the template used by your homepage, click the "access" tab and "yes". Then check the box for "guest" view access, and save. Your site should now be functional. I installed 2.1 using the new profile but now many pages have no title ProcessWire 2.0 assumed that all pages had a title field whether it was ever officially assigned to the template or not. ProcessWire 2.1 is different in this regard. So if you run into pages without titles, edit the templates used by those pages, add the field 'title' and hit save. The issue should now be fixed. I ran out of memory or had a timeout when exporting a profile or installing the 2.1 site with the profile On a large site, it's possible that the resources dedicated to PHP might not be enough for the exporter or installer to complete it's job. Should this happen to you, we may need to do one or more parts of the process manually. So if you run into this scenario, please post in the forum and we'll get it figured out. I installed 2.1 and all went well but I now have a non-working "Export Profile" page on my Setup menu (last item) This is the page used by the Profile Exporter module on your 2.0 site. Your 2.1 site won't have the Profile Exporter installed and you can safely delete this page or drag it to the trash.
  15. Thanks, glad that you are enjoying using ProcessWire. Our modules documentation is pretty sparse right now–PW is still a relatively new project and there is still much to do. But I've just updated our existing modules page with a note about naming conventions here: http://processwire.com/api/modules/
  16. Repeatable fields are planned for 2.4, though we may get some rudimentary variations of it before that.
  17. Actually there is no such thing as absence of time in unix timestamps (which is what PW uses). Every date is also storing a time. It's just a matter of whether you are using and outputting a time with it. I think that if you only specify a date, then it just uses the earliest possible time from that date (i.e. midnight). I've developed a module that is somewhat related to yours in the opposite direction, though don't yet have it release ready. But what it does is lets you to query a Google Calendar for date ranges or keywords, and then lets you iterate and output the results like pages.
  18. Thanks for the message mjmurphy–glad that you like this module. I use it quite a bit myself too. I will definitely be adding support for more fieldtypes to it. Actually, I think dates and page references are the only two that we don't support yet. Adding dates will be easy, but the page references a little more complex. However, I need the page references functional in the near future so will likely be adding both of those types soon. An ExportCSV module is also planned for sure. This won't be a module, it is already planned for the core (likely in 2.3/2.4). This feature was in PW1, but just hasn't made it into PW2 yet. But it's a very useful thing to have I agree. This module looks like exactly what I need for migrating a couple of larger sites to PW. Would it be possible to hack this for adding users as well? I think it should work now, though I haven't tried. Although it looks like I need to add support for FieldtypePassword (another one I missed) if you want to import passwords. Should be easy to add though–added to my list.
  19. Welcome to the forums egecan! The textformatter modules actually have a specific naming convention, so you would want to give your module the class name TextformatterIncludeOther and filename TextformatterIncludeOther.module I may get rid of this naming convention requirement for Textformatter modules in the future, but I think that it's still in place right now. If you still don't see it in your list after doing that, go to the "Modules" tab in ProcessWire admin and click "check for new modules" and then click "install" for your module. One other minor thing to mention is that it's recommended to remove the "?>" from the end of your file. It reduces the chance that some whitespace could get introduced after it, which could interfere with the operation of a site.
  20. I think I see what you are talking about– the "-moz-*" declarations that appear in /wire/templates-admin/styles/JqueryUI/JqueryUI.css? I did not create that CSS file, it was actually generated by the jQuery UI themeroller, so just part of the jQuery UI framework. I'm assuming they are using it for progressive enhancement for older versions of Firefox (like Firefox 3) that don't support the native CSS3 properties, but do support the -moz- versions of them. LIkewise for any -webkit-, -o- or -ie- ones that you see. The purpose of it is so that things can still look good on earlier versions of these browsers, before they had full CSS3 support (which admittedly doesn't matter all that much for our audience).
  21. The first part of doing this would be to determine what you want your starting date to be. You could do this by setting a cookie on every pageview to track the time they last viewed it: Setting and getting the date and time of the last visit <?php // see when their last visit was from a cookie that we set if(isset($_COOKIE['lastVisit'])) { // get the last visit time from the cookie $lastVisit = (int) $_COOKIE['lastVisit']; // if it was more than 30 days ago, then just assume 30 days $minLastVisit = strtotime("-30 days"); if($lastVisit < $minLastVisit) $lastVisit = $minLastVisit; } else { // no last visit, so assume 7 days ago $lastVisit = strtotime("-7 days"); } // make a nice formatted date we can use for output later, i.e. October 1, 2011 5:00 am $lastVisitStr = date("F j, Y H:i a", $lastVisit); // set a cookie with the time of this request, and the cookie expires in 30 days setcookie('lastVisit', time(), strtotime('+30 days')); OR, if you wanted to just use a specific date, then you could just do this instead: <?php $lastVisit = strtotime("October 1, 2011 5:00 am"); $lastVisitStr = date("F j, Y H:i a", $lastVisit); // formatted version for output Displaying pages modified since the last visit Once you know your starting date/time (lastVisit), then you can use that to find pages that have been modified since that time: <?php // find the pages that have been modified, and sort by that $modifiedPages = $pages->find("modified>=$lastVisit, sort=-modified, limit=50"); if(count($modifiedPages)) echo "<h2>Pages modified since $lastVisitStr</h2>"; // loop through the pages and display them foreach($modifiedPages as $p) { $modified = date('F j, Y H:i a', $p->modified); // i.e. October 1, 2011 5:00 am echo "<p><strong><a href='{$p->url}'>{$p->path}</a></strong> last modified $modified</p>"; } If you instead wanted to use the created date rather than the modified date, then you would just replace every instance of the word 'modified' with 'created' above. And likewise you can substitute any other date fields you might add to your page. Displaying new comments since the last visit When it comes to comments, we'll use a similar approach. But we first find the pages that have new comments, and then find the new comments on those pages. Since this is more of a specific purpose, we're not using PW's built in comments render functions and instead doing it ourselves here. Also, we'll assume that you already have that $lastVisit variable set from the first code example. <?php // first find the pages that have new comments on them, sort by the comment created date $commentPages = $pages->find("comments.created>=$lastVisit, sort=-comments.created, limit=50"); // output a header that uses the $lastVisitStr var we set in the previous code example if(count($commentPages)) echo "<h2>Comments posted since $lastVisitStr</h2>"; // loop through the pages that have new comments foreach($commentPages as $p) { // find the new comments on this page that have an approved status // status=1 means approved (i.e. not spam or pending approval) $comments = $p->comments->find("created>=$lastVisit, sort=-created, status=1"); // find out how many there are. if none, then move to next in loop $total = count($comments); if(!$total) continue; // output the page that had the comments with a link to it echo "<h3><a href='{$p->url}'>$total new comment(s) found at {$p->path}</a></h3>"; // display the comments foreach($comments as $c) { $cite = htmlentities($c->cite); // prep what we need for output $text = nl2br(htmlentities($c->text, ENT_QUOTES, "UTF-8")); $created = date('F j, Y H:i a', $c->created); echo "<p class='comment'>"; echo "<strong>Posted by $cite on $created:</strong>"; echo "<blockquote>$text</blockquote>"; echo "</p>"; } }
  22. Glad to hear processwire.com is loading reasonably well for you guys. Let me know if that ever changes. I'm not actually recommending HostGator.com, just saying I'm testing it out to see how it works. I have low expectations considering the price, but seems pretty decent so far. If you hunt around, you can get a coupon to get the account there for like $5 USD/month. BlueHost seems to be another okay low-cost option, and I've used it with another client (though like HostGator a slight bit more). I wouldn't go for any low cost option if you have to serve 1k+ pageviews a day though. One of the best places I've found to do research on hosting providers is at http://webhostingtalk.com ... it's also the first place I check if there's ever any kind of outage anywhere, there's usually someone talking about it. I've heard good things before about the providers that Antti and Pete recommended as well. Having a VPS is definitely great if you know your way around server administration, or have a VPS provider that considers them managed VPSs (where they will take care of fixing or upgrading anything as needed). Two other hosting providers I've used quite a bit, but have mixed feelings about are hostway.com and mediatemple.com. Regardless of hosting provider, I personally look for those that use cPanel just because it's familiar and easy to get around.
  23. I received your email–thanks. Just took a look here and I think the problem is a circular page reference. I only encountered it on pages where multiple languages were defined. All other pages saved just fine. For instance, these 3 pages reference each other in the fields alt_lang_1 and alt_lang_2: /revive/en/home/ /revive/nl/home/ /revive/fr/home/ (along with all the others under the language page hierarchy) So lets say you are saving /revive/en/home/. That in turn causes /revive/nl/home/ and /revive/fr/home/ to be loaded, which in turn are both attempting to load /revive/en/home/, and each other. So we end up with a bit of a complex circular reference. This circular reference doesn't happen when the page is being viewed or loaded because PW keeps a page cached in memory as soon as it's loaded. As a result, the circular reference can be resolved. But when saving a page, we don't work with cached data so a circular reference like that can cause a problem (an endless loop). I would like to try and see if there is some way to solve this, but I don't want to start playing around with files on your live server unless this is a development site. Let me know? If not, I'll make a copy on my own server. I also might not be able to do it today just because I've got another deadline to meet this afternoon. But can experiment more with it tomorrow. If you need an immediate resolution, I would solve it by only managing your references in one of the branches. For instance, let the /en/ branch maintain reference to the alternate language pages. If I understand your site's layout correctly, the circular reference isn't actually necessary and it's only creating more work. Your other pages could get the same info just by polling the /en/ version of themselves, i.e. <?php $en = $pages->get("alt_lang_1|alt_lang_2=$page"); $alt1 = $en->alt_lang_1; $alt2 = $en->alt_lang_2; However, even if you take that route, I'd like to see if there's a way we can prevent PW from going into an infinite loop when it encounters this sort of circular reference. So keep a backup copy if you change it.
  24. Thanks Soma. I didn't realize you had found these so useful. Please continue to point out stuff like this, as it helps us to make it better. I just wanted to explain why this part may still have some rough edges. This will continue to improve with time, for sure. I think that enforcing the template selection won't be too difficult. Though I don't think we'll be able to support the 'custom code' with the InputfieldPageSelects, as there's just too many possibilities there for a field with hierarchy. For the page removal, we could have it drill down to the selected page automatically so that the 'unselect' link is visible when you open the field. Could also just have it as a "remove" link next to the selected item, though may have to keep a JS confirm box on that to prevent accidents. I find myself doing something or another with the PageList every couple weeks here, so will definitely keep thinking about implementation possibilities and experiment with these things.
  25. If you have easy access to PhpMyAdmin, you might want to checkbox all the tables and then choose "repair" at the bottom. Just in case there is something amiss in one of the tables, that will fix it. However, always export the database to an SQL dump (also in PhpMyAdmin) before making any changes to it. Assuming a database repair is not the issue, I would guess that we've got an infinite loop occurring somewhere, based on what you've described. What version of ProcessWire are you using (2.0 or 2.1) and do you have any 3rd party modules installed? I'll be happy to take a closer look from here if you'd like. Just PM or email me any info I need to get to it. My email is ryan at this domain name.
×
×
  • Create New...