helo

fredo / 2010-08-30 09:03:38   

helo

fredo / 2010-08-30 09:03:51   

hello everybody,

together with clagom we created a new plugin that generates a galleria using this great jquery plugin: http://galleria.aino.se/

i modified a little bit their javascript in order to have a little bit more customisation... hope no one will get angry at me :)

  1. anyhow: this is the plugin (i'm totally new to indexhibit so probably this is not the best way to make things work...)
  2. <?php if defined'SITE' exit'No direct script access allowed'

/**
* Preggella
*
* Exhibition format
*
* @version 1
* @author fredo
*/

// defaults from the general libary - be sure these are installed
$exhibit['dyn_css'] = dynamicCSS();
//$exhibit['dyn_js'] = dynamicJS();
$exhibit['exhibit'] = createExhibit();

function dynamicJS()
{
    return "function show_image(id)
    {
        $('.pic').hide();
        $('#p' + id).show();
        $('#num').html(id);
        return false;
    }";
}

function createExhibit()
{
    $OBJ =& get_instance();
    global $rs;
    
    $pages = $OBJ->db->fetchArray("SELECT *
        FROM ".PX."media, ".PX."objects_prefs
        WHERE media_ref_id = '$rs[id]'
        AND obj_ref_type = 'exhibit'
        AND obj_ref_type = media_obj_type
        ORDER BY media_order ASC, media_id ASC");

        
    // ** DON'T FORGET THE TEXT ** //
    $s = $rs['content'];

    if (!$pages) return $s;
    
    $i = 1; $a = '';
    
    $total = count($pages);
    
    // people will probably want to customize this up
    foreach ($pages as $go)
    {
     $title         = ($go['media_title'] == '') ? '' : $go['media_title'] . ' ';
     $caption     = ($go['media_caption'] == '') ? ' ' : $go['media_caption'];

        $x = getimagesize(BASEURL . GIMGS . '/' . $go['media_file']);
        
        $off = ($i == 1) ? "style='display: block;'" : "style='display: none;'";
        
        $next = ($i == $total) ? 1 : $i+1;
        
        $a .= "\n";
        
        $i++;
    }
    
    // images
    //$s .= "

1/$total

";
    $s .= "\n";
    $s .= $a;
    $s .= "\n";
    $s .= "";
    $s .= "";
    //$s .= "";
    $s .= "

// Load the classic theme
Galleria.loadTheme('/themes/fullscreen/galleria.fullscreen.js');

// Initialize Galleria
$('#pics').galleria({
        image_crop: true,
        topper:60
    });
";    
    return $s;
}

function dynamicCSS()
{
    return "#img-container { }
#pics { }
p#nums { }
.img-bot { margin-bottom: 12px; }";
}

?>

example: http://www.theeggs.biz/project/lapercine/

greetings,

fredo

lemathieu A / 2010-08-30 09:27:06   

Ho…
Quick note: this is great !
Thanks !

Could you please make a .zip folder with all necessary files in ?

fredo / 2010-08-30 10:17:49   

there u go! :)

http://www.theeggs.biz/files/zippotto.rar

christiandelia / 2010-08-30 19:48:54   

sorry, im dummies....:)
I put the pregella.php in the pligin folder,
and the .js file in the appropriate folder,
now i suppose the theme forlder in the theme exibition....
but the image in the exibition is static and nothings happens.
i try to show my photo and drowing in full scrren browser.
i hope in your help!
peace=!

christiandelia / 2010-08-31 02:15:36   

i try, and i find the right place
and now I customize somethings the plugin,
but i have problem in the margin bottom of image..
this is a Webpage
whith preggella exhibit format.
i change this in the plugin:

(:original code)
image_crop: true, (: false)
max_scale_ratio:4 (:1)

and also i looking aroud the gallery.fullscreen.js
but i didn't find this margin setting...
i wish to understand me!
peace!

fredo / 2010-08-31 07:16:52   

helo,

i think you should put in preggella.php something like:

$('#pics').galleria({
image_crop: true,
topper:0,
max_scale_ratio: 4
});
";

hope it helps.

greetings

fredo / 2010-08-31 07:21:36   

sorry, got it:

$('#pics').galleria({
image_crop: true,
image_pan: false,
            transition:'fade',
            transition_speed: 1500,
            autoplay: 6000,
            topper:0,
            altezza:0,
            max_scale_ratio:4,
});

this way it should work.

peace.

christiandelia / 2010-08-31 14:28:30   

it's work whit charme :)
i dont'try to change "altezza:"
and also is italian word....
sorry for this post...
and thank you a lot for the help !!!

christiandelia / 2010-09-03 22:07:38   

i have another question....
how change the image to advance on click,
i try to customize

clickNext : true,     // helper for making the image clickable.
BUT: Let's not have that in this example....

and where I foud some notice or example to do this ???
already thanks !

peace!

christiandelia / 2010-09-03 23:28:05   

ok, i solved this problem, I add in pregella.php
clickNext : true,
and it's work !!!
wow !

patso / 2010-10-19 13:29:54   

hello,

I know this post is 2 months old, but i really like this plugin and i can't seem to make it work.
Perhaps one of you two could help me?

So I put the pregella.php in the plugin folder,
the .js file in the js folder,
I put the theme folder in the site folder, and inside it I put the files that I was using for my theme.
I get a static image.
Would you have and idea on what I'm doing wrong?

Thanks

gx1982 / 2010-10-20 21:04:27   

This plugin does not worked just "out of the zip" for me. I needed to change the path to the Galleria's theme in the exhibit plugin to get it start working.

Hope this helps.

sbstn / 2010-11-08 23:39:24   

hi, i got this to work, but the images appear over my menu, how can i fix that?

http://www.eleveneleven.mx/test/

thanks!

sbstn / 2010-11-09 00:54:32   

nevermind, got it.

tarabanski / 2011-01-10 11:58:57   

Hi!
christiandelia, where exactly did You change/add code in exhibit.preggella.php to make images clickable? i can't find it...

bs
dominik

mariapaz / 2011-04-01 10:23:25   

Hi, where does the theme folder goes? Can't make it work, just a static image :(
Cheers,

Webpage

mariapaz / 2011-04-01 10:58:22   

Ok, it is both the path to the galleria.js and the Galleria.loadTheme that need to be checked.

midge218 / 2011-04-01 11:07:46   

cant download the file mate

midge218 / 2011-04-06 14:54:19   

nevermind, got it, this is a great plug in but someone there isnt support for it.

ddeexx / 2011-04-13 12:35:47   

hi all,
i was trying this plugin (pregella) but i have some problems.
I'm setting up a gallery with 73 pics and the site takes long time to load the page. I tried to reduce files size (from about 100k for each image to about 20k) but nothing changed.
It looks it doesn't depends on files size. It works great till you upload less then 20-25 pics even if they are very big.
I also tested on several machines, different OS, many browser (ff, ie, opera, safari, chrome).
Any suggestions?
thx

benmr6 / 2011-10-05 12:16:18   

hi.. is there an index file missing in your zip file? Thank you in advance

rickyhawtin / 2011-10-07 02:57:13   

I'm missing the index.php file too ..

rickyhawtin / 2011-10-07 03:35:31   

Never mind, dragged in a random index.

But i got another question .. How can i get the image to resize full-window like 'sbstn' did on his website here

Thanks in advance.

benmr6 / 2011-10-07 16:21:09   

never mind... figured it out. forgot to repost. nice plugin!

:)

gx1982 / 2011-10-11 13:57:11   

@tarabanski, set option "clicknext" to true (in the plugin file).

@rickyhawtin, probably you need to set to something like this in the exhibit.pregella.php file:

// Initialize Galleria
$('#pics').galleria({
clicknext: true,
image_crop: true,
image_pan: false,
     topper: 0,
altezza: 0,

I've got it working here: http://www.helenrodel.com.br/editoriais/fotogaleria-b/

Hope this helps you.

gx1982 / 2011-10-11 13:57:29   

@tarabanski, set option "clicknext" to true (in the plugin file).

@rickyhawtin, probably you need to set to something like this in the exhibit.pregella.php file:

// Initialize Galleria
$('#pics').galleria({
clicknext: true,
image_crop: true,
image_pan: false,
     topper: 0,
altezza: 0,

I've got it working here: http://www.helenrodel.com.br/editoriais/fotogaleria-b/

Hope this helps you.

gx1982 / 2011-10-11 14:00:08   

I like it because you can use keyboard arrows do navigate too. up and down. right and left... :D

rickyhawtin / 2011-10-13 08:55:19   

Thanks gx1982,

That worked indeed!

lucha / 2011-10-14 07:41:06   

hi,

is my first post here, I'm a newbie in Idexhibit, I'm sorry if what I ask is stupid and basic.
I have installed Indexhibit, and everything works, I tryed to put plugin "galleria" in plugin folder, but when I go to indexhibit I don't understand where I can select this option, is not in the scroll window on the right in edit. I thought probably that the problem was the permission mode 777, so I went in folder, I changed that permission, but everything is just still in the same way.
I have to paste some Html/php strings in the code? Where and how? In the Idnexhibit's interface or modifying files in the host?

If somebody speak italian and want to answer me in italiano is better, thanks a lot!

lucha / 2011-10-14 07:41:34   

hi,

is my first post here, I'm a newbie in Idexhibit, I'm sorry if what I ask is stupid and basic.
I have installed Indexhibit, and everything works, I tryed to put plugin "galleria" in plugin folder, but when I go to indexhibit I don't understand where I can select this option, is not in the scroll window on the right in edit. I thought probably that the problem was the permission mode 777 , so I went in folder, I changed that permission, but everything is just still in the same way.
I have to paste some Html/php strings in the code? Where and how? In the Idnexhibit's interface or modifying files in the host?

If somebody speak italian and want to answer me in italiano is better, thanks a lot!

Vaska A / 2011-11-02 05:53:20   

Lucha, you can always create a thread in Italian and then I bet Ricky or Alessandro might see it. ;)

benmr6 / 2011-11-16 12:54:57   

hey is there a css work around for scroll bars... i'm working on a site and someone wants to view it on a really old machine. This plugin looks great on small screens including ipads. I've debugged for IE but I'm wondering if I'm missing something for scroll bars for content that can't be seen. I've played with Overflow css options for a while but was curious if I'm missing something. Any help would rock!

lemathieu A / 2011-11-17 01:39:21   

Hello,
Could you show us what you've already done ?
It should be easier for us to help you… (forum rules)

This thread has been closed, thank you.