by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    Ian Cox
    @ian-cox
    not sure what else to try short of poking around your hosting settings
    if you ssh into the server and cd up a few levels, are there other .htaccess files above that might be conflicting?
    daizumi
    @daizumi
    fixed!!!!
    Ian Cox
    @ian-cox
    what did you find?
    php-mbstring was missing
    Ian Cox
    @ian-cox
    nice!
    daizumi
    @daizumi
    thanks a lot Ian!!!
    Ian Cox
    @ian-cox
    the forum is always a great source, glad you were able to figure it out!
    daizumi
    @daizumi
    indeed it is
    Jason Stringer
    @ODDCODE
    Hi, can someone share with me the best way to build a Gallary page which, will display a single image.
    Philip Q
    @taoguangc
    Hi, A kirby website, up to how many pages can be supported,And the speed can be kept very fast.
    Flo Kosiol
    @flokosiol
    It depends on how they are organized: https://forum.getkirby.com/t/server-response-time/279
    Lukas Dürrenberger
    @eXpl0it3r
    There seems to be a bug, where when you add a page and the URL starts with a number, the number would get stripped off
    Like I create a new page called "10. July 2017" and then it would show "10-july-2017", but when you press okay/create the saved URL will be "july-2017"
    You can change it afterwards and it will save correctly, so it's not critical, but just a bit annoying
    Sonja Broda
    @texnixe
    It's not a bug, it's how Kirby works. Numbers are used as a visibility flag, so if you have a number in your UID, the page will be visible. Starting numbers in URLs are therefore not possible.
    Lukas Dürrenberger
    @eXpl0it3r
    But that's the point, they are possible to be used, it's just that when you enter it the first time it won't get applied
    Maybe it only works when you have made them visible, but then there's still a bug, as the input doesn't match the result
    1-10-july-2017 certain works as folder name
    Sonja Broda
    @texnixe
    Yes, but it will stop working as soon as you make it invisible via the Panel.
    Sonja Broda
    @texnixe
    As I said, it's not a bug, it's just not possible, at least not reliably.
    I have proposed to use a dot instead of a dash to separate the visibility flag from the UID (or anything different to a dash). Let's see what happens in the future.
    Pascal Küsgen
    @Pascalmh

    Wasn't there an option to get a URL to Files that are added to the Panel without the page numbers?

    So https://your-domain.com/content/somepage/something/myfile.pdf instead of https://your-domain.com/content/01-somepage/03-something/myfile.pdf

    Flo Kosiol
    @flokosiol
    Pascal Küsgen
    @Pascalmh
    Ha! I knew it was possible just couldn't find it anymore - thank you Flo!
    Ian Cox
    @ian-cox
    does anyone know how to do a foreach loop on the images found in the assets folder?
    I can echo a single image by it’s path but I’m not sure how to get a files object from that path.
    Sonja Broda
    @texnixe

    You could read the folder using dir::read():

    $files = dir::read($kirby->roots()->assets() .'/images');

    Then you could loop through the resulting array and create a new Asset Object from each file.

    Ian Cox
    @ian-cox
    hmmm interesting
    Note that you have to pass the complete path to the file ('assets/images/etc') to the constructor.
    Ian Cox
    @ian-cox
    trying it now, may need some help creating the object inside of the foreach loop
    we’ll see
    Sonja Broda
    @texnixe
    $files = dir::read($kirby->roots()->assets() .'/images');
    foreach($files as $file) {
        $asset = new Asset('assets/images/'.$file);
        echo $asset->resize(150)->url();
    }
    Ian Cox
    @ian-cox
    that looks great and seem to be working
    do you know how i’d add those files to an object rather than echoing them out?
    Sonja Broda
    @texnixe
    What do you want to achieve? You can add each asset to a Collection or an array.
    Ian Cox
    @ian-cox
    I think a collection, so that I can filter things out easily
    I have a .gitignore in my assets/images/
    and I want to be able to use some other kirby functions on the object later
    essentially, I’m looking for something that behaves like $page->files() but from the assets/images/ folder.
    Sonja Broda
    @texnixe
    $files = dir::read($kirby->roots()->assets() .'/images');
    $collection = new Collection();
    $count = 0;
    foreach($files as $file) {
        $asset = new Asset('assets/images/'.$file);
        $collection->append($count, $asset);
        $count++;
    }
    Then you can filterby whatever:
    dump($collection->filterBy('filename','*=', 'something'));
    Ian Cox
    @ian-cox
    oh wow, thanks this is all very helpful
    Sonja Broda
    @texnixe
    Or even shorter:
    $files = dir::read($kirby->roots()->assets() .'/images');
    $collection = new Collection();
    
    foreach($files as $key => $file) {
        $asset = new Asset('assets/images/'.$file);
        $collection->append($key, $asset);
    }
    dump($collection->filterBy('filename','*=', 'something'));
    Ian Cox
    @ian-cox
    thanks so much, this is working perfectly!
    chriscubellis
    @chriscubellis
    does anyone use this anymore?
    i'm trying to upgrade to v3, but getting a 500 error :(
    not sure where i'm going wrong, cause the debug panel isn't even showing
    chriscubellis
    @chriscubellis
    the starter kit is running fine, so i know it's not my dev environment. i've been following the migration steps, pretty sure i've followed everything in steps 1, 2, & 3...for 4, i wasn't sure if anything's actually supposed to be changed in config.php? and i removed all of the old plugins...