Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

All other Modules /

Discuss all other Modules here.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Image Gallery Extension: Testers Needed


Reply


417 Posts   78423 Views

Avatar
UncleCheese

4085 Posts

20 May 2009 at 12:29pm

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

Avatar
Felicia

Community Member, 7 Posts

20 May 2009 at 3:45pm

Edited: 20/05/2009 3:49pm

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

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

Avatar
UncleCheese

4085 Posts

20 May 2009 at 3:55pm

What do you mean not working?

Avatar
Felicia

Community Member, 7 Posts

20 May 2009 at 3:57pm

Edited: 20/05/2009 4:10pm

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:
[url]http://66.147.242.166/~pascetti/workstations/SearchForm?Search=finishes&action_results=Search[/url]

Avatar
UncleCheese

4085 Posts

20 May 2009 at 4:42pm

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.

Avatar
Felicia

Community Member, 7 Posts

21 May 2009 at 4:13am

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.

Avatar
rico

Community Member, 5 Posts

26 May 2009 at 8:05pm

Edited: 26/05/2009 8:33pm

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 :)

Avatar
UncleCheese

4085 Posts

27 May 2009 at 1:28am

Do you have DataObjectManager and SWFUpload installed?