Jump to content

gmclelland

Members
  • Content Count

    450
  • Joined

  • Last visited

  • Days Won

    1

gmclelland last won the day on February 14

gmclelland had the most liked content!

Community Reputation

339 Excellent

About gmclelland

  • Rank
    Sr. Member

Profile Information

  • Gender
    Male
  • Location
    Texas (DFW area)

Recent Profile Visitors

2,866 profile views
  1. You should be able to change it in your .htaccess file. Look at section #9 in the file.
  2. Here you go https://github.com/phlppschrr/TextformatterMakeLinks/pull/3
  3. @interrobang - can you try this regex? '~ \b([a-z]{3,}://[a-z0-9%\$\-_.+!*;/?:@=&\'\#,]+[a-z0-9\$\-_+!*;/?:@=&\'\#,])\b\/? | # Fully URLs \b(www\.(?:[a-z0-9\-]+\.)+[a-z]{2,}(?:/[a-z0-9%\$\-_.+!*;/?:@=&\'\#,]+[a-z0-9\$\-_+!*;/?:@=&\'\#,])?)\b\/? | # www. domains \b([a-z0-9\\.+\'_\\-]+@(?:[a-z0-9\\-]+\.)+[a-z]{2,})\b # email addresses ~ix' It looks like it works. All I did was add the "\/?" to the end of the first two lines. If it works, I'll make a pull request.
  4. I just remembered that Drupal has a URL filter built into core. Maybe we can somehow use it's code since it's been battle tested? ...with credit of course. https://api.drupal.org/api/drupal/modules!filter!filter.module/function/_filter_url/7.x - For Drupal 7 In the comments of the Drupal module, it interestingly states "Each type must be processed separately, as there is no one regular expression that could possibly match all of the cases in one pass." There is also https://github.com/thephpleague/uri-parser that looks like it may help, but that would require composer to install the library? Also, I've been testing different regex patterns with https://regex101.com. It's the best regex tester I've found so far.
  5. Could you try something like this? // only allow access to the page if logged in with editing permissions // otherwise throw a 404 if viewed directly if(!$page->editable() && (!count($options['pageStack']))){ throw new Wire404Exception(); }
  6. Hmm... Thanks for the test data. I see the problem as well with the www. urls with a trailing slash. I'll see if I can come up with a alternative regex that works.
  7. Thanks interrobang. I didn't know much about regex either, but I'm learning now! That worked with detecting urls with/without an ending slash, but then I noticed that email addresses were no longer linked. test@something.com gets converted into a link "something.com." I even tried removing the other \b, but it didn't make a difference. Edit: Actually, after playing around some more... If I remove the \b in lines 52 only, everything seems to work correctly. Urls with/without trailing slashes and email addresses are now linked correctly. Can you test that on your end? Do you want me to submit a pull request for this change?
  8. Love the module, but is there any way you could fix the trailing slash(/) on urls not being recognized?
  9. I don't have much time to review these. Not sure if it helps, but here's some of my notes: Online Editors https://c9.io/ - Amazon’s Cloud 9 https://www.koding.com/ - can work on local files and sync remotely https://codeanywhere.com/ https://codenvy.io https://coder.com/ https://gitpod.io - open any github page in an online VScode editor that can create a pull request back to github. Uses Docker. Prefix any github page with https://gitpod.io# ex. https://gitpod.io#https://github.com/arunoda/learnnextjs-demo Test and Share code - Web based IDE https://codesandbox.io/ - can install VSCode extensions see https://hackernoon.com/announcing-codesandbox-v3-4febbaba1963 https://stackblitz.com/ - online VSCode Editor than can run react like CodePen https://repl.it/ https://hyperdev.com/ - like http://plnkr.co/ but better to test and share your code https://snack.expo.io/ https://codio.com/ - full dev stack testing https://glitch.com/ http://runnable.com/ http://codepen.io/ https://codepicnic.com - ex. https://codepicnic.com/posts/that-moment-when-i-showed-my-students-how-to-bring-their-code-to-life-bd686fd640be98efaae0091fa301e613 Maybe one of these would fit your needs?
  10. This is probably too basic of answer, but I believe you can install the "Regular Blog" (site-regular) Profile that comes with Processwire on a test site to see and test how comments work. You can also compare your code with it. You can read more about it at https://processwire.com/blog/posts/introducing-a-new-processwire-site-profile/
  11. pwFoo your uploaded image is broken
  12. Hi MoritzLost, In case you didn't already know... You can also check out https://github.com/wanze/TemplateEngineTwig as a good example of a module that doesn't bundle a php library with the module. In this case you can run: composer require wanze/template-engine-twig:^2.0 --no-dev That one line would install the needed php libraries in the correct vendor folder and install the Processwire module in the correct directory.
  13. If you don't want comments at all on blog posts, you can just delete the comments field from the blog-post template.
  14. Hi Ralf, I haven't used comments yet on my sites, but maybe you could add a new "Disable Comments" checkbox field on the "Blog post" template? Then in site/templates/blog-post.php add a conditional check with PHP that says something like: If "Disable Comments" is false then show the comment box and comments. Then just check the box that say's "Disable Comments" when editing the individual blog post pages and the comments/comments form won't be shown when the page is viewed. Hope that helps
  15. The TracyDebugger module also has a "Module Disabler" panel that can easily disable modules.
×
×
  • Create New...