Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 02/04/2014 in all areas

  1. MySQL clients work fine with remote MySQL servers so it is possible to have the two on different machines: it will work. What isn't so obvious is the way that MySQL handles DB replication and failover for high availability (which it sounds like you might want to do.) It's not a simple subject so I'll not go into it here but seeing as you aren't afraid to do your research, I'd recommend taking a look at "High Performance MySQL" (at least the 3rd edition) which really covers replication as well as performance. I think you'll find that the new edition (I've only got the second) also touches on sharding for load balancing - something that you might have to do manually in MySQL unlike some other high availability DBs.) If any of the data you are going to be storing involves financial transactions (say placing orders) then I'd also recommend looking at storing it in InnoDB tables rather than (what was) PWs default MyISAM tables. It is possible to get PW running on InnoDB tables in MySQL, I've done it myself though I haven't posted a how-to about it yet.
    4 points
  2. Hello together! I am working on a new site with pw. It is just a little gallery site. In the past I used MODx for this but since version 2 (Revolution) this CMS is pretty oversized and extremly slow. So I decided to give it a try with pw. So far so good. On my local dev environment a basic page needs about 1.1s to get delivered by the server (only html). A short and superficially check (= end_ts - start_ts) has shown that "new Processwire()" took approx. 1s. Is this a "normal" loading time or is there any space for performance improvements. Imho 1s seems a little long... :/ Thanks guys! Chris #UPDATE well... next time I should dig a little deeper: It is a documented problem within MySQL. Mysqli needs about 1 second to connect to the database: http://www.borngeek.com/2011/04/05/mysql-performance-and-localhost-performance/ A switch from dbHost = 'localhost' to '127.0.0.1' fixed this problem.
    3 points
  3. Hi Sanyaissues, slkwrm already gave you correct answer, but it looks to me that there is a little misunderstandig (not sure, but could be). I think slkwrm suggested that you have organized your csv-file something like that: Product one, /category/xxx/, /brands/zz1/, "This is the brand one" Product one, /category/xxx/, /brands/zz2/, "This is the brand two" Product two, /category/yyy/, /brands/zz3/, "This is the brand three" Product two, /category/yyy/, /brands/zz4/, "This is the brand four" Product three, /category/zzz/, /brands/zz5/, "This is the brand five" But seems it is bit different: Product one, /category/xxx/, /brands/zz1/, "This is the brand one", /brands/zz3/, "Description 3" Product two, /category/yyy/, /brands/zz2/, "This is the brand two", /brands/zz4/, "Description 4", /brands/zz5/, "Description 5" Product three, /category/nnn/, /brands/zz7/, "Custom description 7" You have to iterate over the lines of your csv file add a new page, add title and category and when coming to the brands you can add the first repeater-item as you showed above. If you have more than one (looks like it can differ), you should save the page! and after that iterate over the brands and foreach you have to add it and to save the page, (I think) $productPage->title = $title; $productPage->category = $categoryName; $repeater = $productPage->items->getNew(); $repeater->brand = $brandName; $repeater->description = $description; $productPage->save(); // check / get your brands foreach($myBrands as $brand) { $repeater = $productPage->items->getNew(); $repeater->brand = $brand['name']; $repeater->description = $brand['description']; $productPage->save(); } Don't know if this is an elegant way, but should work (haven't tested) . >> Please refer to the api: http://processwire.com/api/fieldtypes/repeaters/ look after "Using the API to add or remove repeater items"
    3 points
  4. Ok, I have added support for rendering the video in a Sublime Video player with: echo $page->video_field->eq(0)->play; Just register at sublime and enter your token on the config settings page of this module and that's it. I am not sure I am convinced about Sublime at the moment. I like the idea of a CDN approach to including the required file, but you can get mediaelementjs and other libraries through services like: http://www.jsdelivr.com/#!mediaelement Admittedly there is a lot more to include this way though. I think the main thing that puts me off about Sublime is how the process they take you through is designed to set up each video separately. Certainly you can just get the token for your domain and forget about the rest, but I would like it to be simpler. I have pushed this version to github, although I think maybe I should have made a separate branch - oh well. I am contemplating the idea of supporting several different players. Any thoughts on this, or how this new version of the module works?
    2 points
  5. From someone who hasn't really used either yet but is contemplating it (need to see what all the fuss is about), this is a decent article: https://medium.com/frontend-and-beyond/8b3812c7007c
    2 points
  6. Hi Joss, Why not design it from scratch? I understand that BS and Foundation are fast starting points but don't they just complicate things by having to sift through all their code to work out what does what? Not to mentioning loading code you never use. BTW on your Stony site there's a typo in the footer: Site Design ©2012 Stony Webistes
    2 points
  7. Hi Pierre, Welcome to the forums. Actually, lots of us have been using 2.4 for a while now..But that is now history, 2.4 is now in RC status! A newsletter went out late last week to this effect. An official announcement is soon to follow. You are good to go! Edit I forgot to respond to the issue about upgrade. Nothing breaks upgrading 2.3 to 2.4, at least not in the core. And I haven't heard of any of the custom modules breaking either...
    2 points
  8. Hi folks! tonight i searched a tool for create an UML directly from the source code of PW. The result is a 9MB of PNG Enjoy it http://zoom.it/hT0q
    1 point
  9. I've been working on this one for a few months and just launched it this morning: http://villasofdistinction.com I also did the previous iteration of this site, 5 or so years ago (which was running ProcessWire 1.0). The new site is powered by ProcessWire 2.4 (2.3 dev). The site is responsive and designed for a good experience on both desktop and mobile. While I did all the development, the site's design/look and feel was created by the client (they have their own internal design agency). Most of the work in this project was actually not anything you can see on the front end. Instead, most of the work went towards back-end management, workflow and web services. The client has a large number of editors and agents that needed various capabilities, workflows, feeds and such. So there's a lot more going on here in terms of a management platform than in the previous iteration... and that's mostly what kept me busy for so those few months. Modules used here: Foundation 4 Profile All In One Minify (AIOM) FieldtypeMapMarker (with MarkupGoogleMap) Pro Cache Form Builder Hanna Code Redirects Selector test Changelog Version Control for Text Fields Batcher Admin Template Columns CKEditor Select Multiple Transfer CollagePlus And a few custom modules
    1 point
  10. Today we launched a new website www.pluimveeweb.nl. This is our first portal page build in ProcessWire is all about poultry. Partners of pluimveeweb can have their own Microsite within the site. There are several different sources where information is comming from, imported to ProcessWire, managed in the backend and make it ready for articles. It is quite a big project worked the last 3 months on it. Here ya go: pluimveeweb
    1 point
  11. Down that path lies madness - trust me, I have been doing this (surviving this? ) for 35 years. Anyway, you will find out at the end of the month when the book comes out.
    1 point
  12. Will "old" admin themes be supported also in future versions? I'm using a customized version of Soma's great teflon 2 admin theme for a project. After upgrading to the newest dev version, I could uninstall the new Admin theme and so far the Teflon seems to work without problems. I love Pw!
    1 point
  13. Hmmm, it's a she, we are getting somewhere... (twiddling thumbs)....
    1 point
  14. Never did a comparison, but hell ya getResources was slow. Without cache, I was ashamed to deliver it to customers.
    1 point
  15. Thanks Soma, I just did that and used the word "ShoppingCart" as the name for the folder under site/modules/. Also I just saw that the latest pw dev has an extra button in the backend for automatically find new modules. That all worked well. I checked the readme but the beginners problems I have is setting up calls in a shop template. This is a template I found from Dave. Is this really all you need to run a shop ? Sorry for asking must read silly but like I said just beginning with apeisa's module and a pw shop. <?php /** * Page template * */ include("./head.inc"); include("./navbar.inc"); ?> <div class="container"> <h1>Your Cart</h1> <?php echo $modules->get("ShoppingCart")->renderCart(); ?> </div> <?php include("./foot.inc");
    1 point
  16. 1 point
  17. Hi @horst, thanks for your detailed answer. You were right, @slkwrm really gave me the answer but i was too blind to understand. @kongondo thanks for the "hidden pages" tip and the links. I made a simple loop and everything works. My first approach seems a little dirty but at least its working: CVS file: Title, Category, Brand page, Brand description, (...) Brand page, Brand description -------- product1,/cat/one/,/brand/01/,"foo",/brand/02/,"bar" product2,/cat/one/,/brand/01/,"foo",/brand/02/,"bar",/brand/03/,"foo",/brand/04/,"bar" product3,/cat/two/,/brand/04/,"foo",/brand/05/,"bar",/brand/06/,"foo", Script: $c = count($data); //Counts the parameters per line $productPage->title = $data[0]; //Title $productPage->category = $data[1]; //Category for ($i=2; $i < $c; $i++) { // Stars on 2 because the first parameters are Title and Category $repeater = $productPage->items->getNew(); // Creates a new item on the repeater $repeater->brand = $data[$i]; // Assigns the Brand page $i++; // Increase i to jump to the next parameter $repeater->description = $data[$i]; // Assigns the Brand description $productPage->save(); // Saves the page }
    1 point
  18. More links for you... http://processwire.com/talk/topic/3619-updating-repeaters-via-api-without-removeall/ http://processwire.com/talk/topic/3969-problem-repeaters-why-u-no-save/?p=38938 Seems you may have to save repeaters individually as well...and not just the page? Maybe that's just for editing? But if adding a second item to a repeater, maybe that is editing? Try and see Edit: Just to reiterate what's on the other thread and in above posts. Repeaters are themselves "hidden" pages. So, You have to iterate through the repeaters and treat them one by one as if they were normal pages.
    1 point
  19. @Sanyaissues You have to loop through the lines of your csv and for each line check whether the page for your current product has already been created. If so, just add a new brand item to its repeater and save it. If the page hasn't been created yet, add the page, populate its fields and first brand item and save it. That's it.
    1 point
  20. Dear Andre, I agree; a module would be a good idea for this. Peter
    1 point
  21. i do this sort of thing now a lot, thanks to Ryan's CMS Critic Case Study; this is almost the same as WillyC's code at the above link /** * This hook modifies the default behavior of the Page::path function (and thereby Page::url) * * The primary purpose is to redefine blog posts to be accessed at a URL off the root level * rather than under /posts/ (where they actually live). * */ wire()->addHookBefore('Page::path', function($event) { $page = $event->object; if($page->template == 'post') { // ensure that pages with template 'post' live off the root rather than '/posts/' $event->replace = true; $event->return = "/$page->name/"; } });
    1 point
  22. Lovely job, Ryan! I was so close to booking a 10+ person venue for an impromptu ProcessWire gathering at Calvigny, but $52K per night just sets off my grunge alarms. Maybe the pools aren't refilled nightly or something, you never know.
    1 point
  23. Thanks for the feedback guys! I agree on the serif typeface (replacing the Georgia with another serif face), but it's not my call. I'll suggest it though. I already communicated concern about using a geometric face for body copy (Avenir) but it doesn't seem to be a major issue in the end. I'll check with the client to see what I can share on the workflow side. But essentially, this site involves 1 PW installation for managing the inventory, and another PW installation for presenting it, and they use web services to chat back and forth all day.
    1 point
  24. Whether cached at view or save, t's exactly the same amount of work either way. Though caching at save potentially creates more work. Whether we're talking about template cache or ProCache, there are a few reasons why it's better to do it upon first view, rather than upon save. Pages are only cached for guest users. If we performed an automatic cache after a page save, it would be within the context of the user editing the page. This is not a context we want to cache. You want the page to be cached within the context of a real page view, not from something automatic or behind the scenes. This ensures that any other modules that are part of the render process also get to participate. You may save a page multiple times in a short period of time (don't we all?). If it gets cached on every save, you are potentially using a lot more resources than if it was just cached the first time it was viewed from a guest user. If we regenerated on save rather than view, that would be a whole lot of extra saves that have to be performed in the system (a save uses a lot more resources than a view). Keep in mind cache files automatically expire after some period of time (defined by you). You can't rely purely on a save() for knowing when data is stale or not, as your site may be pulling data from multiple pages or other resources.
    1 point
  25. Not especially related to programming, but I just learned of Finnish band Ultra Bra, and considering I speak no Finnish whatsoever and understand not one word of their lyrics, they sound wonderful. I'm just a few years late... (The only other band I really enjoy even though I don't speak the language is Runrig, who sing in Gaelic.)
    1 point
  26. Very, very smart. This is the kind of site that should be used as a long case study (small ebook, to be honest) going through details such as why dedicated work-flows are so important (and how to define them) the importance of rigidly defining the brief, the necessity of being able to recreate ideal workflows in the back-office for the editorial/site management reasons, the creation of an editorial hierarchy and managing it the level of expertise required to attack such a project the importance of a consistent and understandable API to have a chance of a) creating the site and b) modifying and developing the site over a sustainable period why developing such a site within a rigid structure such as Joomla or Wordpress would undermine most of the above, underlining the importance of being able to create a dedicated application And the finally, why ProcessWire made all the above not only possible, but delivers a fast, effective, enterprise class solution. So, a big PW advert, basically. ProcessWire needs such a write up.
    1 point
  27. I found I could listen to ProcessPageList::execute and just overwrite the breadcrumbs, that should do the trick.
    1 point
  28. When a client asks for "a website" with "easy management", explaining that ProcessWire is "an awesome framework for building just about anything" feels plain wrong and is unlikely to yield desired results. On the other hand, when client (or fellow developer) does mention the need for "an application", "framework" or "software platform", it's good to be able to match those needs too. Personally I really like the fact that ProcessWire has the ability to be both and would like to avoid emphasizing either *too much* over the other. If I needed a CMS, there would be a huge amount of other options available, and if I simply wanted to build an application I could (for an example) turn to Zend Framework and get the job done.. and so on. What ProcessWire brings into this equation is a well-balanced combination of features from both worlds. Each part supports the other, eventually making it more than the sum of it's parts. I especially love how easy and fast built-in admin makes mocking up data structures -- in fact it's such a smooth experience that the times I've built mock data manually for HTML wireframes etc. have been almost nonexistent lately. I find it faster to make fully functional features using ProcessWire than writing dummy directly with editor. And that, in my opinion, is why it's so damn good. Not that I really needed to explain it to anyone here, but my point is mostly that I don't see ProcessWire simply as a CMF or CMS or application framework or whatever. It's all of these combined.. and that's a good thing. I hope we don't get stuck discussing which one it is when that question can't (and shouldn't) have one single correct answer
    1 point
  29. Greetings Everyone, When I started this topic a year ago, I proposed that ProcessWire be presented more like a framework than a CMS. Over the past year, as I have developed further with ProcessWire, my opinion has strengthened. This recent post by Ryan re-ignited the idea for me: (http://processwire.com/talk/topic/5066-creating-commercial-licensed-modules/?p=49389). It seems that a lot of the discussions around "comparisons" continue to be ProcessWire vs WordPress or vs Drupal or vs Joomla. After working with ProcessWire more, I feel even more strongly that the discussion should shift instead to be more like ProcessWire vs Laravel or vs Yii or vs CakePHP. As Ryan indicates in the above quote, ProcessWire is not comparable to WordPress in what and how you build with it. I have had numerous situations in recent months where I propose using ProcessWire for a project and explain that it is a CMF, emphasizing the framework part. In my own work, I have already shifted my presentation, describing ProcessWire as a framework. Still, clients start from the perspective that ProcessWire is equivalent to WordPress (and other regular CMSs). A shift in the discussion might help explain what the system is for, and adjust expectations for new users. It might help us in communicating with clients. And it might attract more attention for ProcessWire from the community of people looking for PHP frameworks but who tend to avoid "CMSs." Thanks, Matthew
    1 point
  30. Actually this is very applicable stuff and I think everyone here is interested. I know I am. Thank you for posting! please keep doing so.
    1 point
  31. At work I'm mostly listening to some youtube playlists.. For a "relaxed" working athmosphere my favorite yt channels are the sound you need: https://www.youtube.com/user/thesoundyouneed1 (mostly house, some hip-hop) and liquicity: https://www.youtube.com/channel/UCSXm6c-n6lsjtyjvdD0bFVw (liquid drum and bass) For "getting things done" I'm quite a big fan of... "BASS" :
    1 point
  32. 1 point
  33. Notepad++ anyone? I don't know if it counts as an IDE but it works fine for me with its plethora of plugins although I may need something more IDE-ish in the future...
    1 point
  34. I've always happily used VI (VIM) and always will. But I found a way to make the newest PHPStorm look and behave like VIM, so that's what I'm slowly adapting to. So far I like it, it's a fairly impressive piece of software. Lets me still be in VIM (or at least trick me into thinking I am) while giving me all the power of PHPStorm. I was also motivated by their support of open source–they provided the full license for free for ProcessWire development.
    1 point
  35. There's at least one somewhat similar topic here. Piece of advice: forum search isn't very trustworthy, do a Google search and add "site:processwire.com/talk/" instead. Works so much better As for your question, I'm an Emacs user. If I had to work with something else, it'd probably be NetBeans. Both of those are simple yet configurable and extendable -- very important features for proper IDE. Most Windows IDE's (don't really know anything about Mac-specific ones) have way too much bloat right from the start. I simply can't stand all that noise.
    1 point
  36. My thoughts about pw: If you just started with pw, maybe you created your First Page and saw how pw Works and handles data you think uh yummi nice CMS. Well thats fine and correct,pw acts, feels and looks like a CMS. You then dig deeper into the API, you understand how the different fieldtypes are working and you get a good overview. You probably think at this point: could I use pw like a Database? You Set your first page relation, count the arrays and you Play with the Data and you think: WTF!? Is this still a CMS? The longer you use pw, the deeper understanding of the API, you finally realise which great,strong and powerfull toolset Ryan just handed right into your hands. At this particullar point the term CMS would not come to your mind anymore. PW could be used like phpMyAdmin, just create tables,rows and data and work with them, but a Way more easier without even knowig what MySQL really is. Some of you might know my Intranet Application i'm working on, this is all made with pw and some little template php scripting. The next days I will Show a Little preview of an App i'm also working on, and yes everything PW driven.
    1 point
  37. Hi Everyone, Follow-up question: what's a good way to refer to the ProcessWire framework? Of course, the whole system is called ProcessWire. Just wondering if, for clarity's sake, we might refer to the framework (for example) as the "Wire Framework," or something like that. This might seem like a technicality, but my thinking is that it sends a message that there is a framework underlying the system. As ProcessWire gets discussed and blogged about more in the future, this distinction could help convey a degree of meaning to developers and designers who recognize such things. What's the "official" name? Thanks, Matthew
    1 point
  38. @bcartier: The ImportPagesCSV-module can't do this as is. But I tried making a tiny addition to make it support FieldtypePage (those used to make page references) and it worked amazingly well. The only change needed was to add 'FieldtypePage' to $fieldtypes array (just before init() function if you take a look at the module file), like this: protected $fieldtypes = array( 'FieldtypePageTitle', 'FieldtypeText', 'FieldtypeTextarea', 'FieldtypeInteger', 'FieldtypeFloat', 'FieldtypeEmail', 'FieldtypeURL', 'FieldtypeCheckbox', 'FieldtypeFile', 'FieldtypePage', // add this line ); After that addition it's possible to choose a Page field when connecting the fields from the CSV to the ones in the chosen template. I had pre-populated categories at the target site and used their id's in the CSV file to reference those categories. Multiple categories worked like a charm as well, just use a pipe in between id's (123|456|789). Moreover, if you've got only one category per entry to reference, then you don't even need the id's of the categories - you can use paths as well. Here's a little example: cat.csv: title one two three four entries.csv: title,categories a,/cats/four/ b,/cats/three/ c,/cats/one/ d,/cats/two/ Import cat.csv using a template for categories with (at least) title field, under a page at /cats/. Then import entries.csv using a template for entries, having a title field and a page field. This should leave you with entries that are connected to categories. I hope this gets you somewhere. @ryan: Looks like page references could be supported very easily. I just used this successfully to import ~3500 pages with category references from an old site to a new PW one. But maybe there's still something else to be done before they're fully supported?
    1 point
×
×
  • Create New...