How to use cpmfetch on a subdomain? - Page 2 How to use cpmfetch on a subdomain? - Page 2
 

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

How to use cpmfetch on a subdomain?

Started by teamvtec, January 30, 2007, 10:46:35 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

teamvtec

Ok, that worked ;D the urls are now correct (see attachement) and when i click them i go directly to the pictures but it still doesn't show any thumbs.

I use this in a php block:
include "http://gallery.sirfanaticsholland.com/cpmfetch/random_pic.php";

I think i have to change something in my random_pic.php file, my guess is it's the include:
<?php

include "cpmfetch.php";
$objCpm = new cpm();
$objCpm->cpm_viewRandomMedia (3,1);
$objCpm->cpm_viewLastAddedMedia (3,1);
$objCpm->cpm_close();

?>

Nibbler

You can't include() using an URL, use a path.

vuud

Quote from: teamvtec on February 23, 2007, 03:21:08 AM
Ok, that worked ;D the urls are now correct (see attachement) and when i click them i go directly to the pictures but it still doesn't show any thumbs.

I use this in a php block:
include "http://gallery.sirfanaticsholland.com/cpmfetch/random_pic.php";

I think i have to change something in my random_pic.php file, my guess is it's the include:
<?php

include "cpmfetch.php";
$objCpm = new cpm();
$objCpm->cpm_viewRandomMedia (3,1);
$objCpm->cpm_viewLastAddedMedia (3,1);
$objCpm->cpm_close();

?>


What is the actual image source tag looking like?  Right click on the broken image and do properties...


Please post for help to the forum... PM me only if you are sending security related items (passwords, security problems, etc).

cpmFetch - Images, RSS feeds from CPG from outside CPG
New release notification signup also. 
See http://cpmfetch.fistfullofco

vuud

Quote from: Nibbler on February 23, 2007, 03:24:45 AM
You can't include() using an URL, use a path.

AFAIK unless the default PHP settings are changed you can.

Its a setting called "URL fopen wrappers".

Although I would agree that a path would be more optimal, I don't think it would solve the problem - he is getting data back.

Please post for help to the forum... PM me only if you are sending security related items (passwords, security problems, etc).

cpmFetch - Images, RSS feeds from CPG from outside CPG
New release notification signup also. 
See http://cpmfetch.fistfullofco

teamvtec

Quote from: vuud on February 23, 2007, 06:08:33 AM
What is the actual image source tag looking like?  Right click on the broken image and do properties...


Hmmm that's strange, it says forum. instead of gallery. ??? http://forum.sirfanaticsholland.com/albums/userpics/10004/thumb_new2.JPG

vuud

Quote from: teamvtec on February 23, 2007, 09:56:04 AM
Hmmm that's strange, it says forum. instead of gallery. ??? http://forum.sirfanaticsholland.com/albums/userpics/10004/thumb_new2.JPG

Whoops.  Something I thought I changed in the code was not changed.  Of course it only happens in this particular situation.  I will fix it tonight and post a new release and let you know.

Please post for help to the forum... PM me only if you are sending security related items (passwords, security problems, etc).

cpmFetch - Images, RSS feeds from CPG from outside CPG
New release notification signup also. 
See http://cpmfetch.fistfullofco

teamvtec

Can't hardly wait ;D, thanks for your time

vuud

Quote from: teamvtec on February 23, 2007, 11:06:01 PM
Can't hardly wait ;D, thanks for your time

Hey,

Finally got to check it. Found out that my code was right.  but i forgot another setting in the cpmfetch_config.dao you need to change:

Make sure these three entries correctly references the domain the gallery is on:

If not, uncomment, then correct them. 

// Your sites domain name
// $cfg['domain_name'] = 'cpg.localhost.com';

// Full URL to your CPG gallerys album directory
// $cfg['cpg_album_url'] = 'http://cpg.localhost.com/albums/';

// Full URL to your CPG gallery
//  $cfg['cpg_url'] = 'http://cpg.localhost.com/';


I am not sure this is it, can you look at the source for the page that is doing the link and make sure its okay?  Not the properties, but an actual view source?

Thanks

Please post for help to the forum... PM me only if you are sending security related items (passwords, security problems, etc).

cpmFetch - Images, RSS feeds from CPG from outside CPG
New release notification signup also. 
See http://cpmfetch.fistfullofco

teamvtec

This topic is solved ;D

I had some settings wrong in the config file.
corrected it and it worked!
Please click link: http://forum.sirfanaticsholland.com/index.php


// Your sites domain name
  $config_overrides['domain_name'] = 'http://gallery.sirfanaticsholland.com';

// Full URL to your CPG gallerys album directory
  $config_overrides['cpg_album_url'] = 'http://gallery.sirfanaticsholland.com/albums/';

// Full URL to your CPG gallery
$config_overrides['cpg_url'] = 'http://gallery.sirfanaticsholland.com/';


Many thanks for all of your time invested in this matter Vuud ;)

vuud

Quote from: teamvtec on February 27, 2007, 05:37:28 PM
This topic is solved ;D

I had some settings wrong in the config file.
corrected it and it worked!
Please click link: http://forum.sirfanaticsholland.com/index.php


// Your sites domain name
  $config_overrides['domain_name'] = 'http://gallery.sirfanaticsholland.com';

// Full URL to your CPG gallerys album directory
  $config_overrides['cpg_album_url'] = 'http://gallery.sirfanaticsholland.com/albums/';

// Full URL to your CPG gallery
$config_overrides['cpg_url'] = 'http://gallery.sirfanaticsholland.com/';


Many thanks for all of your time invested in this matter Vuud ;)



Fantastic!  thank you also, fixed some bugs that would not have been found until someone else tried this...

Vuud
Please post for help to the forum... PM me only if you are sending security related items (passwords, security problems, etc).

cpmFetch - Images, RSS feeds from CPG from outside CPG
New release notification signup also. 
See http://cpmfetch.fistfullofco

slvreagl

I know this is a old posting but its the closest one I could find to my situation.

I am running coppermine as a subdomain of my site I installed cpmfetch 2.0 in my subdomain folder and installed sucessfully. However using the code(s) provided after the installation in my TP portal in a php box nothing happens?? I assume it has something to do with the path to the include but I can not make it happen no matter what I try  :-\

<?php
  
include "./photogallery/cpmfetch/cpmfetch.php";
  
$objCpm = new cpm("./photogallery/cpmfetch/cpmfetch_config.php");
  
$objCpm->cpm_viewLastAddedMedia(1,4);
  
$objCpm->cpm_close();
?>

Joachim Müller

Locking. Start a thread of your own, posting the code you use and the needed links (see sticky thread).