Removing Table from Output Removing Table from Output
 

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

Removing Table from Output

Started by SolidSnake2003, April 03, 2010, 05:53:23 PM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

SolidSnake2003

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 | Where CPMFetch is used

vuud

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 | 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.
 
$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.

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

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 message, you were supposed to be able to use that code, and then insert another code that removes the table.

vuud

Quote from: SolidSnake2003 on April 03, 2010, 08:13:16 PM
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

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

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?

vuud

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...

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

Thanks it worked perfectly :D, marking as solved.