Leaderboard
Popular Content
Showing content with the highest reputation on 12/28/2015 in all areas
-
Hi! I'm writing some tutorials for Tuts+ and I'll put some information here when I have it. Love to hear your suggestions, and I think a couple of other people are wirting tutorials there and of course many other places.3 points
-
Hello, I wrote a tutorial using a simple pattern for code organization in processwire https://processwire.com/talk/topic/11646-the-wire-render-pattern/ Also in this topic I wrote how to make simple menus https://processwire.com/talk/topic/11748-menu-building/?p=109341 I´m happy to help if you need any clarification or something2 points
-
As I already said in this thread, I have Processwire running with PHP7 and also HHVM. So this thread is dedicated to all the question and experiences people run into when trying to get ProcessWire work with HHVM. I will start with a small tutorial, so you can try it yourself and make your own mistakes instead of repeating mine I highly recommend running HHVM on a production system only if you know what you're doing.2 points
-
How about sort pages by date (in the main query), and echo month name if it's different from the previous?2 points
-
Hi everyone! With Batcher you can batch-edit and create Pages in the Pw Admin. If you install this module, you get a new Page "Batcher" under Setup. Modules page: http://modules.processwire.com/modules/process-batcher/ Github: https://github.com/wanze/ProcessBatcher Editing How does it work? Search your pages with a selector. You can check if you want to include also hidden/unpublished pages with the filters. Select the pages you want to execute an action (the action only gets executed on "checked" pages). Select the action and if necessary, additional data like the new parent or the new template. Execute. Supported actions: Publish/Unpublish Pages Hide/Unhide Pages Lock/Unlock Pages Trash Pages Delete Pages Change Parent Change Template Batcher does the following permission checkings for the current user: Don't display pages that are not editable Remove Actions if the user doesn't have the permissions (page-delete, page-move, page-template, page-lock) Important notes: When changing a template, data in fields of the old template which are not assigned to the new template gets deleted. When changing the parent, the template of the new parent must accept the pages template as children. This is a setting in the template under "family". Creating How does it work? Select a parent where your new pages will be added as children Add as many pages as you want by clicking "add Page" Click "Create Pages" You must enter a title and choose a template. The name is optional: If left empty, Pw will generate this for you. Includes permission checking and Family template restrictions. This means in detail: The selected parent must accept children and their template The pages template must accept the parents template User needs the permission to add children to the selected parents template User needs the permission to create Pages for the chosen Template Batch-creating tips The chosen template and the statuses are always cloned from the last row. So if you need to add 30 pages with the same template, define it first and the click "add Page" - it'll make your life easier ;-) You can drag & drop the table rows should you want to change the order. The dragging looks ugly but it works. For the lazy dogs and keybord hackers among us, you can add a new row by pressing "ctrl+n". This works (at least in firefox) only if no input has focus. After adding a new row, the title input gets the focus. By pressing 3 times tab you arrive at the published-checkbox, here the short-cut works. Restrict Batcher for a user to only allow editing or creating Create permissions "batcher-edit" and/or "batcher-add". As soon those exists, the module checks if the current user has the permissions. If you only need batch creating, check out the following module by Soma: http://processwire.com/talk/topic/2138-process-tools-create-pages-wip/ Cheers1 point
-
I'm in no way a github guru, and I may be missing a lot about the implications of what I'm about to suggest, so please bear with me even if it's completely moronic. It's Christmas, after all When a PW site is installed, the original structure is destroyed. In other words, that neat looking .git directory becomes completely meaningless. On the other hand, the wire directory isn't ever touched and, as I see, upgrading PW is done exactly by replacing that directory (and the index.php file, though I believe that one hardly ever changes). So, the suggestion: Why not make the wire directory a separate github project, referenced from within ProcessWire as a submodule? Downloading PW would now take a git clone --recursive ... (I know, it's overbearingly complex) but upgrading would be super easy, just a single git command. For additional magic and peace of mind, index.php could be moved inside wire, and the original could be just one line to require it from there.1 point
-
Hehe, totally just claimed rockett.pw. And wow, .pw domains are dirt cheap. Literally. $2.1 point
-
As far as I understand tibs (just correct me if I'm wrong), his issue is not about how to update PW with one line of cli command or how to update with a few clicks, but it is about how to utilize the official git repo, since this method would fit his workflow, and he thinks that it might be possible to support both the "ProcessWire development" and personal projects based on a workflow he describes.1 point
-
Not much to go by there. Checking your site out did bring one new method to mind, though, so perhaps I'll be able to catch even these cases soon.. Probably need to make the rules visible on the isit.pw site too, so that people can actually prevent detection if they so choose.1 point
-
I finally figured out why the websites with the Protected Mode module (yes I didn't use the correct module name earlier) are not showing up ---- a look at the view source shows the following for my internal website odmc.sdtool.info: <!DOCTYPE html> <head> <meta charset='utf-8' /> <style> .container { margin: 360px; } legend { font-family: Arial, Helvetica, sans-serif; display: block; width: 100%; margin-bottom: 1rem; color: #6F6F6F; } button { font-family: Arial, Helvetica, sans-serif; font-size: 100%; padding: 0.5em 1em; background-color: #006DD3; color:#fff; text-decoration: none; border: 0 rgba(0,0,0,0); border-radius: 2px; } button:hover, button:focus { background-color: #007DD2; } button:focus { outline: 0; } input[type='text'], input[type='password'] { font-size: 100%; padding: 0.5rem; display: inline-block; border: 1px solid #ccc; box-shadow: inset 0 1px 3px #ddd; border-radius: 4px; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; } </style> </head> <body> <div class='protected-mode-container'> <form class='protectedModeForm' action='./' method='post'> <legend><h1>PLEASE LOG IN</H1></legend> <input type='text' name='username' placeholder='Username'> <input type='password' name='pass' placeholder='Password'> <button type='submit' name='login'>Login</button> </form> </div> </body> </html>1 point
-
What's even more odd is that this link gives me "yup". Either I'm doing something wrong here, or there was some kind of temporary glitch in connections or whatnot.1 point
-
You have already brought this up in the following post: https://processwire.com/talk/topic/11629-developing-barbaracolcom/#entry109521 Where I commented" At least cross-reference this post in that one. Thanks.1 point
-
yes, there is an extensive discussion of that here, with code of how to achieve that: https://processwire.com/talk/topic/4991-sub-arrays-dates-times-and-pure-hell/ other options: https://processwire.com/talk/topic/6733-better-way-to-finding-all-years/#entry65975 https://processwire.com/talk/topic/11690-display-results-with-a-year-heading-using-datetime-field/?p=1087091 point
-
I've updated it on the original link: http://heldercervantes.com/experiments/ifim/ Added a behavior for turning the last marker green when clicked/dragged, and tested one with 999 for the number. Don't think anyone will ever need more than two digits though. I'm on a mac and don't have a pc for proper cross-browser testing, so let me know if you detect any problems. EDIT: Re-uploaded file after adding a little keyboard control, complete with shift-key for 10px skips.1 point
-
Hey guys, this upgrade now appears on PW 3.0 (devns) branch. If you are using the ~= operator in a search, like "title~=disability act" it now asks MySQL for the ft_min_word_len (per @LostKobrakai's suggestion above). If any word length falls under that threshold, it delegates that word to a separate REGEXP command in MySQL that matches whole words. This is actually an improvement over the code I mentioned earlier because the previous code that converts it to use a "%=" for short words could match things like "disability fact" or "react to this disability" etc. Whereas the new core addition will only match whole words in the same way that the MySQL index would, meaning the field would only match if it contained the exact words "disability" AND "act" somewhere in the field, and not some word that happens to contain the partial word "act". To take it further, it also now uses this technique to match stopwords that MySQL doesn't full-text index. Previously it would just exclude them from the search since the presence of a stop word would prevent a search from matching. Now you can perform searches that include those stop words and match them.1 point
-
Forgot to clarify that I am still using @heldercervantes HTML (has a couple of nested DIVs) but with (most) of your CSS. I found it to work better even when an image was viewed at its actual size (e.g. the above is 4500x2234). The markers largely stayed in the right positions. Regarding the two-digit markers, I have only had to adjust the padding to 'padding: 0.5em 0' and it looks acceptable, I think? Haven't tested with 3-digit markers. Anyway, once I put this up on GitHub you guys can tell me if the markup needs adjusting, etc. Thanks. <div class="fieldContainer"> <img src="base.jpg" alt="" /> <div class="marker"> <div class="circle"></div> <div class="center"></div> </div> </div> Edit: With lots of markers, the table of coordinates becomes a bit long. Wondering whether to do something about it and how?1 point
-
1 point
-
ImageMarker beta 1 is out (well, sort of) Largely based on @ryan FieldtypeEvents + @kongondo MenuBuilder Up on GitHub later (if I get the chance before x-mas ) + Move to own module support forum API // assuming an ImageMarker field called 'marker' $page->marker->info;// ID of the info page (i.e the page represented by the 'dot'/'bubble' $page->marker->x;// x coordinate in px $page->marker->y;// y coordinate in px $page->marker->infoLabel;// title of the info page @todo/@brainstorm Default/New X/Y coordinates are 0,0. Is this OK? Configurable unique colour for each bubble? Would need to use colour picker + save value to db. Edit. No need actually. See post #34 below; now numbering each marker. Rename dot to bubble? Edit. Renamed to 'marker' Configurable dot/bubble sizes? Default colours? Slider/up-down arrows thing for manual edit of px inputs? Probably not; it is faster to type Reno Theme issue; since using img width 100% height auto in CSS, and since x/y saved as px, dots are off in reno theme. Using percentages should sort this out but do we want to do that or force user to upload image of max width w and max height h?. Edit. See post #34. Using percentages. Rename 'info' property to something else? Make tooltip more specific to IM dots only + unobtrusive Currently loading only info page ID in Field rather than the whole page object. User to grab pages within template file instead. Reasoning is potential performance issues if there's lots of bubbles? GitHub repo Own module support forum (assuming this goes forward ) Note Requires user to set up a file field + upload a base image to that field Currently, I really don't have time to work on this. Managed to do this in between stuff, when I got tired/bored of coding that other stuff Demo1 point
-
Almost. There's also an additional check to see if the returned page contains certain traces of ProcessWire. Simply checking the return code wouldn't be enough here For the record, isit.pw includes roughly a dozen methods for checking if a site is running ProcessWire. In many (most) cases it can still identify your site, even if that one check fails. I should probably mention that isit.pw (which is my project) is both a functional tool (as Antti explained earlier) and an experiment; "can you properly identify a site running ProcessWire or not?" I'm also planning to add an info section later, including details on hiding your ProcessWire-ness from humans and services like isit.pw equally1 point
-
UPDATE Ryan has come up with a nice module which automates a lot of what is discussed in this thread, see: http://processwire.com/talk/index.php/topic,432.msg2937.html#msg2937 EDIT: corrected the link (went to right topic but wrong message) -apeisa1 point