Getting the Database fields Getting the Database fields
 

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

Getting the Database fields

Started by doggiepowers, September 11, 2005, 12:31:46 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

doggiepowers

Hi i was just wondering if anyone knew what the database fields are? I want to use the database to post up the lastest pics on to the home page. I am very good at ASP and don't know a lick you know what when it comes to PHP. I'm sure I can figure out the SQL statement, but all I really need is just the table fields for I guess the thumbnails. Anyone ever done this?

Tranz

You would need to ask your webhost if you are wondering about the database fields like username/password, etc

Nevermind, I just figured out what you're actually asking about.

artistsinhawaii

doggiepowers,

before you even head off in that direction, why not check out this link?
http://forum.coppermine-gallery.net/index.php?topic=19564.0

Dennis
Learn and live ... In January of 2011, after a botched stent attempt, the doctors told me I needed a multiple bypass surgery or I could die.  I told them I needed new doctors.

doggiepowers

Well this is cool and all but I'm not sure if going to be able to use it since I am going to be using it through ASP. Can someone give a run down of the tables or fields in the database? I am going to play with this cpmfetch a bit though to see how it works. Thanks

Quote from: madeinhawaii on September 11, 2005, 01:28:45 AM
doggiepowers,

before you even head off in that direction, why not check out this link?
http://forum.coppermine-gallery.net/index.php?topic=19564.0

Dennis

artistsinhawaii

#4
Well, I'd figured you would find what you were looking for somewhere along that thread as well as other bits that you might be able to implement into your modifications.

This is the Database string to Dbase file... my image file "ABS003.jpg" is in  folder Coppermine_Gallery/Albums/Quarrantine/Abstract.   cpg140_pictures is the parent table name, 'pid' represents the picture id# in the database where lower numbers represent the oldest files and the highest numbers the most recent files.  'aid' would be the album id#. 


`cpg140_pictures` SET `pid` = 16, `aid` = 29, `filepath` = 'quarrantine/Abstract/', `filename` = 'ABS003.jpg', `filesize` = 125390, `total_filesize` = 164344, `pwidth` = 1000, `pheight` = 666, `hits` = 0, `mtime` = '2005-08-25 23:16:40', `ctime` = 1123977064, `owner_id` = 1, `owner_name` = 'evj', `pic_rating` = 0, `votes` = 0, `title` = 'ABS003', `caption` = '', `keywords` = '"scenic sunset" artistic and abstract" all"', `approved` = 'YES', `galleryicon` = 0, `user1` = '', `user2` = '', `user3` = '', `user4` = '', `url_prefix` = 0, `pic_raw_ip` = '', `pic_hdr_ip` = '', `lasthit_ip` = '88.172.94.181', `position` = 0 WHERE  `pid` = 16;


Note: Depending on your version of CPG, the table name can vary, i.e. cpg130_pictures, cpg133_pictures, etc.   Open the update.sql file in your sql folder to find the proper prefix.

Hope that kind of leads you in the direction you are seeking. 

Dennis
Learn and live ... In January of 2011, after a botched stent attempt, the doctors told me I needed a multiple bypass surgery or I could die.  I told them I needed new doctors.

doggiepowers

thanks a lot this did help a lot and now i think i got it going if you wanna see my so far done work take a look at http://www.theanimenation.com

;D :o ;D :o ;D

artistsinhawaii

Lol,

DoggiePowers,

Your site looks great!  I can see where you are going with it and I'm sure it'll be a very popular site. You obviously know what you are doing.  I should be the one asking you for help and not the other way around. :-)


take care,

Dennis
Learn and live ... In January of 2011, after a botched stent attempt, the doctors told me I needed a multiple bypass surgery or I could die.  I told them I needed new doctors.

doggiepowers

well i live in hawaii if makes it any easier hahah  ::) and i love the pics that you have taken. great pics. just goes to show me that i've lived in hawaii all of my life and yet i haven't had the chance to capture all of the great things that we have here. I need to get me a digital camera.

so from one person to another in hawaii

HO TANX AH BRAH!!

artistsinhawaii

Eh, no sweat, brah!

But do me one favor, eh? Align your cool links panel to the left of the column, so I no haf to scroll over just to see it.  I only got me one 800 pix monitor, you know.

You take care,

Dennis
Learn and live ... In January of 2011, after a botched stent attempt, the doctors told me I needed a multiple bypass surgery or I could die.  I told them I needed new doctors.

doggiepowers

shoots cuz i wen jus move um to da middle. 90% of my visitors are using 1024 or higher.

ho bah u get one page full of pictures ah and u stay running 800?

k den

seanbluekey

Is it possible to share the code in .ASP? I would appriciate it.


seanbluekey

Why not? I thought this is the support forum!

Tranz

Quote from: seanbluekey on February 01, 2006, 07:56:41 AM
Why not? I thought this is the support forum!
It's a support forum for Coppermine Photo Gallery, a PHP-based application.


Joachim Müller

porting the whole PHP-driven code to ASP would be a huge task. And it would require someone to actually know both PHP and ASP very well. The coppermine dev team doesn't know ASP, and we're not interessted in porting it to ASP, as it would be a step back from a platform-independent code to proprietary M$-only code. Coppermine contains hundreds of thousands of lines of code written in PHP - if you're going to port it to ASP: have fun, it probably won't take much more than 10,000 hours to accomplish this ;).
If you need it badly, you will have to port it.
It would be the same as if you were asking Microsoft to make Windows work on a Mac ;D.

seanbluekey

IC. I appriciate your explenation Not Just a Yes or No Answer.

Now I am tryin to do what "chad jennings" did.

Created viewPhoto.php file that has the following code:

<?php
include "./cpmfetch/cpmfetch.php";
$objCpm = new cpm("/picture");
$objCpm->cpm_viewRandomMedia(1,1);
$objCpm->cpm_close();
?>

and I placed in the picture folderm and then put this
<iframe src="viewPhoto.php" width="225" height="195"></iframe>
on the body of the .hml

But for some reason I am getting the following errors:

Fatal error: Cannot instantiate non-existent class: cpm in
...\picture\cpmfetch\viewpictures.php on line 3

Can you please help :'(


Joachim Müller

cpmFetch comes as a mod and is only supported on the thread that deals with the mod (there is a whole sub-foum dedicated to it though). Ask cpmFetch-related stuff there.