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

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

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 2 Guests are viewing this topic.

Casper

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

claude258

I tried to install this, but stopped after the last find/replace on editpics.php. I searched the entire file and the code listed in the doc is nowhere to be found.

i am using version 1.32

I cant find this:
<tr>
                <td class="tableb" colspan="3" align="center">
                    <table border="0" cellspacing="0" cellpadding="0" width="100%">
                        <tr>
                            <td width="20%" align="center"><input type="radio" name="galleryicon" id="galleryicon{$CURRENT_PIC['pid']}" value="{$CURRENT_PIC['pid']}" {$isgalleryicon_selected}{$isgalleryicon_disabled}class="checkbox">{$lang_editpics_php['gallery_icon']}</td>
                            <td width="20%" align="center"><input type="checkbox" name="delete{$CURRENT_PIC['pid']}" id="delete{$CURRENT_PIC['pid']}" value="1" class="checkbox"><label for="delete{$CURRENT_PIC['pid']}" class="clickable_option">{$lang_editpics_php['del_pic']}</label></td>
                            <td width="20%" align="center"><input type="checkbox" name="reset_vcount{$CURRENT_PIC['pid']}" id="reset_vcount{$CURRENT_PIC['pid']}" value="1" class="checkbox"><label for="reset_vcount{$CURRENT_PIC['pid']}" class="clickable_option">{$lang_editpics_php['reset_view_count']}</label></td>
                            <td width="20%" align="center"><input type="checkbox" name="reset_votes{$CURRENT_PIC['pid']}" id="reset_votes{$CURRENT_PIC['pid']}" value="1" class="checkbox"><label for="reset_votes{$CURRENT_PIC['pid']}" class="clickable_option">{$lang_editpics_php['reset_votes']}</label></td>
                            <td width="20%" align="center"><input type="checkbox" name="del_comments{$CURRENT_PIC['pid']}" id="del_comments{$CURRENT_PIC['pid']}" value="1" class="checkbox"><label for="del_comments{$CURRENT_PIC['pid']}" class="clickable_option">{$lang_editpics_php['del_comm']}</label></td>
                        </tr>
                    </table>
                </td>
        </tr>

EOT;
        }
}


or this (as mentioned in the reply of july 13):

<tr>
                <td class="tableb" colspan="3" align="center">
                    <table border="0" cellspacing="0" cellpadding="0" width="100%">
                        <tr>
                            <td width="20%" align="center"><input type="checkbox" name="delete{$CURRENT_PIC['pid']}" id="delete{$CURRENT_PIC['pid']}" value="1" class="checkbox"><label for="delete{$CURRENT_PIC['pid']}" class="clickable_option">{$lang_editpics_php['del_pic']}</label></td>
                            <td width="20%" align="center"><input type="checkbox" name="reset_vcount{$CURRENT_PIC['pid']}" id="reset_vcount{$CURRENT_PIC['pid']}" value="1" class="checkbox"><label for="reset_vcount{$CURRENT_PIC['pid']}" class="clickable_option">{$lang_editpics_php['reset_view_count']}</label></td>
                            <td width="20%" align="center"><input type="checkbox" name="reset_votes{$CURRENT_PIC['pid']}" id="reset_votes{$CURRENT_PIC['pid']}" value="1" class="checkbox"><label for="reset_votes{$CURRENT_PIC['pid']}" class="clickable_option">{$lang_editpics_php['reset_votes']}</label></td>
                            <td width="20%" align="center"><input type="checkbox" name="del_comments{$CURRENT_PIC['pid']}" id="del_comments{$CURRENT_PIC['pid']}" value="1" class="checkbox"><label for="del_comments{$CURRENT_PIC['pid']}" class="clickable_option">{$lang_editpics_php['del_comm']}</label></td>
                        </tr>
                    </table>
                </td>
        </tr>

EOT;
        }
}

DustyNine

I'm getting an error on the picture of the day archive page. It's the same one though from before when the one line repeated (and I subsequently took the extra one out).

Fatal error: Undefined class name 'cpgpluginapi' in /u/t/thegate/www.thegate.ca/gallery/include/functions.inc.php on line 690


Any ideas? Everything else works fine. You can find the page at http://www.thegate.ca/gallery/thumbnails.php?album=potdarch.

Casper

@ DustyNine

The answer to your problem is in this reply,
http://forum.coppermine-gallery.net/index.php?topic=14600.msg81947#msg81947


@ claud258

first, you should update to the current version, which is 1.3.5.

The code you need to find is;

        <tr>
                <td class="tableb" colspan="3" align="center">
                        <b><input type="checkbox" name="delete{$CURRENT_PIC['pid']}" value="1" class="checkbox">{$lang_editpics_php['del_pic']}</b>&nbsp;
                        <b><input type="checkbox" name="reset_vcount{$CURRENT_PIC['pid']}" value="1" class="checkbox">{$lang_editpics_php['reset_view_count']}</b>&nbsp;
                        <b><input type="checkbox" name="reset_votes{$CURRENT_PIC['pid']}" value="1" class="checkbox">{$lang_editpics_php['reset_votes']}</b>&nbsp;
                        <b><input type="checkbox" name="del_comments{$CURRENT_PIC['pid']}" value="1" class="checkbox">{$lang_editpics_php['del_comm']}</b>&nbsp;
                </td>
        </tr>

EOT;
        }
}


You should replace it with this;

        <tr>
                <td class="tableb" colspan="3" align="center">
                        <b><input type="checkbox" name="delete{$CURRENT_PIC['pid']}" value="1" class="checkbox">{$lang_editpics_php['del_pic']}</b>&nbsp;
                        <b><input type="checkbox" name="reset_vcount{$CURRENT_PIC['pid']}" value="1" class="checkbox">{$lang_editpics_php['reset_view_count']}</b>&nbsp;
                        <b><input type="checkbox" name="reset_votes{$CURRENT_PIC['pid']}" value="1" class="checkbox">{$lang_editpics_php['reset_votes']}</b>&nbsp;
                        <b><input type="checkbox" name="del_comments{$CURRENT_PIC['pid']}" value="1" class="checkbox">{$lang_editpics_php['del_comm']}</b>&nbsp;
                </td>
        </tr>

EOT;

if (GALLERY_ADMIN_MODE){
echo <<<EOT
                    <tr>
                <td class="tableb" colspan="3" align="center">
                    <table border="0" cellspacing="0" cellpadding="0" width="100%">
                        <tr>
    <tr>
                            <td width="25%" align="center">
<b><input type="checkbox" name="reset_potd{$CURRENT_PIC['pid']}" value="YES" class="checkbox" />{$lang_editpics_php['potdnew']}</b></td><td width="25%" align="center"><b><input type="checkbox" name="reset_potdn{$CURRENT_PIC['pid']}" value="NO" class="checkbox" />{$lang_editpics_php['potdold']}</b>

<td width="25%" align="center">
<b><input type="checkbox" name="reset_potw{$CURRENT_PIC['pid']}" value="YES" class="checkbox" />{$lang_editpics_php['potwnew']}</b></td><td width="25%" align="center"><b><input type="checkbox" name="reset_potwn{$CURRENT_PIC['pid']}" value="NO" class="checkbox" />{$lang_editpics_php['potwold']}</b>
</td>
                        </tr>
                    </table>
                </td>
        </tr>

EOT;
}
        }
}
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

claude258

I have done some mods to the files and I am afraid to overwrite those files with the update (from 1.3.2 to 1.3.5).
If I do the manual update as Gaugau recommands, I think I will be in the same situation (the editpics.php file will not be changed).

What should I do? Do the update and do all the mods again? :( I am not sure to remember all the mods I have done.


DustyNine

Sorry Casper, that's what I meant in my message - I've already removed one of those lines. There is only one of those lines of code, here's where it sits:

$caption = $user_link.'<span class="thumb_caption">'.localised_date($row['potd_date'], $lastup_date_fmt).'</span>';
                        $rowset[$key]['caption_text'] = $caption;
                }

                $rowset = CPGPluginAPI::filter('thumb_caption_lastup',$rowset);

                return $rowset;
                break;


So you know, the $rowset line sits at line 690 (although that's probably obvious). Any other options?

Joachim Müller

Quote from: claude258 on October 19, 2005, 02:16:01 PM
If I do the manual update as Gaugau recommands, I think I will be in the same situation (the editpics.php file will not be changed).
What are you refering to? What manual update do I recommend? Take a look at the instructions posted by Makc666 that explain how to update a modded version: http://forum.coppermine-gallery.net/index.php?topic=22132.msg102767#msg102767

claude258

I am referring to this:
http://forum.coppermine-gallery.net/index.php?topic=22132.msg102767#msg102767
see the first post (on top).

Anyway, I think I will have to do the "regular" update soon. 

Joachim Müller

yes, definitely: as suggested in the posting you refered to: the manual fix is only for experienced users. Cpg1.3.5 contains other fixes for minor issues as well. For details on updating coppermine, please don't post on this thread, as it is meant for discussion related to the potd mod only.

claude258

I did erevything for this mod (POTD) but I get an error while trying to use it as an "anyontent insert":

There was an error while processing a database query.

The debug is:

While executing query "SELECT pid, aid, filepath, filename, owner_name, owner_id  from cpg_pictures WHERE potd='1'" on

mySQL error: Unknown column 'potd' in 'where clause'

Any idea of the problem?
I am on version 1.3.5
Thanks

claude258

I found my problem, the update have not been done properly... Everythin is ok now...  ;D

trackman

I've tried this and I get the following error:

Fatal error: Call to undefined function: db_query() in D:\home\Default\cdcoverhideout.com\htdocs\coppermine_gallery\potd.php on line 39

??? ???

Paver

trackman: It sounds like you're using the 1.3 version of the mod since in 1.4, the correct function is "cpg_db_query".

1.3: db_query
1.4: cpg_db_query

trackman

Changed it back to cpg_db_query but getting this following error now:

There was an error while processing a database query

??? ???

Paver

Under Config - Maintenance Settings, Enable Debug Mode so you can find out more info.

DustyNine

Sorry if the answer is obvious, but what should we do with the POTD add-on if we're upgrading from 1.3 to 1.4?

Joachim Müller


DustyNine

GauGau - I understand you're trying to keep people from asking for hacks and changes every time there's an update, however at the same time this mod was made for 1.3 and 1.4. I only asked for assistance since I wanted to know if updating to 1.4 with this 1.3-edited hack would wreck havok on my gallery. Since I must be the biggest noob here, I'm assuming if I upgrade to 1.4, I should then reverse the steps on the mod instructions to get it to 1.4 as well, but I guess I'll see.

Casper

Quote from: DustyNine on December 16, 2005, 03:10:41 AM
Sorry if the answer is obvious, but what should we do with the POTD add-on if we're upgrading from 1.3 to 1.4?

Sorry, been away a while.

The answer is to simply re-apply the mod, using the instructions for the 1.4x 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

DustyNine

Thanks Casper. I knew it would be something like that, but didn't want to bring the whole thing crashing down. Appreciate the help!