Advanced search  

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

Pages: [1]   Go Down

Author Topic: Return only IMG tag with no <table> <td> <tr>?  (Read 5907 times)

0 Members and 1 Guest are viewing this topic.

judl

  • Coppermine newbie
  • Offline Offline
  • Posts: 3
Return only IMG tag with no <table> <td> <tr>?
« on: December 07, 2009, 11:03:58 pm »

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
Logged

Nibbler

  • Guest
Re: Return only IMG tag with no <table> <td> <tr>?
« Reply #1 on: December 07, 2009, 11:10:47 pm »

Use

Code: [Select]
$objCpm->cpm_setReturnType('resultset');

Then format the data as you wish.
Logged

judl

  • Coppermine newbie
  • Offline Offline
  • Posts: 3
Re: Return only IMG tag with no <table> <td> <tr>?
« Reply #2 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.
Logged

vuud

  • Moderator
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1803
  • [cpmfetch.fistfullofcode.com]
    • Fist Full Of Code
Re: Return only IMG tag with no <table> <td> <tr>?
« Reply #3 on: April 04, 2010, 03:23:24 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


Logged
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
Pages: [1]   Go Up
 

Page created in 0.015 seconds with 19 queries.