Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 01/24/2013 in all areas

  1. Thanks for the likes It means a lot to me you guys seem to really like me. I don't know what this number means but it's a little scary... heh
    9 points
  2. Congrats and thanks for the great modules! Can you even sleep without a daily dose of 50-100 Pw-likes?
    4 points
  3. Hah, Soma! That is because most people probably don't notice your subtle changes/fixes after wrong-but-really-quick posts
    4 points
  4. Dear PW-ers. I would like to inform you that I’ve been in need of Tree View commenting system for a project being developed by me at the moment, thus, I’ve decided to make some additions to the commenting system developed by Ryan. Hereunder, I’d like to share the code with you for your kind information. You can also practice it in case of need. Some screenshots: Download link: FieldtypeComments.zip List of changed files: small change in main.css: Archive updated.
    3 points
  5. Once the International Organization for Standardization have a 639 classification for WillyC's lingo, we can give him his own sub-forum too.
    3 points
  6. Browser? You're using browsers, graphical ones? No no, I'm using a self-written TCP/IP stack and then: >telnet processwire.com 80 Trying 207.58.138.35... Connected to processwire.com. Escape character is '^]'. GET /talk/ HTTP/1.0 Host: processwire.com User-Agent:Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.101 Safari/537.11 HTTP/1.0 200 OK ... No wonder you're always faster than me with your replies...
    3 points
  7. I already secured .co.uk so we're set
    2 points
  8. alway.s have call.to action my designe teacher say
    2 points
  9. This is a great point, and it reveals some core differences between ProcessWire and other systems. I like to put it this way: the closer a CMS comes to not being a CMS, while still being a CMS, the better it is. Hope that makes sense. Thanks, Matthew
    2 points
  10. nn_basic_page_file contains Pagefiles object, which is inherited from WireArray, which is actually an object that PW uses pretty much everywhere. It is neat concept and makes working much faster than with regular PHP arrays. See more from here: http://processwire.com/api/arrays/ So from that link you find all the ways to find files from your field. Some examples: //first, this makes it all nicer: $p = wire('pages')->get(1001); $first_file = $p->nn_basic_page_file->first(); // like wanze showed above $second_file = $p->nn_basic_page_file->eq(1); $random_file = $p->nn_basic_page_file->getRandom(); $specific = $p->nn_basic_page_file->get("filename=myphoto.jpg");
    2 points
  11. Well, I just submitted a pull request for this module that might be of use to others here. It adds the ability to check to see if parent pages appear in a user's editable-pages list and to allow editing if that's the case. This allows marking whole branches of the page tree as being editable by a user with just the addition of the root page to the user's list.
    2 points
  12. Congrats, Soma, you most definitely deserve it! I can personally say I've learned loads of stuff about ProcessWire and web development in general thanks to your contributions to the forums. Thanks, and keep up the good work!
    2 points
  13. Brian, try this post for some autoloader help.
    2 points
  14. Greetings, If you keep this up, you will hit your 2000 milestone at an even faster rate. All jokes aside, thank you very much for all your help. I'm sure I am not the only one who really appreciates your deep knowledge and constant patience. Thanks again, Matthew
    2 points
  15. Soma is always there willing to help. Really deserved likes!
    2 points
  16. Well, I guess it's just because you really deserve being thanked (and liked) by many people on this forum! I wish I could be more helpful myself but I have to admit I have a long way to go before being close to many of you concerning developping skills. I'm saying this not for my own merit, of course, but just so I could allow people like you focusing on higher skilled matters. Anyway, being around this forum is great and it's just because there are many persons like you, Soma, willing to help the others, quick in answering their problems, and patient enough to repeat some 'beginner' talk to guys like me. So THANKS to you, but also THANKS to many others for your kind help and the way you're involved here. Congratulations!
    2 points
  17. It means you talk to much are very helpful I'm trying to catch up, but I'm not as Ninja-quick as everyone else at answering topics first. I do like that so many people are keen to be first to respond - it shows that we all very much enjoy being here and helping out
    2 points
  18. As briefly discussed earlier with Ryan (http://processwire.com/talk/topic/1560-searching-multiple-fieldtypes/page-2#entry23307), I tried to build some sort of test suite for ProcessWire. The tests aim for selector consistency (in-memory and db) and of course making them free of bugs - once and for all. The beginning of the test suite with instructions can be found from https://github.com/niklaka/ProcessWireTests . I wouldn't be surprised if I had to go and restructure the whole thing sooner than later (more than once even), but that'll do for now. Next I'll focus on writing a basic set of tests to cover at least the most common selectors (as there's currently only a few of the most simple ones there). This testing stuff if somewhat new to me and I've been reading lately a little something on the subject. Hope I got at least something right . Having said that, any help (or constructive criticism) from you my dear friends is highly appreciated. Especially if you'd happen to have any/some experience on testing - but I'll take kind words from anyone . I decided to try where I'm able to get with PHPUnit and so far it looks like it would be very much possible to build something useful with it (no, I'm not exactly surprised as it sure is a proven tool for such a thing). I did take Ryan's idea of using Skyscrapers profile as a base for testing (you're not making changes to it are you Ryan ), but there may be need for some other approach as well, even another Skyscrapers based one. Well, I'll go and write a a couple of more tests now. (PS: If some admin feels this post fits some other area better, please do move it - I wasn't sure where to put it myself.)
    1 point
  19. I've been working on making repeatable fields for ProcessWire for a couple weeks and actually now have it nearly ready. I need to do some more testing before releasing it, but wanted to give you a little preview. (please view the full screen version for better quality) Accessing repeatable fields from the API is super-easy. They are fully searchable/selectable with the API just as easily as with any other fields. So if you wanted to find all pages that had a buildings field with a floors value of 50 or more, you'd do this, for example: $pages->find("buildings.floors>=50"); Lets say you are on the page with a 'buildings' field and you want to print out all the building names and number of floors. It works exactly the same as page references: foreach($page->buildings as $p) { echo "<p>{$p->building_name}</p> has {$p->floors} floors.</p>"; }
    1 point
  20. Custom Page List lets you easily customize the page list (tree) in the admin section. I wanted something more (easily) configurable than the existing solutions, so I tried to add some new functionality with an easy to use interface. This is my first module for ProcessWire, so don't hesitate to let me know how to make it better Based on the work of Philipp Urlich (somatonic): PageListImageLabel https://github.com/somatonic/PageListImageLabel Adam Spruijt (adamspruijt): PageListBetterLabels https://github.com/adamspruijt/PageListBetterLabels Features Customize styles and separators used in the page list Display custom labels for each field Display image thumbnails Display formatted dates Display info from related models (e.g. title field of related pages) Display on/off checkbox as "Yes/No" (ready for translation) Define output filter(s) for each field Configuration See the README that comes with the download. Download Source code is available at https://github.com/hgassen/custom-page-list.
    1 point
  21. Hey PW, I am only a starting developer and I am still in school and my experience with processwire is quite small but recently I've created my own module for Processwire and I kind of had to ask and copy a lot from other sources, now I want to create a small walk through tutorial for people with the same lack of knowledge as me And as a guide for myselfs in the future 1) Setting up the file. Okay, so we start of by making a new document in the Module root folder and call it Harmster.module for this example, we dont need to add the .php extension. Now every module in Processwire needs to extends the classes and methods from Processwire itselfs so we start off by typing class Harmster extends Process{ } You can also extend WireData, I don't really understand the difference but both work for me A module contains 2 standart classes, init() and getModuleInfo() init() This is kind of, or the same as a __construct() method, this always executes and is executed almost at creation. getModuleInfo() This is a method that is used to show the information in the Processwire CMS. We both need to add these to our fresh class like following: class Harmster extends WireData { public static function getModuleInfo() { return array( 'title' => 'Harmster', 'version' => 100, 'summary' => 'Harmster module' 'singular' => true, ); } public function init() { $this->setFuel("harmster", $this); } This is where I, as a starting developer, get really excited about this little code in the init() method $this->setFuel("harmster", $this); Basically creates your class in every template you are going to use and it is callable by $harmster Woah! awesome right! Now this is where I got stuck on, I the user to configure some options in the module :\ hmm... Well I just went asking on the forums and the super nice community of PW came to help me, Wanze in this case (no emoticon because its not allowed) (Check it for yourselfs, http://processwire.c...lds-for-module/) And basically you need to implement some methods from an another object, you should replace this, class Harmster extends WireData implements Module with class Harmster extends Process implements Module, ConfigurableModule But when you add that and try to use your module you'll see you get an error, we need to add one more method to the class called getModuleConfigInputfields add static public function getModuleConfigInputfields(array $data) { } 2) Adding a configurable and usable textbox But now you want to add some input fields, now this is pretty hmm complicated For a simple textbox you put this inside the method you just made: $modules = Wire::getFuel('modules'); $fields = new InputfieldWrapper(); $field = $modules->get("InputfieldText"); $field->attr('name+id', ''some_text_field_saved_name''); $field->attr('value', $data['some_text_field_saved_name']); $field->label = "Hamsters rule!"; $field->description = 'Enter a nice sentance here if you like hamsters'; $fields->append($field); Now you've created a input field and you can use it with $this->get(''some_text_field_saved_name''); in all your methods in this class (no emoticon because its not allowed) If you're lazy Now what you've created is a configurable module, heres a I am lazy and i want to pastey (no emoticon because its not allowed) class Harmster extends Process implements Module, ConfigurableModule { public static function getModuleInfo() { return array( 'title' => 'Harmster', 'version' => 001, 'summary' => '', 'href' => '', 'singular' => true, 'autoload' => true, ); } public function init() { $this->fuel->set("harmster", $this); } static public function getModuleConfigInputfields(array $data) { } } Now if you want to add a overview page, much like the setup, pages, acces and module tab in Processwire CMS default you can easily do this by adding 2 new methods in your class, install and uninstall 3) Creating your install and uninstall So you want to get a nice overview for your module now eh? Well we can do that because Processwire is awesome like that I did this for my module Now, we need to add 2 methods to our class, ___install and ___uninstall (yes, 3 underscores) So add this to your class: public function ___install() { } public function ___uninstall() { } I think that these are kind of self explaing, the one method gets executed when the user installs the module and the other one gets executed when the user deinstalls the module. Now we want to add a page to PW CMS, but how (no emoticon because its not allowed) Thats actually really easy, $page = $this->pages->get('template=admin,name='.self::PAGE_NAME); if (!$page->id) { $page = new Page(); $page->template = $this->templates->get('admin'); $page->parent = $this->pages->get($this->config->adminRootPageID); $page->title = 'MailChimp'; $page->name = self::PAGE_NAME; $page->process = $this; $page->save(); } This is how you install a page, notice that we name the page to self::PAGE_NAME therefor you want to add const PAGE_NAME = 'harmster-module'; with the name of your module BUT BUT now everyone can look in to this module D:< i dont want that! Ofcourse you dont want that. Clients are famous for breaking everything where they put their hands on, so we need to create permissions! Now the way you make permissions is just genius and so easy, you just add this to your ___install method, $permission = $this->permissions->get(self::PERMISSION_NAME); if (!$permission->id) { $p = new Permission(); $p->name = self::PERMISSION_NAME; $p->title = $this->_('View Harmster Page statistics and synchronize pages with lists'); $p->save(); } And you create a permission constant just like PAGE_NAME like this const PERMISSION_NAME = 'hr-view'; And of course you can create more permissions, just genius! Now what our install method should look like is this: public function ___install() { $page = $this->pages->get('template=admin,name='.self::PAGE_NAME); if (!$page->id) { $page = new Page(); $page->template = $this->templates->get('admin'); $page->parent = $this->pages->get($this->config->adminRootPageID); $page->title = 'Harmster'; $page->name = self::PAGE_NAME; $page->process = $this; $page->save(); } $permission = $this->permissions->get(self::PERMISSION_NAME); if (!$permission->id) { $p = new Permission(); $p->name = self::PERMISSION_NAME; $p->title = $this->_('View Harmster Page statistics and synchronize pages with lists'); $p->save(); } } This will set a module page up for you And we create an uninstall method, this basicly reverts your installed permissions and pages. public function ___uninstall() { $permission = $this->permissions->get(self::PERMISSION_NAME); if ($permission->id) { $permission->delete(); } $page = $this->pages->get('template=admin, name='.self::PAGE_NAME); if ($page->id) { $page->delete(); } } Now you are might be wondering, how do i get to display content in my page :S Well, I kinda stole this from other modules and it does work, but I am open for suggestions. the method ___execute gets executed when you click on your page in the PWCMS. What i wrote in there is public function ___execute() { return $this->_renderInterface(); } and in renderInterface() i put the next code: private function _renderInterface() { $this->setFuel('processHeadline', 'MailChimp synchronize tool'); $form = $this->modules->get('InputfieldForm'); $form->attr('id','ga_form'); $wrapper_audience = new InputfieldWrapper(); $field = $this->modules->get("InputfieldMarkup"); $field->label = $this->_("Gebruikers"); $field->columnWidth = 100; $members = $this->list_members($this->get_apikey()); $html = "<table class='AdminDataTable AdminDataList AdminDataTableSortable'>"; foreach($members['data'] as $member) { $html .= "<tr><td>" . $member['email'] . "</td><td>" . $member['timestamp'] . "</td></tr>"; } $html .= "</table>"; $field->attr('value',$html); $wrapper_audience->append($field); $form->append($wrapper_audience); return $form->render(); } Bascily you create a form and you render the form and that displays it for you, just play around with it for a bit and you'll get into it, as i am still getting into it. I am lazy, here a copy, pastey (no emoticon because its not allowed) <?php class Harmster extends Process implements Module, ConfigurableModule { const PAGE_NAME = 'harmster-module'; const PERMISSION_NAME = 'hr-view'; public static function getModuleInfo() { return array( 'title' => 'Harmster', 'version' => 001, 'summary' => '', 'href' => '', 'singular' => true, 'autoload' => true, ); } public function init() { $this->fuel->set("harmster", $this); } static public function getModuleConfigInputfields(array $data) { } public function ___install() { $page = $this->pages->get('template=admin,name='.self::PAGE_NAME); if (!$page->id) { $page = new Page(); $page->template = $this->templates->get('admin'); $page->parent = $this->pages->get($this->config->adminRootPageID); $page->title = 'Harmster'; $page->name = self::PAGE_NAME; $page->process = $this; $page->save(); } $permission = $this->permissions->get(self::PERMISSION_NAME); if (!$permission->id) { $p = new Permission(); $p->name = self::PERMISSION_NAME; $p->title = $this->_('View Harmster Page statistics and synchronize pages with lists'); $p->save(); } } public function ___uninstall() { $permission = $this->permissions->get(self::PERMISSION_NAME); if ($permission->id) { $permission->delete(); } $page = $this->pages->get('template=admin, name='.self::PAGE_NAME); if ($page->id) { $page->delete(); } } public function ___execute() { return $this->_renderInterface(); } private function _renderInterface() { $this->setFuel('processHeadline', 'MailChimp synchronize tool'); $form = $this->modules->get('InputfieldForm'); $form->attr('id','ga_form'); $wrapper_audience = new InputfieldWrapper(); $field = $this->modules->get("InputfieldMarkup"); $field->label = $this->_("Gebruikers"); $field->columnWidth = 100; $members = $this->list_members($this->get_apikey()); $html = "<table class='AdminDataTable AdminDataList AdminDataTableSortable'>"; foreach($members['data'] as $member) { $html .= "<tr><td>" . $member['email'] . "</td><td>" . $member['timestamp'] . "</td></tr>"; } $html .= "</table>"; $field->attr('value',$html); $wrapper_audience->append($field); $form->append($wrapper_audience); return $form->render(); } } I'll update this tutorial in the near future as i am still working my way up (no emoticon because its not allowed) Aww, i get an error when i save it, thats not nice. Thanks for reading (no emoticon because its not allowed)EDIT Updating this tutorial very soon, its horrible and incorrect
    1 point
  22. Dead right! (Psst! Where is the code edit button?) murof eht htiw gnorw gnihtyna ees t'nac I ,yawynA ssoJ
    1 point
  23. Hi, I've installed ACE Text Editor today and it's awesome to directly write markdown in a really good looking way. But what I found to be tricky is to insert images there. It would be nice to get some kind of image import like in TinyMCE there, but I think this could be a little time consuming. So I got myself a little workaround. I've added a little input below the description to the ImageField module to show me the url, so I can easily copy it into my body. This would be a nice optional feature to have, so people could activate it if needed. protected function ___renderItem($pagefile, $id, $n) { $thumb = $pagefile; if($this->adminThumbs && $thumb->height > $this->adminThumbHeight) { // create a variation for display with this inputfield $thumb = $thumb->height($this->adminThumbHeight); } $out = [...] // own Code "\n\t\t\t<input disabled style='width: 99%' type='text' name='url_$id' value='{$pagefile->url}' />" . // End own Code "\n\t\t</p>"; return $out; }
    1 point
  24. There appear to be some ongoing issues since the upgrade and some of it seems to be down to some weird mish-mash of old and new code in the new template - evidently the update did not run as smoothly as it seemed! Since there's a minor upgrade required due to another recent release, what I'll likely do soon is start from scratch with a blank installation locally and copy the edits made for the current theme over the top of that and then re-import it. It's a bit of work, but not as much as it sounds to be honest. In the meantime, those experiencing issues on Chrome might like to try a different browser. @Nik: this means one with a GUI
    1 point
  25. We could indeed put puppies on it. I think it should also run on Wordpress too
    1 point
  26. Nice one pete! Can we put puppies on it?
    1 point
  27. $event = $pages->get("template=calendar-event, sort=calendar_event, calendar_event>today"); if($event->id) { // you got one } That's repeating what nik already said. But I wanted to mention that you can just type "today" in the selector (no need for the mktime). PW runs any non-integer you put in there through PHP's strtotime(), so you can do things like "today", "yesterday", "next week", "+3 hours" etc.
    1 point
  28. Hello world! The generator tag in the default templates/head.inc file reads: <meta name="generator" content="ProcssWire <?php echo $config->version; ?>" /> I think this should be <meta name="generator" content="ProcessWire <?php echo $config->version; ?>" /> Cheers, Jenn
    1 point
  29. In reply to panictree... Totally agree here. There is very seldom a 1:1 language:country mapping so trying to reflect language via country-specific top level domains doesn't reflect that reality anyway. Language specific subdomains would be more easily established under the processwire banner and certainly easier to administer. However, for *local* user-groups locality obviously becomes an issue and is, perhaps, better solved by such groups as they organize themselves anyway. In such cases, I would have thought that a "national" PW user group (should it ever get established) might seek to secure and use domains like processwire.de/.es etc. Perhaps we could do something similar to Textpattern's forum? They have an International section with subforums for each language. The vast majority of discussion is in the English forums but having the language specific forums there does allow for conversations in other languages when needed.
    1 point
  30. I think panictree is absolutely right here. So for internationalization of processwire and community this could be the way to go: Having the main site processwire.com holding all informations in english Subdomains for languages containing the main site translated and adopted to local requirements therefore a language coordinator should be announced (or a group of users) which maintain translations and handles language-specific things forum in english, but it should be possible for non-english-speaking users to post messages, which then might be translated by the language coordinator pideluxe
    1 point
  31. Thanks a lot.. I got that & I had also watched the excellent video by Ryan. Created Repeater field with Title & Page type fields. But I am slightly confused by this: According to the above: There is one Repeater field Each Repeater has for ex: 5 Repeater Items Each Repeater Items has a Title + Page (Array) Thank you for your patience.
    1 point
  32. Try to read through the code since Ryan did a good job describing the steps. You can find that around line 237. Also, you might be interested in the Form Builder. This module has a lot of options which require second to none programming skills. It is build by Ryan and has a very ProcessWire feel to it.
    1 point
  33. GitHub it is then. It's of course the Right Way to do it as well. I think there isn't too much in PHPUnit that couldn't be done pretty easily and more straightforward even, at least at this stage. However, in my opinion there are a few advantages in using PHPUnit instead of a home-grown alternative: 1) It's production ready, so no need to re-invent the wheel; 2) It's a known tool, which could give the project some extra credibility; 3) There are some integration/extension possibilities there already that just might come in handy, for example code coverage analysis (with Xdebug) and Selenium integration. And maybe I should add some more personal ones: 4) It would have taken me ages to come up with a script decent enough; 5) I saw an opportunity to learn something that could be useful in the future. And so on . But, just to be clear, if there comes anything in our way that would stall the progress of testing at least the selectors, I know I won't be missing any tool and will be more than happy to choose another alternative in no time, be it home-grown or not. To write tests using PHPUnit the main thing to know is that any method with its name starting 'test' is considered a test and will be run as such. The tests are located in classes inherited from PHPUnit_Framework_TestCase (or ProcessWireTestCase in this case, which adds a little something there in between). I tried to follow some examples on structuring the tests by creating directory for Selector tests and creating the test case classes there. By the book there should be a test case class for every class that's being tested. But as these aren't really unit tests anyway, I took the freedom to group the tests a bit differently. So right now there are two classes under Selector: BasicOperatorsTest and ContainsOperatorsTest (classnames should end with 'Test') and there could be for example SubfieldTest, SortTest, PagingTest etc. I don't know yet how big each of those would grow so it could have been better to have just one class for starters - especially when with this kind of naming it wouldn't be clear where some more complex tests belong to. But there are other maybe even more logical ways to cut this into pieces, we'll see which direction we're going to take. There are only two test* methods in both of the classes at the moment: one for testing selectors in database and another for in-memory tests. Both methods use a data provider (see the @dataProvider annotation) that returns an array of arrays of arguments to pass to the test method. So basically all you need to do to add a new test that follows the same pattern, is add another array or arguments for the data provider method to return (description, selector string, array of assertions and an optional skip message to mark the test as skipped). More complicated tests can be added as new test* methods as well.
    1 point
  34. Hello everyone, Here's my Hebrew translation for ProcessWire 2.2.9: https://github.com/jacknails/processwire-hebrew ProcessWire-Language-Hebrew.zip
    1 point
  35. Hi everyone - only a couple of days in PW so far, but loving it. Just wondering if there might be a way to name the headers of the collapsible repeaters in the page edit view and also have them collapsed by default. I don't think this is what woop is asking for. What I am trying to achieve is a personnel directory and as it stands, it becomes difficult to edit - once you get a lot of entries you end up with a lot of scrolling. If it was possible to set them to be collapsed to start with and then use values from one or more of the fields (ideally I'd like to concat first_name and last_name) as the title for the header bar. I know it is possible to adjust the visibility for the field to "collapsed ...", but this collapses the entire repeater field, rather than the individual items. I am thinking that I might actually be bette off going back to parent>child approach I had originally set up as I think the repeater approach will become a little unwieldy when there are lots of entries. Anyone have any suggestions - am I missing some obvious setting? Thanks
    1 point
  36. oh! The button says "Like?" I must invest in some new spectacles..... (And thanks for your menu help anyway!)
    1 point
  37. So, here's my script: <?php require('backup_restore.class.php'); $newImport = new backup_restore('localhost','root','','pw_clean','*'); $newImport->restore(); function SureRemoveDir($dir, $DeleteMe) { if(!$dh = @opendir($dir)) return; while (($obj = readdir($dh))) { if($obj=='.' || $obj=='..') continue; if (!@unlink($dir.'/'.$obj)) SureRemoveDir($dir.'/'.$obj, true); } if ($DeleteMe){ closedir($dh); @rmdir($dir); } } function rcopy($src, $dst) { if (file_exists($dst)) rrmdir($dst); if (is_dir($src)) { mkdir($dst); $files = scandir($src); foreach ($files as $file) if ($file != "." && $file != "..") rcopy("$src/$file", "$dst/$file"); } else if (file_exists($src)) copy($src, $dst); } SureRemoveDir('../pw_clean/site', true); rcopy('site', '../pw_clean/site/'); ?> And it's working well
    1 point
  38. Maybe something like this then, extending from Soma's example: $titles = array('first', 'second', 'third');foreach($titles as $title) { $np = new Page(); $np->parent = '/path/to/your/parent/page/'; $np->template = 'basic-page'; $np->title = $title; $np->save();} So there's no need for WireArray or PageArray here, nor import() - which has nothing to do with creating new pages but importing Page objects into a PageArray. And if you'd want to import some more data in there at once, take at look at this as well: http://modules.processwire.com/modules/import-pages-csv/
    1 point
  39. @thatigibbyguy I clearly remember being like you (no PHP) and I am still quite a PHP lite-weight. Luckily by the time I came to PW I had some PHP behind me because it meant I mostly had to only focus on PW. But all I can say is that I am SO glad I spent some time getting the basics of PHP because it's allowed me to use PW which I've found to be the best CMS I've ever used, no contest. And using it has lead to learn more PHP due to the excellent and helpful examples in this forum. In case it helps, these two are resources that you'll either already know of or if not may be good places to get more PHP mojo: http://phpmaster.com/ and of course http://php.net/. Good luck!
    1 point
  40. Ah, yeah sorry myself. I'm not a php developer at all, just html/css/jquery. Just trying to learn something new. Thanks man.
    1 point
  41. (Sorry tinacious, formatting code and quotes just doesn't work for me atm...) You could do it the way you've described with a little change: if($date > $today) { // now you've got what you're looking for in $event $firstUpcomingEvent = $event; // break out of the loop break; } While the example above would do it, I'd say the best way to go is using a single get() with the right kind of selector . This is all you need: $today = mktime(0,0,0,date("m"),date("d"),date("Y")); $firstUpcomingEvent = $pages->get("template=calendar-event, calendar_event>$today, sort=calendar_event"); Although, it's a bit confusing to me when you've got a date field called 'calendar_event' in a template called 'calendar-event'. I would definitely make a mistake with that kind of setup one day myself . I'd change the name of the field to something else, like 'calendar_event_date' or whatever that makes the selectors understandable. But that's just me, the selector does work as it is. Maybe it's just a snippet and there's some html coming up in the actual template file or something, but just in case: it's a good practice to omit the closing PHP tag (at the end of the file) to prevent accidental whitespace, see http://php.net/manual/en/language.basic-syntax.phptags.php . ( Edit 1: I don't get it, since the forum update editing code and/or quotes just does not work. Is it just me? Using Chrome on a Mac. Edit 2: Let's see if I got it right after second edit... Going to use plain text editor from now on. Edit 3: Nope, not even that works anymore. Without any tags then? )
    1 point
  42. For the faq you should consider to use a definition list instead of (ul, li) because it will give you more control for styling the questions and the answers, and it's semantically more correct (arguably, of course): <dl> <dt>question?</dt> <dd>answer</dd> <dt>question?</dt> <dd>answer</dd> </dl> edit: what happened to the first part of my post?? I had a paragraph linking to this http://bio.mq.edu.au/Tools/jquery/plugins/riklomas-quicksearch/examples/... or didn't I? hm, I'm confused
    1 point
  43. 1 point
  44. Thank you Ryan for great work. Issues solved and everything work fine. Total translatable files in dev branch is 84 now. Czech localization progressing fast, i think i will have version 0.8 tommorow.
    1 point
  45. Depends. Here's an example: I'm involved in the development of the Serendipity blog engine. While it's not technically a German project at all, our lead developer (“our Ryan”) is German, as are most of the contributing devs. Since Serendipity also has a lot of German users, it seemed reasonable to set up a German-only subforum on the user forum for those of them who are not confident in their English skills. So now we have quite a few German-only forum threads which “hide” valuable info from people who don't read German, although we usually encourage anyone to use the English subforums if at all possible. So while I think that a certain amount of local activity can be a good thing - basic localized information/documentation, a list of local users/developers etc. -, too much local activity can also lead to a fragmentation of the community. I would, e.g. not necessarily consider a “German PW forum” a good idea. Also, localized documentation is kind of cutting it both ways - while it's a good thing for people who don't read English properly, it is very hard to keep localized docs up to date. Just my 2 cents, though.
    1 point
  46. Welcome Bethanie! I'm on mobile and in a hurry to leave, but I'm sure that when I come back in the evening you will have already an entire course on ftp from the guys here in the forum
    1 point
  47. I think we should do it the WordPress way (sorry for mention the w-name). We don't need processwire.de - we just could use http://de.processwire.org/ (or .com) as a beginning (like: http://de.wordpress.org/). This page doesn't have to include all of the pages processwire.com does. It just would be a "hello german user. Yes, ProcessWire has a german admin interface. You can downlad the bundle here." And if you download processwire on this site it may should contain a german profile already...
    1 point
  48. Greetings Everyone, I sensed a buzzing in my ears... Oh, hello Joss! Quick bit of relevant history: Joss and I have tag-teamed on numerous, lengthy discussions on core CMS issues, stretching back into some obscure Joomla technical groups where he and I voiced loudly the need for that CMS to adopt better custom-field options, as well as other issues. Those were heated discussions, zeroing in on gaps in Joomla's central functioning. But even in those inherently critical discussions, Joss and I both stayed positive and constructive and tried to do our part to move Joomla forward to improve. In those discussions (which I could dig up for anyone who is interested) I often made comparisons between Joomla and other systems as a way of exemplifying what I thought Joomla could become -- again trying to do so in a constructive way. Joss and I remained a virtual tag-team throughout those discussions, online and offline. Which brings us back to the current discussion... I spent a good portion of 2011, and most of 2012, on a quest to test several CMSs and make an honest assessment of them. By the end of 2012, I had deeply tested the following systems: ProcessWire PyroCMS ModX ExpressionEngine Joomla Drupal Concrete5 It's pretty clear which system I have chosen! But that's not the point. The point is, I gave all these systems an unbiased try, and I learned a lot by looking at them honestly. (With Joomla, I did more than "try," as it was my core system for about four years.) Some of these systems have such large gaps in their capabilities I could not continue using then for the kind of sites I want to develop. But others on this list have strong benefits. Still, in the end, the flexibility and complete openness of ProcessWire's API made it a winner across the board for me. The systems that come closest in my mind to ProcessWire's capabilities are EE, ModX, and PyroCMS. Again, each of those systems has its benefits that ProcessWire could learn from (perhaps we could get into specifics in another discussion). But again and again ProcessWire proved itself to be a more natural and flexible system. We should acknowledge that there is a development philosophy behind each system that appeals to certain kinds of users. For example, users who do not want to look at code, and users who want templates that lay out specifically what goes where in their sites, will be happier with systems like Joomla or Drupal. If someone is just counting the number of available extensions, ProcessWire can't compete with Joomla or Drupal (which have tens of thousands). I don't think the raw number of extensions is meaningful at all, but that is also for another discussion. To many users, there is comfort in high numbers. For people who want a fairly open system, with control of their URLs, but which still make some templating assumptions, Concrete5 and PyroCMS are good. When you get into "completely open" systems you can seriously compare EE, ModX, and ProcessWire, at which point there are more refined choices like the use of tags, how files are handled, the speed of the interface, and more. The specific comparisons go on and on... I much prefer positive discussions. That does not mean we cannot be critical. It's more a comment on the goals of a discussion. It's depressing when all you have achieved is a slamming of something (or someone) else. It's much more exciting if in the end you improve your system (or yourself) by taking an honest look around you. Also, to be blunt, it is smarter to be constructive. Of course, it's also more work: it's just so easy to slam someone or something, especially in a forum where you know everyone already agrees with you! The fact is, EE, PyroCMS, ModX (and other systems) were built by very capable and creative people. We should strive to learn whatever we can from their strengths and weaknesses, while simultaneously stating clearly where ProcessWire does something better. In these forums, we are always communicating to at least two vast audiences: 1. People already dedicated to ProcessWire 2. People testing the waters or shopping around For both audiences, we are better off being positive and constructive. Although there is lots of anger and criticism on public forums, I believe that most people are attracted to a positive environment. For audience #1, we are better off pinpointing where ProcessWire can improve (while being constructive). For audience #2, it is important to point out where ProcessWire is better than other systems (while being constructive). Bottom line: I have found that ProcessWire is better across the board in significant ways. There is definite value to pointing out where ProcessWire is better. We just need to do so while being aware of the intelligence of other systems. Thanks, Matthew
    1 point
  49. I get mixed feelings replying to this topic to be honest though, let's do it: The title says "...and how ProcessWire could benefit" but, nobody goes into any detail about how or why PW would benefit from having EE devs come to PW. Or for that matter why EE devs would benefit from PW minus it being free (there are other CMS that are free I might add.) Posting in the EL forums wouldn't be cool by the way. Thankfully that idea looks like it was shot down! Seems like you are having fun with the Alternative.to which, is find, whatever. Having admin themes which look like EE isn't helping your "cause" if you want to call it that. I know these are user submitted though, putting them on the homepage gives off the wrong impression especially to EE devs I've talked with. Most of which do not like "plagiarism" even if only closely resembling the EE CP. Glad you changed them out for the default ones. You guys know why you like PW though, someone who has been using another CMS everyday for the past 5 years, for example, might just see PW as noise along with all the other CMS out there. I've talked about it before though, there are plenty of people who prefer a template engine over strait PHP or PW API however much you might think the API is just as easy. Is PW like theming for Drupal or Wordpress? Not even close and I commend you on your work with the API though, like I said, it may not be everyone's cup of tea. To be honest there is currently quite a bit of CMS "research" taking place within the EE community though, I'd say most people are just testing the waters and probably a bit less now that the initial shock of the EL changes have settled down a bit. Plus, folks are getting help via the new ExpressionEngine StackExchange site so free support is better than ever and there are more options for support then ever as well. Some people have abandoned EE altogether though, that's common with any CMS or Framework when there are major changes. With that said, PW is being looked at yes though, so is PyroCMS, Statamic, Perch and very importantly Blockscms which probably is most likely to put a dent in EE if any significant dent are to be made. Others are being looked at as well (maybe even some RoR and Node stuff.) PyroCMS is moving over the Laravel 4 (away from CI) which might just propel it's future use. Hard to say. I'm sure there will be other Larvel CMS popping up (other than pongo that is.)Statamic is different in that it's a static CMS similar to say Jekyll though PHP based (and commercial I might add which believe it or not allot of people do like.) In it's current state it could definitely compete with Perch in the "Lite" CMS arena which by the way isn't so small any longer (the Lite CMS arena that is.)Perch is another one people have been looking at though, of course that's for smaller sites too. I need to give v2 a try.Now Blockscms is a whole different story altogether and is the most anticipated to compete directly with EE once it's out of private beta. I'm not going to go into all the details though, yeah, it's coming. We'll have to see what this new year brings for that. This is really a topic in itself so I won't extend this already long post out any more on that. WIth the recent changes I think allot of people might consider using some of the other options I listed especially for personal sites or smaller client sites where as in the past they would have just used EE for everything. Allot of this stuff wasn't even there two years ago so, sometimes it's all about timing. Currently there really isn't anything that is on the same level as EE especially in regards eco system. No offense but you're not there yet. You have Drupal, WP and even Joomla of course (all are "free") which have huge eco systems but, yeah, let's not talk about those any more than I hear Drupal 8 is suppose to go Symfony 2 so I'm curious to see how that turns out. Anyway, I guess I'm not quite sure what you guys are hoping to achieve by having people come over from EE especially since there isn't anything for you to gain other than more hands on deck (which I guess I understand.) Trying to reach any users via a forum post is just senseless if you ask me and you're going to have to step up your game in many areas to compete with what's coming down the pipe. I look forward to seeing the future as things unravel for PW and all those involved.
    1 point
  50. Keep in mind that ProcessWire can run in shell scripts outside of Apache/http. But so long as you aren't dealing with timeout issues, it should also be fine to trigger it the way you are asking about too (whether curl or wget or something else). However, you'll want to make sure you've got some good security through obscurity (obscure URL), and/or a GET/POST variable pass key or something to ensure nobody else can trigger your script except you. This is always a concern with anything http accessible.
    1 point
×
×
  • Create New...