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

Author Topic: How to use cpmfetch on a subdomain?  (Read 28858 times)

0 Members and 1 Guest are viewing this topic.

teamvtec

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 21
Re: How to use cpmfetch on a subdomain?
« Reply #20 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:
Code: [Select]
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:
Code: [Select]
<?php

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

?>
Logged

Nibbler

  • Guest
Re: How to use cpmfetch on a subdomain?
« Reply #21 on: February 23, 2007, 03:24:45 am »

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

vuud

  • Moderator
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1803
  • [cpmfetch.fistfullofcode.com]
    • Fist Full Of Code
Re: How to use cpmfetch on a subdomain?
« Reply #22 on: February 23, 2007, 06:08:33 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:
Code: [Select]
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:
Code: [Select]
<?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...


Logged
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

  • Moderator
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1803
  • [cpmfetch.fistfullofcode.com]
    • Fist Full Of Code
Re: How to use cpmfetch on a subdomain?
« Reply #23 on: February 23, 2007, 06:10:15 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.

Logged
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

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 21
Re: How to use cpmfetch on a subdomain?
« Reply #24 on: February 23, 2007, 09:56:04 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
Logged

vuud

  • Moderator
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1803
  • [cpmfetch.fistfullofcode.com]
    • Fist Full Of Code
Re: How to use cpmfetch on a subdomain?
« Reply #25 on: February 23, 2007, 06:51:58 pm »

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.

Logged
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

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 21
Re: How to use cpmfetch on a subdomain?
« Reply #26 on: February 23, 2007, 11:06:01 pm »

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

vuud

  • Moderator
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1803
  • [cpmfetch.fistfullofcode.com]
    • Fist Full Of Code
Re: How to use cpmfetch on a subdomain?
« Reply #27 on: February 27, 2007, 03:44:30 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

Logged
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

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 21
Re: How to use cpmfetch on a subdomain?
« Reply #28 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


Code: [Select]
// 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 ;)
Logged

vuud

  • Moderator
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1803
  • [cpmfetch.fistfullofcode.com]
    • Fist Full Of Code
Re: How to use cpmfetch on a subdomain?
« Reply #29 on: February 27, 2007, 05:47:03 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


Code: [Select]
// 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
Logged
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

  • Coppermine newbie
  • Offline Offline
  • Posts: 1
Re: How to use cpmfetch on a subdomain?
« Reply #30 on: June 26, 2008, 06:09:54 pm »

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  :-\

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

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: How to use cpmfetch on a subdomain?
« Reply #31 on: June 26, 2008, 06:45:21 pm »

Locking. Start a thread of your own, posting the code you use and the needed links (see sticky thread).
Logged
Pages: 1 [2]   Go Up
 

Page created in 0.061 seconds with 19 queries.