forum.coppermine-gallery.net

Support => cpg1.4.x Support => Older/other versions => cpg1.4 cpmFetch by vuud => Topic started by: yell0wdart on May 18, 2007, 08:19:42 am

Title: Gallery images displaying, but dropping the "www." off the links to images
Post by: yell0wdart on May 18, 2007, 08:19:42 am
First off, much thanks to vuud for writing such a slick mod.  Exactly what I've been hunting around for... and a perfect fit for my site.  ;)

Just to preface my question here, I have done some searching around these boards, but haven't been able to find exactly what I'm experiencing.  Haven't seen it as I've been browsing through the docs either.  If I missed it somewhere, I apologize.

On to my issue...

I'm working with a Joomla/SMF/CPG setup.  I have CPG bridged to SMF, and Joomla running w/ no bridge.  I've done a pretty good bit of template modding, and am getting a little better at my budding career as a closet code monkey.  :P

Anyway, here's a link to the site:  www.the-studioonline.com

The install went very smoothly, no hiccups there.  I ended up just embedding the super-basic code lines in my template index.php file just to start out simple.  It displays perfectly.  The issue I'm running into is, when I click on one of the thumbnails generated by cpmfetch to go strait to the image in CPG, it seems to drop the "www." off of the url in the browser's address bar.

This normally wouldn't be a big deal, but if you're logged into SMF/Coppermine, dropping that "www." makes the browser think you're not logged in.  If you manually add the "www." onto the url in the addy bar, it'll show you the correct "version" (for lack of a better term) of CPG.

Here's my code from the index.php in my template:

Code: [Select]
//cpmfetch code
include "../gallery/cpmfetch/cpmfetch.php";
$objCpm = new cpm("../gallery/cpmfetch/cpmfetch_conf6ig.php");
$objCpm->cpm_viewLastAddedMedia(1,7);
//$objCpm->cpm_close();

Also, just an FYI to any folks potentially thinking of adding this mod and linking from a Joomla page, I found it easier to just embed the code strait into your index.php file rather than creating a new module.  I ended up creating a new module and a new module position in my template just for this mod, but found it so much easier to just embed the code.  Also, Jooma didn't seem to like that last $ogjCpm->cpm_close(); line in there.  Kept returning MySQL errors.  Commenting it out solved that issue.  ;)
Title: Re: Gallery images displaying, but dropping the "www." off the links to images
Post by: yell0wdart on May 19, 2007, 10:46:01 am
Still digging around to solve this issue.

I ended up going with the cpg_mod for Joomla, and it's working great.  But I'm still running into this same issue where the thumbnail links that cpmfetch provides drop the "www." off the url.

Found nothing that seemed related to my problem in these forums (all 7 pgs), and no apparent answer in the docs.  I've been digging through the cpmfetch.php file and I'm thinking that's where the fix to my problem will reside.  I've been seeing some instances of 'htmlTagAHREF' and 'cpg_url' being called in the code... sorry, I don't think my jargon is quite up to par.  ;)

Anyway, I'm thinking that's where my answers will lie.  Am I close?  What should I look for and what should I be changing?  I've seen several references to both, so I'm thinking it's not going to be a quick and easy deal.  heh

Any help is greatly appreciated.  :)
Title: Re: Gallery images displaying, but dropping the "www." off the links to images
Post by: yell0wdart on May 21, 2007, 11:53:55 pm
Solved!

I found the fix in the Coppermine config.  I must have left the "www." off the url in my config without realizing it.  I checked it, and it was missing.  Added it in, reran the cpmfetch/install.php and it works like a charm.  Problem solved.

Before you call your IT support stating your computer is broken, make sure you plugged it in first.  :P
Title: Re: Gallery images displaying, but dropping the "www." off the links to images
Post by: Joachim Müller on May 22, 2007, 08:59:49 am
Thanks for returning and posting your solution.
Title: Re: Gallery images displaying, but dropping the "www." off the links to images
Post by: fangweile on July 13, 2007, 07:11:19 am
I also have the same problem but it is now resolved, thanks yellowdart for your post and solution   ;)