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: Fetch names of Top Rated  (Read 7669 times)

0 Members and 1 Guest are viewing this topic.

kehbop

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 52
Fetch names of Top Rated
« on: January 20, 2006, 03:16:37 am »

I didn't know if this should be in the CPMfetch board because this isn't the same engine used for fetching things.

A while ago someone gave me this great code to fetch images.
I would make a php file of this code and put it in the root gallery folder.
Code: [Select]
<?php
Header
('Content-Type: image/jpeg');
define('IN_COPPERMINE'true);
require(
'include/init.inc.php');
$pic_data get_pic_data('lastup'$thumb_count$album_name, -11);
$pic_url =  get_pic_url($pic_data[0], 'thumb');
readfile($pic_url);
?>

Then I would direct the img src to that PHP file. It works great!

I want to do the same thing, but i need it to fetch the name that the user gave his image. Can someone rewrite this code to retrieve that image data or point me to something another way to do it.
Logged

kehbop

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 52
Re: Fetch names of Top Rated
« Reply #1 on: January 21, 2006, 09:29:37 am »

I found this explaining how to list albums on Dreamweaver.
http://forum.coppermine-gallery.net/index.php?topic=20714.0

I've tried and tried for HOURS!!! I can't connect to MySQL using my Dreamweaver 8. ARRGGH! I want to write the code manually, but I suck at PHP.

As you can see, I'm very stressed out about this.
Can someone help me with this? PLEEEAAAASSSE!
Logged

Tranz

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Female
  • Posts: 6149
Re: Fetch names of Top Rated
« Reply #2 on: January 21, 2006, 12:44:29 pm »

Have you set the database to accept remote connections from wildcard? Where exactly do you get stuck?
Logged

kehbop

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 52
Re: Fetch names of Top Rated
« Reply #3 on: January 21, 2006, 04:59:51 pm »

Have you set the database to accept remote connections from wildcard? Where exactly do you get stuck?

You mean asking my server to set it to remote connections or Dreamweaver to allow remote connections? In both cases, it's probably no, but i don't know where to try to do it.

Basically I put in localhost, my databse name and password (which is the same one I used for my gallery), and then the database name. I click test, and then it says that it could not connect to the "FTP Server" even though I've connected to it since forever to build my website.

 ;D Thanks for replying! ;D
Logged

Tranz

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Female
  • Posts: 6149
Re: Fetch names of Top Rated
« Reply #4 on: January 21, 2006, 06:33:12 pm »

Is your database on the same computer as Dreamweaver? If not, you're not supposed to use localhost, but the mysql server's address. You should contact your host for more detailed assistance. If you are self-hosted, you should reconsider.
Logged

kehbop

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 52
Re: Fetch names of Top Rated
« Reply #5 on: January 21, 2006, 09:11:09 pm »

Dang. I have a server that I bought from a website. But how come localhost works for coppermine gallery's access to the database?

Do you know any other means of fetching a list of top-rated.
Logged

Tranz

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Female
  • Posts: 6149
Re: Fetch names of Top Rated
« Reply #6 on: January 21, 2006, 09:21:36 pm »

Because Coppermine, running on the web server, is actually "local" to the mysql server. Dreamweaver, running on your computer, is considered remote.

If you can't use your current method, I'd recommend using cpm-fetch. You are unlikely to get much support with what you want to do now, whereas cpm-fetch's author provides excellent support.
Logged

kehbop

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 52
Re: Fetch names of Top Rated
« Reply #7 on: January 21, 2006, 10:05:53 pm »

problem with using CPMfetch is that I have a phpBB together.
Logged

tommytomato

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 41
    • http://gallery.rockinghamgateway.com/
Re: Fetch names of Top Rated
« Reply #8 on: January 24, 2006, 04:07:24 am »

cheers people that worked well

what happens if you want ramdom file instead and more than 1 image  ( 4 images )

if I wanted that code to be out side the coppermine directory would i change the
Code: [Select]
require('include/init.inc.php'); to

Code: [Select]
require('http://name_of_doman.com/include/init.inc.php');
TT
Logged

tommytomato

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 41
    • http://gallery.rockinghamgateway.com/
Re: Fetch names of Top Rated
« Reply #9 on: January 24, 2006, 04:33:20 am »

I can only get it to work with in the same directory as coppermine, code dont work out side of coppermine directory, any one added this type of code to nuke portals before  ???

TT
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Fetch names of Top Rated
« Reply #10 on: January 24, 2006, 08:24:27 am »

I can only get it to work with in the same directory as coppermine, code dont work out side of coppermine directory, any one added this type of code to nuke portals before  ???
Afaik this isn't possible, as coppermine uses relative references to the other include files. Outside of coppermine's root folder, you should use cpmFetch as suggested or come up with some custom code that runs the needed queries. Nuke isn't supported on this board anyway.
Logged

tommytomato

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 41
    • http://gallery.rockinghamgateway.com/
Re: Fetch names of Top Rated
« Reply #11 on: January 24, 2006, 08:34:50 am »

ok thanks

I was hoping to get the thumb nails to show with in a box on " N " site, both sites run on the same server. anyway thanks for the input

was is cpmFetch, thats not the  Dreamweaver tut is it ?

TT

« Last Edit: January 24, 2006, 09:47:13 am by tommytomato »
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Fetch names of Top Rated
« Reply #12 on: January 24, 2006, 09:37:27 am »

was is cpmFetch, thats not the  Dreamweaver tut is it ?
erm, what? I don't understand.
Logged

tommytomato

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 41
    • http://gallery.rockinghamgateway.com/
Re: Fetch names of Top Rated
« Reply #13 on: January 24, 2006, 09:44:22 am »

tut as in, Flash Tutorial "How to list Coppermine Albums on your homepage using PHP"

think we both lost each other  :D

tt
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Fetch names of Top Rated
« Reply #14 on: January 24, 2006, 09:48:07 am »

I still have no idea what you're talking about. I understand that someone used to post a tutorial about some complicated stuff in Dreamweaver, but I didn't look into it, as I don't have Dreamweaver. I was refering to cpmFetch.
Logged

kehbop

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 52
Re: Fetch names of Top Rated
« Reply #15 on: January 27, 2006, 08:36:54 pm »

If i tried using CPM fetch just to get text, would it work? I've tried to use it before and I didn't work because of my integration with phpBB.

=(
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Fetch names of Top Rated
« Reply #16 on: January 28, 2006, 12:02:37 pm »

I don't know - support for cpmFetch is being given on the cpmFetch boards exclusively. Using SMF/Coppermine/cpmFetch on my personal site, fetching text (stats) just works fine. Don't try to hijack threads.
Logged

kehbop

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 52
Re: Fetch names of Top Rated
« Reply #17 on: January 28, 2006, 12:49:07 pm »

This is alittle off topic, but I thought this thread was orignially mine!  ???
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Fetch names of Top Rated
« Reply #18 on: January 28, 2006, 06:31:22 pm »

OK, sorry. Anyway: cpmFetch support is only available on the threads that deal with it. Locking this one.
Logged
Pages: [1]   Go Up
 

Page created in 0.021 seconds with 19 queries.