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: Removing Table from Output  (Read 5842 times)

0 Members and 1 Guest are viewing this topic.

SolidSnake2003

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Gender: Male
  • Posts: 82
  • Solid Snake/Joshua Harris Fan
    • Legacy Designs
Removing Table from Output
« on: April 03, 2010, 05:53:23 pm »

I have created a latest_images.php so I could include it in a iframe, but I would like to remove the table from the output

I found a post that said to add this to your include code:

Code: [Select]
$objCpm->cpm_setReturnType("resultset");
I tried this

Code: [Select]
$objCpm->cpm_setReturnType("html");

adding either of the above codes, and nothing is displayed

Gallery Link | Where CPMFetch is used
Logged

vuud

  • Moderator
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1803
  • [cpmfetch.fistfullofcode.com]
    • Fist Full Of Code
Re: Removing Table from Output
« Reply #1 on: April 03, 2010, 06:17:51 pm »

I have created a latest_images.php so I could include it in a iframe, but I would like to remove the table from the output

I found a post that said to add this to your include code:

Code: [Select]
$objCpm->cpm_setReturnType("resultset");
Gallery Link | Where CPMFetch is used

The return type of resultset will return an array I believe... Its up to you to do all rendering and formatting.  After you do the setReturnType, you need to actually call to get pictures...  using one of the other calls.
 
Code: [Select]
$objCpm->cpm_setReturnType("resultset");
$results =  $objCpm->cpm_viewRandomMediaFrom();
print_r($results);

That, in addition to all your setup code for it, should dump the data for the pictures... Its up to you to format it as you wish then.  There is no way currently to just remove the table code.

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

SolidSnake2003

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Gender: Male
  • Posts: 82
  • Solid Snake/Joshua Harris Fan
    • Legacy Designs
Re: Removing Table from Output
« Reply #2 on: April 03, 2010, 08:13:16 pm »

The return type of resultset will return an array I believe... Its up to you to do all rendering and formatting.  After you do the setReturnType, you need to actually call to get pictures...  using one of the other calls.
 
Code: [Select]
$objCpm->cpm_setReturnType("resultset");
$results =  $objCpm->cpm_viewRandomMediaFrom();
print_r($results);

That, in addition to all your setup code for it, should dump the data for the pictures... Its up to you to format it as you wish then.  There is no way currently to just remove the table code.



Im sorry that I misunderstood.  According to the poster of this message, you were supposed to be able to use that code, and then insert another code that removes the table.
Logged

vuud

  • Moderator
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1803
  • [cpmfetch.fistfullofcode.com]
    • Fist Full Of Code
Re: Removing Table from Output
« Reply #3 on: April 04, 2010, 02:52:00 am »

Im sorry that I misunderstood.  According to the poster of this message, you were supposed to be able to use that code, and then insert another code that removes the table.


That poster is entirely correct in what they are saying...  however, in that post when they say...

Quote
Then format the data as you wish.


It means exactly what I am saying... you have to start with the raw data at that point.

Hope that clears it up

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

SolidSnake2003

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Gender: Male
  • Posts: 82
  • Solid Snake/Joshua Harris Fan
    • Legacy Designs
Re: Removing Table from Output
« Reply #4 on: April 04, 2010, 04:25:26 am »


That poster is entirely correct in what they are saying...  however, in that post when they say...


It means exactly what I am saying... you have to start with the raw data at that point.

Hope that clears it up



ahh ok

Is there any documentation on how to format the text?
Logged

vuud

  • Moderator
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1803
  • [cpmfetch.fistfullofcode.com]
    • Fist Full Of Code
Re: Removing Table from Output
« Reply #5 on: April 04, 2010, 06:13:27 am »

ahh ok

Is there any documentation on how to format the text?


I would recommend running your query and then using print_r($results) to get an idea of what is in there.  After that is just going through the array and printing the parts you want.  For help with that you could look at some of the basic PHP stuff out there.  It would require very little php knowledge to work with the data.   Any documentation I wrote would be a PHP guide and there are tons out there...

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

SolidSnake2003

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Gender: Male
  • Posts: 82
  • Solid Snake/Joshua Harris Fan
    • Legacy Designs
Re: Removing Table from Output
« Reply #6 on: April 04, 2010, 02:36:13 pm »

Thanks it worked perfectly :D, marking as solved.
Logged
Pages: [1]   Go Up
 

Page created in 0.024 seconds with 19 queries.