We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 28797
    • 6 Posts
    Hi

    Thanx a lot for this really simple to use extra, I am using it for automatic thumbnail generation of a slider for my new site. There, to make things look good I want to apply a gray-scale thumbnail while the image is loading.

    I tried to get it by adding &fltr[]=gray to the line but the filter doesn’t seem to work, the rest works fine. I am wondering whether phpthumbof supports all the filters that phpThumb has;

    This is my code

    <div class="thumb">
    <div class="color">
    <img src="[[+tv.home-slider-image:phpthumbof=`w=59&h=26&zc=1`]]" />
    </div>
    <div class="black">
    <img src="[[+tv.home-slider-image:phpthumbof=`w=59&h=26&zc=1&fltr[]=gray`]]" />
    </div>
    </div>

    Thanx a lot again for the wonderful extra. smiley

    Sudaththa
      • 22019
      • 390 Posts
      @lithiumlab, @joZ3 I have a multi-context Revo site working where all contexts are folders (and also sub-domains). In order to get phpthumbof working I had to make sure that the modx ASSETS_PATH (I added manually to core-config.php, as per one of the tutorials) and filemanager_path in the context (== system) settings was set.

      If the thumbnail is being created, but in the wrong place, you can also use the replace output filter to hack an adjustment to the output path eg [[*image:replace=`subfolder/=`:phpthumbof=`w=120&h=60`]] or something similar anyway - I can’t remember the correct syntax for replace. However, you would have the overhead of two filters per image.
        Writer > E-consultant > MODx developer || Salesforce || modx 2.x || PHP 5.2.13 || MySQL client 5.0.86
        • 14822
        • 61 Posts
        @odeclas tnx for the response, but your solution not work for me sad and generate other error like clear cache idle in the manager and assets/components/phpthumbof/cache not writable (chmod 777),

        Temporaly I use the phpthumbs core meanwhile correct the phpthumbof issue
        <img src="connectors/system/phpthumb.php?src=../../[[+tv.notimage]]&w=735&h=300&far=1&q=90&f=jpg" alt="[[+pagetitle]] - Aguamarinas Bisutería, joyas y accesorios - Neiva, Huila - Colombia"/>
          • 14822
          • 61 Posts
          Arghhh no I have a new issue, now with the core phpthumb sad , the image only show in the website when I’m logged in the manager... any can help to solve this?
            • 9550
            • 123 Posts
            I’m having the same issue posted by hlight, sushi, evf, and joz3

            in my error logs, phpthumbof is looking for the following file

            /Users/ojs/Sites/rawc2//rawc2/assets/images/exhibitions/nicholas frenette/01NFEntryToPurgatory.jpg

            but the file is actually located at

            /Users/ojs/Sites/rawc2//assets/images/exhibitions/nicholas frenette/01NFEntryToPurgatory.jpg

            with the extra /rawc2/ (ie rawc2//rawc2/)

            i’m running this install from inside a subdirectory (rawc2/) under MAMP pro 1.9.4 (PHP 5.2.13)

            have you guys found a fix for this? there’s a couple other threads posting the same issues.
              • 22019
              • 390 Posts
              What I’ve ended up doing in my multi-context Revo sites is creating a manual config.core.php entry for $modx_assets_path and $modx_assets_url- which seems to be the only way to tell MODX where to find the assets folder when you’re NOT using the file browser, and you’ve got a non-standard folder setup. In a multi-context setup this is also the only directory from the core that you want to be unique per context. I hadn’t noticed the issue before because I was only using the MODX file browser.
                Writer > E-consultant > MODx developer || Salesforce || modx 2.x || PHP 5.2.13 || MySQL client 5.0.86
                • 9550
                • 123 Posts
                odeclas: hmmm, interesting... ok, will give that a shot...
                  • 9550
                  • 123 Posts
                  ok, I just added the following two lines to my config.inc.php

                  $modx_assets_path = ’/Users/ojs/Sites/rawc2/assets/’;
                  $modx_assets_url = ’/rawc2/assets/’;

                  tried it both underneath: $table_prefix = ’modx_’;
                  and at the bottom of the file.

                  still get the same file error in my logs

                  /Users/ojs/Sites/rawc2//rawc2/assets/...

                  note the following already exists in the config:

                  if (!defined(’MODX_ASSETS_PATH’)) {
                  $modx_assets_path= ’/Users/ojs/Sites/rawc2/assets/’;
                  $modx_assets_url= ’/rawc2/assets/’;

                  any other ideas?

                    • 9550
                    • 123 Posts
                    ok, not sure what else to do but to post the issue on github..

                    https://github.com/splittingred/phpThumbOf/issues/11

                    give up, and install my own copy of phpthumb.
                      • 14822
                      • 61 Posts
                      Quote from: featherodd at Apr 02, 2011, 03:32 AM

                      ok, not sure what else to do but to post the issue on github..

                      https://github.com/splittingred/phpThumbOf/issues/11

                      give up, and install my own copy of phpthumb.

                      Tnx so much to post the bug in the github, I hope that development solve this bug smiley