forum.coppermine-gallery.net

Support => cpg1.3.x Support => Older/other versions => cpg1.3 Miscellaneous => Topic started by: doggiepowers on September 11, 2005, 12:31:46 am

Title: Getting the Database fields
Post by: doggiepowers on September 11, 2005, 12:31:46 am
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?
Title: Re: Getting the Database fields
Post by: Tranz on September 11, 2005, 12:39:47 am
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.
Title: Re: Getting the Database fields
Post by: artistsinhawaii 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
Title: Re: Getting the Database fields
Post by: doggiepowers on September 11, 2005, 08:31:36 am
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

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
Title: Re: Getting the Database fields
Post by: artistsinhawaii on September 11, 2005, 11:08:47 am
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
Title: Re: Getting the Database fields
Post by: doggiepowers on September 17, 2005, 10:07:45 am
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
Title: Re: Getting the Database fields
Post by: artistsinhawaii on September 17, 2005, 10:43:07 am
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
Title: Re: Getting the Database fields
Post by: doggiepowers on September 17, 2005, 08:50:17 pm
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!!
Title: Re: Getting the Database fields
Post by: artistsinhawaii on September 17, 2005, 09:10:54 pm
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
Title: Re: Getting the Database fields
Post by: doggiepowers on September 17, 2005, 11:15:30 pm
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
Title: Re: Getting the Database fields
Post by: seanbluekey on February 01, 2006, 12:07:06 am
Is it possible to share the code in .ASP? I would appriciate it.
Title: Re: Getting the Database fields
Post by: Nibbler on February 01, 2006, 12:08:43 am
No.
Title: Re: Getting the Database fields
Post by: seanbluekey on February 01, 2006, 07:56:41 am
Why not? I thought this is the support forum!
Title: Re: Getting the Database fields
Post by: Tranz on February 01, 2006, 08:10:22 am
Why not? I thought this is the support forum!
It's a support forum for Coppermine Photo Gallery, a PHP-based application.
Title: Re: Getting the Database fields
Post by: seanbluekey on February 01, 2006, 08:18:09 am
and?
Title: Re: Getting the Database fields
Post by: Joachim Müller on February 01, 2006, 08:42:06 am
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.
Title: Re: Getting the Database fields
Post by: seanbluekey on February 01, 2006, 09:02:12 am
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 :'(

Title: Re: Getting the Database fields
Post by: Joachim Müller on February 01, 2006, 09:31:23 am
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.