Giter VIP home page Giter VIP logo

customrequest's Introduction

Hi, I’m Thomas Jakobi 👋

I am a german web-developer & designer based in Münsterland, Germany. I am the developer and/or maintainer of around 35 open source extras for MODX. I am the owner of Treehill Studio, an agency developing premium extras for MODX.

Open Source

I love open source and I commit some of my spare time in open source projects. Most of these projects are extensions to MODX, a content management system to build fast, secure websites.

If you like my work, you can sponsor me on GitHub Sponsors. You can also buy me a coffee (or two) on Ko-fi. I also offer paid coding of custom MODX extras.

Thomas's GitHub stats

Current work

My last open source extra for MODX was TwoFactorX, a MODX extra that adds a two-factor authentication to the MODX manager. Behind the curtain I am working on Cursus, a premium booking system for MODX on base of Agenda.

customrequest's People

Contributors

benjamindean avatar boddlnagg avatar davidpede avatar dependabot[bot] avatar jako avatar jcdm avatar nornik avatar weblate avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

customrequest's Issues

Are dynamic parameter key names possible?

I have a resource url like: https://my.test/shop/books/fiction/

I've setup a config with only: Config > Alias Path: #.*?books/.*?(filters/)# filled in.

If I load: https://my.test/shop/books/fiction/filters/key1/value1/key2/value2/foo/bar/ the parameters array returned is formatted like:

[p1] => key1,
[p2] => value1
[p3] => key2
[p4] => value2
[p5] => foo
[p6] => bar

Is there anyway to assign dynamic key names to the array instead? I'm needing:

[key1] => value1
[key2] => value2
[foo] => bar

I've tried loads of regex's but can't seem to get it - not sure if possible?

wrong table prefix

MODX Revolution 2.4.2-pl
CustomRequest 1.2.1-pl

The sql table prefix for my modx installation is modxfc_ instead of modx_
When installing CustomRequest it installs the table under modx_customrequest_configs though.

How to go about having a wildcard child page?

I have a section with almost 1200 languages. The structure is siteroot/directory1/languages/language. How would I go about having the language page be the landing for each language: e.g., siteroot/directory1/languages/english, siteroot/directory1/languages/spanish?

I've tried different options and not quite getting there.

Site is on MODX 3.0.1.

Bugs in CustomRequest.php

--- a/html/core/components/customrequest/src/CustomRequest.php Sat Apr 08 10:57:15 2023 +0300
+++ b/html/core/components/customrequest/src/CustomRequest.php Mon Apr 10 10:55:38 2023 +0300
@@ -185,19 +185,18 @@
if (!$resourceId) {
$resourceId = 0;
if (!$this->isRegularExpression($alias)) {
$resourceId = $this->modx->findResource($alias);
if (!$resourceId) {
// If resourceId could not be calculated and alias is not a valid regular expression, don't use that setting
if ($this->getOption('debug')) {
$this->modx->log(xPDO::LOG_LEVEL_ERROR, 'Could not calculate the resourceId for the given alias "' . $alias . '".', '', 'CustomRequest Plugin');
}

  •                            break;
                           }
                       } else {
                           $aliasRegEx = true;
                       }
                   }
                   if ($resourceId) {
                       $resource = $this->modx->getObject('modResource', $resourceId);
                       if ($resource) {
                           $contextKey = $resource->get('context_key');
    

Here: it should be no break on resource id not found for alias - other good aliases will be thrown away, i think it should be continue;

@@ -278,19 +277,19 @@
$search = substr($search, strlen($this->modx->cultureKey) + 1);
}

     $valid = false;
     // Loop through the allowed aliases
     if (is_array($this->requests) && count($this->requests)) {
         foreach ($this->requests as $request) {
             if (!$request['aliasRegEx']) {
                 // Check if searched string starts with the alias and for the contextKey
  •                if ($request['alias'] && 0 === strpos($search, $request['alias']) && $request['contextKey'] == $this->modx->context->key) {
    
  •                if ($request['alias'] && $search === $request['alias'] && $request['contextKey'] == $this->modx->context->key) {
                       $this->found = [
    

Here: 0 === strpos($search, $request['alias']) for alias "school/lession" will find resource with alias "school" if it goes before alias "school/lession" in reqests cache.

Default config path

It would be good if the configsPath setting pointed to the configs directory by default.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.