Trying to change image title. Trying to change image title.
 

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

Trying to change image title.

Started by aunrea, October 03, 2007, 10:55:42 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

aunrea

I am trying to change the image title to the title of the image instead of the filename. This is what I have:


$options = array("imageattributes" => array("alt" => '{{pTitle}}', "title" => '{{pTitle}}'));
$objCpm->cpm_viewLastAddedMedia(1, 4, $options);


The images show up but the image title is still the filename and when looking at the code I see:

<table  >
<tr>
<td><a href="http://portfolio.spot-design.net/displayimage.php?pos=-279"  ><img  src="http://portfolio.spot-design.net/albums/digiscrap/papers/thumb_cduffy_Zita_PP15.jpg" alt="cduffy_Zita_PP15.jpg" title="cduffy_Zita_PP15.jpg" alt="{{pTitle}}"  title="{{pTitle}}"   /></a><br /></td>
<td><a href="http://portfolio.spot-design.net/displayimage.php?pos=-280"  ><img  src="http://portfolio.spot-design.net/albums/digiscrap/papers/thumb_cduffy_Zita_ScallopOverlay.png" alt="cduffy_Zita_ScallopOverlay.png" title="cduffy_Zita_ScallopOverlay.png" alt="{{pTitle}}"  title="{{pTitle}}"   /></a><br /></td>
<td><a href="http://portfolio.spot-design.net/displayimage.php?pos=-277"  ><img  src="http://portfolio.spot-design.net/albums/digiscrap/papers/thumb_cduffy_Zita_PP13.jpg" alt="cduffy_Zita_PP13.jpg" title="cduffy_Zita_PP13.jpg" alt="{{pTitle}}"  title="{{pTitle}}"   /></a><br /></td>
<td><a href="http://portfolio.spot-design.net/displayimage.php?pos=-278"  ><img  src="http://portfolio.spot-design.net/albums/digiscrap/papers/thumb_cduffy_Zita_PP14.jpg" alt="cduffy_Zita_PP14.jpg" title="cduffy_Zita_PP14.jpg" alt="{{pTitle}}"  title="{{pTitle}}"   /></a><br /></td>
</tr>
</table>


How do I get it to change the title and alt to the image title I set in Coppermine? I do have image titles set for those images too. You can see the title in my coppermine gallery (which is v. 1.4.13).

The website I have this on is http://spot-design.net. My coppermine gallery is at http://portfolio.spot-design.net.

Thanks for any help.