We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 10226
    • 412 Posts
    Awesome - forgot about that multiples bug smiley

    Hope my watermark additions can be gd-ified.
      • 10226
      • 412 Posts
      Quote from: fruitwerks at Dec 13, 2010, 03:53 PM

      Have a small issue with the templates, if I call a snippet from a template (the ones on disk) it doesn’t quite work right smiley

      <div class="photo">
                 <a class="thumb" rel="shadowbox[flow]" href="[+images_dir+][+filename+]" title='<a href="[!giveLink?&tid=`[+id+]`!]">View all pics for [+alias+]</a>'>
                      <img src="[+thumbs_dir+][+filename+]" alt="[+title+]" />
                  </a>
      </div>
      


      [!giveLink?&tid=`[+id+]`!]


      It parses and returns the info, but it doesn’t return the right info, cached or not

      The snippet is simple..

      <?php
      return $modx->makeUrl($tid, '', '', 'full');
      ?>


      But it does not return a valid FURL when called from the template, I get back the ’id’.html or domain.tld/’id’.html in full mode.

      The idea here is to return a clickable link to view an entire gallery from a ’summary’ of galleries - so I need the url for the gallery returned in the template so I can click it from shadowbox.

      Thanks!

      I figured this out actually - it was something stupid.

      On another note, how hard would it be to move images to another resource? Maybe a neat multi-select / move to popup. I haven’t looked at the code that deeply, but it should be fairly easy. I’ll take a crack at it later if nobody else feels like it.
        • 9995
        • 1,613 Posts
        Testing the 1.1-beta (MarkH):
        http://modxcms.com/forums/index.php/topic,49489.msg340266.html#msg340266

        I noticed some small install things:

        - Readme has no extention like .txt
        - Maybe correct but new for me -> There’s a map into the root called galleries ánd also the same map in assets? Rootmap is empty, also after uploading some images.
        - After install im redirected to the frameset bottom right, no tree structure and top frame. index.php?a=2 -> should be index.php

        Improvement:

        - would be nice to see what images where downloaded, now i only see a preview of the image but i see no filename.

        Some other things:
        - in FF (3.6.13) i have a problem, i uploaded 10 pics, the 9th image was not uploaded. It said 100% but freezed, the other images went ok. After try to delete directly it didnt go away, after click clear queue i had a adobe flash crash. (Still need to check on some other PC i have the same problems, MAC goes OK. Have the same in previous version, i haven’t figgered it out yet.)
        I uploaded some second album: 32 pics, number 7,9,21,27 freezed see attachment, after w8ting some minutes!
        i got the http error and was able to delete it, after upload again these 4 pics went ok.
        Third album the same, freezes and had an IO Error this time.

        #Edit: i have updated FF to 4.0-beta and uploading went smooth. Flash and FF are not that great, also lost my Firebug plugin sad Can use both versions thow laugh


          Evolution user, I like the back-end speed and simplicity smiley
          • 18373 ☆ A M B ☆
          • 3,141 Posts
          Thanks for testing.

          The readme thing is a github thing. I’m not 100% sure, but I think it wants you to add a README to be in the root.. can change that though - no biggy.

          The one in the root shouldn’t have been there - sorry. It should be in assets/galleries which I added to make sure the folder exists beforehand to save users having to add it manually (which was the case with the old version iirc). Now it’s just gotta be checked for permissions.

          I’ve not modified anything in the install, but that sounds like a good catch. I’ve put it in the github issue list so I wont forget it later.


          What do you mean with showing the filename of what was downloaded? Do you mean uploaded?


          That issue with uploading is common in the old version as well, filed in github so it can be modified in a later release. Perhaps an update of Uploadify (the flash utility being used) fixes that.


          On another note, how hard would it be to move images to another resource? Maybe a neat multi-select / move to popup. I haven’t looked at the code that deeply, but it should be fairly easy. I’ll take a crack at it later if nobody else feels like it.
          I’ll file that as an improvement, it would take some figuring out how to best allow moving it (right click, select resource - but how do you display the resources?). The actual moving would involve modifying the DB and moving the files, but that’s all feasible in php.


          Thanks for everything.
            Mark Hamstra • Developer spending his days working on Premium Extras and a MODX Site Dashboard with the ability to remotely upgrade MODX and extras to make the MODX world a little better.

            Tweet me @mark_hamstra, check my infrequent blog at markhamstra.com, my slightly more frequent ramblings at MODX.today or see code at Github.
            • 28042 ☆ A M B ☆
            • 24,524 Posts
            (right click, select resource - but how do you display the resources?).
            You can clone the javascript that allows a resource to click on the Tree to select its parent; I did that to allow clicking in the Tree to set the ID of the resource for weblinks. The actual Javascript that does this looks like this:
            var allowLinkSelection = false;
            
            function enableLinkSelection(b) {
                parent.tree.ca = "link";
                var closed = "<?php echo $_style["tree_folder"] ?>";
                var opened = "<?php echo $_style["icons_set_parent"] ?>";
                if (b) {
                    document.images["llock"].src = opened;
                    allowLinkSelection = true;
                }
                else {
                    document.images["llock"].src = closed;
                    allowLinkSelection = false;
                }
            }
            
            function setLink(lId) {
                if (!allowLinkSelection) {
                    window.location.href="index.php?a=3&id="+lId;
                    return;
                }
                else {
                    documentDirty=true;
                    document.mutate.ta.value=lId;
                }
            }
            

            This is on line 214-271 of manager/actions/mutate_content.dynamic.php for both sets of functions (set parent and set weblink content)

            The first function stops the default click behavior of the Tree, and the second copies the ID value to the relevant field. You should be able to modify the triggers and the rest of the field names and such as needed.

            I also modified tree.php at lines 318-331 to enable the click to call the other frame’s function:
                    if(ca=="parent") {
                        try {
                            parent.main.setParent(id, name);
                        } catch(oException) {
                            alert('<?php echo $_lang['unable_set_parent']; ?>');
                        }
                    }
                    if(ca=="link") {
                        try {
                            parent.main.setLink(id);
                        } catch(oException) {
                            alert('<?php echo $_lang['unable_set_link']; ?>');
                        }
                    }
                }
            


            I suspect you should be able to use one of these without hacking the tree.php file since it’s a different frame than the one using both of these together.
              Studying MODX in the desert - http://sottwell.com
              Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
              Join the Slack Community - http://modx.org
              • 9995
              • 1,613 Posts
              Ah yea, i mean name of uploaded image like image001.jpg somewhere under the thumbs or somewhere.
              Also delete full album option would be very nice, now i need to delete manual or 1 by 1 lol.

              Update from Uploadify would be great! That will prolly do the trick.

              Used an the old version some short while ago on my job has a sorting problemo front-end which i noticed today, guess it’s fixed when i update?
              Can updating be done just by overwriting?
                Evolution user, I like the back-end speed and simplicity smiley
                • 18373 ☆ A M B ☆
                • 3,141 Posts
                Thanks Susan! That will really help.

                @Fourroses: the sort problem is fixed in github / the attachment in one of my earlier posts.

                I may have some time to dig in a few things next week - although no promises. wink
                  Mark Hamstra • Developer spending his days working on Premium Extras and a MODX Site Dashboard with the ability to remotely upgrade MODX and extras to make the MODX world a little better.

                  Tweet me @mark_hamstra, check my infrequent blog at markhamstra.com, my slightly more frequent ramblings at MODX.today or see code at Github.
                  • 9995
                  • 1,613 Posts
                  Oke, we will see, just for sure: update by just overwrite the old files?
                    Evolution user, I like the back-end speed and simplicity smiley
                    • 18373 ☆ A M B ☆
                    • 3,141 Posts
                    Should do the trick. I’ve only modified some of the classes, and not the snippet or module.
                      Mark Hamstra • Developer spending his days working on Premium Extras and a MODX Site Dashboard with the ability to remotely upgrade MODX and extras to make the MODX world a little better.

                      Tweet me @mark_hamstra, check my infrequent blog at markhamstra.com, my slightly more frequent ramblings at MODX.today or see code at Github.
                      • 9995
                      • 1,613 Posts
                      i have uploaded the whole assets map and overwrited the that files, cleared cache but no correct sort order.
                      Do i need to use the install again? I’m a little afraid i loose all images or the link to the images then and i can’t let that happen.
                        Evolution user, I like the back-end speed and simplicity smiley