Jump to content


  • Posts

  • Joined

  • Last visited

  • Days Won


Everything posted by blynx

  1. What about the database? Copied it? appropriate login/password?
  2. Hi all, thanks @PWaddict to look into this! Actually I'd like to fix this or enhance the module, but I can't find the time right now for that and will be away for a few weeks. .......... anyone who maybe wants to contribute on GitHub to include this case? ?? (https://github.com/blynx/TextformatterVideoEmbedOptions)
  3. Hi! It should be the "rel" attribute, but if it doesn't work anymore then YouTube has obviously changed their API.. ? edit: Ah, you are talking about the pause overlay ... yep, not sure about that atm. All documented attributes: https://developers.google.com/youtube/player_parameters
  4. Hi! Mh can't really tell from that screenshot. One thing I noticed by myself already is, that it doesn't seem to work when caching is turned on - but I can't find the time to work on it right now. : | Can you have a look into the markup and see what actually was appended, also which actual paths/urls are used which are failing here? cheers!
  5. Yep, stumbled upon gitkraken, too. I don't know - If I have the choice I prefer native applications / applications with a more native looking UI. That's also why I don't use GitHub desktop. ?‍♂️
  6. +1 for Tower! Switched away from Sourcetree because it requires an account now. For now, Tower/Sourcetree/... are easier for me to handle all kinds of git-things apart from simple commit/push/pull like for example: rebase, stash, squash, ... and it is visually nice. I also use vs code. It is still nice to browse diffs in it or just to have a convenient second place to commit/push.
  7. if($flip) { echo "H" } You are exactly right, I think you just miss a thought: The condition relates to the value of $flip. The value is either 0 or 1. And in PHP, 1 in a condition is “like” true, and 0 is “like” false. So $flip may be 1. In that case PHP will coerce it to true and finally print H because the condition is met. If $flip is 0, PHP will coerce that to false and print T because the condition for the if() was not met. So the else block is executed. Hope that helps?
  8. Hm, if you view a WordPress frontend with populated data and copy/paste the source you have more or less an HTML theme? Apart from that, there will still be manual work.
  9. Yeah, that was my idea first, too. Then I remembered the token field. But you can force login a user with the other approach. I think in this case the token is not really useful since you have to authenticate manually on every request anyway. The token is a prevention of CSRF attacks: https://de.wikipedia.org/wiki/Cross-Site-Request-Forgery. As I understand it correctly, it ensures that any potentially harmful request to the server is really made by you, the person using the website/app, and not someone else who might have tricked you to send a bad request. Any request is only executed if it includes the correct tokens. @monchu Mh, then it depends. I would not recommend this approach, because you would have to put the credentials into the script, since you cannot (don't want to) ask for name and password every time. I guess putting plain text passwords into scripts is not so cool. ;P But yes, it is “possible”. Otherwise, a simpler way would be to use a “supersecret-obfuscated-url”—while keeping in mind that this is just security by obscurity and in fact the url will be public. It might be just fine if the content is not “classified”-secret but just “it just should not be so easy to find”-secret. Make sure to exclude the pages from any sitemaps, etc. ... If you have some admin/ssh access to the server you could use scp (scp?, download file with scp) - using ssh authentication. Or any kind of secure command thing. sftp? Maybe even curl. Not sure ... I think it depends on what you want to achieve. Btw. I would like to put a little disclaimer here, that I am by no means a security expert - these are just pieces of my humble knowledge and please regard all of it just as hints for further own research! Anyone with profound knowledge is invited to complement and/or correct
  10. Hi, Regarding the shell script, I assume you are talking about curl and the like? I don't know exactly - haven't tried specifically this, yet, but I think this could be roughly the right direction. (Just some thoughts about how I would probably approach this taking the script direction) That page/template which handles the document could be an endpoint for a custom login-like GET request. In your shell script, promt for unsername and password and send them in the url parameters to that url via curl (using https these are encrypted). An additional parameter like “cli-document-request=1” could be handy to distinguish the different requests in your template. (web browser vs. curl). See if the login succeeds and deliver the contents of the file. You have to look up the exact curl command by yourself, I don't use it that often Random helpful stuff for inspiration: download with curl: http://osxdaily.com/2014/02/13/download-with-curl/ curl: https://curl.haxx.se/docs/manpage.html prompt for password, without echoing password: https://stackoverflow.com/questions/3980668/how-to-get-a-password-from-a-shell-script-without-echoing#3980904 https://askubuntu.com/questions/299870/http-post-and-get-using-curl-in-linux (aha, you can also “log in” with curl → I am sure there are even more advanced techniques using curl for a more proper authentication, but the above might be just fine.) hope that was helpful (If you have any more specific questions don't hesitate to ask) best wishes Steffen
  11. Let me be nitpicky here ... „no“ ... I would describe it like this: Responsiveness is a characteristic of the resulting website or app. It is achieved through technologies like CSS grid, media queries, Javascript, etc. etc. ... but indeed, CSS grids can make it extremely easy in certain situations to create responsive websites. The question regarding „bootstrap vs. css grid“ is not if any of them is responsive, but wether you want to do some work by hand and learn the underlying tech (no bootstrap) or you rather want to build a website relatively quickly with ready-made pieces of code (yay bootstrap).
  12. CSS grid is „just“ new CSS technology which bootstrap will most certainly adopt in the future - just like the newer frontend frameworks are using flexbox now. It allows some pretty neat and clever layouting. CSS grid, just like all other CSS (flexbox, float, etc, etc ...) is the underlying technology the frameworks rely on. It is roughly a matter of „will readymade feature X / Y / Z of bootstrap easen the development of the project“ and „which browser versions do I need to support at reasonable effort“ to decide on using frontend frameworks. https://gridbyexample.com/examples/ https://css-tricks.com/snippets/css/complete-guide-grid/ cheers
  13. Nice! But I wonder if the JWT are really necessary here—or why the implementation? Doesn't the server session / processwire handle that already?
  14. Hi! I am not an expert there, yet, but here is a nice general talk about writing modes. Maybe it helps - "generally". cheers The
  15. ah yep, noticed that the captions were missing the other day. Will look into it!
  16. Hm! This is weird - but it looks like a permissions problem on your side? I guess you can fix this by setting the file/folder permissions. I couldn't find anything wrong here at my place - is the folder name of the module correct? How did you install it? Sorry for the trouble - will have a closer look later the week Maybe try a fresh installation of the module for now -
  17. Although I don't believe this is would be coming any time soon, I'd just like to leave a note here that I would really really really enjoy sqlite for processwire very much. It would be so much easier to handle and synchronise smaller sites just by version controlling the files of the project. *sigh* ... could the FileCompiler offer a new approach on creating a universal compatibility especially for 3rd party modules?
  18. @JasonS Noooooo, I was afraid this would happen. It is fixed now! Sorry! Yep, that was a Tracy bd() call ... as a quick fix you may just remove that line ...
  19. Ok, so there is the new version out now which includes a gallery type like the ones in the medium articles. The whole module has been rewritten and I changed the way the galleries are rendered. Instead of weird template files the galleries are now modules which extend the MarkupPwpswpGallery module. Have a look at the readme for some more info. Everything should work just fine when updating despite the code changes. I build a gallery module which should ensure compatibility in case anyone was using her/his own template file. This is the new gallery type „Petersburger Hängung“ The inspiration for that type: https://github.com/SiteMarina/guggenheim The linear partition problem: http://www8.cs.umu.se/kurser/TDBAfl/VT06/algorithms/BOOK/BOOK2/NODE45.HTM https://github.com/crispymtn/linear-partition/blob/master/linear_partition.coffee#L11 (coffee script) Yet, I implemented a simplier and I guess faster algorithm: https://stackoverflow.com/a/6670011/3004669 Maybe I will implement the original algorithm, too, at some point. ...
  20. This sounds like you are looking for something like Repeater fields? There is the standard Repeater field included in the core - you have to install it under modules > core > Repeater. Check out Repeaters here: https://processwire.com/api/fieldtypes/repeaters/ And there is also RepeaterMatrix, but this is a pro module and costs some few $$. Don't know if you actually need it here ... But regarding where you put the code ... it doesn't really matter as long as you get along with it and it works for you. Processwire lets you do your own thing there. You will find out later if you could/should improve something.
  21. Where is the data from of which this list is made of? Basically „yes“ - put it into home.php if this is the home page. Maybe, depending on what the data is, you may want to check out the possibilities of the /fields/ folder and $page->render('field') (Check out this processwire blog post about that functionality) E.g.: In case these items are children of some page. Maybe like so: (assuming ) // assumed site structure -home [template: home] -portfolio [template: portfolio] -nice [template: project] -cool [template: project] -awesome [template: project] -... // templates/home.php <?php include('_top.php'); echo $pages->get('/portfolio/')->render('children'); include('_bottom.php'); ?> // templates/fields/children.portfolio.php <div class="portfolio"> <?php foreach($value as $item): ?> <div class="portfolio__item"> <h2><?= $item->title ?></h2> <img src="<?= $item->someImage->url ?>"> </div> <?php endforeach ?> </div> But there are many ways to do anything. See this as some inspiration. cheers Steffen
  22. That should work - but that would kinda eliminate the use of it for me. I Just try to find a way for others to make those kind of modules. So the interface should have been some guide for that. Butttt: Actually it's nothing big and I do hardly need it aaaaand: These submodules extend this one base submodule now which implements the interface already and therefore the functions are already implemented there and can be used by extending modules. So ... ... ... Ah, message incoming while typing ... thanks kongondo, but I think a problem like that was already solved. In the beginning I had a typo and got an error thrown that the interface was not found or something like that. Corrected it and the processwire module list worked fine. Then, the error occurred when installing the modules. So I thought when installing modules the main module is probably not loaded yet and the interface fails? The setup: MarkupTheModule -- is already installed and includes the interface MarkupSubmodule -- not installed yet, one of those submodules which can be used by TheModule, should implement interface MarkupSubmoduleB ... MarkupSubmoduleC ... ... #+ä+0ad ASdsdjfgs dgiguh aha. So I tested some things after I wrote down the setup and it actually works now. So I must have missed something. *blush* edit Mhm! Maybe what I was looking for are abstract classes ...
  • Create New...