Jump to:

10375 Posts in 2190 Topics by 1707 members

All other Modules

SilverStripe Forums » All other Modules » Image Gallery Extension: Testers Needed

Discuss all other Modules here.

Moderators: martimiz, Howard, Sean, Ryan M., biapar, Willr, Ingo, swaiba, simon_w

Go to End
Author Topic: 66867 Views
  • micahsheets
    Avatar
    Community Member
    162 Posts

    Re: Image Gallery Extension: Testers Needed Link to this post

    Uncle Cheese,

    I was wondering if you ever looked into my request in post at http://www.silverstripe.org/all-other-modules/show/250910?start=280#post259431 ?

    This was a partial solution to the die() problem in the controller init and also allows for setting the renderWith template to something custom. I have been using this modification for a while now and can't find any errors with it.

    I did forget about it though and updated my gallery to the newest version and found that I had to go back and make this mod again. I will probably have to make this modification on every site I put the gallery module on which is pretty much all the sites I build now.

    If you can look at it and let me know if you would incorporate it into your code or if not, let me know what is wrong with my code so I can learn from it.

    Thanks.

  • UncleCheese
    Avatar
    4085 Posts

    Re: Image Gallery Extension: Testers Needed Link to this post

    Yup.. This is literally the next feature I'm going to add to ImageGallery. Thanks for the reminder.

  • Felicia
    Avatar
    Community Member
    7 Posts

    Re: Image Gallery Extension: Testers Needed Link to this post

    Hi Uncle Cheese,
    I've been trying to add the search functionality mentioned here:
    http://silverstripe.org/all-other-modules/show/259512

    I'm having trouble... the link function is not working.

    This is what I am using on ImageGalleryAlbum.php & ImageGalleryItem.php:

    public function Link()
    {
    return DataObject::get_one("ImageGalleryPage")->Link();
    }

    I would REALLY appreciate help. Thank You!

    Felicia

  • UncleCheese
    Avatar
    4085 Posts

    Re: Image Gallery Extension: Testers Needed Link to this post

    What do you mean not working?

  • Felicia
    Avatar
    Community Member
    7 Posts

    Re: Image Gallery Extension: Testers Needed Link to this post

    It is returning the wrong page. It is not unique for each result.
    The title and content show up perfectly, but the link does not return correctly.

    Here is an example:
    http://66.147.242.166/~pascetti/workstations/SearchForm?Search=finishes&action_results=Search

  • UncleCheese
    Avatar
    4085 Posts

    Re: Image Gallery Extension: Testers Needed Link to this post

    I think you're misunderstanding how it works. In my example, as I remember, I had a DataObject that was a component of a page, so there was this lingering question of what would happen when a user clicked on it as a search result. The answer I came up with was to take you to its parent page, and skip down the page to it using a # in the url, e.g. /my-data-object-holder/#dataobject-123, where 123 was the ID of the dataobject.

    In the case of an ImageGallery search, the ImageGalleryAlbum class already has a Link() method built in due to the way it is integrated in the ImageGallery as a faux "page." You're not getting unique results because every time that function runs it's doing the same thing. That function might as well be static the way you have it now.

    I would just skip the Link() function all together. It's already built into the album class.

  • Felicia
    Avatar
    Community Member
    7 Posts

    Re: Image Gallery Extension: Testers Needed Link to this post

    Okay, I still can't get it to work.
    I know that there is a Link() function included in the ImageGalleryAlbum class, but it does not return the correct link.

    Do I need to change the Page_results.ss page?
    Right now $Link returns "mydomain.com//album/"

    <% if Results %>
        <ul id="SearchResults">
        <% control Results %>
        <li>
        <% if MenuTitle %>
        <h3><a class="searchResultHeader" href="$Link">$MenuTitle</a></h3>
        <% else %>
        <h3><a class="searchResultHeader" href="$Link">$Title</a></h3>
        <% end_if %>
              <% if Content %>
           $Content.FirstParagraph(html)
              <% end_if %>
        <a class="readMoreLink" href="$Link" title="Read more about &quot;{$Title}&quot;">Read more about &quot;{$Title}&quot;...</a>
        </li>
        <% end_control %>
        </ul>
        <% else %>
        <p>Sorry, your search query did not return any results.</p>
        <% end_if %>

    Thank you for your help. I really appreciate it.

  • rico
    Avatar
    Community Member
    5 Posts

    Re: Image Gallery Extension: Testers Needed Link to this post

    I've tried to download the Image-Gallery several times, but I always get an Error. Then i've tried at the unstable trunk and after painfully downloading every single file, I get this Error by making a DB Rebuild:
    <br >
    <br >Fatal error: Class 'SortableDataObject' not found in /data/www70/wwwroot/image_gallery/_config.php on line 2
    <br >
    <br >I hope you can help me or tell when i will be able to download the full package. Thanks!<br >
    <br >
    Sorry, i solved the problem with the installation! Now it work really well. Sorry for asking before thinking

    66867 Views
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.