Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 09/11/2014 in all areas

  1. I think there is just a fundamental difference between what you are looking for in a CMS, and what ProcessWire is. That's not a bad thing. Some people think cucumbers taste better pickled. I currently work with ProcessWire in a University environment (300-500 active users, depending on the number of faculty during a semester). ProcessWire has not only been up to the task, but has far exceeded everyone's expectations. Both from a design/development standpoint, as well as UX for the site editors. One install powers a fairly complex public site (launching in the next few weeks), a faculty/staff intranet, a travel authorization and payment system, a news and events management system that handles around 500 events a semester with dozens of editors, an automated user management system that queries LDAP to determine user access and roles (runs via cron 3 times a day), Faculty syllabus manager (800+ documents a semester, maintained by hundreds of different users). Integration with MailChimp, some basic integration with BaseCamp, user generated forms (powered by FormBuilder), custom user dashboards, etc…, etc… Do you need to know how to code to use ProcessWire at this level? Absolutely. At least a little. In my opinion, that's a good thing. It means you can respond quickly to development needs. It means you can build solutions to suit, and not rely on pre-packed solutions that may not meet all project requirements. It means that you aren't constantly dealing with security patches, upgrade, etc… From a frontend development standpoint it means you aren't trying to work with markup that is bad/dated or has 17 classes on each element. I've been able to accomplish things fairly easily with ProcessWire that I bashed my head against for ages with other CMSs. Are all the typical "enterprise" checkmarks present in ProcessWire? No, but that isn't what ProcessWire is — and I hope it's not something it ever tries to become. At least not in the traditional sense. Depending on your needs and skillset; other CMSs may be better suited. ProcessWire might be a pickle—when what you really want is a cucumber.
    11 points
  2. Thanks Martijn - just knocked it up for my new web design site (that I am losing sleep over) Here is a screen of the front page - all those are animations. I really am not an artist, but since I can't afford to employ one, I will have to do!
    7 points
  3. https://kristopolous.github.io/BOOTSTRA.386/index.html look great an every screen.....
    6 points
  4. But modules can restrict you to one way of doing things, which is not what it's all about. There are also already blog modules and form modules, and a dozen ways to build forms and galleries. I guess it's that fine line between whether we want it to be a system people can use out of the box without having to learn anything and whether we want them to have to learn something about building websites. It's also whether it's even a good idea to let people loose without them having to grasp how things work - you're going to get queries about how to do things either way, but when they're potentially pigeon-holed by a module (not saying that would happen, but it could) and want it to do something else than what it's designed to then they're stuck. There's merit in both approaches, but I think continuing to roll out good tutorials and docs is the best route - that's just my opinion though. The "added value" bits you mention are the very core of the system - they're why you would choose it in the first place over pre-built solutions and how a lot of people arrived here in the first place. The whole point of the system is it's a blank(ish) canvas and you can do what you like, with a little HTML and CSS knowledge - there are plenty of website builders out there for those that don't want this. I don't think we should try to be like other systems. If there are people looking to build a site but don't want to learn even the very basics of the system they're using then they're going to arrive at a point sooner or later with any system they use where they will have to learn or give up, so why not land them with that choice right at the start? Sorry, I'm not trying to start an argument - just airing my personal views same as you and I know there are plenty of people who have been here a while who share your views and mine, sometimes both There is very likely some way to have it both ways, but I just don't see that catering to people who are unwilling to learn the basics helps anyone, at least not in the long run where they will be asking questions about customisation that we could have helped with right from the start. If anything it is a recipe for a recurring headache.
    6 points
  5. I do understand the user-friendly request, but I'm just concerned about how it can be done without making it not be ProcessWire any more. It's hard to make a bunch of templates when you don't know that the user is definitely looking for a blog or example - any templates that make too many assumptions will come with too many fields people won't use, and if you just stick with the default fields from the default installation but offer templates around that (there will be several with the 2.5 release coming soon) then those same people are still going to be confused even if they can see different template options The other option that has been talked about before is having several different installation profiles aimed at the question "what do you want to build?" with options like blog, company site, photo gallery etc and have some nice tailored options that can be installed at the start to show off different options. I think this is the more viable route as it offers choice rather than just theming the default template, plus is able to perhaps better show off some of the options depending on what someone wants. The rest of your points are easier to do, which is great! For Enterprise, I think we're getting the kind of case studies we can point to for those clients - the one I absolutely love being this one: https://processwire.com/talk/topic/7494-case-study-the-triumph-of-national-geographic-traveller-india-in-processwire/ - big project, large team and high-profile client. And as a bonus they switched from another system after facing numerous hurdles which speaks volumes - that particular development team have experience with the tools they've used in the past but they still made that switch and left their familiar territory behind for the benefit of the project.
    5 points
  6. I am relatively new to PW but as i am a full scale developer i really loved the concept right from the beginning(thx to Mr_Fan who informed me about PW) , but still even i had a: "huh, where is the template installer ? No default templates ?". I really can understand the problems Argos faced . You install, then whats next, how do i get a page from that point? There are a lot of tutorials but any newcomer, who isn't a developer yet, wil say "damit" and goes back to Wordpress or whatever. Many pepole start as users and than they begin to learn. PW does not offer a user level and that's a real pity. Lots of young pepole start building a private blog(homepage) whith Wordpress and they say: "hey, thats simple, lets see what else we can do.". And so they start experimenting, just to find that WP is still very limited ;-) . Now imagine they the find that there are no real limits , that this simple basic CMS can do anything they ever dreamed of? This leads me to the fact that pepole use what they already know. Even while there a lots of limitations in using WP there a still thousands of company websites done whith WP. So one way to spread the word about PW is to make it user friendly (that shouldn't be too hard ). These Pepole grow up, they had made good experiences whith PW or at least they heard of PW and some of em become decision makers ..... As it is right now PW is a Framework/CMS only for companies that have a developer available. Ok, lets start from here. How about spreading the Word ? How about offfering presentations for companies interested maybe founding usergroups ? If i Google for "simple php framework", i get a lot of stuff but nothing about PW. Come people spread the word! Google For "simple php framework", "non mvc Framework"..... and similar searches , and whenever there is a comment function add PW. If there is a dev forum advertise PW , put Links on all pages , in you Facebook site , twitter about it. And the best is anyone can help! If we get to a point where the decision maker does not say "Processwire, whats that ?" but instead says "PW isn't that the new promissing CMS i heared about?" then we have won. Managers often love bullshit, so why not make a subpage about PW in enterprise environments. Even if this page is only full of senseless diagrams and time saving examples and loads of bulllshit talking. They will love it. A list of companies offering professional PW support would help too. (Is there really only Ryan who can offer this ? ) So what we got so far? - Make it userfriendly! - Spread the Word! - Bullshit page for enterprise ;-) - List of supporters. - Give it some time That's all things that should not be too hard to achieve. Just my 2 cent .
    5 points
  7. I am glad you started a thread on this topic. I agree it would be great to see a FieldtypeDecimal module shipping with the core. This is something that's actually on a TODO-list for a big project of ours. It should definitely be a separate module (in other words, leave FieldtypeFloat alone) because floats have a different purpose. The background of the problem is in how computers handle (or should you say, how they support handling) floating point values. It actually doesn't have anything to do with PHP or MySQL, even less with PW - although you can obviously feel the effect of it. Binary floating point values supported by the CPU/ALU/FPU, such as the commonly used IEEE 754 (C, Java, PHP and so on), are always approximations. They are used where speed matters the most and the tiny loss of precision is acceptable. When precision is needed, you actually need something that implements arbitrary-precision arithmetic (bignum). The resulting loss of speed is irrelevant in many cases, such as handling currency. The reason why I'm bringing this up is that even with a FieldtypeDecimal implementation, you would still need to make sure you are handling the values correctly in PHP. If you perform any arithmetic on the value using PHP's arithmetic operators, you are actually causing PHP to cast the value to a floating point representation. That would defeat our purpose here (because you could loose precision). Thus if you need to perform arithmetic on the value, you must use an arbitrary-precision arithmetic library. For PHP you have at least two good options BCMath - http://php.net/manual/en/book.bc.php (simple set of functions, built-in) GMP - http://php.net/manual/en/book.gmp.php (a much larger set of functions, requires an external library) Of course none of this matters unless you can first store the original value in the database without precision loss. This requires a DECIMAL field in MySQL - which indeed was the original topic of the thread Here's a few links for general information. I recommend you to read at least the first one - it's a simple introduction. http://floating-point-gui.de/ http://en.wikipedia.org/wiki/Floating_point#Accuracy_problems http://en.wikipedia.org/wiki/Arbitrary-precision_arithmetic http://en.wikipedia.org/wiki/Double-precision_floating-point_format http://en.wikipedia.org/wiki/Fixed-point_arithmetic
    5 points
  8. In some ways this discussion still keeps going in circles. "We want to have more site profiles / markup modules / modules in general for beginners" vs "ProcessWire is awesome for seasoned developers and we don't want that to change". Quite frankly it's still not an either-or choice; ProcessWire is extendable (modules, site profiles, templates) and we can -- easily -- cater for both sides. We've got a lot of good ideas floating around here. We know that we need to actively promote ProcessWire and we also know that we need to provide more resources and tools for users of all levels. What we need more than anything else right now is, in my opinion, more action. For this reason alone I have enormous respect for projects like ProcessWire.tv, Cheatsheet, Captain Hook.. and all the people writing blog posts, tweeting and otherwise helping to spread the word. That's the kind of thing we need if we ever want to be noticed by wider audience. I also think that catering for (ProcessWire) beginners is where we're currently a bit weaker than we should be. We need more easy-to-use modules that make common tasks trivial and -- especially -- resources that help people get acquainted with ProcessWire. I'd also love to invest some time in creating site profiles performing specific tasks; I for one have learned much of what I know through the process of taking things apart and, when I'm confident that I know what makes them tick, modifying them to better suit my needs (a process also known as hacking). That's what I see as the biggest benefit of extensive site profile library, by the way -- it's definitely not about us having everything thought out and ready to install, it's much more about us having a good starting point for a wide range of things.. and a lot of raw material to bend and twist and study as one sees fit. For the record, one thing I've been kind of disappointed about is that the more I discuss things like CMS' with people making the decisions (or helping others make the decisions), the more I see how much they value safety. Such safety is generated by long track record, popularity and sheer numbers (end-users, developers, modules, extensions, etc.) This makes a lot of sense, really, but it's also a bit annoying when you're rooting for "the underdog"; in order to get larger audience you need to have larger audience..
    4 points
  9. Just off the top of my head, I think I would look at using url segments (well a url segment), with one template dealing with all the steps by way of the form submitting to itself. So the page would be example.com/order/ and each step would be denoted by example.com/order/step2/, example.com/order/step3/ etc. I agree that $session would probably be a good way to store the data as you build it up, and you would need to check that, at any given step, you have all the data you would expect at that point. A progress indicator (working like a breadcrumb trail, but including 'greyed out' future steps) would help usability, both allowing the user to back up and showing them where they are in the process. Smarter people than I will surely come up with better ideas (ajax, anyone?), but, as with almost everything in PW, there are almost as many solutions to every problem as there are people attempting to solve that problem.
    4 points
  10. Hey John, are you gone? What are your thoughts on the pw api?
    4 points
  11. I'm giving out an implementation which you can use while Ryan is considering this matter. It's based on Ryan's FieldtypeFloat and InputfieldFloat and it should cover all the basics. cd <pw_modules_directory> git clone https://github.com/sforsman/FieldtypeDecimal.git git clone https://github.com/sforsman/InputfieldDecimal.git To actually use them, you obviously need to tell PW to scan for new modules and then install them. Couple of notes Since the precision needs to be defined on the database-level, this module hooks ProcessField::fieldSaved and updates the database if you have changed the precision settings. You get a notification if it's been done. Be aware, if you decrease the precision you will obviously loose those decimals forever after the save - the database is immediteally and always modified. I don't consider this ugly because this is mandatory - one way or another. Due to the implementation of the DECIMAL type in MySQL, it's not possible to choose such default values that would be optimal for all of the different scenarios. Along with a dot, I prefer to accept decimals with a comma as well. This is because many humans separate them with a comma. As with InputfieldFloat, you can define the range of the values the InputfieldDecimal will accept. If you have a precision math library installed, the module will use it when doing the comparison. This will rarely make a difference but hey, what the heck. To be consistent as to how the DECIMAL type is created in MySQL, the digits-parameter refers to the the total number of digits - including the decimal parts (5.55 has three digits and two decimals). There's a few known "issues" (I prefer to call them "features", though)The min/max configuration Inputfields are still using InputfieldFloat. This means you need to separate decimals in your min/max range with a dot. The sanitizer currently uses is_numeric() to check the value, which means you can enter some weird stuff (like 0x539) and it's sent to the database. However MySQL obviously ignores such values and stores 0 for you. This should be improved later. The Fieldtype doesn't do much to the values and relies on MySQL to handle the necessary rounding etc. This is good in my opinion. However this also means that if you have set the precision to "2" and enter a value that doesn't have any decimals (e.g. "5"), MySQL will add the decimals (the DECIMAL type is afterall an exact fixed-point type) and that's what you will see after you have saved your value (e.g. "5.00") . Again, I consider this a good thing. Like InputfieldFloat, the InputfieldDecimal doesn't do any validation on the data - invalid values are just blanked. As I have intentionally hooked only ProcessField::fieldSaved, you need to manually either a) call $field->type->syncSchema() or b) hook Fields::save yourself if you are modifying the precision of a field through the API. Oh and I'm open to any ideas - at least regarding these modules.
    4 points
  12. Announcing QBox.co; a simple native PW shop that I'll be using to sell my commercial PW modules. This site has been put together with the aim of giving me an independent platform to sell some of my more specialised packages. The selection is limited at the moment but more will be added soon. Actually, a lot of the packages that I'll be offering on QBox are not limited to ProcessWire applications - they will often provide functionality that you can use in other PHP projects. Before you ask, the shop is running an, as-yet unreleased, version of Antti's shop module suite for PW with some changes to provide additional functionality. Payment is handled by integration with Stripe.com and you'll need Javascript enabled to make it happen. I've already opened a dialog with Ryan about getting the modules represented on QBox.co in to the official PW shop site and we'll see how that progresses. In the meantime, please feel free to let me know if you stumble over any problems; have useful comments or criticisms; want to know anything more about any of the modules offered there or just like what you see.
    3 points
  13. What you described here is the opposite of PW. Call it what you want, but if these are your requirements for a tool to call itself a CMS, than PW is not —and won't be— one. This can happen with site profiles though. We only have to wait that they appear, and they will with time.
    3 points
  14. Agree and have noticed that some clients devalue a CMS when they think "it's free". What I tend to do is mention that it's freely available but represents a product into which thousands of man-hours worth of development have been invested. Still need to work on the phrasing there but *some* clients need to be reminded that just because it's "free" doesn't mean it just appeared on the web overnight. Or more importantly that it's some kind of download which then requires zero installation, setup, build, maintenance, patching, upgrades, training ... ... ... ...
    3 points
  15. That's a rather encouraging list actually Peter, since workflow has come up as a bit of a hot topic recently and the rest aren't all that surprising I think. Certainly, most of those are already there in one form or another and would be adaptable for more complex team scenarios with a little work where necessary. A lot of requirements on the local government (or even national) side are exactly the same, but government are more likely to take into account the fact that it's free than Enterprise customers, though often arriving at polarised views - "Open Source? That sounds scary" versus "So it's free and we can do anything with the source code you say?" Custom dashboards is an interesting one because what that really needsin my opinion is for one Dashboard module that other modules can have a predictable function to output to the dashboard in some way. I can see how it would work, and it would work quite well, but it is also the least important on the list I think, though people are often persuaded by shiny things in my experience, especially if they're managers who just want reports at the touch of a button
    3 points
  16. Having worked with senior Marketing in Enterprise sized organisations and even a Fortune 500, I can tell you right now what they expect from a CMS. Some of these might be suprising but its good to know. Comprehensive users / usergroups / roles / access permissions etc etc File management and secure file hosting Draft to staging to published workflow Related to above, ability for admins to review stuff before it's live (including getting notified when pages are ready for review) and share pages with other team members for review Form wizards so they can build their own forms Media management Custom dashboards for their "own" areas Round the clock support Approval from their IT department etc who review security, upgrades, patches etc etc BTW, my involvement with these companies was not website related but I've seen their setups and spoken with them in the past about such things. I'm happy to run any specific questions from Ryan and Co past them if more detail is required.
    3 points
  17. Since some others and me have been run into problems with FieldtypeFloat. I want to start a discussion with the purpose to get a consistent FieldtypeFloat and/or to create a new Fieldtype maybe called FieldtypeDecimal to store exact values maybe for currencies. First I will assume some known problems. precision Values of Type Float are stored in most of the Mysql Installations with a precision of 6 by default. PW FieldtypeFloat uses Type float() in the Mysql Database This could cause some problems. For easy understanding look at this table. +---------------+----------------+--------------------------------------------------+ | input | float() | decimal(10,2) | +---------------+----------------+--------------------------------------------------+ | 1234.56 | 1234.56 | 1234.56 | +---------------+----------------+--------------------------------------------------+ | 123456.78 | 123457 | 123456.78 | +---------------+----------------+--------------------------------------------------+ | 12345678 | 12345600 | 12345678.00 | +---------------+----------------+--------------------------------------------------+ | 1.23456789 | 1.23457 | 1.23 | +---------------+----------------+--------------------------------------------------+ | 12345678912345| 12345600000000 | ERROR SQLSTATE[22003]: Numeric value out of range| +---------------+----------------+--------------------------------------------------+ As an example in Apeisas Shoppingcart Module exists a field sc_price of type float(). This field allows a maximum value of 9999.99 Euro Dollar or whatever. Don't use it to sell cars like Ferrari. Try to store the input values of the preceding table in a PW Field of Type Float in your surrounding and look what you get after saving. Threads treating the same problem https://processwire.com/talk/topic/3888-float-field-rounding-problem/ https://processwire.com/talk/topic/86-float-field-rounding rounding Mysql will round anyway the float value to precision. So it is not necessary to round the value in php before storing. To store exact Values it is better to use Type decimal(M,D) where M is the lenght and D the number of digits. Thread treating the same problem https://processwire.com/talk/topic/86-float-field-rounding format We had already some discussion about local settings, storing and output of PHP-Values of Type (float). And Ryan did some Adjustments with number_format. But I don't trust completely, thats why I am using Textfields to store numbers. Would be nice to have a consistent Fieldtype working in different local-settings. Thread treating the same problem https://processwire.com/talk/topic/4123-decimal-point-changed-to-in-base-of-setlocale/ https://processwire.com/talk/topic/86-float-field-rounding What is a float (floating point value), what is decimal? A float is an approximate value and exactly like this it is stored in Mysql. For more understanding two examples. 1. example CREATE TABLE `test` ( `test_float` float(10,2) NOT NULL, `test_decimal` decimal(10,2) NOT NULL ); INSERT INTO `test` (`test_float`, `test_decimal`) VALUES (5.43, 5.43); SELECT (test_float * 1.0000000) AS f, (test_decimal * 1.0000000) AS d FROM test; This will result the following: f = 5.4299998 and d = 5.430000000 source: http://netzgewe.be/2012/03/mysql-und-waehrungsbetraege-float-vs-decimal/ (german) 2. example mysql> create table numbers (a decimal(10,2), b float); mysql> insert into numbers values (100, 100); mysql> select @a := (a/3), @b := (b/3), @a * 3, @b * 3 from numbers \G *************************** 1. row *************************** @a := (a/3): 33.333333333 @b := (b/3): 33.333333333333 @a + @a + @a: 99.999999999000000000000000000000 @b + @b + @b: 100 source: http://stackoverflow.com/questions/5150274/difference-between-float-and-decimal-data-type INFO & LEARNING http://stackoverflow.com/questions/5150274/difference-between-float-and-decimal-data-type http://stackoverflow.com/questions/4520620/float-precision-problem-in-mysql http://dev.mysql.com/doc/refman/5.0/en/problems-with-float.html http://dev.mysql.com/doc/refman/5.0/en/storage-requirements.html INTENTION The intention of this thread is to discuss good solutions for a consistent working FieldtypeFloat which makes clear to Everybody what it is via description. Furthermore to build a new Fieldtype with setting options of total lenght and decimal places. NOTES Please use this thread rather for development than as a help forum. BTW I am not an expert in Mysql PHP or whatever. Maybe there are some guys in the forum which could put the real good stuff here. Thanks a lot and lets go.
    2 points
  18. Websites often provide content not only as on list of stuff, but with some sort of category. The most flexible way in ProcessWire to manage such a categorization are with PageFields. Form example with a structure like this. - Magazine (magazine) - Articles - Article 1 (article) - Article 2 - Article 3 - … - Categories - Category 1 (category) - Category 2 - … Templatenames in parentheses Now all articles have a url structure like: "…/magazine/articles/articlename/" The categories are looking like: "…/magazine/categories/categoryname/" But it can be useful to also provide the articles as part of the categories like this: "…/magazine/categories/categoryname/articlename/" Because ProcessWire doesn't provide such functionality by default, we'll use urlSegments. These have to be enabled in the template-settings for the category template. This template therefore fulfills two different jobs. Displaying a list of containing articles, as well as rendering the articles which are linked by the list. A simple example of a existing category.php could be: <?php // category.php $articles = $pages->find("template=article, category=$page"); // This example uses a deligated template approach. // Feel free to use your own way of templating, // but this is also a simple way to explain this. $content = renderArticleList($articles); include("./_main.php"); Now we need to include the logic to seperate the default rendered article-list to the now added rendering of the called article. <?php // category.php // Throw a 404 Error if more than one segment is provided if($input->urlSegment2) throw new Wire404Exception(); if($input->urlSegment1){ // Show the called article // Sanitize the input for pageNames $name = $sanitizer->pageName($input->urlSegment1); // Search for the article with this name $article = $pages->get("template=article, name=$name"); // Throw an 404 error if no article is found if(!$article->id) throw new Wire404Exception(); // Explicitly set the original url of the article for the <link type="canonical" href=""> tag $article->canonical = $article->url; // Render the page, like if it was normally called. // $page->url will not updated to the "categorized" url for the rendering-part // so you need to have that in mind if you provide some sort of breadcrumb echo $article->render(); }else{ // Show the list of articles of the current category $articles = $pages->find("template=article, category=$page"); // The generateCategoryUrls() function is new, because // $page->url would provide the wrong urls. // Details are provided later $content = renderArticleList( generateCategoryUrls($articles, $page) ); include("./_main.php"); } Now if we call this "…/magazine/categories/categoryname/articlename/" we'll get the right article rendered out instead of the article-list. Now we need to talk about the article-list, which would - without changes - still render the "wrong" urls to all those articles. Therefore I added the generateCategoryUrls() function. This function iterates over the pageArray and adds a second url to all those articles. <?php // part of _func.php function generateCategoryUrls($list, $category){ foreach($list as $item){ $item->categoryUrl = $category->url.$item->name."/"; } return $list; } The last thing missing is the actual template which gets rendered by renderArticleList(). This would normally call for $article->url to get the url to the article. We want this to render our second url if we are on a category site. To let the template still be useable by non category sites, we just change the parts, where to url is used form the current $article->url to $article->get("categoryUrl|url"). Only if the additional urls are provided they get rendered or it falls back to the normal urls of the articles. There we go, with such a setup all categorized articles are reachable via both urls. A small addition to explain the $article->canonical I used in the category.php. For SEO it's not good to provide the same content on multiple pages without explicitly declaring which of the duplicated ones should be the original / indexed one. By providing the following link tag we provide this declaration. The extra field I use isn't really necessary, because $page->url still is the standart ProcessWire url of the shown article. But I like this to be visibile in the code, that this is a dublicate. <link rel="canonical" href="<?php echo $page->get("canonical|url") ?>"/> Hope you like the explanation. Feel free to give feedback on this. Based on the example shown in the wiki: http://wiki.processwire.com/index.php/URL_Segments_in_category_tree_example
    2 points
  19. @netcarver Thank you for the comments! Exactly. You are correct. Actually I had this mentioned in an edit of mine, but I decided to remove it because generally I don't want to encourage using (VAR)CHAR, BLOB or TEXT (for storing decimals) - especially regarding ProcessWire-projects. The reason behind this is that you don't get the benefits of a real DECIMAL field while performing database-operations on the field - you could actually get very unexpected results. Consider things like indexes, ORDER BY clauses, querying based on a range (field BETWEEN a AND b), aggregates (AVG, SUM) or other arithmetic done on the field (price*quantity*discount). Of course if you are writing SQL queries, you could ask MySQL to CAST the field (and it will actually do this for you in some cases), but this would be a lot slower (not to mention ugly). Of course there are cases where you need none of this and then using a CHAR is perfectly fine! PHP is obiously a lot slower handling them, but if you're not processing large result sets then this doesn't matter either. However I had even more reason to edit it away due the ProcessWire context. I'll give you two simple examples just to demonstrate my point. Consider the following selector template=product, sort=-price, limit=5 If your price-field is a CHAR-field, your results would be all wrong. In your PageArray you'd have products with a price of $9 even if there was a product with $1000 price. MySQL sorts the text-based fields alphabetically, so anything that starts with the number 9 is bigger than something that starts with the number 1. Then consider template=product, price>=10, price<=20 PW would actually return products that have a price of $100, which we clearly didn't ask for. This is because PW sends the values quoted (i.e. '10' and '20') which causes MySQL to compare the values as strings (because the database-field is a TEXT-field). I don't really see a problem with altering the column - the module does it for you. PW requires ALTER permissions anyway. Besides, as I demonstrated, having a DECIMAL-field is the only proper way handling it in PW.
    2 points
  20. done: https://github.com/ryancramerdesign/ProcessWire/issues/662
    2 points
  21. Completely agree with Pete - having an app that replicates the functionality of a website is sometimes what clients want, but it really makes no sense. Honestly I think a lot of apps out there would work just fine as responsive sites instead. That said, there are obviously great benefits to the app approach when appropriate and the functionality is targeted. One way to make the phonegap experience a little less daunting is to use "phonegap build" which allows you to avoid a lot of unpleasant steps, although the Apple provisioning stuff is still a PITA. You can't just convert a website with phonegap unless the site is very basic and non-interactive. Once the user has the ability to query a database of changing content, you need to provide a mechanism for that content to be pulled into the app. The css, html, and js files are installed to the device (via the phonegap process). The content can be a mix of static content as part of the html and then the dynamic stuff that is pulled from a database via ajax and usually JSON. For web developers with a strong jquery skillset, jquerymobile is an ok approach to get going, although it can quickly become a painful process and I don't think I'll do it again. There are a lot of other frameworks and tools out there that can help. One that I think is worth taking a serious look at is ionic (http://ionicframework.com/). It makes use of AngularJS which, once you get over the learning curve, gives a lot of power and the apps feel much more native than with jquerymobile. Google around for "mobile app html5 framework" to see what else is out there and looks like it will work for you. If you don't have strong javascript/ajax experience, it will be a struggle to get going as you need to rethink how things are done. Good luck!
    2 points
  22. Just realised the title of this topic should have been "people's choice" as the critic's choice entries are completely different and you could only nominate a system for these as of the 3rd september. So... go and nominate ProcessWire: http://awards.cmscritic.com/nominate/ I think the Critic's Choice ones are likely to be fairer as they're not based on sheer numbers. I just wrote what I hope is a compelling entry, so get submitting guys
    2 points
  23. @sforsman Thank you for your two posts! What a great summary you made two posts up; loads of information and good points. Just want to pick up on a few of them... The hardware implementations are fast but that tiny loss of precision at high exponent values can represent huge absolute errors. Floats really work well when you don't mind about precision but you need to have a datatype that allows calculations over a huge range of values. This seems to assume that a decimal is the only possible MySQL fieldtype that can solve the problem. Seeing as PHP uses strings to do BCMath stuff, isn't it possible to store an arbitrary precision variable in a straight MySQL varchar or text field? I've done that in the past and handled all the calculations in the PHP application using BCMaths functions and it's worked very well. This approach would mean you don't have to go and alter your column if you need to start storing values outside of the initial storage range of the decimal column (as long as you made the varchar pretty big.) The approach wouldn't work well if you want to do some maths in queries or stored routines of course.
    2 points
  24. Using my default window size, the forum link on the PW mainpage is hidden below the search field, that way its unclickable Increasing window size does not help but making the window smaller lets the navbar hop one line below so i now can click it. FF31 Linux This maybe because of FF doing this silly page resizing on very big screens. Just wanted to mention as its quite annoying.
    2 points
  25. I've been working on a module to make it really simple to upgrade ProcessWire from one version to another. Especially as a way to make it easy to upgrade from PW 2.4 to 2.5, or to upgrade from one dev version to another. This tool supports upgrading between any branches of ProcessWire (currently we only have master and dev on GitHub). It will also let you downgrade your ProcessWire version, though no reason to do that. The module keeps up-to-date directly with GitHub, so it works as a long-term tool for every upgrade if you want it to. It works best if your file system is writable. However, if it isn't, the tool can still be used. It will still download the upgrade files to the server and then tell you where to move them. I should also mention that this module is somewhat inspired by a similar module Nico built awhile back called AutoUpgrade. So far I've used this tool to upgrade this site (processwire.com), the skyscrapers site, and the modules site (modules.processwire.com). Before releasing this officially in the modules directory, or suggesting it for production use, I'd like to get some help testing. If anyone has availability to help test this on non-production sites, your help is appreciated. It can be downloaded from GitHub here. As a bonus, it will also be a good opportunity to help test PW 2.5! Thanks in advance. What I'd really like to do as the next step with this is make it support upgrade by FTP. That would provide a nicer and safer solution for those that don't have writable file systems on their servers. This tool should be compatible with ProcessWire versions as far back as 2.3.4. I will also update it to support older versions than that if there's demand for it.
    1 point
  26. As some of you might have noticed recently there has been a large "Frontend Performance Talks Offensive" (not only) by Google Engineers. Here are some high quality (regarding content) Videos which i enjoyed very much and thought you also might be interested in. A Rendering Performance Guide for Developers by Paul Lewis: Performance Tooling by Paul Irish Your browser is talking behind your back by Jake Archibald Gone In 60fps – Making A Site Jank-Free by Addy Osmani http://addyosmani.com/blog/making-a-site-jank-free/ Any suggestions for more interesting performance related stuff are welcome!
    1 point
  27. Hi, during work on some own modules (frontend content manager, frontend users) I noticed my need of a helper module. Template2Form (working title) is a module to build a form based on fields get from a page object or a template file (tmp fake page object). During build process each field could be hooked in to modify it. Also it's possible to modifiy form, submit button and form fields via function params. It's my first (basic / dev state) module I post here... If it will be useable I have to clean up and comment the code well... template2form class <?php /** * Processwire 'template2form' module * * template2form - generate form from page / template fields * * @author pwFoo * @since 2014-07-18 * * ProcessWire 2.x * Copyright (C) 2011 by Ryan Cramer * Licensed under GNU/GPL v2, see LICENSE.TXT * * http://www.processwire.com * http://www.ryancramer.com */ class Template2Form extends WireData implements Module { /** * @var object $form generated form object */ public $form; /** * @var array $option multidimensional array with options */ private $option; /** * getModuleInfo is a module required by all modules to tell ProcessWire about them * @return array */ public static function getModuleInfo() { return array( 'title' => 'Template2Form', 'summary' => 'Generate form from template fields', 'version' => '0.0.1', ); } /** * Default module and form options * @var array $defaultOptions static mutlidimensional array with default options */ public static $defaultOptions = array( 'page' => null, 'template' => null, 'prefillFormFields' => null, 'jquery' => null, 'form' => array('method' => 'post', 'action' => '', 'id' => 'login', 'name' => 'login'), 'formSubmit' => array('id' => 'submit', 'name' => 'submit', 'value' => 'Submit'), 'formFields' => null, ); public function init() { $this->addHookAfter('Template2Form::buildField', $this, 'hookingFormField', array('priority'=>20)); } /** * Set / merge module and form options * @param array $options Array with given options * @return null */ private function setOptions (array $options = null) { if($options != null && is_array($options)) { $this->option = array_replace_recursive(self::$defaultOptions, $options); // Use template instead of page if given if ($this->option['template] !== null) { $this->option['page'] = $this->fakePage($this->option['template']); } // No template or page? Use current page... elseif ($this->option['template'] === null) { $this->option['page'] = $this->page; } if ($this->option['jquery']) { $this->modules->get('JqueryCore'); } } else { $this->option = self::$defaultOptions; } } /** * Generate the form object * @param array $options Set of optional and needed settings * @return object Generated form */ public function getForm (array $options = null) { $this->setOptions($options); $this->form = $this->buildForm (); return $this->form; } /** * Generate the form object from given fields * @return object Generated form */ private function buildForm () { $form = $this->modules->get('InputfieldForm'); $form = $this->setFormAttr($form); // Get fields to build the form $fields = $this->templates->get($this->option['page']->template)->fields; foreach ($fields as $field) { $f = $this->buildField ($field); // Get Inputfield object if ($f !== NULL) $form->append($f); // Remove NULLed fields from from... } $form->append($this->addSubmitButton()); return $form; } /** * Set form attributes and return the object * @param object $form * @return object Form with added attributes */ protected function ___setFormAttr($form) { $form->id = $this->option['form']['id']; $form->name = $this->option['form']['name']; $form->action = $this->option['form']['action']; $form->method = $this->option['form']['method']; return $form; } /** * Generate Inputfield object from given field object * @param object $field Page field object * @return object */ protected function ___buildField ($field) { return $field->getInputfield($this->option['page']); } /** * Modify the current field object by hook in after buildField function * @param object $event */ protected function ___hookingFormField ($event) { $field = $event->return; $hook = $this->option['formFields'][$field->name]; // Remove selected field... if ($hook['remove'] == true) { $event->return = NULL; } // prefill form fields from page value... elseif ($this->option['prefillFormFields'] && $event->page->get($field->name)) { $hook['set']['value'] = $event->page->get($field->name); } if (!isset($hook)) return; // nothing to do with this field... // Set form field values... elseif (is_array($hook['set'])) { foreach ($hook['set'] as $key => $value) { $field->set($key, $value); } $event->return = $field; } } /** * Build the form submit button * @return object form submit Inputfield */ protected function ___addSubmitButton() { $btn = $this->modules->get('InputfieldSubmit'); $btn->attr('id', $this->option['formSubmit']['id']); $btn->attr('name', $this->option['formSubmit']['name']); $btn->attr('value', $this->option['formSubmit']['value']); return $btn; } /** * Rendering the current form * @return string Rendered form as html code */ public function ___formRender() { return $this->form->render(); } /** * Process form data if send * @return object Processed form data */ public function ___formProcess() { $submit = $this->option['formSubmit']['id']; if(!$this->input->post->$submit) return NULL; // form NOT submitted... $processedForm = $this->form->processInput($this->input->post); // form api process form values if(!$this->form->getErrors()) return $processedForm; // form processed: OK else return false; // form send with errors } /** * Make fake page and assign needed template * @param string $tpl Template to assign * @return object Generated fake page to work with */ private function fakePage($tpl) { $fakePage = new Page(); $fakePage->template = $tpl; return $fakePage; } /** * jsConfig settings needed by wysiwyg editor * @return string Basic JavaScript config */ public function ___jsConfig () { $jsConfig = $this->config->js(); $jsConfig['debug'] = $this->config->debug; $jsConfig['urls'] = array( 'root' => $this->config->urls->root, 'admin' => $this->config->urls->admin, 'modules' => $this->config->urls->modules, 'core' => $this->config->urls->core, 'files' => $this->config->urls->files, 'templates' => $this->config->urls->templates, 'adminTemplates' => $this->config->urls->adminTemplates, ); return '<script type="text/javascript">var config = ' . json_encode($jsConfig) . '</script>'; } } Usage examples $t2f = $modules->get('Template2Form'); // Remove field 'headline' and 'body' from form $hookFormFields['headline'] = array('remove' => true); $hookFormFields['body'] = array('remove' => true); // Set / Overwrite field attributes / values like you could do with form api $hookFormFields['title'] = array('set' => array('value' => 'CustomTitle...', 'type' => 'password')); $hookFormFields['summary'] = array('set' => array('value' => 'My overwritten summary...')); // Overwrite submit button attributes (default: id, name, value) $hookFormSubmit = array('value' => 'Speichern'); /* * Build the multidemensional array * page (object) or template (string) -- to build the form from * prefillFormFields -- prefill fields (for example to build a frontend edit page * jquery -- Load JqueryCore module (during getForm() call) * form -- set form attributes / values * formFields -- array to set field values / attributes, take a look at form api examples * formSubmit -- set form submit button attributes / values */ $formOptions = array('page' => $page, 'template' => null, 'prefillFormFields' => true, 'jquery' => true 'formFields' => $hookFormFields, 'formSubmit' => $hookFormSubmit); // Generate the form and set options above $t2f->getForm($formOptions); // process form and return processed form date $process = $t2f->formProcess(); if ($process === NULL) // form not sent elseif ($process === false) // form sent, but with errors elseif ($process == true) // form sent without errors // Render form... $form = $t2f->formRender(); echo '<html><head>'; // jsConfig needed by ckeditor echo $t2f->jsConfig() . "\n"; // outpunt needed scripts for inputfield modules, ... foreach ($config->scripts as $file) { echo "<script type='text/javascript' src='$file'></script>\n"; } foreach ($config->styles as $file) { echo "<link type='text/css' href='$file' rel='stylesheet' />\n"; } echo '</head><body>'; echo $form; // output form echo '</body></html>';
    1 point
  28. Success on playground site - Deleted module Upgraded pw to dev branch installed new user email module installed import pages from CSV edited the module to include additional protected fields successfully imported user from CSV and welcome email sent! Thank you. When I do the live site I'll try and video the process for others. Cheers!
    1 point
  29. Now that I am using a lot of PageTable content blocks, Changelog is becoming a little less useful in its current form. I would find it more useful if it could also show the parent page so I can tell what page the user has been editing. Thanks for considering.
    1 point
  30. Don't know the answer but Holy Grail, I like your avatar Joss!
    1 point
  31. @Ryan running PW 2.5 with FieldtypeConcat without any problems. Thanks for fixing it
    1 point
  32. Given that 2.5 is just around the corner, I'm looking forward to a pull request for the stable pw-lang-de repository (whenever you think it's ready), Manfred. And thanks again for putting all that work into these language files. (If you feel it would make maintaining the language files easier for you, I'd be happy to hand over the stable repository to you. Just let me know.)
    1 point
  33. Tom, that sounds like an amazing project on any CMS. Would love to see a case study or some more in depth details once it's live. Goo luck with the upcoming launch.
    1 point
  34. Updated code and example usage... Feedback and suggestions would be great
    1 point
  35. I say go for it - there is certainly no reason to not be running the dev version on a test/dev site right now and if you find no problems, switch the live whenever you are ready. Let me know how it goes - I think it would be nice to write up a tutorial for this when you're done to describe all the steps and any changes needed to the CSV importer to make it all work. I am actually tempted to build something specific to importing and emailing users, but maybe if we can have a clear step-by-step that will be fine too.
    1 point
  36. Just to add to the confusion. - You can make the title field not required in template context. - You can set a template to not include global fields (advanced settings) So you could remove title for that template but still have title global.
    1 point
  37. Worked beautifully for me. Just tried it on my new ProcessWire blog and updated it from 2.4.12 to 2.4.18. Took approx 20 seconds from download of Zip to install and upgrade. No errors. Admin and site working great. My first blog post after upgrading was about the new upgrade Module. Now, that's circular
    1 point
  38. When I took those screenshots, I was basically left with no more sites to upgrade.
    1 point
  39. @Ottogal, in this particular case, Ryan upgraded with a version that matched his current version
    1 point
  40. 1 point
  41. We're aiming for soft launch this Friday and official a week later. Tried for last Friday but still had some issues to resolve + waiting on some things. I believe it's safe to start using now, but you'll still want to upgrade when 2.5 is official.
    1 point
  42. I really need to code faster! Hehe...This was on my todo list! Saves me some time to do other stuff now (remember my recent GitHub question? ). Looking really good Ryan!
    1 point
  43. Couple of bits of wording jump to mind. Perhaps: Instead of "the found version....." have: "The available version is the same as your current installation" Instead of "we recommend you make another backup on your own too...." Have: "For additional safety, we recommend creating an independant database backup, for instance with PhpMyAdmin" Good tool though!
    1 point
  44. Had the same trouble with Google.... they stole it!
    1 point
  45. It sounds like maybe filtering showcase entries by certain categories might help - I'm working with a design agency right now for a reasonably complicated site for a corporate client in the USA that would make an interesting case study when it's done. What I've found fascinating in this particular case is that the chap I'm working with saw Processwire, watched ryan's video I think and was sold on the concept without going much further than that. He also had little problem convincing the client to use it. I think that a lot of the work can be down to dev/design agencies and how we're marketing it ourselves in meetings to clients. It's making me think it's less likely that large organisations would start out by looking at a solution themselves until their dev has suggested something and then they might look into it in more detail. Either way though you do need something on the site to back it up. Being able to filter case studies based on criteria that might be appealing to larger customers would be a start, as would the idea of a developer directory. I know there are more devs than those who post on the forums so a directory along with which country they're in would be a relatively easy and reassuring indicator to a company performing some sort of due diligence to make sure that if one dev vanishes they've got alternatives.
    1 point
  46. @argos - there are many, many people who have learned it and understood it here that did not consider themselves programmers to begin with, so I think it all depends on every person's ability to grasp new concepts or languages and as human beings we'll all have different experiences there. However saying all of those things in your posts because you personally didn't get into it seems a little unfair. It's not for people who want to plug it in and go - it's for people who want to learn at least some of the basics of web development. As you say there are plenty of other systems out there for various needs, but just last night with a few choice fieldtypes and a bunch of templates I built the structure of a site that would have either been impossible in another CMS or taken me weeks of wrestling/coding. It took me 3 hours and not a single line of code was touched and the end result is a really nice page structure with intuitive templates for entering the data. The code will come in the frontend templates, but the backend is all the client should ever have to worry about. I would be very interested to know what could be done to improve the many documents and tutorials to better help people getting stuck, but I very much doubt the coding aspect can be made any simpler - it's already simpler than working with databases directly, so I can only imagine more tutorials might be the answer?
    1 point
  47. Raymond, Can you try out the update I just pushed to FieldtypeConcat? I couldn't duplicate the issue you are seeing, but I can how why it's feasible to occur. I updated the module to identify it's requirements for ProcessWire 2.5+ dependencies and am wondering if this might resolve the issue.
    1 point
  48. The one and original (reason for the shop module to exists): http://www.martanpuoti.fi
    1 point
  49. It's not necessary here, as ProcessWire doesn't include the http host with url() calls... just the path. So you can prepend the http host yourself, or make a custom function to do it for you. For example, you make an uppercase "URL" property to refer to your own version: wire()->addHookProperty('Pagefile::URL', function($event) { $event->return = "http://www.domain.com" . $event->object->url; }); Usage: <img src="<?=$page->image->URL?>">
    1 point
  50. I was thinking this at one point, but the project was cancelled so I didn't get into implementation part. It had the special need, that the recurring event need to be it's own entity (it might be same event, but different time - but also it might be in different place, have different price etc). How I started to approach the problem was to have "events-item" template which could have children with template "events-instance". Events instances would inherit most of the data from their parent event, but could override some parts of it. And how I would have implemented is that when saving the "event-item" you could make some selections "Repeat once a week, until <date>" and that would create the required amount of instances as children. Pretty simple actually that way.
    1 point
×
×
  • Create New...