Photo of the day / week etc, with auto archive albums. - Page 4 Photo of the day / week etc, with auto archive albums. - Page 4
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

Photo of the day / week etc, with auto archive albums.

Started by Casper, February 07, 2005, 01:16:42 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Zanelli

#60
Is there any way of making this work with animated .gif or shockwave files?

My galley's at: http://theaahc.net/Gallery

Casper

Should work, but you will have to edit the files you are using to remove all instances of 'normal_', as these files do not have a 'normal_' version.
It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here

Zanelli

Quote from: Casper on January 03, 2006, 01:16:14 AM
Should work, but you will have to edit the files you are using to remove all instances of 'normal_', as these files do not have a 'normal_' version.

Thanks that worked for .gif files but not for shockwave but I'm not bothered.

Timbli

G'day
Could someone maybe show me how to edit my weekthumb.php so it displays:

*Image*
Title:
Descripion:
Date:
Submitted By:

Cheers

modiba

Hello,

Can someone tell me how to remove a photo from the Photo of the Day/Week Archive?

Very grateful for any help.

Thank you,
Greg

Timbli


Joachim Müller

on the very first page of this thread, leotan asked
Quote from: leotan on May 30, 2005, 02:16:33 PM
How do I remove it if I accidentally choose a wrong picture? Can I take it out of the ptd?
and Casper replied:
Quote from: Casper on May 31, 2005, 09:05:07 PM
There is no way to do this at the moment, without going into the database to amend the entry in the pictures table.
Please read the thread before posting to avoid the same question being asked over and over again.

If you need the mod modified, you're basically on your own. This thread is meant to help users applying the mod in the first place. It's not meant to be used for questions related to modifications of the mod. If you can't figure out how to modify it, you shouldn't use it in the first place.

DustyNine

Sorry folks, it's me again. I had to move servers recently and so I installed the new version of Coppermine, moved my MySQL databases over, and then re-installed the PotD mod. The problem is, it's not updating the databases with the 1s and 2s to signify that the picture is the current PotD or an archived one. I manually went in and did it for today and it worked, but using the control panel isn't working to change the status.

I've checked and rechecked it all, and I did everything - anyone know what could be wrong?

leotan

I upgraded to 1.4.8 and it seems like this mod is not working for me now.
I am not able to move the picture to the archieve and not able to set a new picture of the week.

I notice this at the debug message:
/editpics.php
Notice line 101: Undefined index: galleryicon

Anyone can help?
Thank you.

Joachim Müller

Ignore notices, or (even better) turn them off in coppermine's config unless you're a dev and know what they mean.

leotan

i turn it out hoping to see some answer why it is not working for me anymore... :(

I am not able to move the potw picture to the achieve and set new potw picture...
The last potw picture just refused to be changed. :(

gelaskimgel

It does not work for me... And I'm using 1.4.8 version... Anyone help?

Senator

Hello, great hack, i've change all files, and update the sql. cpg135_pictures.

Everything looks fine. but the pictures in potd.php and potw.php are not vissable.

I get no error or something.

Do you have any idea what iám doing wrong.

Senator

I.ve findout, that when i change my cgp135_pictures manualy it works, so my db is not changing when is select a pic in editpics.php and save.

So i think there is something wrong in my editpics.php

$isgalleryicon = ($galleryicon===$pid);

                $delete       = isset($_POST['delete'.$pid]);
                $reset_vcount = isset($_POST['reset_vcount'.$pid]);
                $reset_votes  = isset($_POST['reset_votes'.$pid]);
$reset_potd  = isset($_POST['reset_potd'.$pid]);
$reset_potd_date  = isset($_POST['reset_potd_date'.$pid]);
$reset_potdn  = isset($_POST['reset_potdn'.$pid]);
$reset_potw  = isset($_POST['reset_potw'.$pid]);
$reset_potw_date  = isset($_POST['reset_potw_date'.$pid]);
$reset_potwn  = isset($_POST['reset_potwn'.$pid]);
                $del_comments = isset($_POST['del_comments'.$pid]) || $delete;

                $query = "SELECT category, filepath, filename, owner_id FROM {$CONFIG['TABLE_PICTURES']}, {$CONFIG['TABLE_ALBUMS']} WHERE {$CONFIG['TABLE_PICTURES']}.aid = {$CONFIG['TABLE_ALBUMS']}.aid AND pid='$pid'";
                $result = cpg_db_query($query);
                if (!mysql_num_rows($result)) cpg_die(CRITICAL_ERROR, $lang_errors['non_exist_ap'], __FILE__, __LINE__);
                $pic = mysql_fetch_array($result);
                mysql_free_result($result);

                if (!GALLERY_ADMIN_MODE) {
                        if ($pic['category'] != FIRST_USER_CAT + USER_ID) cpg_die(ERROR, $lang_errors['perm_denied']."<br />(picture category = {$pic['category']}/ $pid)", __FILE__, __LINE__);
                        if (!isset($user_album_set[$aid])) cpg_die(ERROR, $lang_errors['perm_denied']."<br />(target album = $aid)", __FILE__, __LINE__);
                }

                $update  = "aid = '".$aid."'";
                $update .= ", title = '".addslashes($title)."'";
                $update .= ", caption = '".addslashes($caption)."'";
                $update .= ", keywords = '".addslashes($keywords)."'";
                $update .= ", user1 = '".addslashes($user1)."'";
                $update .= ", user2 = '".addslashes($user2)."'";
                $update .= ", user3 = '".addslashes($user3)."'";
                $update .= ", user4 = '".addslashes($user4)."'";

                if ($isgalleryicon && $pic['category']>FIRST_USER_CAT) {
                                        $sql = 'update '.$CONFIG['TABLE_PICTURES'].' set galleryicon=0 where owner_id='.$pic['owner_id'].';';
                                        cpg_db_query($sql);
                                        $update .= ", galleryicon = ".addslashes($galleryicon);
                                }

                                if (is_movie($pic['filename'])) {
                                        $pwidth = get_post_var('pwidth', $pid);
                                        $pheight = get_post_var('pheight', $pid);
                                        $update .= ", pwidth = " .  (int) $pwidth;
                                        $update .= ", pheight = " . (int) $pheight;
                                }

                if ($reset_vcount) {
                    $update .= ", hits = '0'";
                    resetDetailHits($pid);
                }
                if ($reset_votes) {
                    $update .= ", pic_rating = '0', votes = '0'";
if (GALLERY_ADMIN_MODE) {
if ($reset_potd) $update .= ", potd = '1', potd_date = '$timestamp'";
if ($reset_potdn) $update .= ", potd = '2'";
if ($reset_potw) $update .= ", potw = '1', potw_date = '$timestamp'";
if ($reset_potwn) $update .= ", potw = '2'";
}
                    resetDetailVotes($pid);
                }

                if (UPLOAD_APPROVAL_MODE) {
                    $approved = get_post_var('approved', $pid);
                        if ($approved == 'YES') {
                                $update .= ", approved = 'YES'";
                        } elseif ($approved == 'DELETE') {
                                $del_comments = 1;
                                $delete = 1;
                        }
                }

                if ($del_comments) {
                        $query = "DELETE FROM {$CONFIG['TABLE_COMMENTS']} WHERE pid='$pid'";
                        $result =cpg_db_query($query);
                }

                if ($delete) {
                        $dir=$CONFIG['fullpath'].$pic['filepath'];
                        $file=$pic['filename'];

                        if (!is_writable($dir)) cpg_die(CRITICAL_ERROR, sprintf($lang_errors['directory_ro'], $dir), __FILE__, __LINE__);
    $files=array($dir . $file, $dir . $CONFIG['normal_pfx'] . $file, $dir . $CONFIG['orig_pfx'] . $file, $dir . $CONFIG['thumb_pfx'] . $file, $dir . $CONFIG['mini_pfx'] . $file);
                        //$files=array($dir.$file, $dir.$CONFIG['normal_pfx'].$file, $dir.$CONFIG['thumb_pfx'].$file);
                        foreach ($files as $currFile){
                                if (is_file($currFile)) @unlink($currFile);
                        }

                        $query = "DELETE FROM {$CONFIG['TABLE_PICTURES']} WHERE pid='$pid' LIMIT 1";
                        $result = cpg_db_query($query);
                } else {
                        $query = "UPDATE {$CONFIG['TABLE_PICTURES']} SET $update WHERE pid='$pid' LIMIT 1";
                        $result = cpg_db_query($query);
                }
        }
}

function form_label($text)
{
        global $CURENT_PIC;

        echo <<<EOT
        <tr>
                <td class="tableh2" colspan="3">
                        <b>$text</b>
                </td>
        </tr>

EOT;
}





                               

Nibbler

Check the output of debug mode immediately after saving and see if the UPDATE query is being run.

Senator

Sorry, but can you see it for me? iám not very good with mysql.

Here is my debugcode.

USER:
------------------
Array
(
    [ID] => 6036ec705c212113cff050268184eca3
    [am] => 1
    [liv] => Array
        (
            [0] => 4462
            [1] => 4461
            [2] => 4460
            [3] => 4459
            [4] => 4455
        )

    [uid] => 181
    [search] => Array
        (
            [search] => annie
            [album] => search
            [title] => on
            [newer_than] =>
            [caption] => on
            [older_than] =>
            [keywords] => on
            [owner_name] => on
            [type] => AND
            [params] => Array
                (
                    [title] => on
                    [caption] => on
                    [keywords] => on
                    [owner_name] => on
                )

        )

    [lang] => english
    [lap] => 1
)

==========================
USER DATA:
------------------
Array
(
    [user_id] => 1
    [user_name] => annie
    [groups] => Array
        (
            [0] => 1
        )

    [disk_max] => 0
    [disk_min] => 0
    [can_rate_pictures] => 1
    [can_send_ecards] => 1
    [ufc_max] => 3
    [ufc_min] => 3
    [custom_user_upload] => 0
    [num_file_upload] => 5
    [num_URI_upload] => 3
    [can_post_comments] => 1
    [can_upload_pictures] => 1
    [can_create_albums] => 0
    [has_admin_access] => 1
    [pub_upl_need_approval] => 0
    [priv_upl_need_approval] => 0
    [group_name] => Administrators
    [upload_form_config] => 3
    [group_quota] => 0
    [can_see_all_albums] => 1
    [group_id] => 1
)

==========================
Queries:
------------------
Array
(
    [0] => SELECT extension, mime, content, player FROM cpg135_filetypes; (0s)
    [1] => select * from cpg135_plugins order by priority asc; (0s)
    [2] => delete from `sextekort`.cpg135_sessions where time<1156358589 and remember=0; (0.001s)
    [3] => delete from `sextekort`.cpg135_sessions where time<1155152589; (0s)
    [4] => select user_id from `sextekort`.cpg135_sessions where session_id=md5("d770569a5855f59095b0269c638d6b7aab3ccfcb31501c718c90748e5529b79e"); (0s)
    [5] => select user_id as id, user_password as password from `sextekort`.cpg135_users where user_id=1 (0s)
    [6] => SELECT u.user_id AS id, u.user_name AS username, u.user_password AS password, u.avatar_url AS avatar_url, u.enable_admin_email AS notify, u.auto_subscribe_post AS auto_subscribe_post, u.auto_subscribe_comment AS auto_subscribe_comment, u.user_group+100 AS group_id FROM `sextekort`.cpg135_users AS u INNER JOIN `sextekort`.cpg135_usergroups AS g ON u.user_group=g.group_id WHERE u.user_id='1' (0s)
    [7] => SELECT user_group_list FROM `sextekort`.cpg135_users AS u WHERE user_id='1' and user_group_list <> ''; (0s)
    [8] => SELECT MAX(group_quota) as disk_max, MIN(group_quota) as disk_min, MAX(can_rate_pictures) as can_rate_pictures, MAX(can_send_ecards) as can_send_ecards, MAX(upload_form_config) as ufc_max, MIN(upload_form_config) as ufc_min, MAX(custom_user_upload) as custom_user_upload, MAX(num_file_upload) as num_file_upload, MAX(num_URI_upload) as num_URI_upload, MAX(can_post_comments) as can_post_comments, MAX(can_upload_pictures) as can_upload_pictures, MAX(can_create_albums) as can_create_albums, MAX(has_admin_access) as has_admin_access, MIN(pub_upl_need_approval) as pub_upl_need_approval, MIN( priv_upl_need_approval) as  priv_upl_need_approval FROM cpg135_usergroups WHERE group_id in (1) (0s)
    [9] => SELECT group_name FROM  cpg135_usergroups WHERE group_id= 1 (0s)
    [10] => update `sextekort`.cpg135_sessions set time='1156362189' where session_id=md5('d770569a5855f59095b0269c638d6b7aab3ccfcb31501c718c90748e5529b79e'); (0s)
    [11] => SELECT user_favpics FROM cpg135_favpics WHERE user_id = 1 (0.001s)
    [12] => DELETE FROM cpg135_mod_online WHERE last_action < NOW() - INTERVAL 10 MINUTE (0s)
    [13] => REPLACE INTO cpg135_mod_online (user_id, user_name, user_ip, last_action) VALUES ('1', 'annie', '83.98.239.43', NOW()) (0s)
    [14] => SELECT count(*) FROM  cpg135_pms WHERE owner=1 (0.002s)
    [15] => SELECT count(*) FROM  cpg135_pms WHERE owner=1 AND showed='0' (0.002s)
    [16] => SELECT count(*) FROM  cpg135_buddy WHERE user_id=1 (0s)
    [17] => SELECT count(*) FROM  cpg135_buddy_req WHERE buddy_to=1 (0s)
    [18] => DELETE FROM cpg135_banned WHERE expiry < '2006-08-23 21:47:57' (0s)
    [19] => SELECT * FROM cpg135_banned WHERE (ip_addr='83.98.239.43' OR ip_addr='83.98.239.43' OR user_id=1) AND brute_force=0 (0s)
    [20] => SELECT title, category FROM cpg135_albums WHERE aid = '51' (0s)
    [21] => SELECT DISTINCT aid, title, IF(category = 0, CONCAT('> ', title), CONCAT(name,' < ',title)) AS cat_title FROM cpg135_albums, cpg135_categories WHERE category < '10000' AND (category = 0 OR category = cid) ORDER BY cat_title (0.001s)
    [22] => SELECT aid, title FROM cpg135_albums WHERE category='10001'  OR category='10001' ORDER BY title (0s)
    [23] => SELECT category, filepath, filename, owner_id FROM cpg135_pictures, cpg135_albums WHERE cpg135_pictures.aid = cpg135_albums.aid AND pid='4202' (0s)
    [24] => UPDATE cpg135_pictures SET aid = '51', title = 'ondanks alles', caption = 'wel oud maar zo heerlijk!!!', keywords = '', user1 = '', user2 = '', user3 = '', user4 = '' WHERE pid='4202' LIMIT 1 (0s)
    [25] => SELECT category, filepath, filename, owner_id FROM cpg135_pictures, cpg135_albums WHERE cpg135_pictures.aid = cpg135_albums.aid AND pid='4371' (0s)
    [26] => UPDATE cpg135_pictures SET aid = '51', title = '', caption = '', keywords = '', user1 = '', user2 = '', user3 = '', user4 = '' WHERE pid='4371' LIMIT 1 (0s)
    [27] => SELECT count(*) FROM cpg135_pictures WHERE aid = '51' (0s)
    [28] => SELECT p.*,a.category FROM cpg135_pictures as p INNER JOIN cpg135_albums as a ON a.aid=p.aid WHERE p.aid = '51' ORDER BY p.filename LIMIT 0, 25 (0s)
    [29] => SELECT COUNT(*) FROM cpg135_pictures WHERE approved = 'NO' (0.003s)
    [30] => SELECT aid, title FROM cpg135_albums WHERE category='10001'  OR category='10607' ORDER BY title (0s)
    [31] => SELECT aid, title FROM cpg135_albums WHERE category='10001'  ORDER BY title (0s)
)

==========================
GET :
------------------
Array
(
    [album] => 51
    [start] => 0
    [count] => 25
)

==========================
POST :
------------------
Array
(
    [count] => 25
    [pid] => Array
        (
            [0] => 4202
            [1] => 4371
        )

    [aid4202] => 51
    [title4202] => ondanks alles
    [caption4202] => wel oud maar zo heerlijk!!!
    [keywords4202] =>
    [user14202] =>
    [user24202] =>
    [user34202] =>
    [user44202] =>
    [reset_potd4202] => YES
    [aid4371] => 51
    [title4371] =>
    [caption4371] =>
    [keywords4371] =>
    [user14371] =>
    [user24371] =>
    [user34371] =>
    [user44371] =>
)

==========================
VERSION INFO :
------------------
PHP version: 5.1.4-pl0-gentoo - OK
------------------
mySQL version: 4.0.18
------------------
Coppermine version: 1.4.8(stable)
==========================
Module: GD
------------------
GD Version: bundled (2.0.28 compatible)
FreeType Support: 1
FreeType Linkage: with freetype
T1Lib Support: 1
GIF Read Support: 1
GIF Create Support: 1
JPG Support: 1
PNG Support: 1
WBMP Support: 1
XPM Support:
XBM Support: 1
JIS-mapped Japanese Font Support:

==========================
Module: mysql
------------------
MySQL Supportenabled
Active Persistent Links 0
Active Links 1
Client API version 4.0.18
MYSQL_MODULE_TYPE external
MYSQL_SOCKET /var/run/mysqld/mysqld.sock
MYSQL_INCLUDE -I/usr/include/mysql
MYSQL_LIBS -L/usr/lib -lmysqlclient 
==========================
Module: zlib
------------------
ZLib Support enabled
Stream Wrapper support compress.zlib://
Stream Filter support zlib.inflate, zlib.deflate
Compiled Version 1.1.4
Linked Version 1.1.4
==========================
Server restrictions (safe mode)?
------------------
Directive | Local Value | Master Value
safe_mode | On | On
safe_mode_exec_dir | /home/chroot/home/sites/bin | /home/chroot/home/sites/bin
safe_mode_gid | Off | Off
safe_mode_include_dir | no value | no value
safe_mode_exec_dir | /home/chroot/home/sites/bin | /home/chroot/home/sites/bin
sql.safe_mode | Off | Off
disable_functions | exec,system,shell_exec,popen,chown,chmod,passthru,posix_kill,touch | exec,system,shell_exec,popen,chown,chmod,passthru,posix_kill,touch
file_uploads | On | On
include_path | .:/usr/lib/php:/usr/lib/php/DB:/usr/lib/php/PEAR | .:/usr/lib/php:/usr/lib/php/DB:/usr/lib/php/PEAR
open_basedir | no value | no value
==========================
email
------------------
Directive | Local Value | Master Value
sendmail_from | no value | no value
sendmail_path | /usr/sbin/sendmail -t -i -fwebmaster@sextekort.nl | /usr/sbin/sendmail -t -i
SMTP | localhost | localhost
smtp_port | 25 | 25
==========================
Size and Time
------------------
Directive | Local Value | Master Value
max_execution_time | 30 | 30
max_input_time | 60 | 60
upload_max_filesize | 2M | 2M
post_max_size | 8M | 8M
==========================
Page generated in 0.124 seconds - 32 queries in 0.01 seconds - Album set : ; Meta set: ;

Senator

i thing here is something wrong, but i dont now what.

This is a part of my debugcode

[24] => UPDATE cpg135_pictures SET aid = '51', title = 'ondanks alles', caption = 'wel oud maar zo heerlijk!!!', keywords = '', user1 = '', user2 = '', user3 = '', user4 = '' WHERE pid='4202' LIMIT 1 (0s)
    [25] => SELECT category, filepath, filename, owner_id FROM cpg135_pictures, cpg135_albums WHERE cpg135_pictures.aid = cpg135_albums.aid AND pid='4371' (0s)
    [26] => UPDATE cpg135_pictures SET aid = '51', title = '', caption = '', keywords = '', user1 = '', user2 = '', user3 = '', user4 = '' WHERE pid='4371' LIMIT 1 (0s)

th3m4sk

Dear Fellows,
I got two problems installing this Plugin.
First , when I update the database , all information concerning number of hits etc GONE. The members of my gallery was quit killing me.
Second , I respect all instructions to put my POTW on the first page , and Nothing . I was killing my brain  with no success. More there are two diferent reaction on the IE and Firefox. On both I got the information  the Member so and so but on IE instead of a Pic apperas a X on the Firefox nothing appears.
If there is any person that had already installed this plugin , pls send me a msg I will organize a conttact even by skype or phone to help me.
Tks in advance, and congratulationsfor all efforts on this forum to help us running sujch a beatifull software .

Th3m4sk


modiba

Quote from: gelaskimgel on August 16, 2006, 12:23:24 AM
It does not work for me... And I'm using 1.4.8 version... Anyone help?

If anyone has got this hack to work on version 1.4.8 could they please post up how they did it?

Thanks,
Greg

Gizmo

You should upgrade to 1.4.9 and I've had it running on many earlier versions. I installed it using the instructions set forth by Casper without any modifications. Do you have other plugins installed or using a customized theme?
Did you read the manual first???? Taking 2 minutes to backup your files can save you hours of wondering what you screwed up.
Billy Bullock - BullsEyePhotos Blog of Indecision