Leaderboard
Popular Content
Showing content with the highest reputation on 02/13/2015 in all areas
-
Another Friday blog post with core updates just posted. This time we've got several image editing updates, particularly with regard to image editing for images placed in rich text fields. Also included are HiDPI/Retina support, an image variation tool, and more… Read all about it here, plus a video and screenshots: https://processwire.com/blog/posts/new-image-editing-features-2.5.19/7 points
-
4 points
-
Hey everybody, I'm one of the admins on the ProcessWire FB page and I had a question. For those of you who are active on Facebook, would you rather that we turn the group into a closed group instead of a public group? You can see the difference here: screenshot. Anyone can still request to join the group, so it's still pretty open, but you have to join the group to see the posts. The reason I'm asking is: I notice I don't feel like posting there much, because my Facebook friends are notified whenever I post to a public group. So it's kind of a disincentive to post, for me--like I'm calling attention to something that is just more noise in their feed. Let me know what you think!3 points
-
I transitioned several of my older sites to ProcessWire. I have a multi-artist gallery website in planning. Will display paintings, drawings, sculptures from local area artists. Later will sell direct online. Materials, canvases, brushes and classes. Pretty cool. Very excited about this one! A local comedian contracted me to build his fan page. This will be great creative fun!!! And then I have a personal project that I have been working on (for years it seems) and PW has provided me with the tool kit to build it. It will be a multi-site. First one3 points
-
I believe Page Tree Add New Child Reverse module will do that.3 points
-
It is thanks to Horst. http://modules.processwire.com/modules/page-tree-add-new-childs-reverse/3 points
-
3 points
-
After reading Include & Bootstrap on the ProcessWire website I coded a simple shell script for outputting page informations. Here is the GitHub repository with further informations and usage instructions. Long story short, you can do things like pw get "/" which outputs this: or pw find "template=basic-page,parent=/about/,sort=-id,limit=4" id template rootParent which outputs this: I don’t know if it is in any way useful, but I think it’s a fun way to output PW content and to quickly get to page informations in a rather nerdy fashion.3 points
-
yep, context RTE. Reason, make those linebreak visible, so content editors are aware of those breaks. Lot's of time, the writers use line-breaks when they shouldn't, or don't know that they are using those. So that red, green & gray is done with CSS pseudo elements. Here you can see that the header also includes a strong tag, I don't like that so, there's the visual feedback. Ps, I did solve it, but don't like as I press solved, it tells me: Best Answer3 points
-
2 points
-
2 points
-
Not sure about the most flexible way to achieve what you want to do in point 1. I would also be interested to have some input from other forum members. But for point 2, the events module is an option (or the table pro field), but I would encourage you to create a page for each event, which in my opinion would give you more flexibility – you're not restricted to a few fields in a table, but you could keep adding more fields like an interactive map to locate your event (see Ryan's great Map Marker module) – and is probably a lot more scalable in the long term. This would also be a great opportunity to learn how to retrieve and manipulate information from pages. Here's an example of how you'd retrieve a list of all events taking place today, taking into account that they can either be ongoing (e.g. they started a few days and are still going on) or new (they've started today): $events = $pages->find("template=event, start_date<tomorrow, end_date>=today, sort=-start_date"); Quite simple, isn't it? Bonus 1: find all event current and upcoming events in the next 2 weeks and limit the results to 18: $events = $pages->find("template=event, end_date>=today, start_date<today +2 weeks, sort=-start_date, limit=18"); Bonus 2: find all past events: $events = $pages->find("template=event, end_date<today, sort=-start_date"); Good luck.2 points
-
2 points
-
First, Thank You for your comments. No problem with disagreeing, however my point is that if a developer is using ProcessWire as a solution, they should have confidence in and knowledge of the product. Maybe what I don't fully understand is, if you are a professional Solution Provider, I would sincerely hope that you aren't ever providing crappy solutions. This would be the case regardless of what software you are developing with. That is a situation where the skill of the developer determines the outcome. It's never crappy software that's to blame, it's always a lack of focus that leads to a crappy implementation. In my humble opinion (and remember this is my opinion), ProcessWire as a tool for developing websites has more to offer (on a technical basis) a client than Wordpress. You have more control over the front-end and back-end development processes. You have an enormous variety of field types that can be customized. With ProcessWire, the limitations are few and the benefits are many. Yes, Wordpress is more popular and will most likely always be that way. I appreciate Wordpress' status and pedigree. I believe they have much to offer just not at the technical level that ProcessWire does. Serious web development (once again in my humble opinion) should be about creating workable solutions for your clients. We discuss the requirement with our clients and end up giving them a solidly built self-maintainable website. They only get the good website (in their opinion) when we listen, appreciate and respond to their needs. You are right, they are the final say in whether it works for them. Thanks again for giving me your perspective. I agree with many things you say. This forum has people from all over the world, with a variety of skill-sets and opinions. For me, that is a good and healthy situation. I honestly believe we are all here working with the ProcessWire project because this tool is unique and fun to work with.2 points
-
2 points
-
Can you please check the access rights via FTP? If the PHP script has crashed, it might be not accessible for everyone but your user.2 points
-
Partially disagree. Our top priority is making the user feel as little friction, ever, in their workflow. It doesn't mean they shouldn't adapt sometimes, but still, be extra attentive to their problems. This is an opportunity to learn how to make PW (or your implementations) better. As a community of devs, we need the users to ask for it and love it. I don't want no customer complaining to their contacts how I forced a crappy solution on them — I want them to talk about how awesome their new website is and how the never need to call me cause WP or whatever else is acting up again!2 points
-
I've begun working on my personal site (focusing on my obsessions, pizza & music), plus starting to build an intranet for the mental-health non-profit where I work. The intranet will feature a knowledgebase (to be imported from MediaWiki), training materials, and will give me a chance to offer a sane alternative to the current "zillion Excel/Word docs scattered across the network" approach. I'm hoping to learn enough about XML and JSON to bring in employee info from ADP, and automate the reconciliation of a 300-page monthly Verizon bill via EDI. Plus, we're moving from an undocumented custom-built client database to an industry-standard Electronic Health Record. Developer of the current DB can't even provide a list of content from all the dropdown fields, so I've been grabbing the list elements from Firebug and pasting into a PW text field to strip HTML. In the process it's getting me to model the current DB so we don't repeat the same mistakes in new one.2 points
-
For some reason I didn't get notified about your post, but you're right with the headers. Depending on the rest of your config, you actually might need to add this line. Exactly this cost me 30 minutes today, I just couldn't get it to work on a new installation. Thanks for pointing this out. As with the cookie, the "=" version should, according to the documentation, work - but yours will definitely work better. I personally removed this part, because for my use case it's enough to know whether I'm using the admin area or not. Anyway, I will also update this part. Thanks for you input. The clear cache module is also taking shape (way too slow for my taste, but I only have so much time…), and should be ready for a first test drive soon.2 points
-
Other will answer this with more authority than I Ollie, but I have found PW beta to be more stable and robust than some other production s/w. So on occasions I have used beta for production sites, after extensive tests (so far all of which always work flawlessly). It really is a very, very good CMS. Enjoy2 points
-
This is a very simple way to display some instructions to the admin users. Before starting, you need to write some docs; they can be a hidden branch of your page tree, using basic-page, or a different template of your choosing. You should make each subject it's own page under the docs so you can output each one under an accordion trigger. Required Module: Admin Custom Pages 1.) Follow all instructions to install the module; Also add the ACP_scripts_and_styles field to the admin template. 2.) Make a new page under admin, called Docs or whatever; assign the process as described in the module instructions. 3.) Make a template in your themes directory to generate the output of the docs page. 4.) Select that template from the page select in the admin custom page you created. 5.) also make a folder to keep your admin custom pages scripts and styles; 6.) create a css file to use for the display output and some basic styles (like ol, ul li etc..) 7.) Add the custom css file to your ACP_scripts_and_styles field. You can use any output you want, but i'm using a nested accordion, which is provided here: http://tympanus.net/codrops/2013/03/29/nested-accordion/ this is the content of the admin custom page: <?php $docs = $pages->get(4259); ?> <div id="docs"> <ul id="cbp-ntaccordion" class="cbp-ntaccordion"> <?php foreach($docs->children as $doc) { ?> <li> <h3 class="cbp-nttrigger"><?php echo $doc->title ?></h3> <div class="cbp-ntcontent"> <?php echo $doc->body;?> </div> </li> <?php } ?> </ul> </div> <script src="<?php echo $config->urls->templates ?>_admin_custom/js/jquery.cbpNTAccordion.min.js"></script> <script> $( function() { $( '#cbp-ntaccordion' ).cbpNTAccordion(); } ); </script> you'll also want to add the provided css, js and fonts that come with the Nested Accordion; in the css file you'll need to point the fonts to the actual font directory, for example: /site/templates/_admin_custom/fonts/icomoon_arrows/icomoon.eot it should come out looking something like this: *if you are using Reno theme, you can customize the icon, like for example fa-book, which is used in this example: -- Thanks & Credits to Diogo for originally creating the ACP module, and for Nico for getting it to work with the new admin theme system...1 point
-
Thank you so much Marvin! That was it! There was no php script crash and no failure of PW or Lightning. I just forgot to give the file the correct access rights at the end of its creation.1 point
-
I've now added clock-picker to the master branch and bumped the version number. Please see the opening post for more details.1 point
-
cstevensjr, don't worry I was merely playing devil's advocate. I do believe PW is a great solution, even from a user's standpoint, and I think it's adaptable to a great deal of situations! Just gotta keep the user in mind.1 point
-
I have the same username on there as on here, and well ... most other services as well I think I am addicted to reddit. So many categories/subreddits and I can spend hours and hours just reading and laughing at things. Do you have any favorite subs? I spend more of my time in ELI5, AskReddit, webdev, frontend, TIL, TIFU, Nexus4 and Android (+ a few others).1 point
-
re:headers this is a very interesting read i came across: http://www.mobify.com/blog/beginners-guide-to-http-cache-headers/1 point
-
Somehow content editors love the <br> tag. On a 'random' base, the're putting in a line break. The cases of double <br> is easy to solve, but the single ones are just a pain in the *ss, as they could be intended. Think 80% of the <br /> makes me <grrrr />. For other elements I can use some pseudo elements to foo-doo visualize when they are used. For br thats not possible without some javascript I think. I even think: Disallow br tags at all.<br> How do you guys solve this.? Putting this in the the CSS, will visualize the BR. p br { content: "*"; display: block; margin-bottom: 0; line-height: 1; } p br:after { content: "<br>"; display: inline; background: red; color: #FFF; font-size: 12px; border-radius: 2px; margin-right: 2px; padding: 0 4px; float: left; }1 point
-
If someone has editors, who don't pay attention to linebreaks, that's a little css snippet to at least limit the damage an editor could do to mobile textblocks. Especially for those narrow texts falsely placed breaks can harm the layout of lines. @media (max-width: 26.5em){ br{ display: none; } }1 point
-
1 point
-
Hi. I think you got the solution till one year later , but to go sure for all, who read this: go to e.g. field Body/Input/ckEditor Settings Beautify Markup Toggles set Convert div tags to paragraph tags only that´s it! So, "return" makes a <p> Shift+return makes a <br> 2x shift+retrun makes a free line The source ist like this: <p>Das ist der Text</p> <p>Mit Return ist oben Leerzeile und nun mit shift+return in nächste Zeile<br /> jetzt 2x s+r<br /> <br /> ok</p> The result: Das ist der Text Mit Return jetzt und nun mit shift+return jetzt 2x s+r ok1 point
-
GitHub: https://github.com/owzim/FieldnameUnprefixer From the README.md: Makes it possible to access prefixed field names without the prefix. Usage Create some prefixed fields and add it to you desired template, for example prefix_myField and otherPrefix_myOtherField. Configure the prefixes, that should be removed in your /site/config.php, like so: $config->FieldnameUnprefixer = array( 'basic-page' => array('prefix_', 'otherPrefix_'), 'home' => array('prefix_', 'otherPrefix_') ); The first array keys are the template names. The Prefixes also can be assigned as a string if it's just a single one: $config->FieldnameUnprefixer = array( 'basic-page' => 'prefix_', 'home' => 'otherPrefix_' ); Now you can access the fields without the prefix, like so: echo $page->myField; echo $page->myOtherField; The unprefixed field names are now also accessible via selectors, but only for already fetched data, since the field is not really in the database: // not $pages->find('myField=something'); // but $pages->find('template.name=basic-page')->filter('myField=something'); Use case Prefixes are sometimes necessary to have fields that behave specific to the template, so you need to create a specific field and namespace it with a prefix, but don't want to access the fields differently on each template. // eeew! $client->client_address; $something->something_address; // yay! $client->address; $something->address; Might be not the ProcessWire-way because data access is abstracted, but I use it, and perhaps some of you find it useful too.1 point
-
Just use $image->name as a reference. If the same image is added twice, a unique name is generated for the second one (just like when you add identically titled pages under the same parent).1 point
-
Hi Mike, not possible at the moment, but I just looked into the code, should be easy to implement, with selectors. Instead of $templates->get("name"), I would use $templates->find("selector"), and loop through them. But it needs to be tested as well and unfortunately I haven't got the time at the moment. Feel free to make a PR PS: it's owzim1 point
-
Interesting, also it's heartening to know that ProcessWire will still be functional in the year 7598.1 point
-
I just pushed a new branch to the github repository that adds the clockpicker popup as seen in the screenshot above. If you want to try it simply use the files from the clockpicker branch. If all goes well with your testing I'll merge this change into the master branch and bump the version. Thanks!1 point
-
Hey Christophe, I built this (cultural) event site with PW, and it might be of interest to you: http://www.spainculture.us/ Think carefully about the initial structure that makes most sense for your project. In my case, since we're talking about events organized in different cities around the U.S., I chose to build the tree this way: This "geographical structure" is very intuitive for editors as they're able to quickly add or edit events by looking for the city where the event takes place. Much faster than having all events under one place, e.g. a page named "Events". When editing or creating an event, editors can choose categories (architecture, culinary arts, etc) from a simple pull-down menu: This menu is a page field, like Diogo recommended above, which references the categories that are organized as such in the tree: I hope this helps you understand the power and simplicity of page system in Processwire.1 point
-
I have been finishing up a scoring system for an Observed Motorcycle Trials Series. Our first event is March 28th and will see how it works in real life. I had some beta testers finding bugs and other unintended consequences and I think we are ready. I had lots of help from a PW forum member and am still tweaking some features. I had spent some time switching the templates over to a bootstrapped template but found my CSS tables I was using just didn't render well on mobile devices so I went back to the original template styles. Waiting to start a restaurant site using PW with a online reservation system.1 point
-
Yeah flexbox would make it a lot easier.1 point
-
1 point
-
Inkscape works nice with svg. https://inkscape.org/en/news/2015/01/12/svg-working-group-report/1 point
-
Take a look at this thread, it's about timespamps, but these are integers, too. https://processwire.com/talk/topic/7918-find-most-efficient-solution-for-storing-multiple-values-in-a-field/1 point
-
Hi @palacios000! What @kongondo said. I use the 'context' dropdown for two things: 1. to make my backend template forms look nice and compact, and 2. to reduce the amount of fields I need to use and create. I will explain this one because it is probably the most useful. So instead of having these fields and titles in these templates: Template: Houses with fields: house_address (label: House address) house_available (label: House available?) housing_development (label: Housing development) Template: Flats with fields: flat_address (label: Flat address) flat_available (label: Flat available?) building_name (label: Building name) Template: Mansion with fields: mansion_address (label: Mansion address) mansion_available (label: Mansion available?) mansion_name (label: Mansion name) I can do this: Template: Houses with fields: address (label: House address) available (label: House available?) name (label: Housing development) Template: Flats with fields: address (label: Flat address) available (label: Flat available?) name (label: Building name) Template: Mansion with fields: address (label: Mansion address) available (label: Mansion available?) name (label: Mansion name) I use the same three fields for slightly different things on different templates. This is helpful because when I'm writing code where, say, I want a list of all properties, I only have to call three fields. Does this make sense?1 point
-
Here's a nice little PW story. Working on a large-ish PW site at the moment. I'm not dealing directly with the business owner right now. Rather, my contact & client is a friend of the business owner. Having provided him with login details and a PW admin account, we agreed that the business owner should not yet be given login details. We've a few months before training is supposed to begin and site needs a little back-end housekeeping. IE fields need to be labelled correctly templates named more sensibly etc. I discovered recently that the business owner had prematurely been given login details and is already making content changes. This is so contrary to my client experiences with other CMS's that it's cheered me right up. Normally, even after extensive training, clients can choose the wrong templates have problems uploading and adding images generally have *some* issues adding content This is not a fault of the client but rather a problem with the CMS thats built for technical end-users instead of content editors. It just confirms to be completely why PW is the right CMS for this site. And BTW, the business owner isn't very tech-savvy and has never used a CMS before.1 point
-
title inspiration TL;DR Unless a last bit of checking I am doing over the next short while concludes otherwise, I am going to convert all my sites to run from httpS connections <del>and ensure all the certificates I use are of type SHA-2 not SHA-1</del><ins>and later on ensure all the certificates I use are of type SHA-2 not SHA-1</ins> Dull detail I amy be wrong about a little or a lot of this stuff so please check my facts before you rush off and do stuff, but, I've learnt some new stuff over the last little while and thought I'd share with PW friends in case it's of any help. The following is just a bunch of things that I believe are correct and that may be helpful, sorry I had no time to write it up into a nice article/post: Google preferring websites that serve their pages over httpS connections (so clearly it's a good idea to make a website deliver pages over httpS) source many of the the companies selling certificates are selling SHA-1 type certificates rather than SHA-2—I (I bought two in recent months from different suppliers and they are both SHA-1)—want to test a site's certificate? Check out https://shaaaaaaaaaaaaa.com/ (even tho the URL looks mad I believe it's good and comes from this authoritative looking source: https://konklone.com/post/why-google-is-hurrying-the-web-to-kill-sha-1) Google are gradually sunsetting SHA-1 (in favour of SHA-2) Microsoft, Chrome, and Firefox all recently deprecated SHA-1, and plan to turn it off in 2017. source x1 point
-
http://tjmahaffey.com/blog/cron-legacy-scheduling-a-mysql-query/ "cron-legacy-scheduling-a-mysql-query" is not a url segment - it is a child of the blog page. All you need for that is to echo $page->name Nico mentioned this above already. URL segments are extra paths added to the url as a way of passing values to the page. Instead of: http://tjmahaffey.com/blog/cron-legacy-scheduling-a-mysql-query/?boolean=true&this=that echo $input->get->boolean; // true echo $input->get->this; // that You can do: http://tjmahaffey.com/blog/cron-legacy-scheduling-a-mysql-query/true/that/ echo $input->urlSegment(1); //true echo $input->urlSegment(2); //that1 point
-
@Gerhard, Note I am also new to Fieldtypes so, you may want to thoroughly test/validate, etc the attached. I have customised (mainly just commenting out stuff actually ) the FieldtypeEvents to only save timestamps (1 column table). As was native to FieldtypeEvents, each timestamp on a page is saved in its own row in the DB. Although I have also included the inputfield, you have several options: disable its page visibility in the template field visibility settings; disassociate it from the FieldtypeTimestamps Class and not install it or install it and use it to also have a visual view of the timestamps. You also get the nice jquery 'delete' or 'delete all' timestamps (events). If you don't want to install the Inputfield, you will also have to comment out/remove the method getInputfield() from FieldtypeTimestamps.module. Adding timestamps via API As shown here adding items to the Fieldtype via the API is quite easy (similar code exists in the the ___processInput() method in the InputfieldEvents (in the attached this is InputfieldTimestamps). $times = array('1521884800', '1721884800', '1571884800');//these can also be other valid PHP date/times, e.g. 20-10-2007 $page->of(false); foreach($times as $t) { $timestamp = new Timestamp();//this is the Class Timestamp found in Timestamp.php. Included via FieldtypeTimestamps. $timestamp->date = $t; // note stored in column 'data' in the db of the Field $page->timestamps->add($timestamp); } $page->save(); $page->of(true); To output timestamps using API foreach ($page->timestamps as $t) { echo "<p>Date: $t->date</p>"; } Finding items via API See Ryan's example here; I didn't check if it needs tweaking. Other things to note You can change the Inputfield to show timestamps rather than the date - InputfieldTimestamps.module lines #32-33 Currently the time format is hard coded as d-m-Y in Timestamp.php line #9 Left the commented out stuff in there...you can clean them out if all goes OK FieldTypeTimestamps.zip1 point
-
Some time ago, while debugging a misbehaving site, I found out that one user had a habit of hitting shift + enter at the end of each line in the editor. That made sense as an attempt to gain more control over the typography, but it also explained the situation.. especially since the site in question was responsive. Making each <br /> visible could've prevented that whole mess -- or at least made it easier to understand why it was happening1 point
-
Looking at it from an 'awareness' angle i actually really like the way you've done it. Education wile you make and edit content.1 point
-
1 point
-
1 point