Jump to content

Leaderboard

Popular Content

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

  1. Some more updates on the multi-language front: ProcessWire now comes with a multi-language site profile Language translation files now split by site and core These are the last two things I'd wanted to add to PW 2.5 before release, so please consider it now in release candidate stage. Your help testing is appreciated and please us know if you run into anything that's not working. PW is already designed for such a feature and has been since the beginning. Development of PW2's core and development of PW1's draft system had overlapping timelines. I had planned on including drafts of published pages in PW2 until I saw how little use they got among my clients at the time. In PW2, page IDs 500-900 are reserved and recyclable/reusable for drafts, and there are already methods in the core and Fieldtypes that are there to aid in managing drafts. PW's unpublished vs. published pages system already accommodates the biggest needs in drafts. Drafts and unpublished pages are essentially the same thing in the minds of most (of my clients at least). The drafts that you are talking about are something different and really only useful in situations where you've got pages on a site that continue to undergo major changes after they've already been published. Since developing the drafts system in PW1, I've learned that most don't publish content that way. Instead, they work on something, publish it when they are ready, then move onto the next thing. Though drafts for published pages are definitely useful when/if that is the need, and I have no doubt that some clients have the need. But the reality is that it's a whole lot of overhead for something that most won't ever use. As a result, it would likely come in the form of a module (whether uninstalled core, or 3rd party I'm not sure). But it's definitely coming. In terms of technical challenges for drafts of already published pages, they are only with regard to Fieldtypes that create other pages. Specifically: Repeaters and PageTable. Those two Fieldtypes are the only two I'm aware of that don't currently support drafts for already published pages (though it's possible they could with modifications). All the other Fieldtypes are pretty much draft-ready. Technically there is significant overhead associated with drafts of published pages. It's a 2nd set of editable data. However, you wouldn't feel the effect of it unless creating or publishing a draft, and specially one that had a large amount of assets connected with it. As a result, most would likely not feel the overhead. In terms of comparing overhead, repeaters have more overhead than drafts. I'm very much sold on Teppo's versioning system, and I use it on pretty much everything now. While I have plans to finish the drafts system that's already started, I don't have plans to reinvent what Teppo has already done with regard to versioning. If people have more needs in terms of versioning, we should probably talk to Teppo.
    10 points
  2. Hi Guys, today I want to introduce my first module for ProcessWire: ProcessAbbreviate The module basically hooks the save event of pages and extract all marked up abbreviations in textareas. With the shipped CKEditor plugin comes the main improvement in supporting faster marking up abbreviations. The plugin suggest explanations based on previously extracted abbreviations. On the created setup page, all abbreviations can be managed. Also you can predefine your common used abbreviations to prime the suggestion list. The module can be found at GitHub: https://github.com/sunlix/ProcessAbbreviate Feel free to try it out. Any hints and improvements are welcome. regards, Sven
    8 points
  3. I had written a big post here about drafts/versioning etc a few days back but silly me was doing too many things, forgot about it and forgot to hit "Post" It went a little something like this: Drafts/versioning/workflows (let's just label all of those as workflows because they are all linked) is a feature that is usually required by larger sites/companies and is something that is actually worthy of the name "enterprise" that people have been using a lot recently. A system that I used 10+ years ago when working for my local Council had the following abilities (not saying we're behind the times by mentioning "10+ years ago", more that my memory won't be great when recalling the details ): The web team manager was able to edit certain fields (META data etc whilst the rest of the team was able to edit the content fields. This can already be accomplished in PW, but not sure how easy it is to use - ideal would be a tab when editing a template that has a matrix of all the fields and all the roles and checkboxes to determine who can edit/see which fields. Once web team user has finished editing, page goes to approval with team manager who can review the edits. These will quite often be changes to pages that exist already, so this is a draft copy of that page that has been worked on. There were also X past versions of a page (in PW this could perhaps be determined per-template again as some may need no drafts and others you might want a few) along with who edited them I think (10 years is a long time). Pages could also have a review period assigned to them. This would be a trivial module to build in ProcessWire, but the concept was that you would assign each page a review period of 6 months as well as the email address of the person best suited to review the content - this is NOT always a user account in the CMS. In the Council where I worked this person could be another department head and they would receive an email for each page on the relevant review date, with follow-up reminders. The ideal here would be for the web team leader and other suitable people to be able to log into the admin and see a list of which pages were up for review, who they were being reviewed by and they would remain in the list until either the content was updated or a box was ticked to add another X months to the review date. In theory there are multiple workflow steps that might be required - I think Concrete5 has the ultimate workflow solution here (I started the video at 40 seconds but not sure the forums will cope with that ): http://youtu.be/Z1fHz5jTnw4?t=40s but I'm not 100% sure a "version 1" would need to be that fancy. I can see how the interface might start to come together though as we already have things in the dev branch at present that deal with triggers and actions, I think something like that could be applied to per-template workflows. There isn't a huge audience asking for this, but there is a huge potential audience out there. The vast majority of medoum-large news/magazine sites could use this - having run a small one as a hobby it can become problematic to keep track of what's going on with just a handful of staff. Then there's just about every local government who are on the lookout for something powerful and cheap, but have to have the workflows in place for accountability (and sanity when dealing with lots of staff editing bits). And then there are large companies with lots of content to manage. Certainly I can see all of the above wanting to use ProCache too since systems with advanced workflows can often be of the slower variety. I don't want to sound melodramatic, but without a good, coherent approach to drafts/workflows/version control we are effectively shutting out a large audience. The problem is that it is easier for people reviewing a CMS to see what it's got, not find what they want and go elsewhere rather than saying "I'd use this CMS but it doesn't have feature X", so we will never know how many people might actually consider PW if it had workflows. (On a related note, can we set up the Site Search feature in Google Analytics for the forum and site search fields ryan - then we might get a better idea of what people are searching for but not necessarily requesting ).
    6 points
  4. I am currently fighting with an e-commerce site that the client wants on WordPress. I think I am in genuine pain! Using woocommerce, which does offer the client what he needs (product with selectable digital download or physical cd) and simple management. But where I am losing sleep is over WordPress itself. Trying to customize how things are displayed and ordered is a minefield and the amount of included bits of stylesheets, scripts and so on is a mess. Though interestingly, the developer of Mega Slider (which I am using) has now had a little peak at dear ProcesssWire and is intrigued by it. Although it will be too late for this project, I would happily throw some time into taking the current shop module for PW and take it to its ultimate conclusion! I personally think that none of the currently available carts out there (Open Source or otherwise) are even remotely developer friendly. When you think about it, there is nothing very complicated about an online shop. It is simply displaying and collecting data - so why have all these projects become like swimming in glue?
    6 points
  5. Just wanted to step in and confirm that HTML Purifier does, indeed, strip any tags it doesn't recognise as valid (i.e. part of whatever DTD it's following). ACF is the one that allows any tags it's configured to allow using a config string -- there's a world of difference there. Also, if anyone got the idea that I'm against ACF, validating/filtering/sanitising user-generated markup, or whitelisting, I'm not. Whitelisting is a very good security practice, but as long as HTML Purifier doesn't allow valid HTML5 elements, it's outdated and useless (for many of my use cases). That may or may not be true for anyone else, but in many cases I've found it easier to avoid it -- for now. For the record, the issue that originally led me to this decision was the fact that I could, in theory, configure HTML Purifier to allow specific data-attributes, but apparently there isn't any way to whitelist all data-* attributes, using a wildcard. That's understandable considering it's purpose and scope, but not acceptable for some of my use cases.
    4 points
  6. @ryan. Not a lot of demand? What planet do you live Well, everytime this comes up it get's many likes. My post just got 7 likes. I and many others are waiting for versioning/drafts since a long time. Thing is that it was on the roadmap all the time, so many of users are not asking for it again and again cause it's already.. well "ordered". I agree that it might not be always needed, and I see that this is not a quick implementation (I wouldn't know how in PW this should be designed). Maybe PW just isn't designed and capable for such a feature. And also it can lead to confusion if not implemented right. And all that comes with it, all correct. But I think it's a feature many are waiting for.
    4 points
  7. PageTableExtended Download here: http://modules.processwire.com/modules/fieldtype-page-table-extended/ Extends the Processwire PageTable field for rendering table row layouts. This is great for editors, because they actually see at a glance what the table rows consist of. What it does Turns the Processwire Fieldtype "Page Table" from this: into something like this (sorting capabilities of course still functional): See it in action: Requirements FieldtypePageTable installed (part of the core since Processwire 2.4.10.) Templates used for PageTable need a file associated (otherwise nothing gets rendered) This render method is meant for sites where the PageTable templates only render part of the layout, not complete websites. But you also can define what will be rendered (see below). Options Render Layout instead of table rows Check this for seeing the rows rendered. You can easily turn off the complete functionality by unchecking this. Path to Stylesheet Since the parts are unstyled by default, it is a good idea to define styles for them. All rendered templates are encapsulated in a div with the class "renderedLayout" so you can style them with: div.renderedLayout h2{ color: green; } The path is to be set relative to your templates' folder. Reset Admin CSS Since the parts are rendered inside the Admin, common styles of the Admin Interface apply also to your layout parts. This is not a bad thing, because especially text styles are well integrated in your admin's theme. But if you like to override the admin styles in your table rows completely (more or less), just check this box. Don't forget to define a custom CSS then! Advanced Since this module is meant for parts of your layout you already have defined for your frontend templates, it is a good idea to use a preprocessor like Stylus, Sass or Less for building the custom CSS file. Just outsource your layout part definitions in an extra file, compile that in a separete CSS file and use this as custom CSS for this module. Since your CSS is should be built in a modular way, this works pretty well ;-) Will write a tutorial with a use case once finished testing. Notes: Github: https://github.com/MadeMyDay/PageTableExtended If you want to get rid of the unnecessary step for entering a title before editing the page, just set the "autoformat" value as suggested in the PageTable settings. If you don't want to use a title field at all, see this post from Soma Will put it in the module repository once finished testing. Please test it and give feedback. I haven't used GitHub for a long time, please check if everything is in place and if this will work with the modules manager and the new core module installer once added to the repository. Have fun Module is in the repository now: http://modules.processwire.com/modules/fieldtype-page-table-extended/ Please use GitHub for instructions, I made some additions there.
    3 points
  8. If you turn off ACF and turn off HTML Purifier, you've essentially got what we had with TinyMCE. I grew increasingly uncomfortable with TinyMCE as ProcessWire has grown. The fact that it is open with regard to what markup it will allow also creates quality problems for a site especially over time. But an even bigger issue is security. An RTE without a strong filter behind it is a security hole because markup from RTEs is already entity encoded and ready for output. If a user with access to the RTE knows what they are doing, they can manipulate the POST request to the server, adding in some of their own markup (and XSS). This is particularly easy to do with TinyMCE. And once you can do that, you can get very creative indeed. A non-superuser with page edit access using TinyMCE could feasibly insert a script to make a front-end page render like a PW admin login screen. The next time the superuser views that page on autopilot, they type in their password and then the system is compromised. So CKEditor + HTML Purifier prevents that problem. ACF doesn't prevent that problem, but goes a long ways towards solving the other major RTE issue: markup quality and preventing markup degradation. You can turn those filters off, but it's important to understand the compromises that result. If your admin is limited to yourself or just superusers then you probably have no need for HTML purifier. But I sleep a lot better at night knowing we have a secure solution for the RTE. Since CKEditor can be configured to be as open-ended as TinyMCE (even if we don't recommend it for anyone but superusers), I don't necessarily see any reason to use TinyMCE any more... we now have a stronger feature set and much nicer plugin system for CKEditor than we ever had for TinyMCE. But I'll still be maintaining and supporting TinyMCE as a 3rd party module for a long time to come. On most of the sites where I'm already using TinyMCE, I'm likely to keep using it. But for any new installations CKEditor is definitely the way to go.
    3 points
  9. new german updates for actual PW dev 2.4.16 (01 September 2014). Zip contains only updated/added files (in comparison to the default 2.4 lang pack). updated files: wire--modules--process--processmodule--processmodule-module.json pw-lang-de-dev-update.zip
    3 points
  10. You can easily create cross-references to other pages using Page field. It's a very versatile solution to any task like this. Old but still relevant demo: https://processwire.com/videos/page-fieldtype/
    2 points
  11. don't know if you can find something useful here, but it sounds like you can grab some code or ideas about 404: https://processwire.com/talk/topic/4884-hook-before-a-404-exception/ yes, here it is: https://github.com/harikt/Assets/blob/master/Assets.module#L59 https://processwire.com/talk/topic/5724-404-search-module/
    2 points
  12. The DOM can't be altered when the DOM is not ready, thus what you say must fail if the browser hasn't support of the scrset them selfs. Just reading smashingmagazine, they say: So here we found the issue I do use the src atrribute, because I like the image to be an image without javascript
    2 points
  13. I actually didn't read them all admittedly as this is a long discussion and I was short on time but thank you for that. To be honest, I don't see a reason worthy of switching from TinyMCE if I have to disable switches and turn off options in order to make the editor work as intended, know what I mean?
    2 points
  14. The module could even prompt for a estimated time.
    2 points
  15. OK... Sounds like a job for the new group selectors [OR-groups] See here: https://processwire.com/talk/topic/3768-processwire-dev-branch/?p=64049 Another example here: https://processwire.com/talk/topic/7370-search-for-one-field-or-another-but-with-different-values/ This other related improvement might also be of interest https://processwire.com/talk/topic/3768-processwire-dev-branch/?p=58722
    2 points
  16. First of all I see that you haven't named your repeater template repeater_[fieldname]. But something different that could cause the problem is using the php short tag "<?=". Big chance that in php on the server short tags are turned off. You could try by changing it to normal php "<?php echo" and see what happens. In your home.php you don't use the short tag and so maybe, with your other repeater template it's the same, reason why that one works fine.
    2 points
  17. --------------------------------------------------------------------------------------------------------------------------------- when working with PW version 2.6+, please use Pim2, not Pim! read more here on how to change from the older to the newer version in existing sites --------------------------------------------------------------------------------------------------------------------------------- PageImage Manipulator, API for version 1 & 2 The Page Image Manipulator is a module that let you in a first place do ImageManipulations with your PageImages. - And in a second place there is the possibility to let it work on any imagefile that exists in your servers filesystem, regardless if it is a 'known PW-image'. The Page Image Manipulator is a Toolbox for Users and Moduledevelopers. It is written to be as close to the Core ImageSizer as possible. Besides the GD-filterfunctions it contains resize, crop, canvas, rotate, flip, sharpen, unsharpMask and 3 watermark methods. How does it work? You can enter the ImageManipulator by calling the method pim2Load(). After that you can chain together how many actions in what ever order you like. If your manipulation is finished, you call pimSave() to write the memory Image into a diskfile. pimSave() returns the PageImage-Object of the new written file so we are able to further use any known PW-image property or method. This way it integrates best into the ProcessWire flow. The three examples above put out the same visual result: a grayscale image with a width of 240px. Only the filenames will slightly differ. You have to define a name-prefix that you pass with the pimLoad() method. If the file with that prefix already exists, all operations are skipped and only the desired PageImage-Object gets returned by pimSave(). If you want to force recreation of the file, you can pass as second param a boolean true: pim2Load('myPrefix', true). You may also want to get rid of all variations at once? Than you can call $pageimage->pim2Load('myPrefix')->removePimVariations()! A complete list of all methods and actions are at the end of this post. You may also visit the post with tips & examples for users and module developers. How to Install Download the module Place the module files in /site/modules/PageImageManipulator/ In your admin, click Modules > Check for new modules Click "install" for PageImageManipulator Done! There are no configuration settings needed, just install and use it. Download (version 0.2.0) get it from the Modules Directory History of origins http://processwire.com/talk/topic/3278-core-imagemanipulation/ ---------------------------------------------------------------------------------------------------------- Page Image Manipulator - Methods * pimLoad or pim2Load, depends on the version you use! pimLoad($prefix, $param2=optional, $param3=optional) param 1: $prefix - (string) = mandatory! param 2: mixed, $forceRecreation or $options param 3: mixed, $forceRecreation or $options return: pim - (class handle) $options - (array) default is empty, see the next method for a list of valid options! $forceRecreation - (bool) default is false It check if the desired image variation exists, if not or if forceRecreation is set to true, it prepares all settings to get ready for image manipulation ------------------------------------------------------------------- * setOptions setOptions(array $options) param: $options - (array) default is empty return: pim - (class handle) Takes an array with any number valid options / properties and set them by replacing the class-defaults and / or the global config defaults optionally set in the site/config.php under imageSizerOptions or imageManipulatorOptions. valid options are: quality = 1 - 100 (integer) upscaling = true | false (boolean) cropping = true | false (boolean) autoRotation =true | false (boolean) sharpening = 'none' | 'soft' | 'medium' | 'strong' (string) bgcolor = (array) css rgb or css rgba, first three values are integer 0-255 and optional 4 value is float 0-1, - default is array(255,255,255,0) thumbnailColorizeCustom = (array) rgb with values for colorize, integer -255 - 255 (this can be used to set a custom color when working together with Thumbnails-Module) outputFormat = 'gif' | 'jpg' | 'png' (Attention: outputFormat cannot be specified as global option in $config->imageManipulatorOptions!) set {singleOption} ($value) For every valid option there is also a single method that you can call, like setQuality(90), setUpscaling(false), etc. ------------------------------------------------------------------- * pimSave pimSave() return: PageImage-Object If a new image is hold in memory, it saves the current content into a diskfile, according to the settings of filename, imagetype, targetFilename and outputFormat. Returns a PageImage-Object! ------------------------------------------------------------------- * release release() return: void (nothing) if you, for what ever reason, first load image into memory but than do not save it, you should call release() to do the dishes! ? If you use pimSave() to leave the ImageManipulator, release() is called automatically. ------------------------------------------------------------------- * getOptions getOptions() return: associative array with all final option values example: ["autoRotation"] bool(true) ["upscaling"] bool(false) ["cropping"] bool(true) ["quality"] int(90) ["sharpening"] string(6) "medium" ["targetFilename"] string(96) "/htdocs/site/assets/files/1124/pim_prefix_filename.jpg" ["outputFormat"] string(3) "jpg" get {singleOption} () For every valid option there is also a single method that you can call, like getQuality(), getUpscaling(), etc. See method setOptions for a list of valid options! ------------------------------------------------------------------- * getImageInfo getImageInfo() return: associative array with useful informations of source imagefile example: ["type"] string(3) "jpg" ["imageType"] int(2) ["mimetype"] string(10) "image/jpeg" ["width"] int(500) ["height"] int(331) ["landscape"] bool(true) ["ratio"] float(1.5105740181269) ["bits"] int(8) ["channels"] int(3) ["colspace"] string(9) "DeviceRGB" ------------------------------------------------------------------- * getPimVariations getPimVariations() return: array of Pageimages Collect all pimVariations of this Pageimage as a Pageimages array of Pageimage objects. All variations created by the core ImageSizer are not included in the collection. ------------------------------------------------------------------- * removePimVariations removePimVariations() return: pim - (class handle) Removes all image variations that was created using the PIM, all variations that are created by the core ImageSizer are left untouched! ------------------------------------------------------------------- * width width($dst_width, $sharpen_mode=null) param: $dst_width - (integer) param: $auto_sharpen - (boolean) default is true was deleted with version 0.0.8, - sorry for breaking compatibility param: $sharpen_mode - (string) possible: 'none' | 'soft' | 'medium' | 'strong', default is 'soft' return: pim - (class handle) Is a call to resize where you prioritize the width, like with pageimage. Additionally, after resizing, an automatic sharpening can be done with one of the three modes. ------------------------------------------------------------------- * height height($dst_height, $sharpen_mode=null) param: $dst_height - (integer) param: $auto_sharpen - (boolean) default is true was deleted with version 0.0.8, - sorry for breaking compatibility param: $sharpen_mode - (string) possible: 'none' | 'soft' | 'medium' | 'strong', default is 'soft' return: pim - (class handle) Is a call to resize where you prioritize the height, like with pageimage. Additionally, after resizing, an automatic sharpening can be done with one of the three modes. ------------------------------------------------------------------- * resize resize($dst_width=0, $dst_height=0, $sharpen_mode=null) param: $dst_width - (integer) default is 0 param: $dst_height - (integer) default is 0 param: $auto_sharpen - (boolean) default is true was deleted with version 0.0.8, - sorry for breaking compatibility param: $sharpen_mode - (string) possible: 'none' | 'soft' | 'medium' | 'strong', default is 'soft' return: pim - (class handle) Is a call to resize where you have to set width and / or height, like with pageimage size(). Additionally, after resizing, an automatic sharpening can be done with one of the three modes. ------------------------------------------------------------------- * stepResize stepResize($dst_width=0, $dst_height=0) param: $dst_width - (integer) default is 0 param: $dst_height - (integer) default is 0 return: pim - (class handle) this performs a resizing but with multiple little steps, each step followed by a soft sharpening. That way you can get better result of sharpened images. ------------------------------------------------------------------- * sharpen sharpen($mode='soft') param: $mode - (string) possible values 'none' | 'soft'| 'medium'| 'strong' return: pim - (class handle) Applys sharpening to the current memory image. You can call it with one of the three predefined pattern, or you can pass an array with your own pattern. ------------------------------------------------------------------- * unsharpMask unsharpMask($amount, $radius, $threshold) param: $amount - (integer) 0 - 500, default is 100 param: $radius - (float) 0.1 - 50, default is 0.5 param: $threshold - (integer) 0 - 255, default is 3 return: pim - (class handle) Applys sharpening to the current memory image like the equal named filter in photoshop. Credit for the used unsharp mask algorithm goes to Torstein Hønsi who has created the function back in 2003. ------------------------------------------------------------------- * smooth smooth($level=127) param: $level - (integer) 1 - 255, default is 127 return: pim - (class handle) Smooth is the opposite of sharpen. You can define how strong it should be applied, 1 is low and 255 is strong. ------------------------------------------------------------------- * blur blur() return: pim - (class handle) Blur is like smooth, but cannot called with a value. It seems to be similar like a result of smooth with a value greater than 200. ------------------------------------------------------------------- * crop crop($pos_x, $pos_y, $width, $height) param: $pos_x - (integer) start position left param: $pos_y - (integer) start position top param: $width - (integer) horizontal length of desired image part param: $height - (integer) vertical length of desired image part return: pim - (class handle) This method cut out a part of the memory image. ------------------------------------------------------------------- * canvas canvas($width, $height, $bgcolor, $position, $padding) param: $width = mixed, associative array with options or integer, - mandatory! param: $height = integer, - mandatory if $width is integer! param: $bgcolor = array with rgb or rgba, - default is array(255, 255, 255, 0) param: $position = one out of north, northwest, center, etc, - default is center param: $padding = integer as percent of canvas length, - default is 0 return: pim - (class handle) This method creates a canvas according to the given width and height and position the memory image onto it. You can pass an associative options array as the first and only param. With it you have to set width and height and optionally any other valid param. Or you have to set at least width and height as integers. Hint: If you want use transparency with rgba and your sourceImage isn't of type PNG, you have to define 'png' as outputFormat with your initially options array or, for example, like this: $image->pimLoad('prefix')->setOutputFormat('png')->canvas(300, 300, array(210,233,238,0.5), 'c', 5)->pimSave() ------------------------------------------------------------------- * flip flip($vertical=false) param: $vertical - (boolean) default is false return: pim - (class handle) This flips the image horizontal by default. (mirroring) If the boolean param is set to true, it flips the image vertical instead. ------------------------------------------------------------------- * rotate rotate($degree, $backgroundColor=127) param: $degree - (integer) valid is -360 0 360 param: $backgroundColor - (integer) valid is 0 - 255, default is 127 return: pim - (class handle) This rotates the image. Positive values for degree rotates clockwise, negative values counter clockwise. If you use other values than 90, 180, 270, the additional space gets filled with the defined background color. ------------------------------------------------------------------- * brightness brightness($level) param: $level - (integer) -255 0 255 return: pim - (class handle) You can adjust brightness by defining a value between -255 and +255. Zero lets it unchanged, negative values results in darker images and positive values in lighter images. ------------------------------------------------------------------- * contrast contrast($level) param: $level - (integer) -255 0 255 return: pim - (class handle) You can adjust contrast by defining a value between -255 and +255. Zero lets it unchanged, negative values results in lesser contrast and positive values in higher contrast. ------------------------------------------------------------------- * grayscale grayscale() return: pim - (class handle) Turns an image into grayscale. Remove all colors. ------------------------------------------------------------------- * sepia sepia() return: pim - (class handle) Turns the memory image into a colorized grayscale image with a predefined rgb-color that is known as "sepia". ------------------------------------------------------------------- * colorize colorize($anyColor) param: $anyColor - (array) like css rgb or css rgba - but with values for rgb -255 - +255, - value for alpha is float 0 - 1, 0 = transparent 1 = opaque return: pim - (class handle) Here you can adjust each of the RGB colors and optionally the alpha channel. Zero lets the channel unchanged whereas negative values results in lesser / darker parts of that channel and higher values in stronger saturisation of that channel. ------------------------------------------------------------------- * negate negate() return: pim - (class handle) Turns an image into a "negative". ------------------------------------------------------------------- * pixelate pixelate($blockSize=3) param: $blockSize - (integer) 1 - ??, default is 3 return: pim - (class handle) This apply the well known PixelLook to the memory image. It is stronger with higher values for blockSize. ------------------------------------------------------------------- * emboss emboss() return: pim - (class handle) This apply the emboss effect to the memory image. ------------------------------------------------------------------- * edgedetect edgedetect() return: pim - (class handle) This apply the edge-detect effect to the memory image. ------------------------------------------------------------------- * getMemoryImage getMemoryImage() return: memoryimage - (GD-Resource) If you want apply something that isn't available with that class, you simply can check out the current memory image and apply your image - voodoo - stuff ------------------------------------------------------------------- * setMemoryImage setMemoryImage($memoryImage) param: $memoryImage - (GD-Resource) return: pim - (class handle) If you are ready with your own image stuff, you can check in the memory image for further use with the class. ------------------------------------------------------------------- * watermarkLogo watermarkLogo($pngAlphaImage, $position='center', $padding=2) param: $pngAlphaImage - mixed [systemfilepath or PageImageObject] to/from a PNG with transparency param: $position - (string) is one out of: N, E, S, W, C, NE, SE, SW, NW, - or: north, east, south, west, center, northeast, southeast, southwest, northwest default is 'center' param: $padding - (integer) 0 - 25, default is 5, padding to the borders in percent of the images length! return: pim - (class handle) You can pass a transparent image with its filename or as a PageImage to the method. If the watermark is bigger than the destination-image, it gets shrinked to fit into the targetimage. If it is a small watermark image you can define the position of it: NW - N - NE | | | W - C - E | | | SW - S - SE The easiest and best way I have discovered to apply a big transparency watermark to an image is as follows: create a square transparent png image of e.g. 2000 x 2000 px, place your mark into the center with enough (percent) of space to the borders. You can see an example here! The $pngAlphaImage get centered and shrinked to fit into the memory image. No hassle with what width and / or height should I use?, how many space for the borders?, etc. ------------------------------------------------------------------- * watermarkLogoTiled watermarkLogoTiled($pngAlphaImage) param: $pngAlphaImage - mixed [systemfilepath or PageImageObject] to/from a PNG with transparency return: pim - (class handle) Here you have to pass a tile png with transparency (e.g. something between 150-300 px?) to your bigger images. It got repeated all over the memory image starting at the top left corner. ------------------------------------------------------------------- * watermarkText watermarkText($text, $size=10, $position='center', $padding=2, $opacity=50, $trueTypeFont=null) param: $text - (string) the text that you want to display on the image param: $size - (integer) 1 - 100, unit = points, good value seems to be around 10 to 15 param: $position - (string) is one out of: N, E, S, W, C, NE, SE, SW, NW, - or: north, east, south, west, center, northeast, southeast, southwest, northwest default is 'center' param: $padding - (integer) 0 - 25, default is 2, padding to the borders in percent of the images length! param: $opacity- (integer) 1 - 100, default is 50 param: $trueTypeFont - (string) systemfilepath to a TrueTypeFont, default is freesansbold.ttf (is GPL & comes with the module) return: pim - (class handle) Here you can display (dynamic) text with transparency over the memory image. You have to define your text, and optionally size, position, padding, opacity for it. And if you don't like the default font, freesansbold, you have to point to a TrueTypeFont-File of your choice. Please have a look to example output: http://processwire.com/talk/topic/4264-release-page-image-manipulator/page-2#entry41989 ------------------------------------------------------------------- PageImage Manipulator - Example Output
    1 point
  18. The Module Blog for ProcessWire replicates and extends the popular Blog Profile. Blog is now in version 2. Please read the README in the Github link below in its entirety before using this module As of 20 December 2017 ProcessWire versions earlier than 3.x are not supported Blog Documentation is here (Work in Progress!) See this post for new features in version 2 or the readme in GitHub. To upgrade from version 1, see these instructions. ################################################## Most of the text below refers to Blog version 1 (left here for posterity). Blog version 1 consists of two modules: ProcessBlog: Manage Blog in the backend/Admin. MarkupBlog: Display Blog in the frontend. Being a module, Blog can be installed in both fresh and existing sites. Note, however, that presently, ProcessBlog is not compatible with existing installs of the Blog Profile. This is because of various structural and naming differences in respect of Fields, Templates, Template Files and Pages. If there is demand for such compatibility, I will code a separate version for managing Blog Profile installs. In order to use the 'Recent Tweets Widget', you will need to separately install and setup the module 'MarkupTwitterFeed'. Please read the README in the Github link below in its entirety before using this module (especially the bit about the Pages, etc. created by the module). I'll appreciate Beta testers, thanks! Stable release works fine. Download Modules Directory: http://modules.processwire.com/modules/process-blog/ Github: https://github.com/kongondo/Blog You can also install from right within your ProcessWire install. Screenshots (Blog version 1) Video Demos ProcessBlog MarkupBlog Credits Ryan Cramer The Alpha Testers and 'Critics' License GPL2
    1 point
  19. Hey are there any drupal convert/devs in here? I have been having an ongoing discussion with a number of firms about Processwire. I am always pushing Processwire pretty hard. I feel like I can do anything with PW! Faster and more elegant than with any other CMS. What I notice is that most good size firms that I talk to are heavily invested in Drupal. Every discussion I have had with developers and stakeholders is the same. They say that Drupal is pretty much the only option for large websites and that it allows them to produce anything extremely fast with all the modules etc. that people have produced... that they never have to reinvent the wheel. My experience with Drupal is that it is extremely cumbersome, produces pretty much the worst output I have ever seen. Has a very poor user experience for managing/organizing and editing content. And makes you work 5 times harder. Granted, you can click a lot of buttons and produce views and get content on the screen... but it seems like so much extra work.. almost like you spend all your time trying to clean up the mess Drupal makes with endless overrides and pounds and pounds of HTML & CSS... gah.... It seems a lot like the way Wordpress works... "there is probably a plugin for that...." But I feel so frustrated with CMSs that have your functionality, workflow, and user experience predefined. I am so tired of fighting a CMS. That is exactly why I love PW... It's never in the way. Let's me work the way I do. Almost all of the larger business/organization websites that I come across are Drupal... So I don't want to be biased and hate on it, that's not my intention. So I guess I am looking for feedback from people who know... Is there really anything in Drupal you cannot do with PW? Is PW a capable platform for large scale websites? (I believe it is, but I am having trouble demonstrating it to people) Is it really less work and more efficient to implement advanced functionality with Drupal vs PW? Thanks in advance for any feedback and contributions to this discussion.
    1 point
  20. AlternativeGridImages module for Processwire Details Add a slider directly proportional to the size of the images introduced in the input field image. Installation copy AlternativeGridImages folder to /site/modules/ Screenshot https://github.com/LuisSantiago/AlternativeGridImages Updated 1.0.6: - Renamed altGrid as AlternativeGridImages. (Thanks @adrian) - Changed styles. - The slider value is saved in a cookie. (Thanks @Martijn Geerts) Updated 1.0.7: - Limit the number of characters in the file name (all items have the same height) (Thanks @enricob)
    1 point
  21. Link 1 here: https://www.google.co.uk/search?q=processwire+logo+file
    1 point
  22. 1 point
  23. Yes you do ...Just use the 'More reply options' when you are editing the first post you created and you'll get the full editor... But I can change it, no worries
    1 point
  24. Btw, the including class can of course extend the included one...
    1 point
  25. ...maybe let's just change the title to something more descriptive, mark this as solved and maybe you can buy me coffee when am next in Spain?
    1 point
  26. Include as normal...at the top of the class...e.g. require_once(__DIR__ . '/NameOfYourPHPFILE.php');//am assuming this is a class as well class BackendChat extends WireData implements Module { //your class methods } For $ _GET and $ _POST. See $input: http://processwire.com/api/variables/input/ In a module: $this->input->post; wire('input')->get should also work in a class I believe as well as a function. Otherwise, normal use is $input->post, $input->get, $input->cookie
    1 point
  27. yes, some files have to be overwritten and a lot new will be added
    1 point
  28. Much more better - one step languagepack installation install first this one: http://modules.processwire.com/modules/language-instant-install/ LanguageInstantInstall if you are on "create new lang" page you chould choose....the 2.4 packs. for 2.4.x add this additional files from manfred62! regards mr-fan
    1 point
  29. +1 for #1 (optional)
    1 point
  30. Added instructions for altering template output when called from PageTableExtended.
    1 point
  31. Ok so i'm right. the code could be added to the maintain mode like this: header('HTTP/1.1 503 Service Temporarily Unavailable'); header('Status: 503 Service Temporarily Unavailable'); header('Retry-After: 1800');//30 min found this one is interesting, too: https://plus.google.com/+PierreFar/posts/Gas8vjZ5fmB
    1 point
  32. If it helps: http://googlewebmastercentral.blogspot.de/2011/01/how-to-deal-with-planned-site-downtime.html
    1 point
  33. Thanks @enricob. I updated the module. Your solution seems good but it seems best to limit characters and not the height that can be variable. $(".InputfieldFileName").each(function(i){ len=$(this).text().length; if(len>9) { $(this).text($(this).text().substr(0,9)+'...'); } }); If file name > 9 chars the result is Namemoret...
    1 point
  34. Hi, After uploading the /site/ folder to my web host and importing the database, I realized that a single repeater was not output correctly. Instead of rendering the content, only the path to the repeater's template is shown, and this is the path on my local machine: This is the code in question: home.php (page->advantages contains 3 items) <!-- ADVANTAGES BOXES - START --> <div class="row text-center"> <?php foreach ($page->advantages as $a): ?> <?php echo $a->render(); ?> <?php endforeach; ?> </div> <!-- ADVANTAGES BOXES - END --> repeater_services.php <div class="col-md-4 col"> <div class="icon-border bm10"> <i class="<?= $page->icon ?>"></i> </div> <h5 class="upper colored"><?= $page->subject ?></h5> <?= $page->summary ?> </div> The strange thing is that there is a second repeater on the same page using nearly exactly the same code, and this one is output correctly. I already emptied the cache, sessions, and ProCache folders, but that did not the trick, either. This is the site in questions: http://staging.sovonex.com The section "WHAT WE PROVIDE" is rendered correctly by a similar repeater, the section "YOUR ADVANTAGES" below is the result of the repeater I am having problems with. It would be great if someone could give me a hint as to where the error is. Cheers, Stefan
    1 point
  35. Have a late breakfast at the central market in the morning. If you have some spare money, check out Restaurant La Biblioteca (http://labibliotecagourmande.com/). Have a drink at night at the beach, stay away from the tourist hotspots.
    1 point
  36. Hi, first I have to say I really like this module, thanks blad! The only minor complaint I have is: when I resize the images to be quite small (200px or less) the longer image names go on two lines so the boxes that contain these images become higher than others, and this breaks the grid layout... Looking at the html code, one way to solve the problem could be to set a fixed height to the header of the boxes (InputfieldItemHeader class), so for now i simply added this code to the module css and now it works: ul.InputfieldFileList li .InputfieldFileInfo { height:80px; } Obviously it's not a perfect solution since I will lose this modification on module update... Maybe if this is useful to others the modification could be done on the original module code
    1 point
  37. Schedule Posts Publish and Unpublish dates using SchedulePages module Hello Bloggers and devs! I would like to hear your thoughts on this matter. As you know, there have been requests to implement such a feature in Blog. I have decided to use the module SchedulePages to accomplish this. In fact, I have already implemented this in my dev version and it works brilliantly. Thanks to Jasper for a great module. OK, I need to make a decision whether: Scenario #1: This should be an optional add-on to Blog, i.e. those who want to use the auto-publish feature should go ahead and install SchedulePages and optionally maybe, if found on your server but not installed, Blog would go ahead and install it for you. Blog would then use the feature VS. Scenario #2: Require that auto-publish is always used. In this scenario, the user would first need to install SchedulePages before Blog is installed. If they don't, installation would halt. The issues with #2 is that I feel I would be forcing users to use a feature they may not be interested in or a feature they could implement using other means, e.g. normal normal cron vs lazy cron. I am therefore inclined to go with #1; make the feature optional. Those who want to use it to go ahead and install SchedulePages and Blog would detect that and work with it in blog-post template and quick post dashboard. The way I see it, there's 4 camps of users:. SchedulePages already installed but user does not want to use it with Blog SchedulePages already installed but user wants to use it with Blog SchedulePages not installed but user wants to use it with Blog SchedulePages not installed and user does not want to use it with blog Going with Scenario #1 would cater best for above 4 user camps, I think. Maybe make this configurable in the module post-install screen. Tick a box if you want to use SchedulePages. In that case, the checkbox would be locked for ticking unless SchedulePages was already installed [not just available] on the system (I'll see whether this is doable). Note that SchedulePages itself installs and works with two date/time fields - 'publish_from' and 'publish_until'. Blog would need to add these to the 'blog-post' template after ticking of the above checkbox. This should be doable via an include in init() that would run only once/if checkbox was ticked and SchedulePages already installed. Hope I am not complicating this. Maybe there are simpler ways to effect this? I would like to hear and consider your thoughts, thanks .
    1 point
  38. Yep, exactly what Sinnut says. And the best part: You also can import the courses with the CSV importer. Just define a page field in the course template which relates to the instructor(s). You can easily customize the CSV importer module for that case. For example a reference to instructors with ids 1012,1024,1034 should be placed in a column in the CSV export which then is tied to the page field. Of course the ids don't match "the old" ones, so you have to apply some additional logic in the importer. For example it could be possible to import the old id with the instructors in an extra field and while importing the courses you look for the matching instructor and build the relation via the page field. Search the forums a bit, especially the CSV import thread, there are a lot of good solutions hidden
    1 point
  39. Are there scenarios thinkable where a course could have multiple instructors? In that case you would probably want to reference the instructors via a page field belonging to the course template. Or even, when a course can only have 1 instructor this might be best/flexible way. So you would have: instructors >member name1 >member name2 courses >course1 >course2 and then the course pages would have a field of type 'FieldtypePage', where you can choose one or more instructor pages, depending on your needs.
    1 point
  40. +1 for drafts. That's something i consider essential (and the only thing that im REALLY missing in pw) for every cms (and I can't think of one that hasn't got this feature apart from pw)! Almost EVERY of our customers asked if they can preview their edits or schedule changes to an exisiting site to be published at some later point.
    1 point
  41. Ryan, a huge thank you for all the recent changes. The speed of the development at the moment is very exciting. I also think you have a "knack" of prioritising what's important and I very much trust your vision for the future. I think the drafts module is a nice idea but perhaps something that can be a funded, 3rd party module rather than part of the core. I wanted to point out on the version I'm testing (2.4.15), when you choose whether a template can have children/new pages, the fields below stay visible, whereas they used to collapse as appropriate, not sure if this is intentional (it's certainly not a big deal )
    1 point
  42. Remember though that srcset is not available that widely available just yet: http://caniuse.com/#search=srcset So that link I sent you to mentions the picturefill polyfill that you'll need to get going with it now: http://scottjehl.github.io/picturefill/#getting-started
    1 point
  43. 1 point
  44. I highly recommend this module. I have used it quite a bit and it makes redirecting a breeze
    1 point
  45. You could also have these links added as entries to the Redirects module (http://modules.processwire.com/modules/process-redirects/).
    1 point
  46. We all have days like this
    1 point
  47. thanks for the hint. new german updates for actual PW dev 2.4.4 (17 June 2014). Zip contains only updated/added files (in comparison to the default 2.4 lang pack). added files: wire--modules--inputfield--inputfieldselector--inputfieldselector-module.json pw-lang-de-dev-update.zip best would be to have a GitHub repo for the dev lang-pack as discussed above, so others can check and correct files if necessary?
    1 point
  48. Glad you got it! I'll have to remember that one too. No doubt these CKEditor 4.1+'s ACF system is a mixed blessing. On the whole, I'm glad to have it (especially with clients that like to copy/paste from Word, etc.) but I can see it being a real bear when trying to do something out of the norm. I've gone ahead and updated the CKEditor version so that it now supports options for: Enable ACF (Advanced Content Filter)? [Yes/No] (default=Yes) Enable HTML Purifier? [Yes/No] (default=Yes, if installed) When upgrading to this version, revisit all your textarea fields using CKEditor in Setup > Fields, and see the new options on the Input tab. Hit save, even if you don't change anything, just to commit the new settings.
    1 point
  49. rather then namen "nofile_*" u.cann also do $this alsos $tamplons = ''; foreach($templates as $t) { if(!$t->filenameExists()) $tamplons .= $tamplons ? "|$t" : $t; } foreach($page->children("template!=$tamplons") as $babby) { // $babby.not tamplon } cd ..
    1 point
×
×
  • Create New...