Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 09/10/2012 in all areas

  1. Just added that optional options array to the size() function, so it should appear in the core this week. Currently you can specify: quality (1-100), upscaling (boolean), cropping (boolean). The position stuff will be added later. $image->size($width, $height, $options); You can also choose a default set of options and specify them in your /site/config.php: $config->imageSizerOptions = array( 'upscaling' => true, 'cropping' => true, 'quality' => 90, );
    4 points
  2. Agree with you. I'm planning to use the same purchase options as Gravity Forms, which does include a Developer license with use on unlimited sites.
    3 points
  3. I wanted to give you a little preview of a new module I've been working on recently: the Form Builder module. This module lets you create simple-to-complex forms and place them in your site without any need for development. In this video we show how we can create, publish and test a simple contact form in less than 5 minutes. Then we take a quick look at a more complex form (already produced). I recommend viewing the full screen + HD 720p version so that you can see it more clearly than in this small forum embed. (note: there's no sound, so no need to adjust your volume) More about the Form Builder The Form Builder has many options for the developer to customize output and create their own themes, markup, etc. But the goal here was to build something that could enable you (or your client) to publish a form in less than 5 minutes, so that's the focus of this video. This tool is literally easy enough for your clients to create and manage their own forms. Or from a developers perspective, it takes something that used to consume hours and makes it happen in minutes. Form results save in the database and optionally can be CC'd to you by email. Result entries and be viewed, filtered by date, and even edited in the admin. You can export results to a spreadsheet as well. I'm working on the ability to export to pages, though that isn't quite ready yet. How the Form Builder will be licensed This module will be individually licensed on a per-site basis for a small license fee. It will also be available for free personal use to established forum members. Basically, I want to see if I can substitute some of my client work to focus on ProcessWire instead. And in order to do that, I need to have an income (I have a family to support). So I thought that building a special tool like this would be a way to make a go of it. A lot of you have asked to make donations to the ProcessWire project, and while we still won't be able to take donations, you will be able to support the ProcessWire project by purchasing and using the Form Builder in your own client projects. So a lot of motivation for this module came from wanting to provide something really special for all that had wanted to support ProcessWire. After a few months of work, I'm pretty happy with how this module has turned out -- it's already saved me tons of time in my client projects. So I'm thinking and hoping you guys will really like it too. I look forward to your feedback.
    2 points
  4. A recent post on PageArray find() made me try and fix a couple of things discovered there (and in some earlier posts, I think). What I came up with is a few modifications to WireArray class (base class for PageArrays): sort() accepts multiple fields to sort by. Fields can be given as a comma separated string "-modified, title" or an array of strings array("-modified", "title") find() supports start=n and multiple sort=field selectors some optimizations for sorting and limiting even quite big arrays without losing performance in certain conditions The new implementation seems to give same results as the old one where applicable (given only one field to sort by and no start selector for find()), but more tests are definitely needed. I've tested this on a site with more than 15000 pages and find()'ing 3000 of them at once for sorting/finding with the API calls. Performance is about the same as it was before. Even giving more than one field to sort by doesn't make it noticeably slower if limit is being used as well (those optimizations actually work). The replacement for wire/core/Array.php is attached if anyone's interested in trying it out. Array.php I tried some different methods of sorting as well, but just to find out Ryan had a good reason for all the little things I couldn't get a hold of at first . PHP sorting methods being unstable must have turned much of my hair gray in the last couple of days... While testing this I found out that sorting by a field with empty values at some records would act differently when done at initial $pages->find() (database query that is) compared to $aPageArray->find(). While this isn't affected by the WireArray code, I may dig deeper into it later. Giving sort=random works as it did before, but the code doesn't handle the situation it's not the only sort field given. Left a TODO-note in the comments on this (and the missing trackChange() call as well). @ryan: I will try to make a pull request as well just for the fun of it (being new to git). Do whatever you like with the code if you see any potential in it. You may want to rename function stableSort() and its last argument to something else at least. I know I'm not too happy with them.
    2 points
  5. @celfred, you've got two problems in that example: YouTube links need to be alone in their own paragraphs, there shouldn't be any other content in same <p> tag -- try adding the descriptions below or above actual YT links (also: now they're in a list, which probably won't work either) Don't make them actual hyperlinks; I might remember wrong, but IMHO that way they won't work -- just plain URL as a string without the <a> tag I hope this helps a bit.
    2 points
  6. Modules directory: http://modules.processwire.com/modules/facebook-login/ Github: https://github.com/apeisa/FacebookLogin I didn't have any real reason to build this. I actually started to just browse the documentation of OAuth implementations and discovered that Facebook really does make this easy: http://developers.facebook.com/docs/authentication/server-side/ (header "Example" on bottom of the page) so I decided to implement it. It was also nice way to test the Ryan's method of module that creates page which executes itself (like Ryan's new ServicePages module).
    1 point
  7. Just got your pull request -- this is great, thanks for taking the time to help out with this!
    1 point
  8. You can call it object oriented PHP If you really want to know how it works have a look at this http://www.killerphp...t-oriented-php/, the special thing about ProcessWire, is the clever way how Ryan wrote it, inspired by the simplicity and power of jQuery. That's why you can do great things as $page->images->getRandom(); or {$image->height} You can get it here http://processwire.com/api/ I would suggest that you do like I did. Print it, and read everything while having a coffee or a beer, looking at the see
    1 point
  9. I've updated this with the suggested improvement, thanks for finding it.
    1 point
  10. Thanks for finding this, I have updated the code. Most likely it's been there since the beginning, as there haven't been any recent changes to the code in question. It can be challenging dragging a page to be the first child of another, and might take a couple tries. Keep at it and you'll get there. Admittedly I struggled with getting all the movements right on this action in particular, and found we might be pushing the limits of what jQuery UI draggable/droppable was wanting to do. I'm not sure how to improve that particular action, and it might take someone looking at it that is better with Javascript than me. One alternative is to edit the page you want to move and change the parent from its settings tab.
    1 point
  11. Hi Joe, One of the nice features of the multilanguage fieldtypes is that when they are empty, they will fall back to the default populated field. For example, if you have a multilanguage title in English and not in German, when outputting $page->title (and the user language is in German) - it will output the English title.
    1 point
  12. I think it's quite telling that there isn't a tag for PW on Stack Overflow.
    1 point
  13. I figured it out! I noticed the AJAX queries to grab the data are including the API Developer key in the URL. However, according to Google (https://developers.g...rence#q_summary) it says that the parameter is optional and that you should do that when authenticating with OAuth 1.0. Since the module uses OAuth 2.0 for authentication, that query parameter should be left out. I commented out this line in the module (line 930 under the _loadGoogleApi function): $this->ga_client->setDeveloperKey($this->developerKey); That seems to have done the trick! It's loading the data beautifully! (And it also allows me to select the domain in the drop down correctly too.)
    1 point
  14. Hello there, First of all, letting a client post HTML straight into a field and then echoing it (especially without escaping anything) could potentially break things up and cause quite a bit of confusion / extra work for you, so I wouldn't really suggest it. IMHO better option would be to ask the client to post WordPress embed tag offered by SoundCloud to the body field (or any other field you've specified, actually) and then replace that with actually player code at your template. WordPress embed tags look like this: [soundcloud url="http://api.soundcloud.com/tracks/59233018" iframe="true" /] Simply ask your client to post these tags to whatever field you've specified, each as it's own paragraph (just paste and hit enter when field has TinyMCE enabled.) Then include this code in your template (I'm using body field as an example here): <?php $replacement = '<iframe width="100%" height="166" scrolling="no" frameborder="no" src="http://w.soundcloud.com/player/?url=http%3A%2F%2Fapi.soundcloud.com%2Ftracks%2F$1&show_artwork=true"></iframe>'; $page->body = preg_replace("#<p>[^\w]*\[soundcloud url=\"http:\/\/api.soundcloud.com\/tracks\/([0-9]+)?\"[\w\=\" ]* \/\]</p>#i", $replacement, $page->body); That should do the trick. EDIT: once again I've been too slow.. damnit. Oh well, now there's twice the regexp fun to check out. EDIT 2: @danielholanda, even though both answers so far have certain similarities (regexp ftw), there's actually one important difference just in case you've missed it: the method diogo provided is based on adding a specific field for songs. This way if you want multiple songs on one page you could add that field inside a repeater and loop through it's content. The method I posted above is based on the assumption that you could be using that same field for both "typical" content and (multiple) SoundCloud embeds. I'm adding this just to clarify both methods a bit and make it easier to choose which method you're going to use. This really depends on how your client will manage this content too; especially if each SoundCloud clip has it's own page there's very little point for using the latter method.
    1 point
  15. That second one was reported by a fellow worker yesterday as well. I'm able to reproduce it simply by dragging a page and dropping it back to its original place. Javascript error is: "Uncaught TypeError: Cannot read property 'error' of null" at ProcessPageList.js:655. At stopMove() ajax post callback gets a null for the data parameter. Error can be fixed simply by replacing "if(data.error)" with "if(data && data.error)". Not sure what has changed though (if anything) and where so that isn't necessarily the right fix either. The first one then. The destination parent page has to be selected first (before clicking 'move') for you to be able to move a page there. That new parent page should be highlighted as well. Could that have been the cause for the first problem? Still, it seems to be a bit challenging to find the right place where to drop the page so that it would become a child for that new parent. I guess my fingers aren't working well enough either . I wonder if there was something to be done for this to be easier? (I have a feeling this has been discussed earlier, anyone?)
    1 point
  16. Amazing stuff!! Never seen a formbuilder this easy!! Would be very nice if this could build the check-out page of the E-Commerce module
    1 point
  17. 1 point
  18. Google page speed test shows 88 out of 100. With some recommendations. https://developers.google.com/speed/pagespeed/insights#url=http_3A_2F_2Fwww.lentovertailu.fi_2F&mobile=false
    1 point
  19. Where do I send the money? I have been embedding forms generated with a self hosted form builder and integrating that into installations. Having a native solution would be preferable. I ask that you consider selling a developer license as a onetime fee for unlimited PW sites in addition to a site license. Another exciting edition to PW's impressive capabilities. Thank you Ryan.
    1 point
  20. 1 point
  21. ProcessWire is meant to support your existing way of developing things, but I think it's always good to provide a starting path and then let people take it from there. More needs to be added, like you mentioned. We added the tutorials board here a few months ago and hoping to continue adding to it with more stuff like this. I also want to start adding new site profiles. I plan to expand on this tutorial with the items mentioned at the bottom of it (page 1), as soon as time allows. Anyone that wants to make tutorials or site profiles, that's great too and just let me know what I can do to assist.
    1 point
×
×
  • Create New...