We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 27889
    • 415 Posts
    Hello, first thanks for this very good snippet.

    I have a (small) problem with path, I have added a gallery on a page, in the thumb page the [tt]src=""[/tt] attribute are relative:
    [tt]<img src="assets/galleries/89/tn_photo_4.jpg" ...[/tt]
    and it don’t find the image .

    I can’t add a [tt]base href=...[/tt] due to lot of snippet, some using relatives links others absolutes.

    If I modify the [tt]$path_to_galleries="assets/galleries/";[/tt] to
    [tt]$path_to_galleries="/assets/galleries/";[/tt]

    the thumbs are displayed but the links to the image are broken to [tt]http://dp-site.fr//assets/galleries/89/photo_4.jpg[/tt] with a double [tt]/[/tt].
    I don’t want hack your code (and perhaps I can’t smiley).
    Is there a solution that works for everyone ?

    edit:
    bizarre the problem is just on my local site, with base href on my hosted site all is good.
    Continue your good work, MODx is the best !
      MODx Sites & Prestations: http://dp-site.fr [Last MODx Site]
      MODx Repository: [HOME] [MetaTagsExtra] / Current Dev: [xFDM]
      • 7923
      • 4,213 Posts
      Great that you got it working, one thing that you could of done is do a search in the snippet code for src=\" and replace with src=\"[(site_url)]. I’ll make sure it get’s fixed in the upcoming release. Thanks!


        "He can have a lollipop any time he wants to. That's what it means to be a programmer."
        • 27889
        • 415 Posts
        thanks for your answer, that’s what I think.
        There is lot of snippet plugin that have differents behaviors with URL, I think that the parser could correct somes.
          MODx Sites & Prestations: http://dp-site.fr [Last MODx Site]
          MODx Repository: [HOME] [MetaTagsExtra] / Current Dev: [xFDM]