Nukro

Members
  • Content count

    210
  • Joined

  • Last visited

Community Reputation

51 Excellent

About Nukro

  • Rank
    Sr. Member
  • Birthday 10/10/1996

Profile Information

  • Gender
    Male
  • Location
    Switzerland

Recent Profile Visitors

2,897 profile views
  1. Perhaps bootstrapping Processwire inside the Slider Script. https://processwire.com/api/include/
  2. - Are you trying to learn something new (programming language, framework etc...)? - Are you trying to refactor code from past projects where you have written "bad/not so good" code? - Are you asking other employees for work or if you can help at something?
  3. Interesting Conference / Talk from Rasmus Lerdorf, creator of PHP.
  4. @tpr On plainjs.com are many pure js sliders. Your Tiny Slider is also there: https://plainjs.com/javascript/search/?q=slider
  5. Hi Guys Since I nearly always needed a Slider for my websites, I've searched for a Slider which I could use for every Project or better said for different scenarios. So It had to be a rich-feature, responsive and customizable Slider which could be adapted/changed hassle-free to different needs of customers. In the end I found this nice jQuery Slider Plugin called "Slider Pro" (don't worry, it is MIT licensed ) which I think fulfills all expectations above and it also works very well for me. Perhaps it is also useful for you. Github Link: https://github.com/bqworks/slider-pro/ PS: What kind of Sliders are you using for your projects? Do you build your Sliders from scratch? Greetings Nukro
  6. Wow @bernhard what an impressive work! The developer heart is blooming.
  7. I had tried and it looks like it's not supported. There is no Detail Tab / Textarea or something where you can add the PHP Code. I came up with a workaround using InputfieldMarkup and Hanna Code Tags. But still, thank you for your Support @kongondo. Greetings Nukro
  8. Hi @kongondo Very Nice Module you have created here! I have a question, would it be possible to use this module inside the Formbuilder somehow. Is it even supported by the Formbuilder? Greetings Nukro
  9. You could also try something like that: $styles = array("class1", "class2", "class3"); $recipes = $pages->find('your-selector'); foreach($recipes as $key => $recipe){ $class = (isset($styles[$key])) ? $styles[$key] : "default-class"; echo "<div class='$class'><img src='{$recipe->images->first->url}'></div>"; }
  10. Hi @kongondo Have you found some spare time to implement this feature? Greetings Nukro
  11. I tried to make a function, which I can fetch translations from a page by it's name field. Features of the function: Fetches translations from page title (multilanguage). Outputs an edit link to the Translation Page (doesn't output it when 2nd argument is false) When the translation page you are referencing is not found, it outputs an error and also the absolute path to the php file were the function was executed by using debug_backtrace function of PHP. Benefits of this approach: You have full access to the ProcessWire API in terms of manipulating the translation data Translations of single Strings in different languages are side by side (tabs) Searching of single Translations is easy with Listers (I know search of site translation files is supported in PW3 but not in PW2, and I am using PW 2.7.3) Usability is far better since the users doesn't have to fiddle around in the system languages itself. Possible disadvantages: Little overhead when using the function, since it always loads a page behind the scenes when the function is used. (I had used 8-13 function calls inside a template file and doesn't had noticed any performance issues (bless processwire)). function _gt($key, $edit = TRUE){ $link = ""; $tracemessage = ""; $string = ""; $translationPage = wire('pages')->get("template=translation, name=$key"); if($translationPage->id){ if($edit && wire('user')->isLoggedin()){ if(wire('user')->isSuperuser()){ $editlink = " <a style='color:green;' target='_blank' href='".$translationPage->editUrl()."'>[Edit]</a>"; } } $string = $translationPage->title.$editlink; }else{ if(wire('user')->isLoggedin()){ $trace = debug_backtrace(); $tracemessage = "(".$trace[0]["file"].")"; } $string = "<span style='color:white;background-color:red;padding:5px;'>[Not Found: '".$key."'] $tracemessage</span>"; } return $string; } Example: echo _gt("akkreditierung"); echo _gt("fachgebiete-doctor"); And when it fails to find the translation page:
  12. Hi Guys I have a problem with the Code Internationalization (Site Translation Files) in Processwire. I am using the method Ryan is describing in this topic and also the normal way of translating files. The weird behaviors are that translations are just gone after a change in the main translation file called _strings (uses Ryan method). Or some other weird behavior was, that the english translation of the _strings file were somehow ported inside the german _strings file. I really don't know what could cause this. Have ever witnessed something like that? I have made some thoughts about this whole Code Internalization thing in ProcessWire and I am thinking to go another way (don't get me wrong, it's perfect for small to mid projects but in my opinion it is just a overkill for big projects), because at the beginning the strings we needed to translate were splitted up in many files which produced many site translation files to translate per language. It was just to much and confusing for the customer (and also for me), so that we needed another approach. So I tried Ryans method with one central translation files. The problem with this one is that it also gets confusing since it is a very big amount of strings to translate and also the problems described above. So for know I will try to make approach to store the strings in Pages. All translations of a string would be stored side by side. I know that this is probably more complex behind the scenes but it is far easier for the customer (especially with ListerPro). And I also like the idea of having the translations inside the DB instead in form of Files. What are your thoughts about it? Have ever done something like that? Greetings Orkun
  13. Hi @kongondo I have an suggestion about a new feature addition for replacing media. Would it be difficult to add a Message/Popup when the user is replacing media? At the moment it just replaces the media without a Warning Message or something like that. It would be a nice addition, since it is a risky move to let the users not know, that they have changed something, because they would replace media without noticing it. Also my customer become aware of this. Greetings Nukro
  14. @kongondo Sorry I somehow get confused now. To my understanding the pagefileSecure works like this: pagefileSecure ON (The news template for example, which holds the image/file field has view access for guest users activated) Guest User can't access unpublished/trashed image/document file with the direct url to it. Guest User can access published image/document files with the direct url to it. (the media-manager templates which holds the image/file field hasn't view access for guest users) Guest User can't access any image/document file that comes from the media manager with the direct url to it. pagefileSecure OFF Guest User can access any(published/unpublished/trashed) image/document file (also the ones from the media manager) with the direct url to it (also the ones from the media manager).
  15. Hi @kongondo Does the $config->pagefileSecure setting work with your module together? I tried it and it looks like it always blocks the access for guest users also when page(media) is published. From a blog post about pagefileSecure: I have the feeling that it blocks always because the media pages live under the admin where no "guest" user has access? Am I right? Would it be possible to write a hook or something to support the pagefileSecure together with the Media Manager pages/files? Greetings Nukro