Forum Index > glFusion > glFusion Support New Topic Post Reply
 Media gallery search result "filelist" style
 |  Printable Version
By: dlassen (offline) on October 31 2009 02:40 AM (Read 341 times)  
dlassen

Hi,

Is there anyway that media gallery search results can be configured (or mod'ed) to display entries in the "filelist" style. Alternatively, how could the icon size be reduced - they are very large.

Any help would be appreciated...

Thanks

Dennis


Forum Junior
Junior

Group Comfort
Level:
: 0

Status: offline

Registered: 10/30/09
Posts: 19

Profile Email   PM
  Quote
By: Mark (offline) on October 31 2009 06:28 AM  
Mark

You can change the template that controls the search results for Media Gallery. It is the private/plugins/mediagallery/templates/search_results2.thtml template.

For the thumbnail size, it currently uses the same size as the main index page for media gallery. I guess a good 'feature request' would be to add a configuration option to control just the search results icon size.

For now, you could 'hard code' it in the source code by making this small modification....

Edit public_html/mediagallery/search.php. Around line 629 you will see:

PHP Formatted Code

    if (isset($_MG_USERPREFS['tn_size']) && $_MG_USERPREFS['tn_size'] != -1 ) {
        $tn_size = $_MG_USERPREFS['tn_size'];
    } else {
        $tn_size = $_MG_CONF['gallery_tn_size'];
    }

    switch ($tn_size ) {
        case '0' :      //small
            $tn_height = 100;
            break;
        case '1' :      //medium
            $tn_height = 150;
            break;
        case '2' :
            $tn_height = 200;
            break;
        case '3' :
                $tn_height = 200;
                break;
        default :
            $tn_height = 150;
            break;
    }
 


Right after this, you could hard code the max height in pixels by adding

PHP Formatted Code

$tn_height = 50;
 


so the new block would be:

PHP Formatted Code

    if (isset($_MG_USERPREFS['tn_size']) && $_MG_USERPREFS['tn_size'] != -1 ) {
        $tn_size = $_MG_USERPREFS['tn_size'];
    } else {
        $tn_size = $_MG_CONF['gallery_tn_size'];
    }

    switch ($tn_size ) {
        case '0' :      //small
            $tn_height = 100;
            break;
        case '1' :      //medium
            $tn_height = 150;
            break;
        case '2' :
            $tn_height = 200;
            break;
        case '3' :
                $tn_height = 200;
                break;
        default :
            $tn_height = 150;
            break;
    }
    $tn_height = 50;
 


This would make the icon around 50x50 pixels in size.

Thanks!
Mark

Forum Admin
Admin

Group Comfort
Level:
: +93

Status: offline

Registered: 10/21/05
Posts: 5029
The Great State of
Texas

Profile Email    
  Quote
By: dlassen (offline) on October 31 2009 10:06 AM  
dlassen

Thank you for your help and patience! I'll let you know how it goes.

Dennis


Forum Junior
Junior

Group Comfort
Level:
: 0

Status: offline

Registered: 10/30/09
Posts: 19

Profile Email   PM
  Quote
By: dlassen (offline) on November 03 2009 12:52 PM  
dlassen

This worked out perfectly.

On a related note, could someone point to the code where I can make a similar change for the list of media gallery entries displayed in the user profile?

Thanks

Dennis


Forum Junior
Junior

Group Comfort
Level:
: 0

Status: offline

Registered: 10/30/09
Posts: 19

Profile Email   PM
  Quote
Content generated in: 0.48 seconds
New Topic Post Reply



 All times are CDT. The time is now 09:42 AM.
Normal Topic Normal Topic
Locked Topic Locked Topic
Sticky Topic Sticky Topic
New Post New Post
Sticky Topic W/ New Post Sticky Topic W/ New Post
Locked Topic W/ New Post Locked Topic W/ New Post
View Anonymous Posts 
Able to Post 
HTML Allowed 
Censored Content