Leaderboard
Popular Content
Showing content with the highest reputation on 12/04/2016 in all areas
-
I'm looking forward to client-side image resizing in PW. I have clients who will upload massive 24-megapixel 10MB images without a second thought. I use the "Max width for uploaded images" option but it's not working reliably because the oversized images still get through somehow (perhaps out-of-memory issues). Anyway, I was looking for a foolproof way for non-tech-savvy clients to resize images and found this: https://bulkresizephotos.com/ Images are resized client-side so it's much faster than many of the other online tools. You can resize multiple images at once and get a ZIP file back with the results. And the best feature is that you can set the tool up how you want and then generate an embeddable drag-and-drop widget, so it's super-easy for clients to use and there are no options for them to mess up. I created a Hanna Code for the widget and added it to the online documentation I supply to clients so it's right there when they need it. Could even potentially be embedded directly in the admin theme. Until client-side resizing comes to PW this is a useful stopgap.6 points
-
For those of you who are experienced with the PW API (and those looking to learn), there is now an "Action Code" viewer that shows the executeAction() method of the action you are about to execute. It is of course collapsed by default and only available to superusers. Anyway, hope you'll find it useful and either reassuring (if you're worried about what code it about to be executed on your site), or informative as to what can be done with the API.4 points
-
4 points
-
My best guess is that Germans support both David Hasselhoff and Ryan Cramer because both have German last names (and maybe origins - Hasselhoff does for sure). If Ryan's last name was Ivanov he could be much more popular in Russia. But your question @Robin S is pretty interesting marketing wise. Could this be part of the answer?3 points
-
2 points
-
You would enable URL segments on the template used for "Shirts" and "Shoes". You would allow segments that match the names of your category pages and throw a 404 for anything else. For example: if($input->urlSegment1) { $category_names = $pages->find('template=category')->explode('name'); if(in_array($input->urlSegment1, $category_names)) { // build your selector to filter the products using $input->urlSegment1 } else { throw new Wire404Exception(); } } else { // show all the products }2 points
-
FieldtypeFontIconPicker Supported Icon Libraries FontAwesome 4.7.0 Uikit 3.0.34 IonicIcons 2.0.1 Cahangelog NOTE: Module store data without prefix, you need to add "prefix" when you want to show your icon on front-end, because some of front-end frameworks using font-awesome with different "prefix". Module will search site/modules/**/configs/IconPicker.*.php and site/templates/IconPicker.*.php paths for FieldtypeFontIconPicker config files. All config files need to return a PHP ARRAY like examples. Example config file : create your own icon set. File location is site/configs/IconPicker.example.php <?php namespace ProcessWire; /** * IconPicker : Custom Icons */ return [ "name" => "my-custom-icons", "title" => "My Custom Icon Set", "version" => "1.0.0", "styles" => array( wire("config")->urls->templates . "dist/css/my-custom-icons.css" ), "scripts" => array( wire("config")->urls->templates . "dist/js/my-custom-icons.js" ), "categorized" => true, "attributes" => array(), "icons" => array( "brand-icons" => array( "title" => "Brand Icons", "icons" => array( "google", "facebook", "twitter", "instagram" ) ), "flag-icons" => array( "title" => "Flag Icons", "icons" => array( "tr", "gb", "us", "it", "de", "nl", "fr" ) ) ) ]; Example config file : use existing and extend it. File location is site/configs/IconPicker.altivebir.php <?php namespace ProcessWire; /** * IconPicker : Existing & Extend */ $resource = include wire("config")->paths->siteModules . "FieldtypeFontIconPicker/configs/IconPicker.uikit.php"; $url = wire("config")->urls->templates . "dist"; $resource["scripts"] = array_merge($resource["scripts"], ["{$url}/js/Altivebir.Icon.min.js"]); $resource["icons"]["flag-icons"] = [ "title" => "Flag Icons", "icons" => array("tr", "en", "fr", "us", "it", "de") ]; $resource["icons"]["brand-icons"]["icons"] = array_merge($resource["icons"]["brand-icons"]["icons"], array( "altivebir" )); return $resource; After you add your custom config file, you will see your config file on library select box. Library Title (Location Folder Name). If your library categorized and if you have categorized icons set like uikit and fontawesome libraries, you will have category limitation options per icon field or leave it empty for allow all categories (default). Example : output if ($icon = $page->get("iconField")) { echo "<i class='prefix-{$icon}' />"; } MarkupFontIconPicker Usage // MarkupFontIconPicker::render(YourIconField=string, Options=array) echo MarkupFontIconPicker::render($page->YourIconField, [ 'prefix' => 'uk-icon-', // Icon class prefix, if you have different prefix, default is : "fa fa-" 'tag' => 'span', // Icon tag default is : "i" 'class' => 'fa-lg', // If you have extra cutom classes, for example : icons sizes, Array or Sting value 'style' => 'your custom styles if you have' // Array or String Value ]); Theme support Search support Category support1 point
-
When I read the topic's title, I instantly knew I was about to see another AdminActions module recommendation (which is cool, do not get me wrong). However, I've been thinking if you could figure out a way to automatically publish the list+description of these "actions" somewhere, so that you (we) can just link to them, I mean always see what is available without logging into the right admin. You might also want to provide the means of including screenshots like above.1 point
-
Well you could hide with CSS add a CSS animation to unhide after a few seconds, which would ensure the select to be visible (in theory). Because of the few seconds delay the JavaScript will probably make changes to the DOM so the original select won't be visible. I've used this tecnhique in a site with a loader, to remove the loader even if there's something with JavaScript. Anyway, I think this kind of FOUC doesn't matter too much in an admin.1 point
-
My clients have also been using bulkresizephotos.com for a while, so far it's been a reliable service.1 point
-
Welcome @MilenKo, great that you want to give ProcessWire a shot. I think you won't regret it. Delayed output would be a better choice for more complex sites, but that is up to you, as PW doesn't dictate you how to structure your templates. I for example started with direct output and just switched to delayed output a few months ago. But for single pages I still use direct output. Whatever is most convenient for the project. You can look at the default site profile included in the PW installation to have a look at delayed output. You can find the complete site profile of the PW skyscraper demo on GitHub. There is also an corresponding blog post. Ryan used in the new skyscraper demo the new region function, which is also explained in the blog post. This is an more advanced site profile, so the default site profile is maybe easier to start with. Best way to learn PW in my opinion is to get your hands on and learn by doing. Happy coding. Regards, Andreas1 point
-
Your easiest option might be to install @tpr's AdminOnSteroids module. It adds a filter box to the top of the edit view in BCE. Take a look at his screencast here: Another option, would be to use the "Page Manipulator" action in my new Admin Actions module that will let you use the selector field type that is used in Lister to filter pages and then delete all matches: Would that work for you?1 point
-
Backup, of course Always! After five tries of PW installation and transferring between localhost to webhost, including different settings, template, modules. I find that .htaccess is less culprit in my case. But after done several researches, .htaccess can be the problem for many reasons... depending on web hosting you use, some may require technical assistance for security purpose, the level of the package you use, Indexes Options to be phased out and replace with hosting's brand. Or even FTP software you use that could not copy and paste .htaccess from local to host like cyberduck (windows version) which I just found out and I had to use filezilla instead. The best and promising solution is to log into hosting's cPanel > File manager and pick up .htaccess from local folder.1 point
-
Just count yourself lucky and stop your research now. Trust me, you're not missing much. But seriously, this is what I'm talking about. There's got to be a reason why Germany is the only country whose interest in PW reaches the threshold to register on Google Trends - any ideas?1 point
-
Hello, I created a simple telegram bot. What it does? it enables you to save your voice messages and send them later using emojis or keywords in your group chats. Just add @voxgrambot in your group chats and search all the public voice messages available using text or emojis. If you want to create a new voice message just send a private message to the bot with the command /new . If you want more info send the command /help. The bot was made using Python and https://python-telegram-bot.org The backend was made using ProcessWire 3.x and my Rest API helper. http://telegra.ph/Voxgram-Telegram-Bot-12-031 point
-
@Nagendra Hello As far as I know, all the code needed is in the first post in this thread, (link to first post). Have you tried following the tutorial? If so, can you describe what is, and what is not, working and perhaps people can try to help you out. Your request, as it stands, is pretty ill defined.1 point
-
1 point
-
I think I had to manually deploy from memory and ran into similar problems. Had to get the Host Site Support to fix my .htaccess .... So from then on, i just rsync between deployment machine <-> Webhost and not touching the .htaccess file (Making sure there's backups of that too)1 point
-
I know this is old, but in case new users stumble across this, the Console Panel in TracyDebugger is what you are looking for http://processwire.com/blog/posts/introducing-tracy-debugger/#console-panel The other option for @muzzer's specific request of: $p = $pages->get("template=test"); $p->of(false); $p->set( 'fieldx', 'this is a default value' ); $p->save(); is to check out the "Field Set Or Search And Replace" action in the new AdminActions module which provides a GUI for setting the value of a field on many pages at once:1 point
-
Had some fun yesterday implementing an small easter egg in one of my websites: Let it snow on your website based on if it is actually snowing in your location. I use the Weather Underground API and jQuery Snowfall for this. Previously I used OpenWeatherMap for checking the weather, but they want to charge you for access over SSL. Here is what my easter egg looks like: $.ajax({ // Debug with North Pole // url : "//api.wunderground.com/api/YourAPIKey/conditions/q/AK/North_Pole.json", url : "//api.wunderground.com/api/YourAPIKey/conditions/q/Country/City.json", dataType : "jsonp", success : function(parsed_json) { var weather = parsed_json.current_observation.weather; var flakeCount = 0; if (weather === "Snow") { flakeCount = 100; } else if (weather === "Snow Showers") { flakeCount = 75 } $(document).snowfall({ round: true, minSize: 5, maxSize: 10, flakeCount: flakeCount }); } }); Too bad it isn't currently snowing where I live, but maybe soon. Regards, Andreas1 point
-
Hi @Rajiv I'm glad you like it I'm refactoring the code to have it more customizable and pluggable, so installation should be easier, too. Don't know when I can post the new version, though. Hopefully within the next days, as I need it anyway for a new project, too ;-)1 point
-
I would just like to mention that I think the easiest way for most users to upgrade these days is with this module: http://modules.processwire.com/modules/process-wire-upgrade/ It handles the PW core as well as any modules you have installed.1 point
-
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
-
For future reference, only for front end though (as far as I'm aware of, because you output it slightly differently) there's field rendering template files https://processwire.com/blog/posts/more-repeaters-repeater-matrix-and-new-field-rendering/#processwire-3.0.5-introduces-field-rendering-with-template-files https://processwire.com/blog/posts/processwire-3.0.7-expands-field-rendering-page-path-history-and-more/#field-rendering-with-template-files they can be a nice alternative for textformatters at least front-end wise, and maybe easier for newcomers1 point
-
I would also probably go with repeater matrix here, but dropping this here to give you another option http://modules.processwire.com/modules/fieldtype-page-table-extended/1 point
-
@operat - welcome to the forums! Here's some info on the field that LK mentioned: https://processwire.com/blog/posts/processwire-3.0.4-repeaters-revisited-preview-of-profields-matrix/#new-profields-repeater-matrix-field1 point
-
That's why it's called page table. It's not meant to be a layout builder of sorts. The ProField matrix would probably fit your needs better.1 point
-
Correct Syntax for Fieldtype Select Options $optionsfield // return id (string) $optionsfield->id; // return id (int) $optionsfield->title; // return string USE THIS or $optionsfield->value; // return empty string or value (if your option settings like '1=value|title') // dot syntax in selector string $pages->find('optionsfield.id=2'); Docs: https://processwire....tions-on-a-page or https://processwire....d-on-selections @BitPoet $page->manufacturer return id as a string, NOT the title!1 point
-
1 point
-
thanks for the advice, wanze. I think, in the introduction of multi-language support there should be a kind of overview which approach has to be applied for which purpose.1 point