Welcome to Geeklog Thursday, November 23 2017 @ 11:00 pm EST


Status: offline

berber

Forum User
Junior
Registered: 24/10/2005
Posts: 20
I made the change and the error is gone, however I'm not getting the welcome mail with the password when i register.

a simply mail -v from shell does send mail...

I'm using a linux box


any idea?

Status: offline

berber

Forum User
Junior
Registered: 24/10/2005
Posts: 20
forget it.... damn junk mail folder
I need to change the From field... it's sending this mail to the junk folder in outlook...

Status: offline

hatric

Forum User
Junior
Registered: 19/09/2005
Posts: 22

Close to the begining of this thread a user (k616) asked about a parent album not showing the # of items (from sub albums):


"- picture and view count of album should show picture and view count of album and subalbums combined."


Currently my parent albums show 0 items even with subalbums within. Can you help?


The auto-thumbnailing of sub-album pictures code that he/she submitted worked, although it is now line 1610 with v.9 versus 1477 in .85


Thanks for your help!

Status: offline

machinari

Forum User
Full Member
Registered: 22/03/2004
Posts: 1512
my bad, missed the parent album dir..

the following applies to v0.9.0
in functions.inc, in the function inm_showAlbumSummary(), at beginning at line 1604 replace the following:
PHP Formatted Code
                        //loop thru sub-albums until a random image is returned
                        while ($sRA = DB_fetchArray($sR)){
                            $albumthumb = inm_getRandomMedia($sRA['id']);
                            if(is_array($albumthumb) && !empty($albumthumb['mid']) && file_exists($INM_CONF['path_albums'] . $sRA['aid'] . '/' . $albumthumb['filename'])){
                                $adir = $sRA['aid'];
                                break;
                            }
                        }


 
with the following:
PHP Formatted Code
                        //loop thru sub-albums until a random image is returned
                        while ($sRA = DB_fetchArray($sR)){
                            $albumthumb = inm_getRandomMedia($sRA['id']);
                            if(is_array($albumthumb) && !empty($albumthumb['mid']) && file_exists($INM_CONF['path_albums'] . $A['aid'] . '/' . $sRA['aid'] . '/' . $albumthumb['filename'])){
                                $adir = $A['aid'] . '/' . $sRA['aid'];
                                break;
                            }
                        }


 
notice the addition of $A['aid']

Status: offline

hatric

Forum User
Junior
Registered: 19/09/2005
Posts: 22
Thanks for the help above...

Another ? for you. When writing a loooooong caption/description for a picture/album the text does not "word wrap" (so to speak) and keeps widening the page to hold the single line of text. Is there a way to have it automatically break to the next line at say 100 characters or something of the like?

Also, a suggestion: In the "jump to" drop down box I increased the character count from the default 12 up to 50. Not a real big deal, but does make it easier to read for those with longer album titles. And along that line... in the text that populates the drop down box (album and subalbum titles) is there a way to bold the text of the parent album?

thanks,
/hatric

Status: offline

charon79m

Forum User
Newbie
Registered: 04/09/2005
Posts: 7
I upgraded to .90 without issue. The install went well and I did not get any issues when I ran the upgrade. When I go into my albums, however, I do not have any images show.

No thumbnails, no resized images, and I get an error when I try to show the full sized images:

PHP Formatted Code

Warning: imagick_setcompressionquality() expects parameter 1 to be resource, null given in /var/www/geeklog/system/pear/Image/Transform/Driver/Imagick2.php on line 261

Fatal error: Call to undefined function: strcasecomp() in /var/www/geeklog/system/pear/Image/Transform/Driver/Imagick2.php on line 263

 

Any assistance on this would be greatly appreciated. If any more info would be helpful, let me know.

Thanks!

MrKnisely

Status: offline

machinari

Forum User
Full Member
Registered: 22/03/2004
Posts: 1512
Quote by hatric:When writing a loooooong caption/description for a picture/album the text does not "word wrap"
I can't think of why this would happen unless you have no spaces in your caption. Must be a style issue. Got a page for me to have a look at?

Quote by hatric:in the text that populates the drop down box (album and subalbum titles) is there a way to bold the text of the parent album?
yes. good idea. here's how you can do it: find the function inm_showintro() in the funcitons.inc file and find this line:
PHP Formatted Code
                $albumoptions .= '<option value="' . $A['id'] . '">' . $album . '</option>' . LB;

 
and change it to this:
PHP Formatted Code
                $albumoptions .= '<option style="font-weight:bold;" value="' . $A['id'] . '">' . $album . '</option>' . LB;

 
or you could add a class name and then put your style into the CSS--that's probably what I'll do.. Coloring the parent albums might be an idea as well.

Status: offline

machinari

Forum User
Full Member
Registered: 22/03/2004
Posts: 1512
Quote by charon79m:I get an error when I try to show the full sized images:
Warning: imagick_setcompressionquality() expects parameter 1 to be resource, null given in /var/www/geeklog/system/pear/Image/Transform/Driver/Imagick2.php on line 261
My bad, I neglected to consider that instead of specifying a library in your geeklog config file's $_CONF['image_lib'], some might just leave it empty, which it is by default.
The easy way to fix this is to specify a library in your Geeklog config.php file according to the comments contained therein.
The not so easy way would be to edit the pear file, system/pear/image/transform.php as follows:
find the following bit
PHP Formatted Code
    function &factory($driver)
    {
                if ('' == $driver) {
            $aExtensions = array(
                'imagick' => 'Imagick2',
                'gd'      => 'GD',
                'imlib'   => 'Imlib');
            foreach ($aExtensions as $sExt => $sDriver) {
                if (PEAR::loadExtension($sExt)) {
                    $driver = $sDriver;
                    break;
                }

 
and just rearrange the extension array like so
PHP Formatted Code
    function &factory($driver)
    {
                if ('' == $driver) {
            $aExtensions = array(
                'gd'     => 'GD',
                'imagick' => 'Imagick2',
                'imlib'   => 'Imlib');
            foreach ($aExtensions as $sExt => $sDriver) {
                if (PEAR::loadExtension($sExt)) {
                    $driver = $sDriver;
                    break;
                }

 

the imagick and imlib extensions are not supported.

Status: offline

hatric

Forum User
Junior
Registered: 19/09/2005
Posts: 22

My bad on the caption, when I was typing in the text I did not use spaces - I am a dumba$$ at times


The bolding of the album titles you suggested did not work, nothing changed in apperance.


and... I thought of another question for you. In the random picture block, is there a way to describe, underneath the thumbnail, text to tell which album the picture came from? e.g. "From the XXX Album"


and... When using the slideshow there is no "exit" button to kill it and return to the gallery... or am I missing something?


and... I would like to set the default order of albums to date ascending rather than date decending.


and... and thats enough for now!

thanks!
/hatric

Status: offline

machinari

Forum User
Full Member
Registered: 22/03/2004
Posts: 1512
Quote by hatric:The bolding of the album titles you suggested did not work, nothing changed in apperance.
worked for me. You must be using IE?
Quote by hatric:In the random picture block, is there a way to describe, underneath the thumbnail, text to tell which album the picture came from?
yup. can you write PHP? You'll need to modify inm_getRandomMedia() in the functions.inc file. ...or you can just replace it with this:
PHP Formatted Code
function inm_getRandomMedia($id = ''){
    global $INM_TABLES, $_CONF, $INM_CONF;

    if (!empty($id)){
        if (inm_hasAlbumAccess($id)){
            $A = array();
            $result = DB_query("SELECT mid, filename, title, caption FROM {$INM_TABLES['media']} WHERE aid='$id' AND status='0'" . COM_getPermSQL('and') . " ORDER BY RAND() LIMIT 1");
            list($A['mid'],$A['filename'],$A['title'],$A['caption']) = DB_fetchArray($result);
            $retval = $A;
        } else {
            $retval = '';
        }
    } else {
        //get random mid
        $result = DB_query("SELECT mid, title, caption, aid FROM {$INM_TABLES['media']}" . COM_getPermSQL('where') . " ORDER BY RAND()");
        if (DB_numRows($result) < 1){
            return;
        }
        while ($A = DB_fetchArray($result)){
            if (inm_hasMediaAccess($A['mid']) >= 2){
                if(!empty($A['title'])){
                    $alt = trim(COM_stripslashes($A['title']));
                } else {
                    $alt = 'link to image #' . $A['mid'];
                }
                $albumname = COM_stripslashes(DB_getItem($INM_TABLES['albums'], 'name', "id='{$A['aid']}'"));
                $thumbsize = DB_getItem($INM_TABLES['settings'], 'thumbsize', "thumbsize<>''");
                $src = $INM_CONF['url_html'] . '/image.php?thumb=1&size=' . $thumbsize . '&mid=' . $A['mid'];
                $retval = '<a href="' . $INM_CONF['url_html'] . '/browse.php?mid=' . $A['mid'] . '"><img src="' . $src . '" title="' . $alt . '" alt="' . $alt . '" /></a>';
                if (!empty($albumname)){
                    $retval .= '<p>' . $albumname . '</p>';
                }
                if (!empty($A['caption'])){
                    if (strlen(trim(COM_stripslashes($A['caption']))) > 64){
                        $retval .= '<p>' . substr(trim(COM_stripslashes($A['caption'])), 0, 64) . '...</p>';
                    } else $retval .= '<p>' . trim(COM_stripslashes($A['caption'])) . '</p>';
                }
                break;
            } else {
                continue;
            }
        }
    }
    return $retval;
}


 
in version 1.0, this function will be changed a bit to allow easier editing from the template file.
Quote by hatric:When using the slideshow there is no "exit" button to kill it and return to the gallery... or am I missing something?
Just click on an image or your browser's back button.

Status: offline

hatric

Forum User
Junior
Registered: 19/09/2005
Posts: 22

Yea... like most of the MS minions of the world, I am stuck using IE. By choice? NO. By necesity? YES!! unless you would like to retrain my 80 year old mother how to use something else! I have spent enough hours on the phone with her already teaching the difference between "left click" and "right click"


The code for the random picture block worked like a charm. Thank you!!! To take it one step further... how to make the "album name" into a link to the actual album?


DOH!! I should have tried the back button for the slideshow!! lol thanks!



Status: offline

machinari

Forum User
Full Member
Registered: 22/03/2004
Posts: 1512
Quote by hatric:... how to make the "album name" into a link to the actual album?

find this line from the code just above:
PHP Formatted Code
                    $retval .= '<p>' . $albumname . '</p>';

 
and replace it with this:
PHP Formatted Code
                    $retval .= '<p><a href="' . $INM_CONF['url_html'] . '/browse.php?id=' . $A['aid'] . '">' . $albumname . '</a></p>';

 

Status: offline

hatric

Forum User
Junior
Registered: 19/09/2005
Posts: 22
Cool! worked great!!

next... (am I annoying you yet?? )

I set my thumbnail page to a default of 64 T-nails to a page. When I open the first picture it comes up fine... I use the little arrow (pointing to the right) to advance to the next picture, and this works good for 15 to 16 images before the green arrow dissapears and the only link left is the "slideshow" link. Seems there is a cut-off at 16 (the default images per page #?). Is there a setting to get past this "limit?"

thanks
/hatric

Status: offline

machinari

Forum User
Full Member
Registered: 22/03/2004
Posts: 1512
the thumbs per page setting is completely separate from the pagination for scaled images so no need to look there for a solution.

that said, I'm at a loss for a solution being that I am unable to reproduce this behaviour.

things to check: do you have more than 15 or 16 images in the album? sure that it was the first image you clicked on to start or was it the 15th from the end? does this behaviour occur for every album? and only when thumbs per page are set to 64? It would help if I could see your gallery--shoot me an email if you want to keep it private.

Status: offline

hatric

Forum User
Junior
Registered: 19/09/2005
Posts: 22

It seems to be working fine today. I must have had some sort of glich going on the other night. Thanks.

Status: offline

Robin

Forum User
Full Member
Registered: 15/02/2002
Posts: 725
OK here's the thing with 0.8.5. Hopefully nobody's mentioned it yet as I checked for this one.
I had to edit images posted by a user and afterwards I noticed that the author/owner changed from the user into myself
So there is something in the SQL that updates photos.
I had to go to the DB and change owner_id back to user's.

Probably the same applies to albums but I haven't checked it.

Cheers
Geeklog Polish Support Team

Status: offline

machinari

Forum User
Full Member
Registered: 22/03/2004
Posts: 1512
0.9.0 takes care of that. thanks Robin

Status: offline

Robin

Forum User
Full Member
Registered: 15/02/2002
Posts: 725
Quote by machinari: 0.9.0 takes care of that.

Looks like I need to update the gallery then
Thanks Machinary for prompt reply .
Geeklog Polish Support Team

Status: offline

berber

Forum User
Junior
Registered: 24/10/2005
Posts: 20
will 0.9.5 have the option to add comments to each image?

Status: offline

machinari

Forum User
Full Member
Registered: 22/03/2004
Posts: 1512
0.9.5? doesn't exist and wont.
the documentation explains that comments wont be applied until gl 1.3.12 comes out. wont be long for that.
anyway, Inmemoriam 1.0 already has comments working and will be released once 1.3.12 is released.

All times are EST. The time is now 11:00 pm.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content