Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 04/09/2015 in all areas

  1. Hi all, finally I just released a major update to my Unsemantic Site Profile. Here are the most important features: runs on Processwire 2.5.3 delegate template approach includes Superfish dropdown menu (requires markup simple navigation module) preconfigured Google Maps implementation includes simple accordion textformatter Module The profile is meant as a starting point for RWD on Processwire. Glad if you find it useful. You can see a preview here. Question: Does somebody know how to update the entry in the modules directory? EDIT: comments, suggestions etc. welcome
    5 points
  2. Today Kalmar County Museum released a small campaign site where people can vote for their favorite building in the city of Kalmar (Sweden). The site uses latest PW dev version and Somas excellent Pollino module. The maps are powered by Leaflet and map tiles are from Mapbox. http://kvarnholmen.kalmarlansmuseum.se/
    3 points
  3. In my experience booking systems can get pretty complicated quickly. Even the smaller ones can potentially have a lot of interaction with the user which you have to account for. I would first map out the user interaction before deciding which way to approach the functionality. ProcessWire is built to handle this stuff, but there are several ways to build it depending on your exact needs. FormBuilder can be one if you just need a form which needs to be sent by email. If there is backend processing like checking if the trip is available in another system or if you want to prevent duplicate entries you would definately need do some custom PHP (even if you use FormBuilder).
    3 points
  4. FormBuilder does not offer this out of the box as every field is self contained without any connection between them (besides inputfield dependencies). But you could still use FormBuilder to build the skeleton form. To build such a thing you've two options. Either load all available options and filter them on the client side by javascript or load only the options for the first select and use ajax to dynamically fetch and fill the other inputs based on previous selections.
    3 points
  5. Both ways make the most sense Did that today with groups and products, looks like it works great. You need to adjust names and stuff and you should be up & running (bidirectional)
    2 points
  6. Maybe you have mod_pagespeed installed on your webserver? I'm not familiar with it though, it's a guess because of the "pagespeed" string in your css filename.
    2 points
  7. I actually think the reverse way would make more sense. Because you are likely to add more people than companies, and like this you have to edit only one page when adding a person. Also, the list in the asm field is also likely to be shorter this way. and... With that system you could use a single query for this: $people = $pages->find("parent=/people/,template=person,first_name=Joe, company=$companies");
    2 points
  8. You can click "Edit this Module" and then save it again and it will update version number, readme text etc. You can also wait about 24 hours and it will update automatically.
    2 points
  9. Posting and getting may sound more difficult then Ryan has made it for us. To give you a simple example that extends Jan Romero's post: $http = new WireHttp; $request = array( 'public-key' => 'xyx1234_what-instagram-wants', 'just-a-key' => 'Just some value you want to add to your get request', ); $data = $http->get('http://instagram.com/request/some/partt', $request); // data should have data coming from instagram var_dump($data);
    2 points
  10. @BernhardB, yup, the PR I submit on database creation that Ryan accepted is directly linked to making the setup much, much faster. I'm still looking into Vagrant and/or Docker automatic setups, but time being limited, it's still far from being there.
    2 points
  11. @benbyf, you just have to start... We can help when you're stuck.
    2 points
  12. New version 0.1.1 - improved template handling as well as adding optional clear up functionality for uninstalling the module. creating/updating templates after submitting the module settings add and/or remove fields works but you have to check the html structure manually additional checkbox for uninstall: "If you check the following box all data containing files as well as database content will be permanently erased with no chance for recovery. It's recommended to make a backup before uninstalling this module." @Ivan Gretsky: Now you can add/remove fields in the config (separated by comma). But make sure to check your html structure because I do not know your html structure. It's not that easy to determine the position to insert/remove code.
    2 points
  13. Did you add "TextColor, BGColor" to the CKEditor Toolbar? My first line looks like this: Format, -, Bold, Italic, Underline, -, TextColor, BGColor, -, RemoveFormat You can further customize what colors will be allowed, under Custom Config Options: colorButton_enableMore: false colorButton_colors: F00,FFC609,FFF
    2 points
  14. Update: version 0.0.8 Added an 'include_children' feature, thanks to ideas by @dazzyweb. Added sister options 'm_max_level' and 'b_max_level' that control how deep to fetch descendants if using 'include_children'. Default is 1 (i.e. only include immediate children); 2 means go up to grandchildren, etc. As part of ideas above, also added a 'current_class_level' that lets you specify how high up the ancestral tree to apply a 'current_class'. This is like an 'active parents' setting. The default setting is 1. A value of 2 means apply class to current item and its parent; 3 means apply to the item, its parent and grandparent, etc. Only applies to menus (not breadcrumbs). Added a permission 'menu-builder-include-children' in relation to above 'include_children' feature (this permission is required to set and use the feature). This is currently in the dev branch only. Please thoroughly read the updated docs about these new features (especially the first) before attempting to use them. Although covered in the docs, I would like to repeat this here: Use the 'include_children' feature with caution. You can end up unwittingly including hundreds of child pages in your menu! Currently there are no code-checks in place to prevent such a situation (difficult to impose an arbitrary figure) so we leave this to your better judgement. Also note that the setting cannot be applied to a menu item made up of your 'homepage'. If you enable the 'include_children' feature (it is off by default), your main settings, PageAutocomplete/AsmSelect and menu item advanced settings will change from this: to this: and your menu output to something like this...(from only two items in the visual Menu Builder) Please test and let me know if there are any issues. Thanks.
    2 points
  15. MarkupSocialShareButtons This module outputs a list of share links for the following services by default * E-Mail (kinda extra) * Facebook * Twitter * Google+ * LinkedIn * Thumblr * Reddit (off by default) * Pinterest (off by default) Usage examples echo $modules->MarkupSocialShareButtons->render(); This outputs a simple UL list with links <ul class='MarkupSocialShareButtons cf'> <li class='mssb-item mssb-facebook mssb-popup'><a href='url'><i>facebook</i></a></li> etc ... </ul> Config Screen See more details and examples on github or modules directory https://github.com/somatonic/MarkupSocialShareButtons http://mods.pw/8j
    1 point
  16. Here is very simple abstract class that I hope would get ideas and contribution from community, so that different PW projects could use same payments methods in generic way: https://github.com/apeisa/Payment Currently Payment modules just assume it's found from /site/modules/Payment/Payment.php, but I would love to get it autoloaded somehow (I went with PW module dependencies and transformed the base class into PW module also). Also I have tried to keep this as minimum as possible - hopefully I have not left anything too important out. I have also created one two payment modules, that use this base class: https://github.com/apeisa/PaymentStripe/ https://github.com/apeisa/PaymentPaypal/ Please visit their repos for examples.
    1 point
  17. So you've developed this shiny new website but your editors and marketing guys keep complaining they need more "native embedded content" with shiny share and retweet buttons because otherwise their text will look like ...text? Look no further: This processwire module has you covered! TextformatterOEmbed for processwire What it does At this point this module basically wraps the fabolous Essence PHP library by Félix Girault and adds some processwire magic to parse your boring Textareas and make your content look more bling blingthan ever before. Disclaimer: This Module is heavily inspired by TextFormatterVideoEmbed by the awesome guy who created processwire: RyanCramer. Requirements php 5.4+ curl and/or allow_fopen on Features Supports the following 32 providers out of the box (That's a lot of Hanna-Codes you can get rid of now, eh?): Add your own providers in the blink of an eye (if you're not good at regex - like me - it will propably take you a cup of coffee and a google search) Easy styling: Wraps embedded items with customizable BEM-Style classes including modifiers for every provider and embedtype. Choose to either add CSS directly in the modules configuration or to your existing stylesheets Choose to add pre defined Fluid Video CSS for your responsive design (or - again - feel free to add your own) Usage Click check for new modules in ProcessWire Admin Modules screen. Click install for the module labeled: "oEmbed for processwire". Install the module Open the modules Settings page Add css classes either within the "Custom CSS" field or in a seperate CSS file. Every provider is wrapped with the following markup: <div class="pw-oembed pw-oembed--providername pw-oembed--embedtype"> <div class="pw-oembed__inner pw-oembed__inner--providername pw-oembed--embedtype"></div> </div> If you're not happy with the "block" class .pw-oembed you can rename it to something you like better using the modules config. Every embedded media item and it's respective inner wrapper has two modifier classes: One for the provider (i.e. youtube, twitter...) and one for the media type (one of photo, video, link or rich according to the OEmbed specification). This should be enough classes to add some fancy icons, adjust widths per provider or whatever else you like to do. If you're missing a provider don't hesitate to open a pull request (see roadmap first) and I'll do my best to add it as soon as possible. In the meantime you can extend the available providers found in lib/essence/providers.php in the modules settings using the following JSON-Format (remember that you'll have to properly escape the regex): [{ "23hq" : { "class" : "OEmbed", "filter" : "#23hq\\.com/.+/photo/.+#i", "endpoint" :"http://www.23hq.com/23/oembed?format=json&url=%s" } }] Roadmap Add moaaar providers:Facebook (currently not providing a "native" oEmbed API) Google Plus (currently not providing a "native" oEmbed API) support for more fancy integration of Instagram posts (currently there are "just" images without fancy sharing stuff that will be embedded) Render only one javascript (i.e. ) when there are multiple items of the same provider Propably make this module more generic and add services as submodules at some point World domination
    1 point
  18. https://github.com/adrianbj/ProcessModuleToolkit It allows bulk automated migration installation and upgrading of modules (and their config settings) from one PW install to another, so it should be very handy in setting up new sites with your standard collection of favorite modules and settings. Allows includes batch installing by a list of module class names. Go to the Setup > Module Toolkit and follow the prompts. During the import, you can choose which modules from the collection to import. You can optionally import the module config settings from the source install. The one caveat is if a particular setting includes a reference to a page, template, or field ID, it won't work, but you can easily update this setting on the destination install. Batch install new modules directly from the modules directory with a list of module classnames or URLs to module zip files. You can optionally, automatically update all of the imported modules (if they are in the ProcessWire modules directory) to their latest available versions. It copies the module files so you can use it to migrate modules that are not available in the PW modules directory, or on Github. Great for all those custom helper modules you've created. Full restore feature in case something goes wrong / you change your mind. I maintain a dedicated test PW install for installing and configuring modules which I can then export for use in my projects using this tool. Please test and let me know what you think!
    1 point
  19. I have been spending some long evenings building PadLoper. It is my personal project to challenge myself as a developer, but also something I believe ProcessWire really misses: a solid eCommerce platform. I am happy to announce, that I am not very far away from public release, so I did create a little teaser site and email list for all of you that are interested: https://www.padloper.pw/ As many of you now, I also have bunch of eCommerce modules called "shop for processwire". Those remain open source modules, but I am not actively maintaining them (like I really haven't since 2012). All the code in PadLoper is new and it's totally build from ground up. If someone wants to maintain or develop shop for processwire further, I am more than happy for that. There will be some open source components coming from PadLoper also: at least payment modules, but I might also open source the shopping cart module. Padloper released 4th October, 2015: https://www.padloper.pw/
    1 point
  20. This is a very basic guide on how to optimize a ProcessWire page for speed. It doesn’t go into the depths of optimization and perfect render paths but will provide you with some proven ProcessWire methods for faster websites. The big problems that are easy to fix are what we aim for. You want quick improvements? Then read on… First let's have a look ath the following graph. Those are the areas, we want to improve. Source: http://httparchive.org/interesting.php?a=All&l=Oct%201%202014 Clean up your HTML Look at your HTML source code. Are there any unnecessary parts? Remove anything that might not be needed and try to keep your markup as clean as possible. Avoid using too many external JS libraries or other tools. It is okay to include jQuery from a CDN, because most visitors will already have cached the file. Too many of those external requests will slow down the page. If possible, try to avoid render-blocking Javascripts and move your script tags to the end of the page, right before the body. In most cases, your Javascript will enhance your content but doesn’t need to fire before the site is rendered. Always think if you need to include another library or the fourth webfont on your site. Minify Markup The next step to save some bytes is to remove all whitespaces from your markup. It doesn’t have to look nice, it has to be loaded fast. We perform this trick with our new super-weapon: The AllInOneMinify module for ProcessWire. Install it like every other module for ProcessWire. Once activated, go to the module settings and tick the checkbox for “Minify HTML” and look at your sites source code. It should be minified. AIOM can handle conditional browser comments. If your layout depends on whitespaces you could “force” them by putting an into the markup. Optimize the CSS Now we’re heading for the next larger part of a usual website. We will combine all CSS files and then remove anything not needed (whitespace,comments) from it. Before we start, make sure your CSS files only contain rules that you really use. Especially if you’re using a framework like Bootstrap, most of the selectors are never used. Remove them carefully. We need the AllIneOneMinify module from the previous step again. After installation, open the template file where your HTML header is generated. We will now replace all stylesheet tags with a single file. AIOM needs to know all CSS (or even LESS) files, relative to your template folder. It will then output a link to a single, compressed CSS file. You might have this in your HTML head: <link href="<? echo $config->urls->templates;?>/css/grid.css "rel="stylesheet" /> <link href="<? echo $config->urls->templates;?>/css/style.css“ rel="stylesheet" /> Replace all links to Stylesheets with the single tag like this: <link href=”<? echo AIOM::CSS(array(‘css/grid.css’,’css/style.css’)));?>” rel=”stylesheet”/> You pass an array with the file names to the AIOM method CSS. It will return a link to the file. AIOM takes care of image urls inside CSS. It will detect changes in the source file and only generate a new file if necessary. While developing, you might want to turn on the “Development” checkbox in the module settings. Make JavaScript tiny Do the same as you do to the CSS to your Javascript files. First, clean up the code. Then install AIOM and compress all JS files into a single file using the AIOM::JS method that works as the AIOM::CSS method. For best results, think about including scripts like jQuery from a CDN and put your scripts below the content, before you close the body tag. Also note that the order on how your throw your JS files into AIOM might be important, depending on the code inside. Get the right image size. ProcessWire comes with great image tools. Use them, to make images exactly the size you need them. You don’t have to serve that little thumbnail with over 3000px length just because the editor wasn’t able to reduce the size. Example: Your designer wants to have a slider image with a maximum size of 600x320 pixel. To output the image with that exact dimensions, use the API accordingly: $sliderImage->size(600,320)->url; An even better way would be to use adaptive images or the new srcset attribute combined with a JS fallback. Then your site only delivers the image size as needed. Hint: Play around with the image quality setting in the config.php. Maybe you don’t need images with a JPG quality of 90+. Compress the images further with minimize.pw To make images even smaller, we can use the minimize.pw service. This service will compress images nearly lossless by using more complicated tools to reduce the size of PNGs and JPEGs. By doing this, you remove bytes from the largest chunk of your website weight. minimize.pw is free for 2000 images. Just enter your E-Mailadress and receive a free key Then you have to install the ProcessImageMinimize module and enter they key. You can now activate the option to automatically compress every image uploaded. It is fail-safe and will compress images in the background. Please note, the automatic mode only works with images uploaded AFTER you have activated the module. You can manually select image fields with the ->mz() API method. Just include it before you output the image in your template file: $myImage->width(300,300)->mz()->url; We've closed the service. You could use something similar like Imgix ( https://www.imgix.com/ ). Activate GZip compression on your site Another method to speed up your site is to activate GZip compression. The server will then send all files compressed to the client. This works with nearly all browsers and the CPU power required is minimal. You can tell your server to do this, by adding those lines to your .htaccess file in your root directory. Please take care, that you do not overwrite the ProcessWire rules in the file! For best results add them on the top of the .htaccess file: <IfModule mod_deflate.c> AddOutputFilter DEFLATE js css AddOutputFilterByType DEFLATE text/html text/plain text/xml application/xml BrowserMatch ^Mozilla/4 gzip-only-text/html BrowserMatch ^Mozilla/4\.0[678] no-gzip BrowserMatch \bMSIE !no-gzip !gzip-only-text/html </IfModule> This was taken from another forum post. Tell the client to cache stuff To make repeating visits faster, we can tell the browser to cache special files for a longer period of time. Again, add this on top of your .htaccess file: <IfModule mod_expires.c> ExpiresActive On ExpiresDefault "access plus 1 seconds" ExpiresByType image/x-icon "access plus 1 year" ExpiresByType image/jpeg "access plus 1 year" ExpiresByType image/png "access plus 1 year" ExpiresByType image/gif "access plus 1 year" ExpiresByType text/css "access plus 1 month" ExpiresByType text/javascript "access plus 1 month" ExpiresByType application/octet-stream "access plus 1 month" ExpiresByType application/x-javascript "access plus 1 month" </IfModule> <IfModule mod_headers.c> <FilesMatch "\\.(ico|jpe?g|png|gif|swf|woff)$"> Header set Cache-Control "max-age=31536000, public" </FilesMatch> <FilesMatch "\\.(css)$"> Header set Cache-Control "max-age=2692000, public" </FilesMatch> <FilesMatch "\\.(js)$"> Header set Cache-Control "max-age=2692000, private" </FilesMatch> <FilesMatch "\.(js|css|xml|gz)$"> Header append Vary: Accept-Encoding </FilesMatch> Header unset ETag Header append Cache-Control "public" </IfModule> Remember, that this caching might be annoying while developing the site. Use the internal cache (or ProCache) Another trick to make the site faster is to use a caching system. This will “store” your rendered site so you don’t have to query the database that often. We can either do this with the internal cache of ProcessWire or use the commercial, official ProCache module. Using the build-in system, you go the the setting page of a template and open the “Cache” register. You can now set the Cache time and what happens if something changes. The settings depend on the content of the site. Mostly static content can be cached longer and you might not need to reset the cache every time. Dynamic sites will need shorter cache times. ProCache (buy here) is even faster because it will bypass PHP and the database. Files are served directly as HTML. Please note, that caching might make the site faster but it can create new problems. Use with care. Summary Keep your code as clean as possible. Remove anything unnecessary and then compress HTML,CSS and JS using the AIOM module. The largest part of your page weight are images. Keep them small by using the appropriate dimensions and consider services like minimize.pw. In the end, use intelligent caching and buy ProCache. Following this guide takes not more than an hour but can speed up your site and make your visitors happy. This was just a quick overview of techniques to optimize your page speed. There is plenty of stuff you can do but the steps above are a good first step. Maybe you can share your favorite methods (or links) to start the discussion.
    1 point
  21. Just wanted to share a simple bash script I've been using lately to make installing ProcessWire a little faster. Feel free to modify it to your taste! Just copy everything into a simple text file, I call mine "preparepw". Optionally, set this file to executable (chmod -x preparepw) and put it somewhere into your path to be able to load it as a regular command without the need to call it from sh ~/preparepw for example. To run, first cd to where you want to install PW's root, e.g. /sites/mysite/ then call the script. It will create a /sites/mysite/wwwroot/ directory containing all of PW's files from current master, set the required permissions and rename htaccess. It has an option to set the directory that, when unset, will default back to ./wwwroot. (e.g. preparepw public would install PW in ./public/). #!/bin/bash # Version 2.0 INPUT=$1 if [[ -z $INPUT ]]; then INPUT="wwwroot" printf "Directory option not set, installing into ./$INPUT/...\n" else printf "Installing in to ./$INPUT/...\n" fi # Select a version printf "\nWhich ProcessWire branch do you want to install?\n" options=("master" "dev" "devns") select BRANCH in "${options[@]}"; do test -n "$BRANCH" && break; echo ">>> Invalid selection, please try again"; done printf "\nDownloading ProcessWire $BRANCH branch, please hold on...\n" # Get ProcessWire master and prepare files if [ "$BRANCH" == "master" ]; then curl -o processwire.zip https://github.com/ryancramerdesign/ProcessWire/archive/master.zip -# -L fi if [ "$BRANCH" == "dev" ]; then curl -o processwire.zip https://github.com/ryancramerdesign/ProcessWire/archive/dev.zip -# -L fi if [ "$BRANCH" == "devns" ]; then curl -o processwire.zip https://github.com/ryancramerdesign/ProcessWire/archive/devns.zip -# -L fi unzip -q processwire.zip rm processwire.zip if [ "$BRANCH" == "master" ]; then mv ProcessWire-master $INPUT fi if [ "$BRANCH" == "dev" ]; then mv ProcessWire-dev $INPUT fi if [ "$BRANCH" == "devns" ]; then mv ProcessWire-devns $INPUT fi chmod -R u+rwX,go+rX,go-w $INPUT mv $INPUT/htaccess.txt $INPUT/.htaccess cd $INPUT # Prompt for site profile printf "\nWhich site profile will you be using?\n" select d in site-*/; do test -n "$d" && break; echo ">>> Invalid selection, please try again"; done mv $d site/ rm -rf site-*/ # Set permissions chmod 777 site/assets chmod 777 site/modules chmod 666 site/config.php printf "\n" read -p "Press [Enter] once you've finished the installation process to remove the install files..." rm install.php rm -rf site/install printf "\nInstallation files removed.\n" printf "\nDirectory \"$INPUT\" all set for ProcessWire. Have fun! \n"
    1 point
  22. A little bit more data will simplify search queries and results in less overhead. And for end users it's convenient to be able to edit on 2 places. ps, when you discover a bug, please report
    1 point
  23. There's also this: $this->pages->addHookBefore('Pages::save', $this, "hookAutoPageName"); // to either/or $this->addHookBefore('Pages::save', $this, "hookAutoPageName"); $this->pages->addHookBefore('save', $this, "hookAutoPageName");
    1 point
  24. Replace: $pageid = $this->sanitizer->selectorValue($this->input->get->id); $page = $this->pages->get($pageid); with: $page = $event->arguments[0]; Remember the id get variable won't be available on the front-end via the API. EDIT: Actually, better yet, don't use $page at all, use $p instead - you don't want to overwrite the current $page with the one being saved.
    1 point
  25. // Single company $company = $pages->get("parent=/companies/,template=company,title~=Test"); $people = $company->people->find("first_name=Joe"); // Multiple companies $companies = $pages->find("parent=/companies/,template=company,title~=Test"); $people = new PageArray(); foreach($companies as $company){ $com_people = $company->people->find("first_name=Joe"); $people->import($com_people); } $people = $people->unique(); Pagefields are only single direction, which sometimes is not the most convenient.
    1 point
  26. His avatar is one scary looking Romeo
    1 point
  27. sounds strange - which template is it ? sounds like a javascript rewriting the url for a cdn application. or if this is your server then you must have some module or htaccess that is changing those - is this in a subdomain of another site that may have a script running in the root?
    1 point
  28. No need for paymentmodule either. These are new more general payment modules, that don't have anything to do with the old shop module of mine. I tried hard to get different naming, but didn't get any ideas.
    1 point
  29. Ah, thanks for the hint. I see now this is s leftover from a earlier version and forgot to change it there.
    1 point
  30. Moved your site? If yes, edit your database settings is /site/config.php
    1 point
  31. great news! this feature is now in the core - and you can guess, ryans solution is far better than my initial module https://processwire.com/blog/posts/processwire-core-updates-pull-requests-and-more-2.5.25/#clear-page-cache-by-matching-pages-with-custom-selector again a great example of how processwire evolves from the needs of every single user. thank you teppo for taking this further! edit: how would i set the "has_parent" id to page id of the page that is being saved?
    1 point
  32. @bacos where do you see/read this method of setting the theme? It's never mentioned somewhere and it's not the way to do it. That setTheme is protected and not part of public API. Read https://github.com/somatonic/MarkupSocialShareButtons#themes
    1 point
  33. Yep, the deprecated paypal module is for the shop-for-pw.
    1 point
  34. Cool, are you on BitBucket? If not, create and account and let me know your username.
    1 point
  35. yeah, sometimes repeaters are quite essential and un-replaceable, as problematic as they are from the api perspective. where possible i try to use profields table, pageTable, multiplier, or textareas; but once in a rare while, those repeaters are good.
    1 point
  36. thank you BernhardBthat is exactly what i want! <?php $active = ' active'; // set active for first item foreach($page->images as $img) { ?> <div class="item<?= $active ?>"> <img src="<?php echo $img->url; ?>" /> <div class="container"> <div class="carousel-text"> <h2><?php echo $img->description; ?></h2> </div><!-- /carousel-text --> </div><!-- /container --> </div><!-- /item --> <?php $active = ''; // remove class "active" for following items } ?>
    1 point
  37. Greetings, Yes, as Teppo said, "pricing projects is hard work"! I think this part of the project development process is a bit of an art. I'm good at designing/developing, but I'm not always great at getting the best price for my work. Lately, I've partnered with a couple of other people who are the opposite -- they are good at negotiating. I've sat in the table and watched them magically get a better price. Thanks, Matthew
    1 point
  38. Interesting, I didnt know that. Doesnt seem intuative from a UX point of view but cool anyway
    1 point
  39. It is. Sort of. https://processwire.com/talk/topic/8298-list-your-5-must-have-modules/?p=81262
    1 point
  40. Hi Andi, 1) Thanks for the links and for the useful part of the informations. 2) I (personally) allready haveused GraphicsMagick a year ago. In the above post it was said in the past (at least I tried to do so). Besides that: I have used a lot of other image processors in the past 15 years too. But I cannot see any usefullness with installing a software that only integrates image processors. If I want to evaluate the quality of image processors, I use the image processors. 3) GraphicsMagick does a (maybe very) good job, but IMHO it isn't the best tool out there. The best tool in regard of visually quality for photos is NETPBM! - if one know how to use it. 4) And sorry if I have posted in a way that not let you see what I have meant in the first place. What I have tried to do with the imagickresizer, and also have tried to say in the newer posts here, was to bring in a next step of image processing for a wide range of users. It should not only be available for those who are on their own servers. So using apt-get install... isn't an option for all that are not on their own servers. 5) Please do not assume what I have done, nor what I have done not. This is neither purposeful nor pleasing to read. My short and precious free time I like to spend rather different. Maybe with programming something (or doing other) that is useful for PW and a wide range of PW-users. 6) I'm available for paid PW modules development. I allready have built some nice custom ones in regard of image processing. Horst
    1 point
  41. Thanks. I did not develop the editor, it's licensed. Sir Trevor is nice, I like the simplicity, but yes, it's lacking some essential features like pictures. Are you looking for a builder? I may be able to recommend one, I've researched many.
    1 point
  42. Hey @mindplay.dk, I like to have a look at code, and if possible will try to contribute . Thank you. Like @joe_g mentioned, I was also having a similar thought of exporting the json via API and keeping on the module. And later exporting via the api than doing via the GUI . May be we can somehow add it to Wireshell ?
    1 point
  43. We're using a pretty opinionated yeoman generator somewhat similar (but different... i.e. no coffescript ) to the one from fixate. It's more or less like fireshell. The generator pulls a fresh copy of processwire + evergreen modules, sets up the directory structures, downloads npm & bower modules and creates basic templates + includes that we need for most of our projects. For the database part we're currently planig to integrate wireshell as soon as it leaves the beta status.
    1 point
  44. For shure not the best way - but i'm no pro who work on projects every day....so it works good for me and my skills. got a local installation with uptodate core + my standard modules + german language files at one place 1. install new blank pw installation 2. copy and paste the /site/modules/ and /site/templates/ folder 3. install all new modules + language 4. if needed import special content from my local repository with https://github.com/adrianbj/ProcessMigrator (like site-settings-page, fields/templates for a imagegallery and so on) 5. ready to work on the new page as you can see not really fancy not really streamlined but for a one man show with less projects it did the job.
    1 point
  45. Then maybe it's a bug. This feature was added somewhere around that time of your pw version, if I remember this right. It should be the right option.
    1 point
  46. Here's how it worked for me in CKEditor (in case you persist on this route - but I would go for Hanna Code as Adrian suggested. As usual, the "culprit" is our friend HTML Purifier (read from here up to and including Ryan's comment here about its pros and cons before deciding whether to implement #5 below!) For iframes, the Extra allowed content seems to have no effect - btw, the correct syntax here is for example, div(*) not div[*] Add 'Iframe' (note the spelling) to your CKEditor Toolbar Leave ACF on No need to switch the field's "Content Type" from "Markup/HTML" to "Unknown" Turn HTML Purifier off (gasp! ) Enjoy your embedded video
    1 point
  47. I have several ideas in mind for directory-based websites, and came across ProcessWire in my search for a starting point about a year ago. There are several good WordPress themes that are commercially available, but all the ones I've seen have various limitations that would preclude their use for what I have in mind. As a starting point for experimenting with ProcessWire, I had access to a list of churches and used that to develop a map-based directory here: Baptist Blue Book. The central issue for me was the map interface, and how to handle a reasonably large number of listings (~6,000) in that view (Most of the WordPress themes I had come across restricted the map view to a certain city, which I suspect was to limit the number of markers that had to be loaded.) A few notes: I'm using Ryan's Form Builder to accept suggestions for new listings. I liked having the packed solution for this, and the ability to control what happened to those submissions on the back end (e.g., the ability to hold them in a queue for review rather than posting immediately to the site). The church pages are subdivided by state (e.g., Directory > Texas > [church name]) by using a script to push a new listing to the proper sub-directory once it's approved. In hindsight, this may be an overly limiting approach, particularly for adapting it to international use, but once I had started on that path I needed to stick with it and focus on other issues. For the map view, a separate script pulls the latitude, longitude, and page-id from all listings and caches that in a JSON file. When the Map page is viewed, that file is retrieved and used to generate the markers. The content for the popups is only loaded as needed to minimize bandwidth. (Side note: I'm using MapBox for this, along with Leaflet and the MarkerCluster add-in.) All in all, I've been very pleased with the flexibility of ProcessWire, as well as the helpfulness of the community. I've also noticed several directory-type sites listed in the showcase, so I'm wondering if it might be useful to develop a module tailored to that application (or is each one so unique that this would not be feasible)? Any comments or feedback would be welcome. Brian
    1 point
  48. If you use PW form API, it will get validated if you call processInput() $form->processInput($input->post); I think the CSRF doesn't get reset if the CSRF was valid, but you can do it manually with $session->CSRF->resetToken(); after validating the form. Or if you do manual form and not use InputfieldForm you can generate and validate the token $session->CSRF->validate(); // will throw exeption if invalid And get the token name and value with it respective methods $session->CSRF->getTokenName(); // name for input hidden $session->CSRF->getTokenValue(); // token value Also the trick renobird mentioned is also very good to prevent double click submission errors. Of course you can still use redirect method and as you may found the $notices errors and messages are transported through redirects.
    1 point
  49. @arjen, @isellsoap: I'm not quite sure if it became what you were thinking of, but this conversation was the inspiration behind this: http://processwire.com/talk/topic/2967-pagereferencestab/ At least it's something you could use as a base for something more if it's only half way there at the moment.
    1 point
  50. I created simple module to add these subsites. You need to use $page->subUrl or $page->subPath if you want working urls/paths. Not sure if it would be better to use $page->url and $page->path... and how that could be achieved? Anyways, I have this version up and running nicely: <?php class Multisite extends WireData implements Module, ConfigurableModule { public static function getModuleInfo() { return array( 'title' => 'Multisite', 'version' => 001, 'summary' => 'Allows multiple sites with different domains run from single PW-site and database.', 'singular' => true, 'autoload' => true, ); } public function init() { $subdomains = explode("\n", strtolower($this->subdomains)); foreach($subdomains as $subdomain) { $httpHost = strtolower(wire('config')->httpHost); if(strpos($httpHost, $subdomain) !== false) { $this->subdomain = $subdomain; // change path like /about/contact/ to /campaign.com/about/contact/ $_GET['it'] = "/{$subdomain}/" . ltrim($_GET['it'], '/'); // hook for path method to make path() and url() methods context aware $this->addHookAfter('Page::path', $this, 'modifyPath'); } } } public function modifyPath($event) { $event->return = str_replace("{$this->subdomain}/", '', $event->return);; } static public function getModuleConfigInputfields(array $data) { $fields = new InputfieldWrapper(); $modules = wire('modules'); $field = $modules->get("InputfieldTextarea"); $field->name = "subdomains"; $field->label = "Other sites running from same install"; $field->description = "Add each domain for their own line. Don't add http or https, just simple domain like: www.example.com tai campaign.example.com"; $field->notes = "IMPORTANT: create homepage for each of these domains right on the root. Name should be exactly same as the domain you use here."; $field->attr('value', $data['subdomains']); $fields->add($field); return $fields; } }
    1 point
×
×
  • Create New...