Gallery images displaying, but dropping the "www." off the links to images Gallery images displaying, but dropping the "www." off the links to images
 

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]

Main Menu

Gallery images displaying, but dropping the "www." off the links to images

Started by yell0wdart, May 18, 2007, 08:19:42 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

yell0wdart

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:

//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.  ;)

yell0wdart

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.  :)

yell0wdart

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

Joachim Müller


fangweile

I also have the same problem but it is now resolved, thanks yellowdart for your post and solution   ;)
[My Coppermine Galleries]
All Koreans, Lim Eun-kyeong's IFC
Saranghae 김태희