Jump to content

horst

PW-Moderators
  • Posts

    4,088
  • Joined

  • Last visited

  • Days Won

    88

Everything posted by horst

  1. @desbest Uhm sorry for any confusion. @flydev is right. Welcome back to PW and the forums!
  2. New? You joined the community in Oct. 2013
  3. Simply said: YES! There are more then one, but ... The biggest point is, that you don't need any module to run complex sites and very complex sites with PW. PW at first is a framework, and then a CMS on top of that framework. I can put all my application logic into template files and the site/init.php, site/ready.php and site/finish.php via hooks. No need for modules at first place. So, in a second place, modules also can be very valuable. We have some of them in the directory. And of course, PW 3 should be able to run with most of them, at least if there is stated that they are compatible with PW 2.7. As a side information: The modules do not belong to the PW core. Most of them, (if not all minus ryans personal modules) are from "third party" authors. So, as of now, PW 3 is DEV-branch, and most of the modules authors simply haven't updated their module directory entries. But this is not that relevant. If you are interested in using a module with a PW version that is not listed there, you can ask in the dedicated support forum thread of that module. Here you normally will get fast answeres, I believe. But now to the biggest second point, why it is useful to use PW 3, when most of the modules in the directory stated as not compatible with it: https://processwire.com/blog/posts/processwire-3.0.14-updates-file-compiler-fields-and-more/ PW3 has a file compiler for template files and modules, that in 99% of the PW 2.7 modules simply make them compatible with PW3. Nice eh? (And if you are unsure, ask in the dedicated support forum thread) Thank you for reading and enjoy PW3, (or what ever you like)!
  4. It all depends on name formatting of the old crop variations! Please, to be sure, can you give one or two examples of the filenames (original image + varition name of the crop)? Also, how do you call them in templates. (with the older CroppableImage and the CroppableImage3, we use $image->getCrop("suffix")). I'm sure, we will find a practicable solution, but want to be thouroughly and careful. EDIT: How many cropsettings / thumbsettings are defined with a typical field in your sites? Can you post an example of the textarea content?
  5. Do you know if there is a high setting allowed for timeout on this host? If so, you may try to temporarily add a line into your site/templates/admin.php (before the controller.php) $timeLimit = 60 * 15; // sec * min <= adjust to your needs set_time_limit($timeLimit); ------- In general, you also simply can copy all files to a new location. You then will need a mysql dump too. If you have no other tool at hand, you simply can install the PW module ProcessDatabaseBackups, before you do the copy. Create a full backup from within the PW admin, before you copy the files. The backup can be found under site/assets/backups/ database/...
  6. Some years ago, (maybe 10 ?), I worked with a nice and useful tool: Tiny But Strong. It is a OneFileTemplatingEngine in PHP, with 1 PHP-class, 6 methods and 5 properties. If I recall right, I was able to do every thing with it. Besides Tiny But Strong, it also was Simple And Easy To Use. It is under constant development / maintenance since 2004!
  7. Hey @Manu, welcome to the forums. Have you already read / tried this troubleshooting guide? http://processwire.com/docs/tutorials/troubleshooting-guide/ What have you done to solve your first issue?
  8. Another approach, what works automatically everytime, and without additional support, (updating version numbers) can be: $timestamp = filemtime($config->paths->templates . 'scripts/myJsFile.js'); $myJsFile = $config->urls->templates . "scripts/myJsFile.js?ts={$timestamp}"; $config->scripts->add($myJsFile); I'm to lazy to add version numbers to all and everything. Also, last modified filetime is foolproof, not updated version number is not.
  9. It isn't designed to support this. But I also don't see much disadvantage for this usecase. Lets assume the width you want to support is 1400, 960, 480. Setup the image field with min-width: 1400 and min-height: 788 (= 1400 / 16 * 9) Create a cropsetting image16x9, call it with 100% quality as master-source for the variations $master = $page->images->first()->getCrop("image16x9", "quality=100"); $large = $master->width(1400); $medium = $master->width(960); $small = $master->width(480); Or directly use the markup srcset module from @tpr and only pass the master to it!
  10. You don't have to move files into templates folder. I have linked to solutions with template files stored in the modules folder already above: https://github.com/horst-n/LocalAudioFiles/blob/master/site-default/modules/LocalAudioFiles/LocalAudioFiles.module#L53 https://github.com/horst-n/LocalAudioFiles/blob/master/site-default/modules/LocalAudioFiles/LocalAudioFiles.module#L121 https://github.com/horst-n/LocalAudioFiles/blob/master/site-default/modules/LocalAudioFiles/view.php
  11. im not sure why it should behave that like, but have you tried to add "sort=-timestamp" directly to yout selector, and skip that extra step?
  12. Simply overseen this. I think, when adding a module to the directory, most inputfields get prepopulated with the github-data, where my name is "horst-n", because "horst" wasn't available. But I could change the module authors name to "horst". Thanks for pointing me to it!
  13. This is the version to stay. It is close to get stable 1.0.0 ! The quirks with the first tries in PW3 was mainly because of misunderstandings between Ryan and me when first time talking about the changes in core image field. And also because my insuficient knowledge of PW But know we have a solution that (only) extends the core image field with additional functionality. Possible changes, enhancements on the core imagefield will automatically inherited know, like it was with the versions before the core image change.
  14. small update to v 0.9.15 and its now approved and available in the modules directory: http://modules.processwire.com/modules/croppable-image3/
  15. You can configure CKEditor on a per field base. The forums are full of questions and answers. My own experiences are small. If I would use it on my own, and not for untrusted or tech-unsafy users, I simply would disable the ACF and the Purifier. But you also can add rules directly into the fields input tab under extraAllowedContent, what works well, if you define it right.
  16. As far as I understand, you want something like a teaser homepage? A collection (in boxes) of subpage summaries with a read-more-link? If yes, how do you have organized your (sub)pages? Where do they live in the page tree? Do they have different templates? What are the most important fields they have?
  17. I don't know this highlight.js, but if you need different classes for different code types, css js php etc, I would simply add those within [] right after the opening <pre>: <pre>[JS] This way you are able to add the css classes to the <code without any hassle: $search = array( '<pre>[JS]', '<pre>[CSS]', '<pre>[PHP]', '</pre>' ); $replace = array( '<pre><code class="jsclass hljs">', '<pre><code class="cssclass hljs">', '<pre><code class="phpclass hljs">', '</code></pre>' );
  18. If you don't want to change the formatting options from CKEditor, one solution could be to write a little Textformatter and add it to CKEditor fields that contain those code snippets. <?php namespace ProcessWire; class TextformatterCodeHighlight extends Textformatter { public static function getModuleInfo() { return array( 'title' => 'TextformatterCodeHighlight', 'version' => 100, 'summary' => '... ', ); } public function format(&$str) { $out = trim($str); $search = array( '<pre>', '</pre>' ); $replace = array( '<pre><code class="languageClass hljs">', '</code></pre>' ); $out = str_replace($search, $replace, $out); $str = $out; } }
  19. Uhm, - doesn't sound good. Transparency has made problems all the last twenty years with GD. I'm not sure, but maybe I have read something about that they have updated their Lib to support it. Maybe the version what is bundled with PHP-7 does support it now (?) <- Not sure on this. Other than that, I believe we can do nothing. (Using any function would result into the same)
  20. How do you have installed it? Was a previous version there before? If there is no Process installed, that could be because: the ProcessImageCroppable3 isn't installed or not installed correct. maybe it misses its admin page? Have you checked that ProcessCroppableImage3 is installed? Did you have under Admin > Pages > a page with title "Croppable Images 3", and what is its process and name?
  21. You need to call your modules config url via AJAX, check in the init or ready if it is an AJAX request, do the needed settings, (modify / save config?) and return back the resulting list B, or what ever you like / need to do. It is completly the same as you would do with any other HTML-page. There is nothing special for modules here. Only difference maybe the places where you check for AJAX requests and posted keys, and that your returns maybe organized in dedicated methods in your module. (Like it is done automatically with urlSegments in Processmodules ___executeMySpecialRequest()) public function init() { // or ready() $input = $this->input; if($input->post->mySpecialRequest) { $this->mySpecialRequestMethod(); } elseif($input->post->anotherSpecialRequest) { $this->anotherSpecialRequest(); } else { // all stuff for a manual and fully displaying of the config page ... } }
  22. For a croppable image edit page (the old modul version) opening in a new window is used: <a href="http://localhost/processwire/page/croppable-image/?filename=scheuermann_aussen.jpg&suffix=cropname&width=780&height=190&pages_id=1&field=header_images" target="_blank">cropname</a> Opening in a modal I now use: <a href="http://localhost/processwire/page/croppable-image-3/?filename=scheuermann_aussen.jpg&suffix=cropname&width=780&height=190&pages_id=1&field=header_images&modal=1">cropname</a> The page / croppable-image is a Processpage that get created during module ___install() routine.
  23. Somehow I had lost the permission settings during the rewrite. Also there were a chance for some interfere with the permission of the older Croppable module. Now I have fixed it with the update to version 0.9.14 But it will not update / correct itself, To get rid of the bug, everyone who has installed a version lesser than 0.9.14 should follow these manual steps: copy the module files >= 0.9.14 into site/modules/CroppableImage3/ goto admin > modules > site > ProcessCroppableImage3, open it, select uninstall and uninstall it now refresh the modules cache and install the ProcessCroppableImage3 open all your user roles that need edit rights for crop images and add the new " image-crop-3 " permission to them Ready! For fresh installs of version 0.9.14+, everything works out of the box.
  24. Same behave here, sorry. What I encountered in short, is: I get different color for the modal windows title bar (?), and it doesn't open the processPage. So, it is an access issue. I need to investigate further. ...
  25. Here it is working without errors. Also, the relevant part for that hasn't changed between the last versions. Maybe browser cache issue, or, if that doesn't help. Delete all files and folders under site/modules/CroppableImage3/ ... and copy a fresh one new Version into it, to make sure to have all the latest versions? I can switch force and back between the two modal windows multiple times, and I also can close it via the buttons and the X. I will test this and come back here, when done.
×
×
  • Create New...