Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 12/19/2016 in all areas

  1. Please do you a favour, (and all potentially additonal users of that said module): don't "optimize" the original image! Those image optimization tools are useful to optimize all final variations, what means: optimize images that are only used to be displayed on the web. Don't "optimize" images that you will need as source for variation creation.
    4 points
  2. This discussion might be worth a look:
    3 points
  3. I've implemented such a system to some sites with a pagetables field and some template functions to show ads. I count only impressions and clicks with simple PHP while generating the ad block and i count the click when i redirect the url of the ad page to the url of the ad itself. Ads in this case are real images, no iframes, no external hosting....so i think not really a enemy of adblockers How many ads you wanna manage? regards mr-fan
    3 points
  4. There are possibilities to prevent that, e.g. by excluding all physically existing files and directories using a rewrite condition: RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ /pw/$1 You could also add specific subdirectories from being redirected, for example if you want to have another PW installation in a sub directory named "pw3", you'd add a condition before the rule: RewriteCond %{REQUEST_URI} !^/pw3/
    2 points
  5. Module: Auto Smush https://github.com/matjazpotocnik/AutoSmush Optimize/compress images. In Automatic mode images that are uploaded can be automatically optimized. Variations of images that are created on resize/crop and admin thumbnails can also be automatically optimized. In Manual mode "Optimize image" link/button will be present. This allows manual optimization of the individual image or variation. In Bulk mode all images, all variations or both can be optimized in one click. Will process images sitewide. Two optimization "engines" are avaialable. reShmush.it is a free (at the moment) tool that provides an online way to optimize images. This tool is based on several well-known algorithms such as pngquant, jpegoptim, optipng. Image is uploaded to the reSmush.it web server, then optimized image is downloaded. There is a 5 MB file upload limit and no limit on number of uploaded images. "Local tools" is set of executables on the server for optimizing images: optipng, pngquant, pngcrush, pngout, advpng, gifsicle, jpegoptim, jpegtran. Binaries for Windows are provided with this module in windows_binaries folder, copy them somewhere on the PATH environment variable eg. to C:\Windows. Similar modules: JpegOptimImage by Jonathan Dart: https://processwire.com/talk/topic/6667-jpegoptimimage/ TinyPNG Image Compression by Roope: https://github.com/BlowbackDesign/TinyPNG ProcessImageMinimize by conclurer: https://processwire.com/talk/topic/5404-processimageminimize-image-compression-service-commercial/ Forum discusion: https://processwire.com/talk/topic/12111-crowdfunded-tinypng-integration-module/ Module created by Roland Toth (@tpr).
    1 point
  6. Aligator (wip) Processwire Module to render a nested tree starting from a single root or an array of pages. Aligator is similar to MarkupSimpleNavigation but has a different approach of how to define the markup for your menu. It doesn't assume any markup or classes. It's up to you to define them where needed. It's less plug and play and requires some more advanced knowledge of ProcessWire, as some additional setup and coding is needed. But allows for powerful and easier customization without using hooks. Aligator uses callback functions to achieve this. Additionally a selector can be used to filter the children for your navigation. Note: This module is a fun project trying to find simple configurable method to render navigations. It's a work in progress and there might be major changes to how the module works. See further infos and examples on the repository: https://github.com/somatonic/Aligator
    1 point
  7. Tense Tense (Test ENvironment Setup & Execution) is a command-line tool to easily run tests agains multiple versions of ProcessWire CMF. Are you building a module, or a template and you need to make sure it works in all supported ProcessWire versions? Then Tense is exactly what you need. Write the tests in any testing framework, tell Tense which ProcessWire versions you are interested in and it will do the rest for you. See example or see usage in a real project. How to use? 1. Install it: composer global require uiii/tense 2. Create tense.yml config: tense init 3. Run it: tense run For detailed instructions see Github page: https://github.com/uiii/tense This is made possible thanks to the great wireshell tool by @justb3a, @marcus and others. What do you think about it? Do you find it useful? Do you have some idea? Did you find some bug? Tell me you opinion. Write it here or in the issue tracker.
    1 point
  8. Hi @AndZyk Here is one: GlobalEmailSettings, such as: sender and reply to. See this recent discussion: I'm not aware of any already published solutions to this and although it seems to be easy to implement and may not necessarily needs to be turned into a module, even a very simple module has the advantage of being ready made, easy to add and update (provided it is the the Module Directory...).
    1 point
  9. After having a closer look to the AutoSmush module, I don't think there is not much need for the module I had in mind: The ImageOptim web service requires an API key generated by your mail address It is similar like reSmush.it currently free, but only in beta and it is not clear how long the beta will last Also I should maybe develop a smaller module first. If anyone wants to give this idea a shot, feel free to do so. If reSmush.it gets shut down for whatever reason, this could be an alternative. @horst: Forgive me this silly question: But does optimizing the source image really make an noticeable difference for creating the variations? Of course it makes sense, but so far I never noticed any downside. But I am not an image expert like you are.
    1 point
  10. It's the "headBtnToTitle" as you can see in the dev tools, coming from "Place header button next to the main title" from RenoTweaks.
    1 point
  11. aaah forgot this topic...;)
    1 point
  12. Not that many ads and they will all be images with a link to another site. Sounds like what I want to do, too. Thanks for your input. Gives me a good idea what I need to do!
    1 point
  13. Ok, now I understand better. You shoud use a rewrite rule in a .htaccess of the document root, you will lost web access to your Document Root but your traffic will end in /pw Something like: RewriteRule ^(.*)$ /pw/$1 This rule should work but there are more way's to do it. Another solution would be to create a subdomain / use a virtual host but I don't know if that is what you need. The previous post about the RewriteBase is still valid, you still have to tell apahce that Proceswire is not in the main directory.
    1 point
  14. One of the biggest projects I've done yet! ProcessWire has been such a god-send so far, and it continues giving. This is an estate agents powered by Vebra in real-time, which ProcessWire imports all the data from and stores as pages, allowing us to use ProcessWires amazing built in API functions. ProcessWire is really perfect for any project big or small. http://www.spencersestateagents.co.uk/ The team here at Peter & Paul really love ProcessWire and so do our clients!
    1 point
  15. SeaVuel | Hotel CMS / template : http://seavuel.com/ | http://demo.seavuel.com/ Whose handiwork is this? It looks ryan-esque to me
    1 point
  16. events fieldtype would be a good starting point... But you could also go on this simple with pages, a custom admin page and a frontendform -rootpage events/bookings --reservation1 (data from the vititor - or a usersystem conected with a pagefield + data of the reservation) --reservation2 ... a reservation is created with a simple frontendform with two datefields (from - to) and a maybe a check if a existing reservation is affected... build a simple admin page where all not approved reservations are listed and a hook on save to the visitors that are approved by the admin. So you only have to build the frontendreservationform and the backendpage for the admin to approve and with pages you are futureproof for more features. If you have predefiened timeslots you could calculate the dates in the frontend calendar that a visitor see, and validate them on submit. Or if you have a difficult set of events and dateranges i would get back to the events fieldtype for the administration side and let the admin setup every bookable event/time slot with this fieldtype (with the fork even reccuring events...) and the use this entries for generating the calendar where visitors choose from (even with a integer field added to the eventtabel you can set the maximum participants for every single event.... You see there are as always many ways to go to provide a simple admin interface for your customer and all freedom of the frontend for the visitors, too...;) regards mr-fan
    1 point
  17. @Neo Have you seen this? You might utilize it on the frontend with something like: http://www.hongkiat.com/blog/useful-calendar-date-picker-scripts-for-web-developers/ Do not forget that you might want to let your users partially access the admin, so that they can do both... But this is just an idea.
    1 point
  18. Or you might want to do it by using Google. Ryan's blog post might help you get started: https://processwire.com/blog/posts/composer-google-calendars-and-processwire/#the-google-client-api-module To tell the truth, I've never used Google Calendars myself, so I do not know how well it could fit your needs, but some of my friends rely on these Calendars and use them to manage reservations.
    1 point
  19. This could be a starting point. I used a customized version for a private car sharing site.
    1 point
  20. No it's powerful and fast and dangerous ... With one "L"? It's more efficient... No I don't know your obsession. Well I don't know what MenuBuilder contents are. Why? Does MenuBuilder not have any render functions? Aligator and MSN only work with Pages.
    1 point
  21. I can confirm the same setup is very easy to count clicks + views...i need that for a project. Working good so far. Only difference is that i simple count clicks and views in a integer field without additional information - so it is "data economical" and i've no problem with saved IP's and so on... For manging the banner i use a PageTableExtended Field: I've a general settings about the amounth of ad slots on that page - and a flag option on every single page where a user can set ads to off for a single page. /** * Adsystem show Ads in several templates * * @var $limit (Int) set the limit of displayed ads ->look at anzeige_anzahl /settings/werbeanzeigen/ * @var $headline (string)set the headline of the ad list */ function renderAdsystem($headline = 'Anzeigenpartner') { //get all ad pages on basic setting - unpublished pages are not listed.... $limit = wire('pages')->get('1056')->anzeige_anzahl; //build add output $anzeigen = wire('pages')->find("template=part_ad, limit={$limit}, sort=random"); //render ads and collect them in $all_ads $all_ads = '<h4 class="subtitle">'.$headline.'<h4>'; foreach ($anzeigen as $anzeige) { $anzeige->of(false); $anzeige->anzeige_views += 1; $anzeige->save(array("quiet" => true, "uncacheAll" => false)); $anzeige->of(true); //get the right imagesize $anzeige_bild = $anzeige->anzeige_bild->size(260,120); //build ad link $all_ads .= '<a href="'.$anzeige->url.'" alt="'.$anzeige->title.'"><img class="anzeigen" src="'.$anzeige_bild->url.'" alt="'.$anzeige->title.'"></a>'; } //check if adds are off if ($limit == 0) { $out = ''; } else { $out = $all_ads; } return $out; } All is a page - so the adlink is a page for shure - and for pages we can count clicks == pageviews + redirect and views for every rendering that pageitem somewhere. Just as an addition to the great example from BitPoet! Thanks for that - so i'm tranquilised to find a way that a professional find, too - so it couldn't be that wrong Best regards mr-fan
    1 point
  22. It shouldn't be hard to get the whole banner rotation thing up using PW's on-board functionalty. The only additional module necessary would be AdminCustomPages to view statistics. Here's how I'd do it: Create a bunch of templates for category and banner as well as categories and banners templates to group them together. The category template gets a view counter which we increment with every view of a banner through the category, and we'll use that counter to pick the next banner. The banner template gets a field for the category it belongs to, one for the URL to redirect to and, of course, the image field, optionally with size settings in the field configuration. Our "normal" templates get another page field in which we pick the banner category. We also add a "click" template to store each banner click with the remote IP. Thus we have the following templates with fields: banner_categories title field onlyWe create a banner categories page somewhere (it doesn't really matter where, can be under home). banner_category title (for the category selections) banner_cat_count (our counter) banners title field onlyLet's create one of these under home too. banner title (just for us) banner_image (image field, set to single image, size constraints in the field's config) banner_url (fieldtype URL, the address to redirect on click) banner_category (page field, single select, parent set to banner_categories page) click click_ip (text field)Our pages that should include banners get a new page field (single page, NullPage if empty) page_banner_category. Now we need two PHP templates: one to render the banner inside the page (let's name it "_banner_include.php") and one that does the counting and redirecting if a banner is clicked ("banner.php"). In banner.php, we simply add a click counter page under the banner page itself, then redirect to the configured URL: <?php $click = new Page(); $click->template = wire('templates')->get('click'); $click->name = 'click-' . time(); $click->parent = $page; $click->click_ip = $_SERVER["REMOTE_ADDR"]; $click->save(); $session->redirect($page->banner_url); In _banner_include.php, we increment the view counter for the category (we could also add a counter field to the banner template and increment it on the banner page), then use the counter value modulo the number of banners in the category to get the banner itself: <?php $banner = next_banner($page->page_banner_category); function next_banner($category) { global $pages; $banners = wire('pages')->find("template=banner, banner_category={$category}, include=hidden"); if( $banners->getTotal() == 0 ) return new NullPage(); $category->of(false); $category->banner_cat_count += 1; $category->save(); $category->of(true); return $banners->eq($category->banner_cat_count % $banners->getTotal()); } if( ! $banner instanceof NullPage ) { ?> <div class="banner"> <a href="<?= $banner->url ?>"><img src="<?= $banner->banner_image->url ?>"></a> </div> <?php } Now all we need in our regular pages' templates to render the banner: <?= $page->render("_banner_include.php"); ?> Getting an overview in the backend using AdminCustomPages should be quite easy too by just creating a custom page including a scipt that iterates over all the categories, reads the click counter, then iterates over each banner and counts the children (optionally limited by the timespan). A quick-and-dirty script (untested) to illustrate that: <?php foreach( wire('pages')->find("template=banner-category") as $cat ) { echo "<h1>{$cat->title}</h1>"; echo "<table><thead><tr><th>Banner</th><th>clicks</th></tr></thead>\n<tbody>\n"; foreach( wire('pages')->find("template=banner, banner_category={$cat}, sort=title") as $banner ) { $clicks = $banner->children->count(); echo "<tr><td>{$banner->title}</td><td>{$clicks}</td></tr>\n"; } echo "<tr><td colspan=2>{$cat->banner_cat_count} Views / {$clicks} clicks</td></tr>\n"; echo "</tbody>\n</table>\n"; } We could, of course, make things a little easier by grouping the banners under their category, and there's nothing major speaking against it. I used a different parent for the banners to have them all under the same URL, i.e. /banners/banner-name. All in all, it shouldn't take more than an hour to get things up and running this way.
    1 point
  23. There's no fieldtype or module for this, because PW already has all the things you need to do flexible and powerful tagging. Using page reference and the powerful inputfields it offers is the way to do it in PW, it's not an "alternative" way, it IS the way. It is far more flexible and powerful than what you have in MODX and most other CMS'. Everything else that stores tags in a textfield comma separated isn't going to give you the power you usually need with tagging. You won't easily be able to use that in selectors and so on. If you're building a new fieldtype, inputfield for tagging, you don't really understand what PW offers already and you will using the same approach at the end anyway. There was already lots of discussions and people were trying to come up with modules or fieldtype for it, but none of them really is a better solution. You can now install the Autocomplete module that comes with PW and use that to search and create tags on the fly. It has even improved from Ryan's blog profile, to create new tags without saving the page. The interface is simple and clients have no problem with it. As mentioned before, I also mostly use ASM select and the Autocomplete feature. Takes couple minutes to setup and can flexibly be used to later expand and use the tag pages for different stuff like listings,sorting and filtering etc. The page find selectors are there to do powerful stuff with page fieldtype already. Further you can use the tag pages later on to expand it with additional fields for and image or description. Possibilities are endless and a feature I love the most in PW (one of the big reasons I love to use PW).
    1 point
×
×
  • Create New...