Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 11/22/2012 in all areas

  1. Here are some more recent 2.3 additions that are currently in the dev branch. This list is far from complete, but covers the more interesting ones: Admin Theme The default admin theme now handles long titles better. If you are editing a page with a really long title, it will dynamically reduce the size of the headline in the admin theme so that it can fit. After a certain point, if it still won't fit, then it will wrap it. If you try to make a headline as long as a paragraph, then you are on your own though. Inputfields Added the 'side-by-side' (inline) option to Checkboxes and Radios Inputfields. This lets you have them all display on one line, floated, rather than placed in columns. To do this, specify "1" for the optionColumns setting. Added ability for PageEditImageSelect to select images from within repeater fields on a page. Update InputfieldDatetime to support i18n jQuery UI translation files with the datepicker. TinyMCE: Add config option to ProcessPageEditImageSelect enabling you to turn off the population of width/height attributes in TinyMCE inserted images. This is desirable for responsive images. To configure this go to Modules > Process > Page Image Select. Sanitizer Added new $sanitizer->entities($str); method, which is the same thing as htmlentities($str, ENT_QUOTES, 'UTF-8'); Added $sanitizer->emailHeader($str); method that does what it says (sanitizes an email header). $sanitizer->url(); will now optionally accept query strings. Comments Fieldtype Add new 'redirect after post' option which makes the Comments form perform a redirect after a comment is submitted. This prevents the possibility of duplicate submissions and enables the user to see their posted comment immediately (when applicable). To enable, see the 'details' tab of your comments field. You can now search the contents of comments fields from $pages->find() selectors in the same way you search text fields. Example: $pages->find("comments*=some text"); Added new 'website' field option to comments fields. To enable, check the box in your comments field 'details' tab. Added Gravatar support to comments fields. To enable, select the Gravatar rating in your comments field 'details' tab. Added option to not send notifications to admin when comment is detected as spam. Some of us were getting dozens of emails a day from spam bots making the rounds through our sites, so this prevents that from annoying us. Added new gravatar() method to Comment class that returns the Gravatar image URL (this is a convenience for those implementing their own comment output). File and Image Fieldtypes Add new 'tags' option to FieldtypeFile. This gives you the option of specifying a 'tags' field with each file/image. From the API, you can then retrieve a files/images by tag using $page->files_field->getTag('some-tag') to retrieve first match or $page->files_field->findTag('some-tag') to retrieve all matching files. Previously you could only retrieve files/images by filename or index. You can also use "[field_name].tags=[tag_name]" in $pages->find() type selectors. To enable tags for any files/images field, see the checkbox on the field details tab. (Note that this also affects InputfieldFile, Pagefile, Pagefiles, FieldtypeImage, InputfieldImage, Pageimage, Pageimages). Add support for secured pagefiles. Now unpublished or non-public pages may have their files (in /site/assets/files/...) protected from direct URL access. For existing installations, you need to add $config->pagefileSecure = true; to your /site/config.php in order to enable this capability. See also $config->pagefileUrlPrefix and $config->fileContentTypes in /wire/config.php, if interested. Files become secured when the page is not accessible to the 'guest' role. Functions/Methods Add new methods to WireArray class: replace(), findRandom() and findRandomTimed(); Name of the last one may change to findRandomInterval before 2.3 is final. Add new wireRmdir() function, to go along with the existing wireMkdir(). The wireRmdir() function works the same as PHP's rmdir() except that you can specify a second boolean argument to make it recursive. This essentially results in a directory prune function that not just removes the directory, but everything in it, recursively. Be careful with this! Add new wireSendFile($filename); function that works as a file passthrough script. This is used by the new secured file functions, but also available for your use should you want it. Add new wireRelativeTimeStr("timestamp or date string"); function that provides a relative time string like "1 minute ago" or "10 hours ago" or "5 minutes from now" type string.
    12 points
  2. Today I started to develop the project. And what should I say? The API is so fantastic, I love it! As first I startet the development of the user management. At the moment I have a page called "profile". Here is a if-statement, which check the session status. If TRUE you will be able to see content. (Nothing generated yet) If false you can choose between login and registration. In the registration process you can insert username, email and password. The user will be added with the status inactive. A mail with a confirmation code will be sent to the email-address and after the confirmation the user is active. Everything worked finde at the moment and I think in a few weeks I will post this community project to the showcase. Many thanks for your input at the beginning, it was a good start in understanding for me. z.
    5 points
  3. Hi all! Here it is the first draft of the italian translation of processWire 2.2. All files should be translated, but for clarity, below there are all the files translated. Core /wire/core/Fieldtype.php Inputfield Modules /wire/modules/Inputfield/InputfieldEmail.module /wire/modules/Inputfield/InputfieldFile/InputfieldFile.module /wire/modules/Inputfield/InputfieldImage/InputfieldImage.module /wire/modules/Inputfield/InputfieldPageListSelect/InputfieldPageListSelect.module /wire/modules/Inputfield/InputfieldPageName/InputfieldPageName.module /wire/modules/Inputfield/InputfieldPassword.module /wire/modules/Inputfield/InputfieldSubmit/InputfieldSubmit.module /wire/modules/Inputfield/InputfieldTinyMCE/InputfieldTinyMCE.module /wire/modules/Inputfield/InputfieldURL.module /wire/modules/Inputfield/InputfieldPageAutocomplete/InputfieldPageAutocomplete.module Markup Modules /wire/modules/Markup/MarkupPageFields.module Language Support Modules /wire/modules/LanguageSupport/LanguageSupport.module Process Modules /wire/modules/Process/ProcessForgotPassword.module /wire/modules/Process/ProcessLogin/ProcessLogin.module /wire/modules/Process/ProcessPageAdd/ProcessPageAdd.module /wire/modules/Process/ProcessPageClone.module /wire/modules/Process/ProcessPageEdit/ProcessPageEdit.module /wire/modules/Process/ProcessPageEditImageSelect/ProcessPageEditImageSelect.module /wire/modules/Process/ProcessPageEditLink/ProcessPageEditLink.module /wire/modules/Process/ProcessPageList/ProcessPageList.module /wire/modules/Process/ProcessPageSearch/ProcessPageSearch.module /wire/modules/Process/ProcessPageSort.module /wire/modules/Process/ProcessPageType/ProcessPageType.module /wire/modules/Process/ProcessProfile/ProcessProfile.module /wire/modules/Process/ProcessField/ProcessField.module /wire/modules/Process/ProcessHome.module /wire/modules/Process/ProcessList.module /wire/modules/Process/ProcessModule/ProcessModule.module /wire/modules/Process/ProcessPageTrash.module /wire/modules/Process/ProcessPageView.module /wire/modules/Process/ProcessPermission/ProcessPermission.module /wire/modules/Process/ProcessRole/ProcessRole.module /wire/modules/Process/ProcessTemplate/ProcessTemplate.module /wire/modules/Process/ProcessUser/ProcessUser.module Admin Theme /wire/templates-admin/default.php ================== I will check with more attention the quality of translation in the week-en! If you want to contribute, this is the Github repo: https://github.com/U...ian-processwire Cheers, Alessio
    4 points
  4. I think you're looking for something like this? $page->guests->find('guest_name='.$guest->title)->first() or $page->guests->get('guest_name='.$guest->title)
    1 point
  5. How about this: if ($page->guests->has("guest_name={$guest->title}")) { $checked = 'checked'; }
    1 point
  6. Ok, spotted! I forgot the quotation marks on javascript. Already corrected on the above code.
    1 point
  7. Edit the corresponding field settings. Setup => Fields => your_image_field
    1 point
  8. Methinks this... 'url' => "./$event[id]", // event ID is the url segment ); return json_encode($json); // <<<< wrong data? } ...should be this... 'url' => "./$event[id]", // event ID is the url segment ); return json_encode($items); // <<<< right data? }
    1 point
  9. Wow this thing is powerful...I feel giddy
    1 point
  10. In your php.ini, you should also set the values for "max_execution_time" and "max_input_time" to more than 30 seconds (30 = default value I guess). But I also suggest to upload huge files via FTP.
    1 point
  11. Regardless of whether handling this with processwire you should change your server variables to handle such a request. Your php.ini should be adjusted for it (at least): upload_max_filesize = 350M post_max_size = 350M And your apache should be configured too: memory_limit = 400M Update (thx Wanze) You should also adjust settings like max_execution_time max_input_time in your php.ini... I don't know if your clients host has such capabilities (-> memory limitations for such one vhost) but you should consider to convince your client to upload such files with ftp (not with http) and it is less error-prone for you and him with ftp...
    1 point
  12. Greetings, onjegolders: I totally understand where you're coming from! I've spent the past three years using Joomla, and I am now moving away from it entirely in favor of ProcessWire. I still get clients that specifically ask for Joomla, and I have a couple of development partners that still want to use it. I'm convinced that it is my job to move away from Joomla. Maybe I can offer some general ways to approach this... I've got several opinions on this matter. But let me focus on one particular area that you mentioned... THE "CLICK TO INSTALL" ILLUSION When I first started using Joomla, I thought it was great to have all those extensions ready to install with a few clicks. But as time went on, I found that my clients wanted more specific styling and actions. Since every module and extension for Joomla is nearly a separate application, each one re-doing models and coding that often were already done by something else in the Joomla ecosystem (more on the Joomla ecosystem in another post), each one comes with its own (sometimes very extensive) styling and coding assumptions. These very often (let me emphasize very often) conflict with styling definitions you're using elsewhere in the site. If you just want to insert stuff into a pre-fab template and use it exactly as is, you can get along pretty well. But I have found it is inevitable that clients need something more customized down the line. At that point, all the time you "saved" with point-and-click is lost when you have to figure out what that extension developer did in there, or when you have to stop using an extension altogether and find another one that does something better and have to figure out how to transfer the arcane material from one extension's database structure into another one (for example). By contrast, in a community like ProcessWire, you can get the snippets of code necessary to do the same thing as the point-and-click operations. The difference is, the styling is up to you. Even more importantly, you are very clear about how the thing was coded and can re-code pretty quickly. The key here is having a strong community, because if there are people to help you out with the code it hardly takes any longer to do it that way than to install a "point and click" extension. Also, it's a real problem that in Joomla so many developers abandon their projects. Then you are left with a strange extension, and you are on your own anyway to decipher the code! I do agree that it's a difficult thing to convince people of this. But I'm becoming more confident in just stating that I can build the system they want, with more flexibility beyond the first stage. I've found that most clients do want to be able to add more features in the future. Another thing I have found: most people who say they want Joomla are only saying that because it's the first or second system that turned up in a Google search. But if you sit down with them and explain that you can go further with a system like ProcessWire, most clients will trust you. After all, the reason they are hiring you is because they want a professional to advise and direct them! If that were not the case, they would just build it themselves. I use a metaphor when sitting down with people who bring up the Joomla vs ____ comments.... It's like a horse race. At the starting gate, the Joomla horse jumps out to a fast lead. ProcessWire and CodeIgniter (for example) start off slower. By mid-race, it seems all but certain that Joomla will win. But more open systems build speed throughout the race. Coming around that last turn, you can see Joomla slowing down. By the end of the race, the Joomla horse is tired and confused, and often doesn't cross the finish line at all. Thanks, Matthew
    1 point
  13. Welcome to the forums Thomas. It's not possible to physically resize an image on another server, but you certainly can resize it with CSS or width and/or height attributes in the <img> tag. But if you want an image you can physically manipulate, then it has to be on a file system that ProcessWire can write to. You can tell ProcessWire to pull an image from another server like this: $page->video_image = 'http://domain.com/path/to/file.jpg'; $page->save(); Once you've got the image in there, you can resize it like in your example. I'm assuming from the non-plural name 'video_image' that you've defined the field to only hold 1 image rather than many. Though the snippet above should work either way. Note you may need to add a $page->of(false); before the code example above if you are executing it from a template file. ProcessWire delivers pages to templates in an output-ready state where entities are encoded and such (something you wouldn't want when saving a page). So you just have to disable output formatting to put the page in a state where it can be saved, otherwise ProcessWire will throw an error. This isn't usually necessary in other API contexts, outside of template files.
    1 point
  14. The "link to larger version" is actually intended to be without implementation so that you can implement it with a lightbox of your choice. Rarely in my sites do I actually leave it as literally linking to the larger version. Instead, I'll usually put in some javascript like this: $(document).ready(function() { $("#bodycopy a:has(img)").fancybox(); }); Or if you want to add some attributes and do it that way: $(document).ready(function() { $("#bodycopy a:has(img)").addClass('lightbox').attr('rel', 'gallery'); $("a.lightbox").fancybox(); }); Now if you want to be able to support more then one way of linking to a large image (i.e. have one link to the larger version and another opening in a lightbox) then you'd probably need to take another approach (or maybe make a module). Let me know if that is your need.
    1 point
×
×
  • Create New...