Advanced search  

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]

Pages: 1 2 [3] 4 5   Go Down

Author Topic: Photo of the day / week etc, with auto archive albums.  (Read 111821 times)

0 Members and 1 Guest are viewing this topic.

Casper

  • VIP
  • Coppermine addict
  • ***
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 5231
Re: Photo of the day / week etc, with auto archive albums.
« Reply #40 on: October 17, 2005, 09:01:38 pm »

No, this mod is not automatic, sorry.
Logged
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

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 150
    • Album photos Brière
Re: Photo of the day / week etc, with auto archive albums.
« Reply #41 on: October 19, 2005, 02:27:42 am »

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:
Code: [Select]
<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):

Code: [Select]
<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;
        }
}
Logged

DustyNine

  • Coppermine newbie
  • Offline Offline
  • Posts: 17
Re: Photo of the day / week etc, with auto archive albums.
« Reply #42 on: October 19, 2005, 05:42:47 am »

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).

Code: [Select]
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.
Logged

Casper

  • VIP
  • Coppermine addict
  • ***
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 5231
Re: Photo of the day / week etc, with auto archive albums.
« Reply #43 on: October 19, 2005, 10:22:49 am »

@ 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;

Code: [Select]
        <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;

Code: [Select]
        <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;
}
        }
}
Logged
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

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 150
    • Album photos Brière
Re: Photo of the day / week etc, with auto archive albums.
« Reply #44 on: October 19, 2005, 02:16:01 pm »

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.

 
Logged

DustyNine

  • Coppermine newbie
  • Offline Offline
  • Posts: 17
Re: Photo of the day / week etc, with auto archive albums.
« Reply #45 on: October 19, 2005, 02:53:37 pm »

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:

Code: [Select]
$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?
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Photo of the day / week etc, with auto archive albums.
« Reply #46 on: October 20, 2005, 08:15:55 am »

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
Logged

claude258

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 150
    • Album photos Brière
Re: Photo of the day / week etc, with auto archive albums.
« Reply #47 on: October 20, 2005, 02:25:06 pm »

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. 
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Photo of the day / week etc, with auto archive albums.
« Reply #48 on: October 20, 2005, 06:20:36 pm »

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.
Logged

claude258

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 150
    • Album photos Brière
Re: Photo of the day / week etc, with auto archive albums.
« Reply #49 on: October 22, 2005, 07:39:46 am »

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
Logged

claude258

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 150
    • Album photos Brière
Re: Photo of the day / week etc, with auto archive albums.
« Reply #50 on: October 23, 2005, 04:03:29 am »

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

trackman

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 50
Re: Photo of the day / week etc, with auto archive albums.
« Reply #51 on: December 04, 2005, 01:42:50 am »

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

 ??? ???
Logged

Paver

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 1609
  • Paul V.
Re: Photo of the day / week etc, with auto archive albums.
« Reply #52 on: December 04, 2005, 02:42:38 am »

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
Logged

trackman

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 50
Re: Photo of the day / week etc, with auto archive albums.
« Reply #53 on: December 04, 2005, 10:34:18 am »

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

There was an error while processing a database query

 ??? ???
Logged

Paver

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 1609
  • Paul V.
Re: Photo of the day / week etc, with auto archive albums.
« Reply #54 on: December 04, 2005, 04:37:54 pm »

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

DustyNine

  • Coppermine newbie
  • Offline Offline
  • Posts: 17
Re: Photo of the day / week etc, with auto archive albums.
« Reply #55 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?
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Logged

DustyNine

  • Coppermine newbie
  • Offline Offline
  • Posts: 17
Re: Photo of the day / week etc, with auto archive albums.
« Reply #57 on: December 17, 2005, 02:31:52 am »

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.
Logged

Casper

  • VIP
  • Coppermine addict
  • ***
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 5231
Re: Photo of the day / week etc, with auto archive albums.
« Reply #58 on: December 29, 2005, 09:16:41 pm »

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.
Logged
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

  • Coppermine newbie
  • Offline Offline
  • Posts: 17
Re: Photo of the day / week etc, with auto archive albums.
« Reply #59 on: December 29, 2005, 10:14:19 pm »

Thanks Casper. I knew it would be something like that, but didn't want to bring the whole thing crashing down. Appreciate the help!
Logged
Pages: 1 2 [3] 4 5   Go Up
 

Page created in 0.028 seconds with 19 queries.