Fetch names of Top Rated Fetch names of Top Rated
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

Fetch names of Top Rated

Started by kehbop, January 20, 2006, 03:16:37 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

kehbop

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

kehbop

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!

Tranz

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

kehbop

Quote from: TranzNDance 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?

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

Tranz

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.

kehbop

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.

Tranz

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.

kehbop

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

tommytomato

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 require('include/init.inc.php'); to

require('http://name_of_doman.com/include/init.inc.php');

TT

tommytomato

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

Joachim Müller

Quote from: tommytomato 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  ???
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.

tommytomato

#11
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


Joachim Müller

Quote from: tommytomato on January 24, 2006, 08:34:50 AM
was is cpmFetch, thats not the  Dreamweaver tut is it ?
erm, what? I don't understand.

tommytomato

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

think we both lost each other  :D

tt

Joachim Müller

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.

kehbop

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.

=(

Joachim Müller

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.

kehbop

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

Joachim Müller

OK, sorry. Anyway: cpmFetch support is only available on the threads that deal with it. Locking this one.