Subject: Re: Using Carpoutput to Pass Feed |
Author:
Derek
|
[
Next Thread |
Previous Thread |
Next Message |
Previous Message
]
Date Posted: 14:08:26 08/02/05 Tue
In reply to:
Derek
's message, "Using Carpoutput to Pass Feed" on 11:12:04 08/02/05 Tue
Found the solution here: http://www.theadminzone.com/forums/archive/index.php/t-6787.html
If $carpoutput isn't automatically working, just skip it, create an output buffer (ob_start()), set 'carpoutput'to 0, and then dump the contents (ob_get_contents()) into $carpoutput. Not elegant, but more elegant than 'not working'. Don't forget to ob_end_clean(), too.
- D
>(I have a background in Java, but am fairly new to php
>-- so if the answer should be obvious, I apologize.)
>
>I'm trying to integrate Carp into phpwebsite because
>it is so much more powerful than phpwsrss (the
>integrated client) and gives much greater control over
>the output. However, whenever I run the code:
>
>CarpConf('outputformat',2);
>CarpShow('http://newsrss.bbc.co.uk/rss/newsonline_uk_ed
>ition/world/rss.xml');
> $THEME['NEWSFEED'] = "
>id=\"news\">$carpoutput ";
>I don't get any html rendered, except for
>
>id="newsfeed">
>
>So, it's evident that the string-passing is working
>(because otherwise it would get nothing), so I can't
>figure out why $carpoutput doesn't contain any data
>from the feed. If I change carpoutput to 0, then the
>data appears correctly -- except that it renders at
>the very beginning of the generated HTML (having
>displayed before the HTML file). Consequently, I have
>to capture the output and display it at another point
>in the template, namely {NEWSFEED}. However, for
>whatever reason, $carpoutput is not displaying
>properly. I wondered if it wasn't a problem with
>passing a pointer instead of the data, but don't
>really know as I'm rather new to php. I tried creating
>a new String with the $carpoutput data, but php didn't
>like that much. Any ideas?
>
>TIA,
>Derek
[
Next Thread |
Previous Thread |
Next Message |
Previous Message
]
| |