Return only IMG tag with no <table> <td> <tr>? Return only IMG tag with no <table> <td> <tr>?
 

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

Return only IMG tag with no <table> <td> <tr>?

Started by judl, December 07, 2009, 11:03:58 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

judl

I am trying to make a call to cpmfetch and insert html code smartly into my page. The php seems to return an entire <table>. Is there an option so I can just get back the image tag?

Thanks in advance,
Chris

Nibbler

Use


$objCpm->cpm_setReturnType('resultset');


Then format the data as you wish.

judl

Seems like there have been a lot of posts about this. Everyone seems to take their own tact. If there is some sample code on how to deal with the resultset data set, it would be appreciated.

vuud

Quote from: judl on December 08, 2009, 01:36:01 AM
Seems like there have been a lot of posts about this. Everyone seems to take their own tact. If there is some sample code on how to deal with the resultset data set, it would be appreciated.

This gets into just plain old PHP.  If you pick up on learning some basic PHP you will be fine.  The results come back as an array, and you just need to loop through them.

Google on stuff like

  • Arrays in php
  • foreach loops in php
  • echo in php


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