Leaderboard
Popular Content
Showing content with the highest reputation on 06/15/2014 in all areas
-
After months of silence on the forum I've decided to speak out and introduce a brand new admin theme for ProcessWire 2.4.x I've made the theme initially for our internal business project and I've decided to share it with you all The theme itself is designed only for ProcessWire 2.4.x and up because it's wrapped as a module (new theming design approach introduced in ProcessWire 2.4) and it also has it's own options you can configure. It has all the bells and whistles as Default Admin Theme of PW 2.4 as well as some of my own You can download it from here: https://github.com/nvidoni/AdminThemeModesta and please let me know of any mistakes you find during your workflow... Changelog: v1.0.1 Added unpublished pages status icon next to username (fires modal window with unpublished pages list that you can edit) Improved PageList (children are more indented with arrows before them, hidden pages have more lighter color and icons have more darker color - by suggestion from Martijn Geerts) Other CSS improvements UPDATE: You can find version compatible with Processwire 2.4.4 and up on dev branch: https://github.com/nvidoni/AdminThemeModesta/tree/dev and also let me know about any mistakes that should be fixed. Dev version isn't updated to v1.0.1 yet because of strange problem with theme not switching right (doesn't activate) - it started to happen from 2.4.5 dev version of PW...) and it seems it happens only in Windows environments...), hopefully we'll fix this soon. To sum it up and let the images do the talking, here we go:6 points
-
@Jonathan: Many thanks for this nice module. I have played around with it the whole evening. The JpegOptim runs smoothly together with the ImageSizer and with the ImagickResizer. Following are some suggestions for you. If you find something useful, please feel free to take and implement it: The ImageSizer supports unlimited individual options for thirdparty modules, but it isn't documented actually. You can add any assoc option to the images $options array in templates. But you need to avoid overriding the core ImageSizers options. Therefor I have prefixed all options from JpegOptim with a jo, followed by the initial option name in camelcase style. Now the options are parsed in this order: default settings, config page settings, template / image-options settings! Example that overrides the default setting and custom setting for quality and threshold: $options = array('joQuality'=>85, 'joThreshold'=>20); $image->width(300, $options); I have introduced an option that temporary suppresses the use of JpegOptim on a per image basis: $options = array('useJPEGOPTIM'=>false); $image->width(300, $options); Also I have played around with the option for lossless optimization, but this seems to be nearly useless (not lossless ) because it produces the same result like quality 100 and threshold 1. I have left it in the code, just for documentation. I don't have added / tested these enhancements with the pageimage::optimize hook. So if you want to use some of the above you need to test / implement it there too. I have found out that the JpegOptim produces best results and also mostly smaller results if the GD or Imagick source is rendered with 100% quality. If you render them with e.g. 80% quality, the resulting filesize from JpegOptim is slightly higher (sometimes). This can be due to more jpeg artefacts in the result from GD or Imagick Also it seems best solution to use strong sharpening (over sharpen the resized variation, what is the source for JpegOptim). $options = array('quality'=>100, 'sharpening'=>'strong', 'joQuality'=>80); $image->width(300, $options); Different tests and results can be viewed here: http://images.pw.nogajski.de/jpegoptim/ PS: as I have explained in my previous post it would be nice to keep IPTC if populated PPS: here is the code that helps testing: https://gist.github.com/horst-n/4757d5a34f2278657b6d#file-jpegoptim-testroutine-php6 points
-
Huge update: * Added media file preview * Added multilayer support * Enabled to use the tab key http://modules.processwire.com/modules/template-editor/4 points
-
@horst I've left the panel switch action as it is (you can click on the switch button or the document body to close it), but I've removed trigger from "Back to top" button - it doesn't close the panel when sliding up to the top of the page. @mr-fan Template selection drop down ("Add new" on the right side) is default action in PW 2.4 and up, it lets you assign templates to that drop down for quicker access - so no need to put it in the sidebar panel (anyway it's quicker to select template from drop down then opening sidebar panel and then selecting the desired template). @diogo There's no easy way for displaying formatted date (for all possible locale scenarios) so I've added warning if iconv extension is not loaded and it uses basic strftime without any conversion in that case, but most servers have iconv loaded so it's just for a few of scenarios where this extension is not loaded. ---- I've also made changes to the theme that reflect changes in PW 2.4.4, but I'm currently setting up the dev branch where I'll commit that version.3 points
-
here we go == German language for ProccessBlog i'll need this great Addon in some weeks for a own blog, so i will contribute some more lost strings that are not translatable until now....so stay tuned. Thanks to Kongondo! This is really great Addon - i'll love ProcessWire at the first glance it is perfect to setup websites and get learning PHP faster!3 points
-
Like announced here: https://processwire.com/talk/topic/6465-module-blog/page-3#entry64334 here we go - added some langfiles for this great module: site--modules--processblog--template-files--blog-recent-comments-php site--templates--blog-post-php site--templates--blog-recent-posts-php site--templates--blog-links-php site--templates--blog-recent-comments-php site--templates--blog-recent-tweets-php site--templates--blog-side-bar-inc site--modules--processblog--markupblog-module site--modules--processblog--processbloginstall-inc site--modules--processblog--processblog-module site--modules--processblog--template-files--blog-links-php site--modules--processblog--template-files--blog-post-php site--modules--processblog--template-files--blog-recent-posts-php site--modules--processblog--template-files--blog-recent-tweets-php site--modules--processblog--template-files--blog-side-bar-inc still some strings are not to translate in the adminmodule but this issue i will work out until i need it in a project...and give a pull request. have fun - mr-fan ProcessBlog-German.zip2 points
-
Could be totally off here, but have you tried start=0 in the selector in your hanna code?2 points
-
Although I would have liked to see England win, for me I was more interested in 'how' England would play. I have never been prouder! So many positives and so many things to hope for for the future. When is the last time you saw England play attacking football and not just sit back? When is the last time you saw England actually bring the ball forward through passing right from the goalie to the front rather than hitting the customary long passes? There's so much to look forward to; well-done lads! Congrats to the Azzurri2 points
-
Hey Jonathan, Thanks for this. I have just done some initial testing and it's working fine. I haven't yet done any comparisons with GD or Imagick to see if it is any better size/quality wise, but you sound convinced, so I am looking forward to analyzing more. One thing I did notice is that the ".jo" files will be left behind after deletion of the initially uploaded file. It is easy to extend Pageimage::isVariation to handle these. Horst did it with the PIM module and I did it with ImageRasterizer. EDIT - any thoughts in incorporating http://optipng.sourceforge.net/ (or similar) as well for PNGs?2 points
-
A quick tutorial how to create file downloads using pages You will be able to create a new page using template "PDF" (or any you setup), upload a pdf file. You then can select this page using page fields, or links in Wysiwyg. The url will be to the page and NOT the file itself. This will allow to keep a readable permanent unique url (as you define it), unlike /site/assets/files/1239/download-1.pdf, and you'll be able to update/replace the uploaded file without worring about its filename. Further more the file will also have an id, the one of the page where it lives. Clicking those links will download or open the file (when target="_blank") like it would be a real file on server with a path like /downloads/project/yourfile.pdf. You'll be also able to use the "view" action directly in the page list tree to view the file. Further more you'll be able to esaily track downloads simply by adding a counter integer field to the template and increase it every time the page is viewed. Since the file is basicly a page. This all works very well and requires only minimal setup, no modules and best of it it works in the same way for multi-language fields: Just create the language alternative fields like "pdf, pdf_de, pdf_es" and it will work without modifying any code! Still with me? ok PW setup Download folder: Create a template "folder" or "download-folder" with only a title needed. Create pages in the root like /downloads/project/ using this template. Setup the template for the pdf files 1. Create a new template in PW. Name it pdf 2. Goto template -> URLs tab and set the URL end with slash to no. (So we can have /path/myfile.pdf as the URL) 3. Create a new custom file field, name it pdf. Set its maximal count to 1 under -> Details tab. 4. Add the pdf field created to the pdf template. Easy. 5. Create a new "pdf" page using the pdf template under a download folder you created earlier. 6. Give it the title and in the name field add ".pdf" to the end (could also leave as is) Template PHP file for the pdf files 1. Create the template file pdf.php in your /site/templates folder 2. add the following code: <?php // pdf.php if($page->pdf){ wireSendFile($page->pdf->filename); } Done. To see the options you have with PW's wireSendFile() you can also overwrite defaults <?php // pdf.php if($page->pdf){ $options = array( // boolean: halt program execution after file send 'exit' => true, // boolean|null: whether file should force download (null=let content-type header decide) 'forceDownload' => false, // string: filename you want the download to show on the user's computer, or blank to use existing. 'downloadFilename' => '', ); wireSendFile($page->pdf->filename, $options); } Simple and powerful isn't it? Try it out. Some thoughts advanced Create as many file types as you like. It might also be possible to use one "filedownload" template that isn't restricted to one field type but evaluate it when being output using $page->file->ext, or save the file extension to the page name after uploading using a hook. One last thing. You can add other meta fields or preview images to the template and use those to create lists or detail pages. It's all open to goodness. Again all without "coding" and third-party modules. Further more you can use the excellent TemplateDecorator to add icons per template and have a nice pdf icon for those pages. This as a base one could also easily create a simple admin page for mass uploading files in a simple manner, and create the pages for the files automaticly. ImagesManager work in the same way. Cheers1 point
-
Hi, today I started and finished work on my new module "TextboxList". It includes "FieldtypeTextboxList" and "InputtypeTextboxList". The main function is to create inputfields like Facebook when you have to insert the name of your friend (see the screenshot below). It automatically creates a new "box" if you press "," or "enter". The result will be saved as a comma-separated list. It is based on the TextboxList.js of Guillermo Rauch so I wouldn't use this for a commercial project right now. (But I wrote him a mail if he would allow this). I changed the color schema so it looks like a native element. I recommend to use it if you have something like a tag list (like: bla, christmas, bla, 2011, bla, ...). You can download it here: https://github.com/N...oll/TextboxList Have fun with it! Greets, Nico1 point
-
Hi everyone! I'd like to introduce PassiveCron - a module, which allows developers to schedule cronjobs - to you. This will be Conclurer's second Pro Module, following ProcessImageMinimize / minimize.pw. PassiveCron is available now as a beta version. What is it going to do? Have you ever been in a situation, in which ProcessWire ran out of PHP's max_execution_time, because you're doing cool tasks like resizing dozens of images using PIM? Or have you noticed site load performance issues when doing a lot of tasks simultaneously? PassiveCron will fix this by giving developers the ability to schedule tasks to future and / or repeating points in time run tasks asynchronously Isn't this exactly the same as LazyCron? No. LazyCron runs your tasks synchronously as your page loads. So running larger tasks will decrease your page's load performance. Instead of this, PassiveCron is able to run those tasks separately from your site loads, thanks to our new web service cron.pw, which will be released together with PassiveCron. How can I use this in my site / module? We will bundle PassiveCron with an easy-to-use API. Let's say you want to call a specific module action tomorrow at 8:00 am: $cron->tomorrow->at('8:00 am')->run('Class', 'Method'); Or do this specific cleanup task, every night at 3:00 am: $cron->every("day")->at("3:00 am")->run("Class", "Method"); Or just run this one large task asynchronously: $cron->run("Class", "Method"); How much will it cost? We are planning to give every ProcessWire site 200 task executions / day for free. For unlimited task executions per site, it'll be around 5€ (pay once, use forever). During the beta period, no payments will be available. Features overview Easy-to-use API for asynchronous task execution Integrable into existing modules for load time improvements No registration at cron.pw needed Pro Cache will be bypassed En- or disable PassiveCron per module Free minimize.pw background tasks Dashboard with reports per task So, what do you think? Is such a module what you need? Can you imagine additional features or do you have wishes for PassiveCron? Please tell us in the comments. Thank you very much!1 point
-
Hi Adrian, Thanks for your suggestion, it makes totally sense - will update the module later this week. The reason I've chosen to add this setting is that the color has to be set with javascript (jqplot) so it can't be controlled with CSS. The bar graph colors could be changed with CSS, but of course the colors should match by default! Cheers1 point
-
I finally found time to try out this module. Congrats to all for the dedication, collaboration and hard work in creating this needed tool. A very useful module.1 point
-
If you use others finds on same page with limit, you need to add start=0 to the conflicting find.1 point
-
whattool u.use 2 bench marks ? whatt. autoload modulos u have ? turning on debugger mode.on in config.php admin>debug>hooks tell u some multi languoge ?1 point
-
Hi jacmaes, I have tracked down the issue. It is definitely a bug that should be reported to Ryan on Github. There are newly added checks for module permissions around line#457 of Modules.php (https://github.com/ryancramerdesign/ProcessWire/commit/2c0762d1f346a3f01171b4f65fa97242f17fd916#diff-995c5c9ce48d4bff459f52363c6e190eR457) The module that is blocking your access is actually ProcessPageSearch, which required page-edit permissions, which of course a guest user doesn't have. If you temporarily remove the permission check, or change the ProcessPageSearch permissions to page-view, it works again (obviously this is not the appropriate solution . Once that hack is in place though, there is one other new bug: {"errors":["Field 'it' is not allowed in queries"]} This can be fixed easily by adding this line to ServicePages.module inside the loop starting at line#174 foreach($k as $name) { if($name=="it") continue; //add this line Let us know if you want us to submit an issue of Github, or if you have taken care of it.1 point
-
something like this? : https://processwire.com/talk/topic/4730-page-list-fields-customisation/ http://modules.processwire.com/modules/markup-custom-page-list/1 point
-
Many thanks for making this! No please, +1 for let it as is (clicking anywhere)1 point
-
While testing I had mostly similar results to those of Soma for the basic site profile out-of-the-box (on localhost), but some actual production sites took a bit longer to load -- around 200-300ms. If we really wanted some comparable results, we'd need all the details of aforementioned tests (including a test site to run those tests on on) just to rule out different measuring methods and side-effects of installed modules1 point
-
In my test PW needs 0.001s to load config and 0.1s to the point right before rendering a page.1 point
-
Wow horst indeed! I will need some time to digest your feedback, stay tuned. Adrian optimizing png's would be useful as well - I'll see what that would entail.1 point
-
Wow horst - just WOW! Once again, thanks for the amazingly detailed testing and for making the results available for all of us to see in such a well formatted and documented way!1 point
-
Updated some stuff and added it to module directory: http://modules.processwire.com/modules/textbox-list/1 point
-
That's sounds really, really great! I'm really excited how it will work1 point
-
@Jonathan: looks very interesting. Haven't tested now, but have one suggestion regarding metadata: You have set "--strip-all" as default. I really would like to see that IPTC-data would be preserved if populated. This is the default behave in ProcessWire since version 2.3.0. IPTC data only is present if people explicitly have populated them, and in this case they have highly interest in keeping that information within the images and its variations. IPTC data is really small, not like EXIF or XMP. The default is to strip everything but not IPTC. You simply can replace "--strip-all" by --strip-com --strip-exif --strip-icc Or Imagesizer can / should apply a public function that adds it to the resulting files of your and other third party modules. So with jpegoptim it would be a bit faster and more straight forward to use its own flags. ------ I will test it soon, together with ImageSizer, ImagickResizer and the PiM and report back the results.1 point
-
Two new small sites, both powered by PW 2.4. Both of them in German only (sorry, people who can't read German), HTML5 and responsive. Both kind of simple in design (per request). http://www.eutin-immobilien.de is a site for a local real-estate agent (in a very small town). Content's become a bit weird since the client started to manage it himself because he used the wrong image formats here and there and also decided to skip my advice to keep the headlines short. Nothing much I can do about that; at some point, you just got to let it go. (I'm not a huge fan of limiting the number of characters there.) http://clic-deutschland.de is for a small, but expanding association which … well, I guess it's best described as a network of support groups for addiction. Kind of like AA, but with a different approach. Especially challenging since they have extremely weird needs in terms of the date formats for their events. Excellent example of how to use the GoogleMap marker module with a jQuery plugin to make it really easy for editors to add individual maps for directions. (The latter was originally requested as a Wordpress site. I suggested PW instead, and the main editor is so impressed by PW that she's considering it for the next relaunch of her own web site.)1 point
-
Netcarver, ProcessDiagnostics is beautiful–really enjoying it. I have one suggestion though, which is to either have ProcessDiagnostics install at least one of the diagnostic modules, or to have it display some error if none are installed when you go to Setup > Diagnostics. I tested on a new installation this morning (before I had my coffee) and couldn't figure out why I was getting a blank admin screen when viewing the Diagnostics page. After hunting around in the code trying to figure out why, I eventually slapped myself for forgetting to install any of the related Diagnose modules. But I'm guessing other people might run into the same thing.1 point
-
Hi, this is a wonderful module for PW. Just need to say that - it works great! As a newbee to PW i'd like to ask, if there is a possibility, to include a "send PDF by email" option? Regards, Bacelo1 point