Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 09/22/2016 in all areas

  1. There are some things to polish but it starts to take shape:
    5 points
  2. It has always been good practice to note any 3rd party modules that you are using when posting an issue/bug report for the PW core, but after seeing @ryan's recent note about issues: https://github.com/processwire/processwire/issues/8 - "Indicate any 3rd party modules that are installed.", I thought it might be helpful to make it easy to get a formatted list of installed modules that you can simply copy/paste into your issue report. The latest version of Tracy includes an update to the ProcessWire Info panel that provides a new "Versions List" section that lists all modules and their version numbers in a textarea to make it easy to copy/paste. It also shows the PW, PHP, and MySQL versions. For those of you updating from an existing version of Tracy, you'll need to check this new panel section in the module config settings:
    5 points
  3. Today I've experienced interface issue - input fields were hidden (address, etc). After some inspection, I found that reason was in css - map has changed its relative position. I guess Google has changed smth in script that draws map as there were no changes in css locally. Do you have the same issue? To fix the issue I had to add custom style clear tag to InputfieldMapMarker.module line 161 "style='height: {$height}px;clear:left;' " .
    4 points
  4. Hi all, I am new to ProcessWire module development. Just recently getting back to using PW again after a couple of years away from it. I was looking for a SASS/SCSS/Compass pre-processor module for PW and couldn't find any. The closest I could find was AllInOneMinify but it doesn't do SASS/SCSS. I decided to make this module (with heavy inspiration from AOIM). This is a pretty basic module that takes one or more sass/scss/compass file(s) and compile them automatically in your template. Github link https://github.com/lesaff/ProcessWire-Sassify I really appreciate any comments, suggestions, bug fixes, etc. Hopefully this is the first of many modules. Thanks Rudy Note: Added to Modules directory, under http://modules.processwire.com/modules/sassify/
    3 points
  5. Downloaded this yesterday for a test drive (V 1.2.15). Like it very much. Reporting back with observations and mods. Disclaimer - I did make another change particular to my needs but I'm pretty certain it doesn't impact anything else. If the page had a RuntimeMarkup field (kind of a pseudo-field) it was always detected as changed. See ProcessChangelogHooks. foreach ($page->template->fields as $field) { //if ($page->isChanged($field->name)) { if (empty($field->runtimeFields) && $page->isChanged($field->name)) { //SB added condition - ignore RuntimeMarkup field $fields_edited[] = $field->name; } } Also undefined index notices as Adrian mentioned. See ProcessChangelog. switch ($operation) { case 'renamed': if(!empty($details["Previous $key"])) { //SB added if $target .= $details["Previous $key"] . " <strong>" . __("as") . "</strong> " // as // In context of a rename operation ("renamed old-page-name as new-page-name") . $details[ucfirst($key)]; break; } case 'trashed': if(! empty($details["Previous $key"])) { //SB added if $target .= $details["Previous $key"] . " <em>(" . $details[ucfirst($key)] . ")</em>"; break; } default: $target .= $details[ucfirst($key)]; } The ProcessChangelog buildQuery method was doing things like WHERE operation = '3' instead of using the name of the operation. That made the filter not work. case "operation": if (!in_array($value, array_flip($this->operations))) { unset($this->input->get->$key); break; } if($value) $value = $this->operations[$value - 1]; //SB fix - want word not number else break; //SB fix default: $where[] = "$key $operator '$value'"; } Thanks!
    3 points
  6. 0.8.5: Due to the recent Twitter update changes are made to remove the limitation of media-URLs. In addition there is an option to set the maximum number of images you want to add to the Tweet (when the images-field is set to multiple). Enjoy!
    3 points
  7. Definitely a useful module, thanks @Rudy! A couple of things... When using a single SCSS file I get a PHP warning notice: And it would be good if the module only recompiled the CSS if one of the source SCSS files changes rather than recompiling on every page load. A while ago I wrote a simple function for compiling SCSS to CSS using ScssPhp, only when needed. Perhaps you might find something useful in there: require_once TEMPLATES . '/stylesheets/scssphp/scss.inc.php'; use Leafo\ScssPhp\Compiler; function compileCSS(){ // get timestamp of most recently modified SCSS file $files = glob( TEMPLATES . 'stylesheets/scss/*.scss' ); $times = array_map('filemtime', $files); arsort($times); $scss_time = current($times); // get timestamp of CSS file $css_file = TEMPLATES . 'stylesheets/site.css'; if (file_exists($css_file)) { $css_time = filemtime($css_file); } // if no CSS file or SCSS newer than CSS file... if( !isset($css_time) || $scss_time > $css_time ) { // ...compile a new CSS file... $scss = new Compiler(); $scss->setFormatter('Leafo\ScssPhp\Formatter\Compressed'); $scss->addImportPath( TEMPLATES . '/stylesheets/scss/' ); $scssIn = file_get_contents( TEMPLATES . '/stylesheets/scss/site.scss' ); $cssOut = $scss->compile($scssIn); file_put_contents( TEMPLATES . '/stylesheets/site.css', $cssOut ); // ...and return the path with the SCSS timestamp... return '/site/templates/stylesheets/site.' . $scss_time . '.css'; } else { // ...else return the path with the existing CSS timestamp return '/site/templates/stylesheets/site.' . $css_time . '.css'; } } FYI... "TEMPLATES" is a constant I defined elsewhere that holds the path to the PW templates folder. I use a single SCSS file "site.scss" that imports the other SCSS files. The compiled file is saved as "site.css", but for cachebusting purposes I include the modified time as part of the file basename in the returned URL, then use a rewrite rule in htaccess to resolve the URL to the actual filename. An alternative would be to append a query string with the file modified time, e.g. "site.css?1472438137"
    3 points
  8. Welcome to the Forums @scaaty ! As you can see by reading @mauricius's post above, he will probably not update the module to sort out the issues with it, however, in ProcessWire it is easy to integrate any sliders into your templates. The very simplest form of this integration is using repeaters for storing the data of the slides and using a free slider that suits your needs, such us: lightSlider, Swiper, etc... Here is a related post to get you started (this example is even simpler than using Repeaters, it just uses images uploaded to a page, but it is just enough to showcase the basics):
    3 points
  9. Regarding the video tutorials, what I have completed so far is just a 50-video series of straight-up comparing WP to PW feature-by-feature, so I don't think you'd personally benefit from that since you're already a ProcessWire guru. I will release them however there's some further editing I need to do as well as making it part of an overall content marketing strategy. I haven't had time for that yet, but at least the really hard part of recording the videos is done. In regards to something like a full training series, the idea is still in my head (on paper too), however I don't have any plans yet to go full force on that as I'm focused on other ventures.
    3 points
  10. ok here is a sample function that i'm using to init selectize on a table field: $(function(){ $('li.Inputfield_table_field tr').each(function(){ var selOpts = new Array(); // add stuff to JS your array here... $(this).find('input[name*="_icon_select"]').selectize({ delimiter: ' ', persist: false, maxItems: 1, options: selOpts, }); }); }); so for example, you would need to be using AdminCustomFiles module and then this would be inside the ProcessPageEdit.js
    2 points
  11. I know, I and sometimes I do that when a file is really deeply nested and I already have it open in Forklift (plug for the best Mac file manager), but usually I don't really find it much quicker than browsing from PW.
    2 points
  12. hi tpr, 2 things: 1) having open treeitems show up in bold is really helpful! 2) i see clients having problems with moving items around the tree very often. especially when they want to move a page into a subtree of another item. the explanation is always the same: "you have to open the oder pageitem before you can move your sub-item there." i think that could be improved and would perfectly fit into your steroids module, if it does not find it's way into the core. looking at your short screencast (https://processwire.com/talk/uploads/monthly_2016_09/aos-highlightrow.gif.7fa25570dd6f9c8c6db625ab329947a8.gif) it brought up the idea of improving this part as well. do you think it would be possible to trigger the click on the treeitem when a user holds the moved item over the new parent? or maybe bring up some helping tooltip like "if you want to place your item here you have to open the parent item first"? what do you guys think about that?
    2 points
  13. Thanks tpr, but I don't think that is obvious enough. If we rely on drag and drop we will have to explain/train our users on how to use the user interface. IMHO.. I'd rather have a simple button that pops up a modal that includes a standard file chooser input field in case the user just wants to select a file and doesn't want to drag and drop.
    2 points
  14. Are you sure? I believe they should work.
    2 points
  15. The use statement does nothing in you snippet. If you want to use "use", then like this: <?php namespace ProcessWire; use DateTime; $date = new DateTime();
    2 points
  16. Numbers do not mean a thing in themselves. It is the human perception that makes any kind of symbol play role in the real life. So this one is to help our perception make ProcessWire a lucky piece of software)) P.S. And this is another call for everybody on github to star the new main repo, as the stars from the old one obviously were not transferred)
    2 points
  17. FYI, just added an "Edit template" tooltip to pagelist items in my module AdminOnSteroids (not yet committed). It's kind of a dirty hack because there's a link inside a link but with a few lines of jQuery it works
    2 points
  18. If you don't want the "optional" HTML tags removed there is a setting in ProCache to disable this behaviour.
    2 points
  19. I agree that it should be optional. I found similar issue with input type text where "type" was removed so my CSS rules targeting input[type="text"] failed. But most cases there's a setting where you can fix such things, but of course that means you need some experience in ProCache. As a workaround if you add a class to the body it should be kept (untested).
    2 points
  20. In my mind, the word can should be in bold here. Just because you can, doesn't mean you should. Omitting the <body> tag, whilst saving a couple of bytes opens a can of legacy worms. Older browsers will revert to quirksmode and Google Analytics 'prefers' analytics code immediately after the <body> tag. The module is awesome, and has shrunk down the first site we built to be so quick, the web inspector barely keeps up, but this one seems like it should be optional in ProCache to help with legacy development. What do you think Andreas?
    2 points
  21. Bumping this because it is really frustrating trying to follow older forum links. @Pete, is there anything that can be done about this? Thanks.
    2 points
  22. Hi tpr. Feature Request: If possible one thing I would like to see is better consistency for replacing files in file and image fields. This is a task that content editors have to do constantly, so I would like to make it dead simple and obvious. Here is some quick mockups: For image fields: When the "Replace Image" Button is clicked, a modal dialog pops up. For File Fields: Same thing...It opens a dialog to replace the file Any thoughts?
    2 points
  23. This module provides a solution for keeping various site settings in one place (titles, slogans, api keys, emails, addresses, etc.). Features - Admin can create unlimited number of settings - Settings can be grouped - Admin can set setting label, notes, property name, field width and type - Settings can be of type text, checkbox, radios, select, email, url, integer How to use In module configuration create as many settings as needed. Customize their label, type, width and provide a name you want to use in a template files (property name). After that admin can set those settings on "General Settings" page in "Setup" section. Every time you wish to output eg. site name you can use $settings->site_name or wire('settings')->site_name or $settings->option2 to get value of 'Check it' as seen on the first screenshot. (Checked checkbox returns 1). You can change global name ($settings) to something else in module configuration. To get basic markup with all settings and their values use $settings->render(), usefull to check returning values (esp. select/radios - their values are sanitized as page names). Current limitation: -no way to change order of settings, -new settings can only be added at the bottom. Multilanguage To make fields multilanguage aware create a field with a same property name with '_languageName' appended. Example: Your site has two languages: default and french, create site_title and site_title_french fields. Put in a template $settings->site_title. If a user has set french language, this module output site_title_french, otherwise site_title. Please notice that render() function is not language aware. https://github.com/pmarki/ProcessGeneralSettings
    1 point
  24. Anyone happen to have created an mailchimp signup modules? Just looking into it now. Looking to create a simple module that signs people up to a list on mailchimp when a new suer is created.
    1 point
  25. Trekkerweb Supply & Demand https://markt.trekkerweb.nl/ Trekkerweb.nl brings agricultural mechanization news and supply & demand together in a single online platform for all the tractor and machine enthusiasts and others interested in the mechanization sector. The site is multi-language with English as default. None Dutch browsers will get the English version of the site, currently we are finetuning the German version which will be available somewhere in the near future. The search page in English and Dutch language - https://markt.trekkerweb.nl/search/ - https://markt.trekkerweb.nl/nl/zoeken/ Used modules Profields Table Profields Textareas MarkupLoadRSS (fetches brand related new from the main website) PageImageManipulator 2 (PIM2) (for placing watermark image) ProCache ProcessGetVideoThumbs TextformatterVideoEmbed WireMailSmtp LanguageSupport (Site is multi language: Dutch, German and Default English) Couple of custom made modules for user profiles and cross page linkage of the datamodel (Bower) components awesome-bootstrap-checkbox bootstrap-dropdowns-enhancement-sass bootstrap-sass bootstrap-select font-awesome formvalidation.io hashids jquery jquery-file-upload jquery-throttle-debounce jquery.mmenu js-cookie lifestampjs moment semantic-ui-sass verge Front-end user profiles (custom module) Account registration Customizable fields (in module settings) Per field privacy configurable (private, public, on a per user basis). Front-end login/ logout Reset password Email activation for account Request activation mail View profile Public profile Edit profile Set profile picture (cover image and avatar) Modify password Language choice Profile dashboard Front-end Ads management Create new ad Edit existing ad Manage media (images / video) Preview and approve ad Remove ad Data model Categories Subcategories Brands Input fields Options An intuitive data model drives the whole site. A couple custom made modules take care of the cross page assigning of categories to subcategories and brands. Per subcategory we are able to assign the related input fields and options which will be rendered on the 'Create new ad/ Edit ad' form page and combined with the given values rendered on the ad detail page. Database caching + Pro caching One of the challenges was to keep the whole project as low weight as possible. Since the data model with categories, subcategories, brands, inputfields and options is the backbone of the site we came up with the solution to have the names, titles, ids, and relations between them cached. Completely as json/javascript with pro cache and separated with database caching. With the Wire Fuel we made the $dm object available for accessing anywhere in PHP and globalJS.dm from within javascript. This means the whole data model is called only once per request, and while it exists in the database cache and pro-cache it is incredibly fast. Subcategory page The first image shown below represent one of the subcategories (Tractors) with assigned categories, brands, input fields and options. The image there after is a screenshot of the add ad page, where the input fields, options and brands are dynamicly rendered after being loaded via Ajax. Other features cookie based favourites cookie based last-viewed list advanced filter search related ads Thanks to the whole team (Ferdi, Bastiaan, Alex, John, Hessel) and last but not least Ryan for creating ProcessWire and all module developers out there
    1 point
  26. looks awesome @tpr ! @gmclelland i support your request to improve that feature on mobile but i would not see it as a replacement of drag&drop. on mobile, yes! but on desktop the drag&drop is almost a killer-feature compared to other cms. and now on steroids it is finally getting even more userfriendly!! thank you tpr for picking the idea up, looking forward to the next steroids update
    1 point
  27. I am sure there are some good ideas in there @szabesz - I don't want to get too carried away, because a lot of that info is available from the PHPInfo panel, but I am certainly open to requests for things to add. I did just update it with Apache version because this may be relevant when debugging htaccess issues.
    1 point
  28. This is really useful again Adrian, thanks! However, be careful. If you show us what can be achieved, we might demand more and more and even more Just to show you what I mean, here is the WooCommerce "System Status" report (certain parts are deleted, such as the list of plugins): Similar to the above is the diagnostics info of another WP plugin: I copied over these just to give you some ideas should you find the time to improve this new feature. It would help forum support as well in some cases.
    1 point
  29. This happened to me today. Clean your cache/FileCompiler folder. For me its gone. .a
    1 point
  30. Thanks for this @valan - any chance you could submit this as an Issue or PR to Github?
    1 point
  31. Well it's the same functionality that is already present in image fields, of course a help text could be added to make things clearer. There could be also a Replace button. I use dnd from time to time, and it's especially handy when replacing images. Just dnd a new image over the old and save. I also maximize windows but it's easy to dnd - move the "loaded" cursor over the taskbar item, wait and drag to the destination.
    1 point
  32. @LostKobrakai You should try to communicate that to Ryan if you have the means to, as it is something important for marketing. I did try to mention it earlier, but with no luck. I think there is still time to rethink and redo the transition to the new repo.
    1 point
  33. Yes, using fields is a better option to him. Not to mention that in AOS only SuperUsers can see these tooltips.
    1 point
  34. Doesn't that defeat the object of having PC in the first place? Like I said, it's awesome, but stripping <body> tag, feels wrong to me. I wonder if any other front end devs would agree?
    1 point
  35. Thanks tpr, I created an issue on github for those who would like to follow along. https://github.com/ryancramerdesign/ProcessWire/issues/2047
    1 point
  36. I think there might be still better places to ask. Table is a Pro field with it's own dedicated support sub-forum. And the feature you are describing is not a feature of Hanna Code but rather a feature of the Hanna Code Helper module.
    1 point
  37. Hi Pete im talking about the time for editing a Post. If you find a typo or forgot to Post a Link you Click edit and Save and then you are forced to wait xx seconds. That makes no sense other than annoying - at least - me and has nothing to do with multiple posts.
    1 point
  38. Maybe @apeisa could share some projects?
    1 point
  39. Awesome Rudy - I was hoping someone would make something like this a few months ago and now here it is Please feel free to add it to the modules directory (mark it as Beta if you want to make people aware there may be bugs): http://modules.processwire.com/
    1 point
  40. Speaking of bad bot blockers, I've had great success with Jeff Starr's robust "6G Firewall" for Apache: https://perishablepress.com/6g/
    1 point
  41. Would also like to see more e-commerce implementations with PadLoper. Couldn't find many so far...
    1 point
  42. Media Manager version 006 (released 21/09/2016) Happy to announce the latest release of Media Manager. Changelog mmlink: A CKEditor link plugin (cloned and adapted from pwlink thanks @ryan) lets you insert links to the media in your Media Manager Library directly into the Rich Text Editor (RTE). (Instructions on how to setup are similar to those of mmimage as shown in this video. Where it says MMImage/mmimage please replace with MMLink/mmlink respectively, thanks). The plugin is in the folder MediaManager/plugins/mmlink. Please note that currently it is not possible to edit a link's attributes (e.g. rel, target and title). However, a title is auto-inserted in the link (the respective media's title. Please download latest release of the module from the link in your purchase confirmation email. Let me know if you encounter any issues, thanks. @TODO: Multi-tagging of media Documentation (thanks for being patient with me guys...)
    1 point
  43. As you're using Nginx in front of Apache, maybe it's worth to try this: https://github.com/mariusv/nginx-badbot-blocker
    1 point
  44. Hi SteveB, I'm pretty sure the code you posted above will not solve your problem. What happens if... We start off with page P not having a locked status. Thread A then gets scheduled, and runs the code in claimPage(P). It gets halted just before the line $page->save(); gets executed. Execution is then passed to thread B which is also trying to claim the page - so, it too, runs the claimPage(P) method - but this time to completion (saving P with the flag) and gets page P back. Eventually B is halted and focus switched back to thread A which picks up where it left off, and saves P again (with the locked flag) and gets page P back from the routine. Both threads will think they have successfully claimed the page, yet neither of them had to waitForPage(P);
    1 point
  45. Before posting, it's worth noting there is an existing section on Security relating to ProcessWire in the Docs section of this website: http://processwire.com/docs/security/ It contains several sub-pages that are worth a read as they offer code examples where appropriate and pointers for general security beyond ProcessWire.
    1 point
  46. I've to say, that I never got warm with Forklift. It tries to hard to be kind of a finder replacement, whereas Transmit just does one thing and that exceptionally well. The synced folder feature is just the best and if you set the local and remote startfolder for the favorites, than it works from the beginning and you just drag&drop files around.
    1 point
  47. Just wanted to follow up to say that today's PW core updates fix the issue with SVG files with no dimensions specified. There is also a new SVG validator/sanitizer that you should consider installing: http://modules.processwire.com/modules/file-validator-svg-sanitizer/ Please let me know if this solves all the issues with dimensionless / responsive (Illustrator's term, not mine) SVG images.
    1 point
  48. Also: http://modules.processwire.com/modules/inputfield-textarea-markup/. Self-promotion, again
    1 point
  49. This hasn't been asked, but wanted to cover how the permissions and publish workflow work on the site. It has a very simple, though nice setup, where authors can submit new posts but can't edit already published posts, nor can they edit unpublished posts by other authors. It enables Mike to have full control over any content that gets published on the site, while still allowing easy submission and edits for the authors. Post workflow All of the authors have a role called "author" with page-edit permission. On the "post" template, the boxes for "edit" and "create" are checked for this "author" role. This site also makes use of the page-publish permission, which is an optional one in ProcessWire that you can add just by creating a new permission and naming it "page-publish". Once present, it modifies the behavior of the usual page-edit permission, so that one must also have page-publish in order to publish pages or edit already published pages. The "author" role does not have page-publish permission. As a result, authors on the site can submit posts but can't publish them. Nor can they edit already published posts. In this manner, Mike has final say on anything that gets posted to the site. Post ownership The default behavior in ProcessWire is that the Role settings control all access... meaning all users with role "author" would be able to do the same things, on the same pages. In this case, we don't want one author to be able to edit an unpublished/pending post created by another author. This was easily accomplished by adding a hook to /site/templates/admin.php: /** * Prevent users from being able to edit pages created by other users of the same role * * This basically enforces an 'owner' for pages * */ wire()->addHookAfter('Page::editable', function($event) { if(!$event->return) return; // already determined user has no access if(wire('user')->isSuperuser()) return; // superuser always allowed $page = $event->object; // if user that created the page is not the current user, don't give them access if($page->createdUser->id != wire('user')->id) $event->return = false; }); Planned workflow improvements Currently an author has to let Mike know "hey my article is ready to be published, can you take a look?". This is done by email, I'm assuming. An addition I'd like to make is to add a Page reference field called "publish_status" where the author can select from: DRAFT: This is a work in progress (default) PUBLISH: Ready for review and publishing CHANGE: Changes requested - see editor notes DELETE: Request deletion Beyond that, there is also an "editor_notes" text field that only appears in the admin. It's a place where Mike and the author can communicate, if necessary, about the publish status. This editor_notes field doesn't appear on the front-end of the site. All this can be done in ProcessWire just by creating a new field and adding these as selectable page references. That's easy enough, but I want to make it so that it notifies both Mike (the reviewer) and the author by email, every time there is a change in publish status or to the editor_notes. This will be done via another hook in the /site/templates/admin.php: wire()->addHookAfter('Page::saveReady', function($event) { // get the page about to be saved $page = $event->arguments(0); // if this isn't a post, don't continue if($page->template != 'post' || !$page->id) return; // if this post wasn't made by an "author" don't continue if(!$page->createdUser->hasRole('author')) return; $subject = ''; $message = ''; if($page->isChanged('publish_status') || $page->isChanged('editor_notes')) { // the publish status or editor notes have changed $subject = "CMSCritic post publish status"; $notes = $page->isChanged('editor_notes') ? "Notes: $page->editor_notes" : ""; $message = " Title: $page->title\n URL: $page->httpUrl\n Status: {$page->publish_status->title}\n $notes "; } else if($page->isChanged('status') && !$page->is(Page::statusUnpublished)) { // page was just published $subject = "CMSCritic post published"; $message = "The post $page->httpUrl has been published!"; } if($message) { $reviewer = wire('users')->get('mike'); $author = $page->createdUser; mail("$reviewer->email, $author->email", $subject, $message); $this->message("Email sent: $subject"); } }); Mike, if you are reading this, does this sound useful to you?
    1 point
×
×
  • Create New...