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:
$objCpm->cpm_setReturnType("resultset");
I tried this
$objCpm->cpm_setReturnType("html");
adding either of the above codes, and nothing is displayed
Gallery Link (http://chrispine.fantorium.com/gallery) | Where CPMFetch is used (http://chrispine.fantorium.com)
Quote from: SolidSnake2003 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:
$objCpm->cpm_setReturnType("resultset");
Gallery Link (http://chrispine.fantorium.com/gallery) | Where CPMFetch is used (http://chrispine.fantorium.com)
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.
$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.
Quote from: vuud on April 03, 2010, 06:17:51 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.
$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 (http://forum.coppermine-gallery.net/index.php/topic,62794.msg311755.html#msg311755) message, you were supposed to be able to use that code, and then insert another code that removes the table.
Quote from: SolidSnake2003 on April 03, 2010, 08:13:16 PM
Im sorry that I misunderstood. According to the poster of this (http://forum.coppermine-gallery.net/index.php/topic,62794.msg311755.html#msg311755) 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
Quote from: vuud on April 04, 2010, 02:52:00 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?
Quote from: SolidSnake2003 on April 04, 2010, 04:25:26 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...
Thanks it worked perfectly :D, marking as solved.