Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 12/25/2014 in all areas

  1. Merry Christmas! from Atlanta, GA, USA
    9 points
  2. Merry Christmas to everyone here.
    8 points
  3. Same same....wish a few quite and great days with family and friends!
    7 points
  4. Merry Xmas from Nigeria sorry got no pix except me playing Skyrim.
    7 points
  5. Feliz Navidad mi amigos from sunny Mexico
    7 points
  6. Merry Xmas to everyone of you! Cheers!
    6 points
  7. С рождеством! Merry Christmass! In Russia we celebrate it only on 7th of january as orthodox church still uses Julian calendar. But it is just a nice way to celebrate twice))
    5 points
  8. waiting on @blad or @josss to make a remix called "I'm dreaming of a wire Christmas".
    5 points
  9. 5 points
  10. Merry Christmas from Zagreb! One quick picture from the main square, check out other if you're interested
    4 points
  11. 4 points
  12. Just popped out another bootstrap and processwire auto website! I am getting to where I can do these in 1 to 2 weeks now! Uses the bootstrap carousel for the slider, Google maps marker module and the form templates processor module on the detail page. Also using redirects module and batcher. (Redirects for the sub menu items under inventory to send the user to the search page with the correct query strings.) I also use a cron that reads an inventory csv file and makes or updates processwire pages based on the vin number. http://www.classictexarkanakia.com
    3 points
  13. Although I've been quite away from the forums lately, I always come here at least to check how things are going. A Merry Merry Christmas for all of you!
    3 points
  14. Hope I understood it correctly. The code above will show all courses which are selected with course_name_from_list if included in the assignment.php. $course = $page->course_name_from_list; // the page inputfield returns a page object if max=1, or a PageArray, if max. is above $content = ''; // because I don't know your settings I do it as flexible as possible, but of course you could make it shorter // Case 1: You have not set a max or max is above 1 and you chosre more than one page if($course instanceof PageArray) { foreach($course as $course_item) { $content .= $course_item->course_number . " " . $course_item->title; } // Case 2: One page selected } elseif($course instanceof Page) { $content .= $course->course_number . " " . $course->title; } echo $content;
    3 points
  15. Okay, exactly how sad do you think I am? "And the DEVS were calling out for Processwire......"
    3 points
  16. Merry Christmas too, everyone.
    3 points
  17. Thank you kids! And seasons greeting to both of you and to all the other Processwirers* here. (* Process Wirers? That would make us webtricians then!)
    3 points
  18. Thanks, and likewise! Nice graphics Vrolijk kerstfeest.
    3 points
  19. A proof-of-concept session handler module for PW that uses Redis as the session database. You'll need access to a Redis server (IP address and Port) and you can configure the session prefix, the Redis DB that the sessions will be stored in and a time-to-live for the sessions. Please let me know if you run into any issues with this module. Here it is on Github. Here it is in the modules repository.
    2 points
  20. Some sites need widgets, as they have been called in some systems; a widget can be almost anything, like: tag cloud mini calendar menu quote rotator free text social sharing search contact info map This is a simple way to create widgets that can be shown in multiple "areas" of a page, as well as on specific pages. In this particular method you would need to setup each widget type you want and then determine how best to accept any necessary user input like content, pages select (like for a menu) or settings. This example uses include files for each widget type, and the name of the include file would match the name of the widget type, which is also a page field. In this example, I'm also using ListerPro to provide a widget management page. Fields The main fields used on this widget example are : title widget_location (page select - options in this case are footer and sidebar) widget_type (page select, you would configure your widget types as selectable options) pages_select (would be used for multiple pages and might apply to a menu widget) body - used for plain widgets selector (selector inputfield, used for telling the system where to show the widget) text_structured - for this i'm using a YAML field, but it could just as easily be a table; would depend on what you want to store; YAML would allow this single field to be used for varying requirements based on the widget type, but would be harder to validate and prone to user error; icon - a page select for an optional icon which is being used in the template, and would be shown as part of the widget. Files for each widget type you want to allow users to select from, you would need to create an include file with the markup for that widget, and then add that widget to the list of available widgets. here is an example for a site with several widget types: Selector & Output wherever you want to include the widgets (footer, sidebar etc.) you would run a $pages->find and then foreach through the widgets (in this case finding all footer widgets). In this case the (incredibly amazing new) selector field would be specifying what pages to show the widget on. We assume that most widgets won't have a selector specified, and will default to show the widget. if a selector is specified, we can check to see if this page fits the selector by using the $page->is($selector) syntax. <?php $widgets = $pages->find("template=widget, widget_location=footer, sort=sort"); foreach($widgets as $widget) { // check if the selector field is in use and if so, see if this page is supposed to display it: if( $widget->selector) { if( !$page->is("$widget->selector") ) continue; } $widgetType = $widget->widget_type->name; $include = file_exists("./inc/widget-{$widgetType}-foot.inc") ? "./inc/widget-{$widgetType}-foot.inc" : './inc/widget-footer.inc'; include($include); } ?> this example also has a fallback file in case the widget type is not specified, sort of a default. the widget's .inc file will be unique to your design and how you have it setup.
    2 points
  21. @Ivan: Glad you like that one. I'm going to try and work on the new module a little now. I have a feeling it needs to be re-written, but I'll decide shortly. (Not a Christmas-person, so any form of work is not a problem - does feel good to have no obligations, however.)
    2 points
  22. Just remembered that I have a couple of Christmas songs too! The first is serious, the second is plain cheesy https://www.youtube.com/watch?v=u59_xmNSp54 and https://www.youtube.com/watch?v=w3dNmLCoeXk
    2 points
  23. Happy Christmas to all Willie Batenburg was a small anonymous artist with a banjo from Dordrecht until he was discovered by a few employees of Radio Rijnmond. His music was from that moment played regularly on this channel and Willie became a real hero. Thousand guilders could be won by the listener who could exactly tell what words he sang. (nobody has ever won the price )
    2 points
  24. @benbyf - I don't think Tom did it that way. I do hope to get my module (which will fully support such redirects) up soon - still got a bit to do on it... Sorry for the delay guys... I'm sure that there are a few people who need it. Will get to it as soon as I have the time.
    2 points
  25. This is the way I use to integrate both worlds together. 1.- _header.php ( or whatever is called the file that contains your <body> tag ) <head> ... <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.2/angular.min.js"></script> <script>var app = angular.module('myApp', [])</script> </head> <body ng-app="myApp"> ... 2.- yourTemplate.php <script> app.controller('myCtrl', function ($scope) { $scope.myvar = []; $scope.myvar = <?=getChildren("template=yourtemplatename")?>; console.debug("my Object form php",$scope.myvar); }); </script> <!-- now $scope.myvar is accesible --> <div ng-controller="myCtrl"> </div> 3.- getChildren is a function that I include in _func.php function getChildren($pageId) { $pagina = wire('pages')->get($pageId); // fields to be avoided $avoid = array("FieldtypeFieldsetOpen", "FieldtypeFieldsetClose","FieldtypeFieldsetTabOpen","FieldtypeFieldsetTabClose"); // fields that must be returned $wanted = $fields; // selector $paginas = $pagina->find($selector); $arr = array(); foreach ($paginas as $child) { $array = array(); foreach($child->fields as $field) { $array['id'] = $child->id; // if we dont' want all fields back if ( !in_array($field->type, $avoid) && in_array($field->name, $wanted) && (count($wanted)>0) ) { $array[$field->name] = htmlspecialchars($child->get($field->name)); } // we want all fields back if ( !in_array($field->type, $avoid) && (count($wanted)==0) ) { $array[$field->name] = htmlspecialchars($child->get($field->name)); } } array_push($arr, $array); } echo json_encode($arr); }
    1 point
  26. This module displays tutorials according to the page where you are (based on intro.js). It also displays useful links. It is in process. Suggestions and reviews are welcome. To test the module go to modules or pagelist after install. Done: - PageList - Modules To Do: - Access -User, Roles, Permissions - Setup -Templates -Fields -Languages -PageEdit -Search Github
    1 point
  27. Was that Stollen? (See what I did there?)
    1 point
  28. Well. I used $image->size(1500)->url in my template and it works now. It is not the way via UI/Backend, but it works pretty good! Hopefully this solution is not just a quick fix but rather an elegant solution ?
    1 point
  29. @nico, i think you mean $image->width(1500)->url ? edit: tried size(1500)->url and it worked! even though it's not in the docs https://processwire.com/api/fieldtypes/images/ @steveooo sorry, didn't know that and didn't read all the results... i agree, leaving a 4MP image on the server may not be the best - but it would not necessarily be a performance problem as you can resize the images for your frontend like nico posted above. but it could still be a problem regarding disk space usage if you have lots of huge images... to your problem: sorry, i have no idea - but as horst jumped in: let the expert talk
    1 point
  30. Finally got a chance to use this module. Thank you apeisa! I installed it on current stable (2.5.3) and tested probably every function. I can state it is compatible with PW 2.5. If someone else could confirm that, maybe it can be stated on module page, so people would not be scared off by compatibility problems. @Mike Anthony: Patiently waiting for your new module. I was impressed by your Bolt redirect module satated functionality! When finished, your PW module should get almoast all use cases covered.
    1 point
  31. I have done a couple of tests in respect of memory (memory_get_usage) and timings (Debug::timer()) when processing 1000 copy-pasted CSV values in a 100X10 matrix table: For a fictitious investment company, I generated (using a local install of datagenerator) CSV data consisting of 100 rows (account manager) x 10 columns of customer details containing their: Full Names, Age, Country, Bank Account Number, Phone Number, Credit Card CVC, Email, Income, Address, Post Code Btw, this showcases another use for this Fieldtype. It is not only about colours vs sizes . If you have data such as above that is most likely already available in CSV or similar format and that would not readily lend itself to being converted to pages (even for use in Page Fields), then you probably want to use FieldtypeMatrix... OK, back to our measurements...I imported my 1000 CSV values into my matrix and got the following results. Note that I am on an i7 windows machine. lightning.pw has been down for me the last couple of days so wasn't able to test there. I am not good at such testing so if anybody else wants to help out I'd appreciate it. I also had to increase my max_input_vars from the default 1000. Saving 1000 pipe (|) delimited CSV values //Note: SEQUENTIAL PROCESSING (I skipped timing methods like get() and set() //not sure why ___sleepValue() was not showing here! See next test where we exit at ___sleepValue() 11187192: Memory Usage Start: get()Inputfield() 0.0360: Debug Timer End: get()Inputfield() 11270704: Memory Usage End: get()Inputfield() 11772248: Memory Usage Start: ___wakeupValue() 11772456: Memory Usage Start: get()blankValue() 0.0000: Debug Timer End: get()blankValue() 11773896: Memory Usage End: get()blankValue() 0.0700: Debug Timer End: ___wakeupValue() 13372176: Memory Usage End: ___wakeupValue() 12871408: Memory Usage Start: sanitizeValue() 0.0000: Debug Timer End: sanitizeValue() 12871408: Memory Usage End: sanitizeValue() 14262896: Memory Usage Start: ___render()//render calls mergeMatrix() 14263624: Memory Usage Start: mergeMatrix() 0.2190: Debug Timer End: mergeMatrix() 15165696: Memory Usage End: mergeMatrix() 0.2800: Debug Timer End: ___render() 15231376: Memory Usage End: ___render() Same as above (+sequential) but exiting at ___sleepValue() //exit before ___sleepValue() returns $values 11707344: Memory Usage Start: get()Inputfield() 0.0020: Debug Timer End: get()Inputfield() 11790872: Memory Usage End: get()Inputfield() 11791416: Memory Usage Start: get()blankValue() 0.0000: Debug Timer End: get()blankValue() 11792856: Memory Usage End: get()blankValue() 11793040: Memory Usage Start: sanitizeValue() 0.0000: Debug Timer End: sanitizeValue() 11793040: Memory Usage End: sanitizeValue() 12762576: Memory Usage Start: ___processInput() 12763296: Memory Usage Start: mergeMatrix() 0.0540: Debug Timer End: mergeMatrix() 13372952: Memory Usage End: mergeMatrix() 13361256: Memory Usage Start: ___processInput() - csv only 13361848: Memory Usage Start: processCSV 13362040: Memory Usage Start: mergeMatrix() 0.0080: Debug Timer End: mergeMatrix() 13486200: Memory Usage End: mergeMatrix() 13613512: Memory Usage Start: get()blankValue() 0.0000: Debug Timer End: get()blankValue() 13614504: Memory Usage End: get()blankValue() 0.0830: Debug Timer End: processCSV() 15346208: Memory Usage End: processCSV() 0.0830: Debug Timer End: ___processInput() 15098552: Memory Usage End: ___processInput() 14992888: Memory Usage Start: sanitizeValue() 0.0000: Debug Timer End: sanitizeValue() 14992888: Memory Usage End: sanitizeValue() 15128552: Memory Usage Start: ___sleepValue() 0.0160: Debug Timer End: ___sleepValue() 15511096: Memory Usage End: ___sleepValue() Loading the matrix table with the saved 1000 values //SEQUENTIAL 11763208: Memory Usage Start: ___wakeupValue() 0.0890: Debug Timer End: ___wakeupValue() 13363016: Memory Usage End: ___wakeupValue() 14253776: Memory Usage Start: ___render() 14254504: Memory Usage Start: mergeMatrix() 0.2250: Debug Timer End: mergeMatrix() 15156544: Memory Usage End: mergeMatrix() 0.2680: Debug Timer End: ___render() 15222208: Memory Usage End: ___render() Don't know what to derive from these results or if I did them correctly . From a timing point of view, the results don't look too bad, or? Saved data screenshot
    1 point
  32. Updated the README and Screenshots on GitHub. Should be really nice to use now: https://github.com/LuisSantiago/FirstSteps/ I also splitted this module to allow third-party modules to use this feature (examples are on github).
    1 point
  33. Hey, I added a pull request on GitHub https://github.com/NicoKnoll/FirstSteps. I think we should work together on this module
    1 point
  34. Mike Anthony, Sweet! That looks super cool. A bit more than I need, and longer than I can wait. I extended the module this afternoon and added support for: Wildcards: /somepage/* Alternate Domain: http://legacy.site.com The alternate domain is specified in the module config settings. If set, the module will also check the alternate domain for the request. If it gets back a status code of 200, then it will redirect to the request on that domain. That may be a fringe feature, but I need to maintain a legacy.site.com scenario, and this takes care of everything. @apeisa ​I may not be the best keeper of this module, as this kind of thing is a bit out of my wheelhouse. Can I just submit a Pull Request? I could also just release a beta version first for those who want to test it. We have about 80 redirects active here (a lot of which will go away with the wildcards), but I've been testing it on a production site all afternoon. Seems stable.
    1 point
  35. I have figured that out! But it takes 9 months, and what you get is something small (but cute!) that take years and years to evolve into coder.
    1 point
  36. You could also say because of this particular template setup pw lost many advanced devs before even looking further. +1 what joss said. That's where I see PW struggles a lot. Living in between advanced and casual is always a bad idea/decision.
    1 point
  37. When I rewrite my old simple site tutorial, I will be recommending the blank install and then I will take the most logical route so that the html is really staring people in the face. If the HTML is recognisable and familiar, they will have a better chance of understanding what they need to learn. However, I will, as I have done before, make sure that new users realise that this is not what you MUST do, but rather what you CAN do. The problem with tutorials, as with demo installs, is that you have to decide on just one method to avoid confusion - it is difficult to avoid newcomers believing that this is the way they have to do things.
    1 point
  38. I know I'm even surprised that you wrote such a long post. Did I ever tell you that you should keep a regular blog?
    1 point
  39. So I can't seem to find the full documentation on the datetime field and was wondering how I would go about formatting the output via the api. If i were to echo $page->date I get the date perfectly. What I would like to do is in some instances just grab a month day or year so that I could run loops that print different info on the page in an archive. I have found some complicated code that I didn't entirely understand and the documentation from the field didn't seem to have what I needed. Is there some way I could just do something like echo $page->date('Month-Year'); //or better yet $month = $page->date('month'); $year = $page->date('year');
    1 point
  40. Hi Adrian, Thanks for your suggestion, it makes totally sense - will update the module later this week. The reason I've chosen to add this setting is that the color has to be set with javascript (jqplot) so it can't be controlled with CSS. The bar graph colors could be changed with CSS, but of course the colors should match by default! Cheers
    1 point
  41. I've also always shied away from unmanaged hosting and found the command line scary. Yet recently I've Digital Ocean after reading so many good things about this new company. It's actually not really unmanaged hosting since you can contact support at any time and they're pretty responsive, but you have to set up your own server (what they call droplets) from the command line. They have well-written guides and a vibrant community for just about any need you might have, and it's actually surprisingly easy and fun to customize everything to your needs. So far, I'm really impressed. Believe it or not, I'm running 5 rather low-traffic sites on a $5 dollar / month SSD VPS with 512 Megs of RAM (their cheapest plan) from their Amsterdam data center, and boy do they run fast, and with no downtime whatsoever so far. You can easily find $10 coupons on Twitter and elsewhere, so you can try them out for a couple of months free.
    1 point
  42. no, not at the moment. But having wild cards would be great feature to have.
    1 point
  43. It seems like you might be asking the same question that's already been answered? Either that or I don't understand the question. I'll step back and assume that maybe you aren't talking about page relations. A best practice would be to make sure you aren't duplicating any data. Meaning, pull the data from the source. For instance, if you wanted to retrieve the first image from the homepage, regardless of what page you were actually on in your site, then retrieve the homepage and pull the value from it. Same goes for anything else. Every page and its data is accessible to you from the API. $homepage = $pages->get('/'); $image = $homepage->images->first();
    1 point
×
×
  • Create New...