Hello,
I have cpm set up on my main page at the top here:
http://www.3dbrewer.com/
My problem is with the link on the pictures, it will open up the the coppermine gallery full page. But, my gallery is actually within an iframe on the site:
http://www.3dbrewer.com/index.php?option=com_wrapper&view=wrapper&Itemid=84
So my question is, how do I force it to go to the above link so it is within the iframe?
I not a good idea to wrap coppermine in an iframe page, imho. When someone is in your page and open the album link in new tab, then it will come to the real coppermine page without header.
I suggest of using a custom header and footer instead of wrapping it in iframe imho.
I think that it is really hard coded to open the fetch images in iframe cause the target iframe page is not there.
Maybe someone know how to code it. ???
I know I cannot link straight to the images through an iframe, and that is fine. What I want to do is either:
1.) Make all the links go to "http://www.3dbrewer.com/index.php?option=com_wrapper&view=wrapper&Itemid=84", regardless of which image it is showing.
OR
2.) Remove the links all together and just have linkless images.
If someone can help me manipulate the code I would appreciate it. I have tried editting the cpmfetch.php and cpmfetch_dao.php myself, but nothing I do seems to work well.
Links are generated in cpmfetch.php
function htmlTagAHREF($target, $contents, $extraAttributes="") {
$htmlOut = '<a';
if ( ( (array_key_exists('imagelink',$this->optionHash))
&& $this->optionHash['imagelink'] == 'large')
&& array_key_exists('windowtarget',$this->optionHash ) )
{
if ($this->optionHash['windowtarget'] == '_blank-js' ) {
$htmlOut .= " href=\"javascript:cmfshowpic('$target','')\" ";
} elseif ($this->optionHash['windowtarget'] == '_blank-cfshow') {
$htmlOut .= " href=\"javascript:void(window.open('cfshow.php?pic=$target','cpmFetch','width=825,height=625,toolbars=0,scrollbars=1,resizable=1'));\"";
} elseif ($this->optionHash['windowtarget'] == '_blank') {
$htmlOut .= " href=\"$target\" target=\"_blank\" ";
} else {
$htmlOut .= " href=\"$target\" target=\"{$this->optionHash['windowtarget']}\" ";
}
} // handling less than full size photos
else {
if (array_key_exists('windowtarget',$this->optionHash)) $htmlOut .= ' target="' . $this->optionHash['windowtarget'] . '"';
$htmlOut .= " href=\"$target\" ";
}
if (array_key_exists('linkstyle',$this->styleHash)) $htmlOut .= " {$this->styleHash['linkstyle']}";
if ($extraAttributes != "") $htmlOut .= " " . $extraAttributes;
$htmlOut .= $this->getOptionAttributes("linkattributes");
$htmlOut .= " >$contents</a>" ;
return $htmlOut;
}
You should be able to simply hardcode:
function htmlTagAHREF($target, $contents, $extraAttributes="") {
return '<a href="http://www.3dbrewer.com/index.php?option=com_wrapper&view=wrapper&Itemid=84">' . $contents . '</a>';
}
or remove:
function htmlTagAHREF($target, $contents, $extraAttributes="") {
return $contents;
}
That worked great, much appreciated ;D