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]   Go Down

Author Topic: Getting the Database fields  (Read 10319 times)

0 Members and 1 Guest are viewing this topic.

doggiepowers

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 9
  • A Life Without Pain Isn't Real
    • The aNiMeNaTiOn
Getting the Database fields
« 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?
Logged

Tranz

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Female
  • Posts: 6149
Re: Getting the Database fields
« Reply #1 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.
Logged

artistsinhawaii

  • VIP
  • Coppermine addict
  • ***
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 856
    • evj art and photography
Re: Getting the Database fields
« Reply #2 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
Logged
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

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 9
  • A Life Without Pain Isn't Real
    • The aNiMeNaTiOn
Re: Getting the Database fields
« Reply #3 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
Logged

artistsinhawaii

  • VIP
  • Coppermine addict
  • ***
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 856
    • evj art and photography
Re: Getting the Database fields
« Reply #4 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
« Last Edit: September 11, 2005, 09:58:01 pm by madeinhawaii »
Logged
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

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 9
  • A Life Without Pain Isn't Real
    • The aNiMeNaTiOn
Re: Getting the Database fields
« Reply #5 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
Logged

artistsinhawaii

  • VIP
  • Coppermine addict
  • ***
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 856
    • evj art and photography
Re: Getting the Database fields
« Reply #6 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
Logged
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

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 9
  • A Life Without Pain Isn't Real
    • The aNiMeNaTiOn
Re: Getting the Database fields
« Reply #7 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!!
Logged

artistsinhawaii

  • VIP
  • Coppermine addict
  • ***
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 856
    • evj art and photography
Re: Getting the Database fields
« Reply #8 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
Logged
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

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 9
  • A Life Without Pain Isn't Real
    • The aNiMeNaTiOn
Re: Getting the Database fields
« Reply #9 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
Logged

seanbluekey

  • Coppermine newbie
  • Offline Offline
  • Posts: 9
Re: Getting the Database fields
« Reply #10 on: February 01, 2006, 12:07:06 am »

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

Nibbler

  • Guest
Re: Getting the Database fields
« Reply #11 on: February 01, 2006, 12:08:43 am »

No.
Logged

seanbluekey

  • Coppermine newbie
  • Offline Offline
  • Posts: 9
Re: Getting the Database fields
« Reply #12 on: February 01, 2006, 07:56:41 am »

Why not? I thought this is the support forum!
Logged

Tranz

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Female
  • Posts: 6149
Re: Getting the Database fields
« Reply #13 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.
Logged

seanbluekey

  • Coppermine newbie
  • Offline Offline
  • Posts: 9
Re: Getting the Database fields
« Reply #14 on: February 01, 2006, 08:18:09 am »

and?
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Getting the Database fields
« Reply #15 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.
Logged

seanbluekey

  • Coppermine newbie
  • Offline Offline
  • Posts: 9
Re: Getting the Database fields
« Reply #16 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 :'(

Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Getting the Database fields
« Reply #17 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.
Logged
Pages: [1]   Go Up
 

Page created in 0.04 seconds with 20 queries.