Jump to content

Leaderboard

Popular Content

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

  1. Happy New Year! Here's the ProcessWire 2016 roadmap: https://processwire.com/blog/posts/happy-new-year-heres-a-roadmap-for-processwire-in-2016/
    21 points
  2. Hello and happy new year to everybody This little module adds an unselect button to PageListSelect. You can define to which PageLists the button is added via module config (CSS selector). it solves this issue: https://processwire.com/talk/topic/9677-unselectclear-button-for-pagelistselect/ https://github.com/BernhardBaumrock/PageListSelectUnselectButton Changelog: v 2.0.0 - added support for ajax loaded fields including repeaters - added sanitization for the jquery selector
    8 points
  3. ** replaced with this: https://processwire.com/talk/topic/11817-module-adminhelp/ ** This is a new module, work in progress/alpha (not for use on live site): [github link deleted] AdminDocsTab module for ProcessWire Processwire helper modules for managing site documentation. Instructions This is a helper module which expects you to have already setup a hidden part of your page tree to establish your documentation, using any template (e.g. 'docs') and a body field (ckeditor). The docs template does not need to have an output template, as the module will only echo the body field inside the admin. In addition this 'docs' template will require a template select field (separate module: FieldtypeTemplates) which should be named template_select. Once you have setup your docs template, template_select field and some docs pages, you should install the AdminDocsTab module, then select the template(s) to show the docs on, as well as the root page of your docs. At this point the 'Docs' tab should show up for the relevant template (as specified in the Doc), and show the docs that have that template specified. To have a global docs overview page (e.g. 'Docs'), which renders all of the docs in an accordion view, you can install the ProcessDocsView module, which will setup a page to view the docs (under Setup).
    6 points
  4. This post has had an inexplicable surge of Likes over the past few weeks so there seems to be quite a bit of interest in this 7 months later. I've been unable to follow these concepts up with the time they deserve but those interested in an mage field tidy up can see Toms own beautiful work mentioned on the Dec 18 blog post. Furthermore, Ryan mentioned in today's Roadmap blog post that these (Tom's) designs are already being worked on by LostKobrakai. Exciting stuff!
    2 points
  5. Nothing better to cure The Erector Set than the PW roadmap for 2016! Everything looks so exciting, thanks for the great work! I look forward to keep developing and contributing to the community this year, it's included in my new year objetives Happy new year!!
    2 points
  6. This is a reworked website of Imre Baksa, a Hungarian actor and director. His former (static) website was also made by me back in around 2009. He asked me to do a redesign but I decided to involve ProcessWire to make content management easier. http://baksaimre.hu/ Lesson 1: templates - no thanks It is tempting to use ready-made templates for a project because most of the work is done, there's some tweaking here and there and mission completed. Okay, this is the theory. I have to admit that I have never found a suitable template/theme for my projects, but being a web designer this is the way it should be, I guess. This time I found one that looked fine: Landed from HTML5 UP. In fact there was a self-made design for the site and this template looked 90% similar, so it really seemed to be an easy task to bring it into ProcessWire. Soon turned out that some of the fancy features of the template required advanced JavaScript knowledge. That means, I had to dive into it and learn how it worked. I did so and I was able to tweak things then, but I wasn't satisfied with the outcome. So I went back to the drawing board and dropped the template. This experience reassured that starting from scratch would have been a better choice on the long run. The good thing is that I learned some new things that will come in handy in the future. Lesson 2: template engines - Latte is still my best friend I was using Nette's templating engine, Latte in previous projects and I liked it a lot. It is similar to Twig, which is more widespread, so I decided to try that for learning purposes. This sounded like an easy journey because ProcessWire supports Twig through modules. However, at the end of the day I sort of regretted that. Latte has some small helper features that makes templating easier, and these differences made up a huge difference. Maybe I'm getting old but I felt Twig more of a nuissance after Latte. Finally I got rid of Twig and I guess I will never look back I will keep using Latte in the future even if I have to bootstrap it manually. Lesson 3: frontend development is hard Having ProcessWire at hand, backend is the minor part in web development, at least in smaller projects. I've used only a few jQuery plugins but making them work together nicely was a real challenge. At the end I had to make a compromise by removing SmoothScroll because it didn't work well with JScrollPane. Even so, I had tough times to eliminate content "jumps" when a lightbox is opened, and to make JScrollPane work the way I wanted to work. Making the whole thing responsive added another level of complexity as features needed to be destroyed/reinitialized on different screen sizes. I like to polish things as much as possible but the current state of the web makes it almost impossible to reach certain level of perfection. Moduling up This was the project where I felt that a link checker button would be helpful so started to develop InputfieldURLChecker. I use this in a few projects and it does the job nicely. My other pet PW module FEEL also got some polish during site development. For site-wide settings I used MultiValueTextformatter so I didn't need to create a field for every setting, just one for all. Other modules used: SEO: must have! Admin Template Columns for better admin layout Page List Image Label: to add featured image to the list of pages in the admin Pageimage Remove Variations: remove unused image variations Forms: one step closer to simpler form processing For the contact form I used Nette Forms, because it is so easy to add forms to the site with it, with frontend & backend validation in one go. Processing them still needs some sweat, but this time I finally put together a class to make this easier. Surely it still needs some iterations but it's a huge help: it takes only a few parameters to save submissions as Pages or send email to the admin or the visitor. For email templates I also used Latte (what else? ). I also created a "json_storage" field to store submission. The beauty is that while it's only one field (a textarea), in the admin it is displayed as formatted key-value pairs using a hook. Summary The site looks fresh and the year knob on the left makes it fun to use. Content management is easy as 1-2-3 thanks to ProcessWire, even if it's mostly me who will deal with the updates. While it's not visible on the site, in the background there are many improvements to my development tools and workflow that will be of huge help in the future.
    1 point
  7. Great work Bernhard! I think this should be in the core!
    1 point
  8. Pretty cool! It even has a "confirm" button, nice touch.
    1 point
  9. i put together a small module for this: https://processwire.com/talk/topic/11805-pagelistselectunselectbutton/
    1 point
  10. Happy New Year from my side too and many thanks to everybody in the Forum especially to Ryan, always one step ahead!
    1 point
  11. Glad you got it sorted. Looks like the new year is starting off well.
    1 point
  12. Dear All, I simplified the method above, and instead of using the figure / figcaption method, I used a single <div> with the class "caption_left". Then, I placed a <br> code after the image, and pasted the caption after that -- all in the same div. It seems to work quite well in FF, IE, Chrome, and Opera, except that the width of the div has a delay in its adjustment until the image fully loads. I used a combination of CSS and JQuery code to make the div width the same as the image, so that the captions would follow the image width. Because there's no child div to mess with (i.e. figcaption), the vertical div overwrite issue is no longer a problem. Here's my code. CSS: .caption_left { float: left; max-width: 50%; height: auto; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 0.7em; color: #003333; font-style: italic; font-weight: normal; text-align: left; line-height: 1.5em; margin-right: 10px; } JQuery: <script> $(window).load(function() { $(".caption_left").each(function(){ image_width = $( this ).find("img").width(); $( this ).width( image_width ); }); }); </script> [EDIT] Because I have both a caption_left and caption_right style, I changed the JQuery to use a wildcard for "caption_": <script> $(window).load(function() { $('[class*="caption_"]').each(function(){ image_width = $( this ).find("img").width(); $( this ).width( image_width ); }); }); </script> [END OF EDIT] [sECOND EDIT] I used the above method on a complex page of images with long captions, and sidebar divs which had images and captions inside them. All worked well, except that at the end of the image resizing, my page had blank spaces at the bottom of the main content column, because the images inside the column had resized upward. Adding a window.resize command fixed it, thus: <script> $(window).load(function() { $('[class*="caption_"]').each(function(){ image_width = $( this ).find("img").width(); $( this ).width( image_width ); }); $(window).resize(); }); </script> [END OF SECOND EDIT] Then, in site/modules/InputfieldCKEditor/mystyles.js, I added the two caption styles so that I could easily apply that style to a div in the body field, into which I would add the image: CKEDITOR.stylesSet.add( 'mystyles', [ { name: 'Caption Left', element: 'div', attributes: { 'class': 'caption_left' } }, { name: 'Caption Right', element: 'div', attributes: { 'class': 'caption_right' } }, The only gotcha that I can see is that when the images have long captions, the div widths take a moment to adjust down to the image widths, after the images load. * Anyone know how to make that faster? * Any thoughts on the solution above? => I also noted that my previous figure/figcaption styling messed up the magnific-popup styles that I used, based on this post: http://processwire.com/talk/topic/5260-how-to-hack-core-or-hook-to-add-classinputfieldfilelink-to-inserted-images-that-link-to-larger-versions/#entry50703 ... suggesed by Martijn and Teppo. So, I deleted my figure / figcaption styles, and the popups went back to normal. Peter
    1 point
  13. Well, I do not even know what I am doing in front of the screen at this time..., but I must have drunk too much champagne anyway... so a little bit of ProcessWire template file building cannot hurt to much I suppose... So, where was I Sorry, it is off topic I know, but I wanted to reply to Ryan's suggestion, that calls this function in question as "wireTemplateFile()". When was it renamed to "wireRenderFile"? It is still called as "wireTemplateFile" in the comments, where it should be corrected I suppose. Oh, and in this changelog: https://processwire.com/blog/posts/processwire-2.5-changelog/ Other than that, I came up whit this version of the delayed output as my preferred one: in _main.php (which I renamed to _page.php) I have <?php echo $layout; ?> between the "header" and the "footer", and the actual template files do only this: $layout = wireRenderFile("layout/home.inc.php"); that is, they render the associated "alternative syntax style template partials", so this is similar to the simple direct output, but with the benefits of the delayed output. To much champagne in my brain, told you, sorry for this post, and HAPPY 2016 everyone!
    1 point
  14. In short: nearly nothing more! If you have an exact copy of your origin Database as second DB you only need to change the credentials in site/config.php to point to the dev-DB. Besides that, you should copy the index.php, .htaccess and complete wire and site folders to the dev.domain. That's it!
    1 point
  15. Thank you very much Cerulean (and the others too), the custom JS styles are exactly what I was looking for!
    1 point
  16. Hi Jones, and welcome to the forum. If I understand your question correctly, adding HTML markup within and SVG element is a front-end issue (therefore not related to ProcessWire) and quite a bit more complicated that it looks. There are, however, many references available from a google search regarding SVG <text>, or CANVAS, etc., which would be a great starting point for you. Since ProcessWire does not restrict you on what or how you create your user-interface, I would recommend you first create the front-end and get it working the way you desire. We could then help you with having ProcessWire manage that information. You will have to determine the best way to accomplish your goals, but you might look at either the TSPAN var text = svg.append("svg:text"); text.append("svg:tspan").style("fill", "red").text("hello"); text.append("svg:tspan").style("fill", "blue").text("world"); Or an foreignObject element: svg.append("svg:foreignObject") .attr("width", 200) .attr("height", 200); .append("div") .html("<span style='color:red'>Hello</span> <span style='color:blue'>world</span>!"); Or even an absolute-positioned HTML overlay. Edit: @Mods: Should this be moved to off-topic?
    1 point
  17. Just to expand on this a bit: unlike the standard CKEditor image plugin, the PW image plugin does not provide a text field where you can type in a class for the image. So you would need to add "img-responsive" to a custom JS styles set and apply the class to the image using the styles dropdown. Info on how to load a custom style set is here. If you want the "img-responsive" class to be applied to every image in your CKEditor field (so you don't have to manually add it to every inserted image) there are a couple of options: 1. Add the class client-side with jQuery. This is a nice easy option. For example if your body text is inside a div with the class "body"... $(".body img").addClass("img-responsive"); 2. A little more challenging but no big deal if you're comfortable with PHP... create your own text formatter module that adds the class at runtime.
    1 point
  18. Hello atar, and welcome to the forums! -- Don't worry about your English. Ask any questions you want and everyone will jump in to help. Edit: Misunderstood the question.
    1 point
  19. What @Martijn said....but I'll attempt a guess If you are talking about a HTML class to add to your uploaded images (uploaded in a page edit session) to target with your CSS, ProcessWire doesn't output markup so you will have to add those on your own at runtime, e.g. $out = ''; if(count($page->images)) { foreach($page->images as $image) $out.= '<img src="' . $image->url . '" class="myImageClass">'; } echo $out; If you are talking about images you insert in the RTE, you can use the RTE to add your classes Welcome to PW and the forums
    1 point
  20. Every now and then I'll run into a post where Ryan seems to be suggesting Repeater fields are limited in some way, or at least not as extensible as pages. I get that. But I've also seen mention that it's not always good to have too many repeater fields as it has an effect on database rows, or columns, or something like that. I understand this has something to do with the limitations of mysql databases, or something? I wonder if someone could tell me how cautious I need to be using Repeaters and what I should be bearing in mind. I seem to be using Repeaters quite a lot, mostly when I want a user to be able to add photos or files to a page, but I want the user to be able to also add information to that file, like captions or maybe have multiple formats of the same file.
    1 point
  21. Not quite.... Nope. Not really.... The most important thing to remember about repeaters is that behind the scenes, they are actually real pages (see /admin/repeaters). Not unlike the recommendation to be cautious with $page->children, if you have too many repeaters (and especially with lots of fields), you will be loading all of them into memory when you call the repeater. With $page->children, you can at least do $page->children('limit=20'); So, the issue is about memory/efficiency. Nothing to do with MySQL (which can easily handle millions of rows - of course, we don't load all of these into memory at once ). In conclusion, repeaters do not scale infinitely...
    1 point
  22. 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
  23. +1 for at least more integrated cropping. i agree that apeisa and horst did an awesome job on their modules but i don't think that should be a reason to not build this functionality into the core. i use those modules in every project and i really think that's a very common and core-worthy thing. thank you peter for your work on the mockups
    1 point
  24. Just to update on this issue, I tried on same host with setlocale (no language support installed) = same problem I tried it on another host (using setlocale and no language support installed) and it also outputs the dates in English. It’s definitely setting the correct locale, but the standard $page->date; field is always outputting in English and seems to ignore it. The only solution I could work out was to convert the date using strtotime and then format it like this <?php echo strftime("%d %B %Y", strtotime($page->news_date)); ?>
    1 point
×
×
  • Create New...