Jump to content

Leaderboard

Popular Content

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

  1. Since I was stuck to my flat today I took up a wish and rolled a Process module / CKEditor plugin combo that adds @-autocomplete like the mentions here in the forum to CKEditor fields. It's configurable, but only in module settings for now, the positioning of the select list is quite off and there's still some visual work to be done, so it is in early alpha state. Nonetheless, if you want to take a look, here it is: https://github.com/BitPoet/ProcessMention After installation, you may want to look into the "Additional selector" entry in the module's settings. You will most likely want to limit results to certain templates there. Edit: Updated to version 0.0.30 with fixed positioning of the dropdown. Edit2: Settings are configurable in field context now. If pwmentions is enabled, the according settings are shown on the "Input" tab.
    7 points
  2. Very, very alpha but working: https://github.com/BitPoet/ProcessMention
    3 points
  3. https://github.com/ryancramerdesign/regular
    3 points
  4. You can also use the following code in your site/ready.php: <?php if($page->template->hasField('name-of-your-ckeditor-field')){ $string = $page->name-of-your-ckeditor-field; //create string replace for blockquote $string = str_replace('<blockquote>', '<blockquote class="blockquote">', $string); //here you can add further manipulations.... //.............. //finally set the value back with manipulations $page->name-of-your-ckeditor-field = $string; } Replace "name-of-your-ckeditor-field" with the name of your field. In this case you can use the default blockquote button from CKEditor. Best regards
    3 points
  5. Yes, if you use my code a view posts above. It works as a textformatter and adds the class automatically on the frontend everytime you use the blockquote tag. You have only to click once on the blockquote button.
    2 points
  6. I don't think there's one. Google comes up with some interesting examples though (searching for CKEditor autocomplete or CKEditor mentions). Maybe some of the below could be a starting point? https://ckeditor.com/old//forums/CKEditor-3.x/Get-current-word-and-display-auto-complete-options https://stackoverflow.com/questions/28377886/autocomplete-lists-in-ckeditor https://web.liferay.com/fr/web/jose.balsas/blog/-/blogs/new-feature-for-liferay-7-autocomplete-lists-in-ckeditor https://github.com/liferay/liferay-portal/tree/00f84a16ac1740dc7c2f5fd8efa2fa3c5b4a8b55/modules/frontend/frontend-editor/frontend-editor-ckeditor-web/src/main/resources/META-INF/resources/_diffs/plugins/autocomplete http://navalgandhi1989.github.io/ckeditor-autocomplete-suggestions-plugin/ (a ready made plugin; demo didn't work for me) https://www.sencha.com/forum/showthread.php?291551-How-do-I-implement-autocomplete-as-I-type-in-a-textarea Rather than querying the server every time via Ajax to get suggestions, you could cache the suggestions client-side (in a hidden HTML element, local storage or JS config)
    2 points
  7. A lot of interesting ideas here. Nevertheless, I'm a bit nervous, because I hoped to see a focus on critical features missing when building larger websites, with full-fledged editorial teams (larger teams, with copy editors and editors, designers, ...). Think about editorial flows: Of course there are already helpful parts available, e.g. ProDraft. But it would be a big help to have page versioning in core, and collision detection! And think about teams with specialists for different work areas: Photographers and photo editors, who upload files into a central media repository and categorize them, so that editors have a logical place to search for article images, headers. To find an unique image language, sometimes with repeated use of some of the images. To publish in this way is a difficult process. Not something that could easily get replaced by AI. It's a special kind of work of human beeings, who like to be creative and want to get technical support in a way they understand and they need. They want to have access to large galleries that they can filter. To look at their selections in a preview, that shows teasers next to the others in the area concerned. To get an impression how it works, how images works with headlines, and teasers works beside their neighbors. And publishers like to see reasons to have confidence in the scalability and further development of key features for their workflows, their cms. Therefore it seems to be important to have a, in this regard fundamental, set of key features for larger publishing teams available, in a quality and with support, that creates trust in pw as a solid and future-proof platform for larger projects. I understand the difficulties and I know some of the arguments regarding versioning, or for one-page-one-image workarounds (against a central media management). But I'm not convinced by these arguments. More in detail, regarding the media management question. I think the maybe best way to achieve a pw kind of a media solution wouldn't be a central, fixed media library, but to build something like a central media archive out of pages – but with multiple images per page, selectable from an image field, like images of other pages are selectable from ckeditor fields. And yes, I know that there are modules that try to offer such a solution. So maybe it's not too difficult to come to a solution in technical terms. However, it makes a difference to see such a module and such a workflow as a well known and documented way to build a reliable media management, to know it as a part of trying to establish pw as a solid alternative for building larger websites with larger teams. Similarly regarding scalability questions. We have $config->pagefileExtendedPaths. But is that thoroughly enough tested that we can say we can definitely count on it? Does template cache work with it or not? (I wasn't able to test it out by myself.) Ryan wrote 2014: "Will have to revisit that with a similar solution to the files at some point in the future". (https://github.com/ryancramerdesign/ProcessWire/issues/432) If we could clarify this question, that would be very good. I mean, a good thing for the ProcessWire 2018 Roadmap. And last but not least: official NGINX support. To be clear: I'm not concerned to criticize any contribution to the roadmap, or have anything to complain about pw. On the contrary, I hope it will be possible to advance pw. But I think it would be a good idea to focus on critical areas regarding the use of pw for larger projects, for larger editorial teams. Decisions regarding a publishing platform depends on features we can offer, but not in a simple way, that we just could show this or that functionality. More important, I think, is to give a perspective that creates confidence in serious steps to build reliable tools, to enable reliable workflows for demanding tasks of teams, i.e. to establish pw, even for more complex teams of editors and for larger websites. This is a lesson to learn from the development of Craft. Of course, it doesn't make much sense to compare the projects, and to compare them is not my point. Success in one way or another not always depends on resources. Sometimes it's more a question of clarity and organization – sometimes success depends primarily on focusing on key issues. Although the basic requirements are very different, in many cases pw is a valuable solution right now. But it would be good to find the critical questions that the project should face, and to leave less important ones aside. EDIT: A short note regarding the NGINX question, apart from posts in the forum there's an older, very simple attempt on howtoforge, https://www.howtoforge.com/running-processwire-on-nginx-lemp-on-debian-wheezy-ubuntu-13.04. And an article about installing pw 3.0.62 on Ubuntu 17.04/17.10 with NGINX, https://websiteforstudents.com/install-processwire-on-ubuntu-17-04-17-10-with-nginx-mariadb-and-php-support/. Just as an example what a useful approach could look like: https://github.com/nystudio107/nginx-craft Would be great to achieve something like that for pw, with special consideration of ProCache.
    2 points
  8. Add Image URLs A module for ProcessWire CMS/CMF. Allows images/files to be added to Image/File fields by pasting URLs or using the API. Installation Install the Add Image URLs module. Configuration You can add MIME type > file extension mappings in the module config. These mappings are used when validating URLs to files that do not have file extensions. Usage A "Paste URLs" button will be added to all Image and File fields. Use the button to show a textarea where URLs may be pasted, one per line. Images/files are added when the page is saved. A Pagefiles::addFromUrl method is also added to the API to achieve the same result. The argument of this method is expected to be either: a URL: "https://domain.com/image.jpg" an array of URLs: ["https://domain.com/image1.jpg", "https://domain.com/image2.jpg"] Example: // Get unformatted value of File/Image field to be sure that it's an instance of Pagefiles $page->getUnformatted('file_field')->addFromUrl("https://domain.com/path-to-file.ext"); // No need to call $page->save() as it's already done in the method Should you have an issue using the method, please have a look at the "errors" log to check if something was wrong with your URL(s). WebP conversion The core InputfieldImage does not support images in WebP format. But if you have the WebP To Jpg module installed (v0.2.0 or newer) then any WebP images you add via Add Image URLs will be automatically converted to JPG format. https://github.com/Toutouwai/AddImageUrls https://modules.processwire.com/modules/add-image-urls/
    1 point
  9. This week I got kicked out of my office, by weather, a furnace, and kids. So I don't have a blog post or a version update, though I do have a lot of work in progress that you'll see next week (including an item from last week's roadmap that I think you'll really like). It's been below freezing all week, and our furnace stopped working, so now there's no heat. Something called the heat exchanger cracked, and it looked like we were going to have to get a whole new furnace. But then we learned that the one we had was still under warranty, so the manufacturer is sending a new one, but it'll take a week to get here. Luckily we've got coats and a fireplace, but houses here in Atlanta really aren't built for the cold, so it's pretty frigid at a little over 50f (10c) indoors. I hadn't really planned on typing this much, but it's keeping my hands warm, so I'll keep going. It started snowing, which is something that doesn't happen often here. It was enough cold, snow and ice that the kids school was canceled for much of the week. So I've been having fun keeping an eye on them, but it's a challenge to keep a 7-year old and 4-year old occupied and away from TV. I grew up in Minnesota, so admittedly a part of me enjoys the cold and the snow. But unlike in Minnesota, snow in Atlanta pretty much shuts everything down. In this case, it's also been so darn cold that everyone is frozen after 10 minutes outside, so nobody wants to go out there. Today is the first day where things are starting to warm up, hopefully a trend. When I say the weather kicked me out of my office, I also mean literally. The day it snowed, water started dripping out of the office ceiling, right onto my head, which is... not what you want to see. There was no entry or access to the space in the ceiling for me to get up there and see what was going on. So I had to cut open the ceiling drywall to get up there and have a look. After making a big mess, I got up there and shined a flashlight around, the scene was surreal. It was a 2 foot high attic crawlspace full of snow, with some snowdrifts nearly a foot high. That answers the question of where the water came from… overhead lights produced heat, melted the snow, and it poured into the office. But how the heck did snow get into my ceiling? And how do I get it out of there before it all melts and destroys my office? As it turns out, the day it snowed was very windy. Structures around here have something called ridge vents at the peak of the roof. They run the length of the roof and vent hot air out during the summer. But if you get the right combination of wind and snow (like sideways and upwards blasting snow) it can get into the ridge vents, and into the attic… so I've learned. The conditions must have been perfect for it, because a whole lot of the snow got in. I've never seen anything like it, and hope I don't ever have to again. I ended up spending a day carefully crawling around on joists every 16-inches in those tight and completely dark quarters, trying to get the snow out of the ceiling and insulation. With a flashlight taped to my head, toting around buckets of snow on my hands and knees, I looked pretty ridiculous. Over a day I filled several big buckets full of snow and got it out of there. It was a pain to clear it out, but certainly much better than having it melt through my office ceiling. It's not been warm enough yet to know how much snow I missed (and will melt through), but with any luck, what's left will just evaporate. That was this week's adventures, which admittedly had nothing to do with ProcessWire, but that's why this isn't a blog post. Coming next week: a new PW version (with some exciting updates), a new blog post, and hopefully a new furnace.
    1 point
  10. Well I was trying to say if the new page is not a calendar-posting or a community-event then return. But I guess I have my operators wrong? && seems to work. Thanks rick - from a fellow Texan!
    1 point
  11. On this cold and rainy weekend in Switzerland, I was trying to learn something about Processwire modules. "Page Draft Control" seemed an ideal starting point, because it has not so many lines of code and looks rather abandoned. While trying to understand it, I've added some code. For me the result looks quite usable, but I am very open for any suggestions, about what could be done better theoretically. I'm not going to further develop this, because there is ProDrafts if you need something perfect. Processwire modules and "ecosystem" are really great. Thank you.
    1 point
  12. What you notice is the default behavior. I've never heard one of my users complain, but I think you have a point here. It would be better if this (just visually) "move" wouldn't take place. It's quite irritating and somewhat annoying one must reload the browser to be sure. I guess it's hard to fix, because the drag and drop move is made by JS, which isn't aware at that moment that some permissions shouldn't allow this.Maybe @ryan can re-think about it? I would be glad if you could fill in an issue report.
    1 point
  13. You could try: Uncommenting this line in your .htaccess: https://github.com/processwire/processwire/blob/master/htaccess.txt#L92 Delete site/assets/cache folder contents Check site/assets/logs for additional hints what went wrong Check $config->httpHosts in site/config.php As a last resort, find out which version you had installed, and overwrite the entire wire folder with the same version. (use $config->version somewhere in your templates to find out which one you have installed). Backup the old wire folder (rename it), just in case. e.g. if you had v. 2.6.1, grab the wire folder from here https://github.com/ryancramerdesign/ProcessWire/tree/2.6.1 And finally... you could download the entire site, clone the DB, and try to make it run locally. But this shouldn't really be necessary.
    1 point
  14. The mixture of namespaced and namespaceless class names looks a bit worrying. Might be an incomplete update (through FTP?) since InputfieldPassword seems to be namespaced but Functions.php not. I'd download everything to a local machine, get things running there, update that copy to a halfway recent PW3 version (>= 3.0.33) and see if that helps.
    1 point
  15. It's a little bit more involved that just "opening a file manager on a URL", since you have to get the necessary information back to PW, tell it to download the image in question and add it to a page field. Here's a small module that can do that, but it's little more than a starting point (no checking of that image is already there, for example, no live updating the image fields in the page editor) and that requires a rest api plugin on Zenphoto's side.
    1 point
  16. Nothing extra is needed to achieve this. If you create a page that has the same title as another page under the same parent then by default PW will automatically add a digit to the end of the page name to make it unique. Unless you have a need for something different it's best to just leave it at that. But if you want to prepend the page id to the page name you can do it with a hook in /site/ready.php: $pages->addHookAfter('saveReady', function (HookEvent $event) { $page = $event->arguments(0); if($page->template != 'blog-post') return; // Only for the blog-post template if(!$page->id) return; // Skip pages that are brand new and aren't yet populated with data // If the page name doesn't start with the page id if(strpos($page->name, (string) $page->id) !== 0) { // Prepend the page id to the page name $page->name = $page->id . '-' . $page->name; } });
    1 point
  17. Whilst you’ve got cold temps and snow, we’re in the last stretch of what’s been a week-long heatwave here in SA’s highveld. Upwards of 30°C (estimated, real-feels were up to 37°C) since Monday. Next week shall cool down considerably, apparently, and very much hopefully.
    1 point
  18. hmmm... down under we had 40c for two days it was really hot and dry
    1 point
  19. Most likely explanation is that the page path or ID that you are saving to session is correct, and that it simply is the 404 page that is being loaded. Maybe you have removed view access for the guest role on one or more templates, and have the "Show a 404 page" option selected? Incidentally, an alternative to what you are doing in _init.php is to select the option "Redirect to another URL" to redirect to your login page, and pass the ID of the page that the user attempted to access in a GET variable. So something like... /login/?return={id} ...then you look for the return variable in your login template and redirect back to that page after login.
    1 point
  20. 1 point
  21. I agree it would be handy, but that would be a completely different thing to what this module is doing. This module is essentially just using Pageimages::add() on the submitted URLs, and that method has no support for clipboard data. I don't think I want to disappear into the browser clipboard rabbit-hole with this module. I'll have a think about it. It would make the module significantly more complex and I'm not sure how much time I want to put into it. Maybe if I get bored sometime...
    1 point
  22. 1 point
  23. Really useful module I consider to be this one, I have done something similar on one website but was not as elegant as this one. Thank you for your work.
    1 point
  24. I try my best Version 0.1.1 is on GitHub and should be picked up by the module repository soon.
    1 point
  25. Alan, I assume that you're talking about these differences: Textile <p>...wherever you’re going...</p> TinyMCE <p>...wherever you're going...</p> This difference does not occur because Textile tries to be smart about numerical entities, but about typographically correct quote characters. Textile automatically converts " and ' characters into curly quotes, which is what you see here. TinyMCE simply uses whatever you type. Remember, Dean Allen once was a book designer by profession - which shows.
    1 point
×
×
  • Create New...