Jump to content

ryan

Administrators
  • Posts

    17,231
  • Joined

  • Days Won

    1,697

Everything posted by ryan

  1. Lars, you can do this if you convert your homepage to ProcessWire first. That's because ProcessWire needs /index.php in order to run. If you have an /index.html already in place, you'll probably want to remove it too. But you can leave the rest of your site files in place as ProcessWire won't attempt to capture pages that already have existing files on the server. So it should be fine to go ahead and install ProcessWire, and just leave your existing site files where they are (except for the homepage).
  2. Achabany: Here's an old post that has a ZIP file with high res logos: Unfortunately I don't have a vector-based version, but the ones in that ZIP are quite large if I recall.
  3. Martind, something's not quite right here, as your screenshot shows columns for "body, headline, summary, title". It should say "name, title, language translation files". I suggest uninstalling the LanguageSupport module and then try installing it again. But first check that you don't already have a template in your system called "language" or "languages". The installer should recognize this if you do, but double check just in case. Also, your system may not support extraction of ZIP files, so you'll want to unzip the language pack first and then drag in all the .json files instead.
  4. Good and interesting ideas Oliver. I'm not sure how simple this one would be to implement, but it's something I need to keep thinking about--maybe there is a simple way to do it.
  5. Sinnut posted this several months ago in the pub. Maybe adding this to your .htaccess would help? # ---------------------------------------------------------------------- # Better website experience for IE users # ---------------------------------------------------------------------- # Force the latest IE version, in various cases when it may fall back to IE7 mode # github.com/rails/rails/commit/123eb25#commitcomment-118920 # Use ChromeFrame if it's installed for a better experience for the poor IE folk <IfModule mod_setenvif.c> <IfModule mod_headers.c> BrowserMatch MSIE ie Header set X-UA-Compatible "IE=Edge,chrome=1" env=ie </IfModule> </IfModule> <IfModule mod_headers.c> # Because X-UA-Compatible isn't sent to non-IE (to save header bytes), # We need to inform proxies that content changes based on UA Header append Vary User-Agent # Cache control is set only if mod_headers is enabled, so that's unnecessary to declare </IfModule> Also, I am going to add the meta tag Antti suggested to the default admin theme (just did, and will commit it soon).
  6. I think this is exactly the way we'll implement it. Plus, it'll be so easy to do hopefully I can do it this weekend (I've got to be at a client's location today).
  7. Very nice! I like it! Nice and simple and useful. You are coming up with all kinds of great stuff for ProcessWire, I can barely keep up. Ideas for future versions: It'd be very cool to have config options as to what corner you wanted the links to appear in. The ability to disable the new page and/or logout buttons (for those that just want an 'edit' button)
  8. Thanks for the issue report Achabany--I will correct this like you mentioned. Also, thanks for the work on the French language pack. I agree about setting up a board just for translations. I'm still learning the ropes of IP.Board but hope to have that setup this wekend or early next week.
  9. The existing comments module does keep the user ID already, though it doesn't use it for storing the user name. But you could make an autoload module that changes the 'cite' property of a comment to the user name. This is something that has to be done at runtime since a user's name may have changed since the comment was posted. public function init() { $this->addHookAfter('FieldtypeComments::wakeupValue', $this, 'hookWakeupValue'); } public function hookWakeupValue(HookEvent $event) { $value = $event->return; foreach($value as $comment) { if($comment->user) $comment->cite = $comment->user->name; } } To have the comment displayed instantly, that will be easier to solve, and doesn't require modifying the existing module. Just do your comments processing/output generation before you "echo" any output. When a comment is posted, do a $session->redirect('./'); I'm making a page-based comments module which will have the same sort of flexibility as the rest of ProcessWire, though it'll be a bit before I've got it finished (and some projects have to come first). But this page-based comments module should support nearly anything you could want to do with it, without having to modify its core code.
  10. We will have a solution for this one very soon.
  11. Achabany, I'm getting the same thing as Nikola. Chrome 16. (those Chrome version numbers just keep climbing!). Also noticed an issue that can affect some sites but not others. See the attached screenshot. If you add any items to your admin nav, then they can get overlapped with the user/profile/logout links. Some modules add items to the top nav like this. It might be safer to locate that user/profile/logout line above the search... or if you like it where it is and want to get fancy, you could always locate it above the search when $pages->get($config->adminRootPageID)->numChildren > 4. One other minor thing to note in the screenshot is that there's no padding to the right of the title input (and any other full length 1-line text input). Though that's a minor point that doesn't affect use at all, and I didn't even notice it till after I took the screenshot. Nice to see it's multi-language ready too. Speaking of which, since you worked the topnav.inc into your default.php, you don't need to "translate from the context of default.php", since this is assumed: $title = __($title, dirname(__FILE__) . '/default.php'); // translate from context of default.php The above line isn't hurting anything, but it's also not necessary. You can just do this: $title = __($title); …or this (which is slightly faster, but not as pretty): $title = __($title, __FILE__); Thanks again for your great work with this theme.
  12. Great admin theme Achabany! I only have a minute on the computer so couldn't try it much, but got a quick look and love what you are doing with the PageList. I look forward to using this more tomorrow. Thanks for your nice work!
  13. This is working in 2.2. I just had to do it yesterday. I was going to say "what password are you using", but that's probably not a good idea. Instead, why don't you try with another password. There is a known issue in the queue with passwords that are exclusively non-ascii. If you find it's still not working, give me an example of a fictional password that I can use to reproduce the issue.
  14. Oliver, there might be some bug in the version of MySQL there. But I would suggest exporting the whole database with PhpMyAdmin to an SQL dump, then create a new database, and import the dump. Then switch your site to use the new database (by editing the bottom of /site/config.php). Just in case there's a problem specific to that DB, that would at least put it in a fresh state. Please let me know if you find anything else.
  15. Nice module Nico! I have a few suggestions: 1. The current way you are using $pages->find() to find files is going to mess up the pagination for any pages that have blank file fields. For instance, on the site I tested, I have 30 files, but hundreds of pages with blank file fields. I ended up with 90+ pagination links, where most pages were just blank. So I think that finding files by template is probably not ideal. Instead I'd suggest finding them by field. This will work: $fields = $this->fields->find('type=FieldtypeFile|FieldtypeImage')->getArray(); $pages = $this->pages->find(implode('|', $fields) . ">0, sort=-modified, limit=10"); 2. You have some stray var_dump() functions that are breaking the display in some parts of the module. 3. In your executeDelete(), I don't understand why you have this line: foreach($f->page->getInputfields() as $field) { It doesn't seem necessary? I would get rid of it if you can.
  16. I didn't know about this. Sounds useful and I like the sound of it, but haven't seen it. Yet another thing I need to investigate further. I think we'll just go one step at a time here and start with implementing your improvements. It'll be a few days here before I can make these updates in the core, but I think it'll be a good thing to do. The only plugins PW has into TinyMCE are the pwimage and pwlink plugins (images and links). These are powered by ProcessWire rather than TinyMCE (for the most part). What sort of extensions or improvements would you recommend?
  17. It shouldn't matter if you've renamed the admin page, but thanks for mentioning it. Those are the kind of things that are good to know. Let me know if you find that you can reproduce it. Thanks, Ryan
  18. Here's how: So you basically create the blog site, then run that profile export. Then take the /site-default/ directory from a blank ProcessWire (one where the installer hasn't yet been run) and replace these directories in it with the ones from your blog site: /site/templates/ /site/modules/ /site/install/ Then zip up that entire /site-default/ directory, or put it on GitHub. This is a site profile. Now anyone can replace the /site-default/ directory in a new copy of ProcessWire with yours, and it'll install your blog site. I also often use this technique for migrating client sites from dev to live.
  19. Testing here in 2.2, but I can't duplicate. Can you think of any other factors involved? Has your site been through a profile export/import (like 2.0-2.1 upgrade)? Have any admin-related pages been renamed? Let me know if you can think of anything else that might be different from a stock installation. Tahnks, Ryan
  20. I agree with all your points, it's a great framework. Admittedly it's rare that I use a traditional framework as most of the work I do better fits in line with what ProcessWire does. But if I found myself in a project that called for a more traditional framework, Symfony2 would be one of the first I'd consider. I've not considered this need before, but you should be able to add a snippet to the top of your /site/templates/admin.php that prevents it from being accessed by your main site: if($config->httpHost != 'admin.mysite.com') throw new Wire404Exception(); As for making the admin run at the root path, I don't immediately know of a way to do that while still having it power a site. Though you can certainly rename the admin page to something more transparent like "a" rather than "processwire".
  21. That does seem very strange. I'm impressed you went to the effort of trying out the query independently. If the query is failing (not updating) even when trying it directly in a MySQL client (like PhpMyAdmin) then it seems like there is a MySQL error or bug occurring here? Can you confirm that following up with this query shows the non-updated value? If it's showing the incorrect value, you might want to try to run a database repair on the table (in PhpMyAdmin, check the box next to the table and select 'Repair' from the select box). If it is showing the correct value from PhpMyAdmin, then let me know as we'll need to look at some other things.
  22. Why can't you login into PW with Firefox 9? (FF9 is my native browser). Just curious if I've missed something?
  23. Can you expand on this? I'm not sure I understand what you mean. If we can make it possible for everything in TinyMCE to be customizable outside of the core, then I'm all for it. The problem is, I don't yet have enough expertise with TinyMCE's architecture to know how. We need a TinyMCE expert on our team to help maintain and optimize this module--interested in the job?
  24. This is a good thing to do with your own sites, but not a good thing for ProcessWire to do since we can't safely assuming PW is "online". PW is used in some offline contexts. I develop offline too. What Antti said is correct. I recommend including your own jQuery scripts for your site. While you certainly can use PW's jQuery modules, it's best to keep the needs of your site independent from the needs of the admin (to prevent a PW upgrade from breaking something in your site's javascript, for example). jQuery stuff isn't always backwards compatible. I originally used 1.2.6 rather than the newer one, because the newer one was buggy, and having issues with new versions of jQuery. This may have changed in the last year (hopefully anyway). If anyone has a moment to check it out and test, I'll be happy to upgrade it. Otherwise I'll take care of it as soon as there's time to properly test on this end.
  25. Jquestion, one good thing that has changed in ProcessWire since that post you linked to was written is that the user system is now built around pages and templates. You can add whatever fields you want to your 'user' template. This opens up a lot more possibilities that didn't exist back when that post was written. So if you want multiple users to have access to a given page, you might just want to create and add a new page reference field to the 'user' template. You might call it something like "client_page". Use 'PageListSelect' or 'PageListSelectMultiple' as the Input field type for that page field. Now when you edit a user, you can select what private page(s) they should be able to view. In your template used by that private page, you'll want to have some kind of access check in there like this: if($user->isGuest() || $user->client_page->id != $page->id) throw new WirePermissionException("You don't have access to this page"); or if a multi-page reference field: if($user->isGuest() || !$user->client_pages->has($page)) throw new WirePermissionException("You don't have access to this page"); To allow for logins by email address: if($input->post->login_submit && $input->post->email) { $email = $sanitizer->email($input->post->email); $emailUser = $users->get("email=$email"); if($emailUser->id) { $user = $session->login($emailUser->name, $input->post->pass); if($user) { echo "Login success!"; } else { echo "Login failed!"; } } else { echo "Unrecognized email address"; } }
×
×
  • Create New...