2010-01-12, 08:16 PM
I hope I'm posting this in the right spot. I'm a newbie to the forums, but have been using mybb for about 2 years. I started using mybb with no experience writing any type of code and have been able to produce a community forum I'm very proud of...and that's because of this community, the support staff and the software you've created.
Enough back-patting! Now to my problem. I have been heavily modifying the templates to mybb, and some modification to the index.php file as well. I've always diverted from using some of the plugins because I wanted to learn on my own how to do it. I have been using...
ob_start();
include("http://www.greensburgneighbors.com/event.php");
$event = ob_get_contents();
ob_end_clean();
...on my index page as a way to include any information from my event.php file, which contained code like this...
I used this same method to include a weather widget and at times a "recent post" widget. This worked like a charm in 1.4.9, and then I upgraded to 1.4.11. After I upgraded, I added, once again, the ob_start code to the top of my index.php file. Once I did that the page simply "chugged" and never loaded any information into my browser. It never does send any error text. So I took the ob_start code out and index.php comes up just fine.
Any suggestions?
Does the new version of php or mybb not like ob_start?
Is there a problem with my event.php code that 1.4.11 recognizes that 1.4.9 didn't?
Enough back-patting! Now to my problem. I have been heavily modifying the templates to mybb, and some modification to the index.php file as well. I've always diverted from using some of the plugins because I wanted to learn on my own how to do it. I have been using...
ob_start();
include("http://www.greensburgneighbors.com/event.php");
$event = ob_get_contents();
ob_end_clean();
...on my index page as a way to include any information from my event.php file, which contained code like this...
Quote:<div class="topbarleft">Today and Tomorrow in Greensburg</div>
<table class="table" style="text-align:left">
<tr class="line">
<?php
$html = file_get_contents("http://www.greensburgneighbors.com/calendar.php");
$html1 = preg_replace('/<td class="trow1calendar" align="center" width="1">(.*?)<\/td>/', '', $html);
preg_match_all(
'/<td class="trow_sep" height="100" valign="top">.*?<\/td>.*?<\/td>/s',
$html1,
$eventcontainer, // will contain the blog posts
PREG_SET_ORDER // formats data into an array of posts
);
foreach ($eventcontainer as $eventinfo) {
$unformated = $eventinfo[0];
$str1 = preg_replace('/<td class=(.*?)>/', '<td class="trow1" valign="top">', $unformated);
$str2 = str_replace('<div class="float_right smalltext">', '<div>', $str1);
$event = str_replace('<div style="margin-bottom: 4px; text-align:left" class="reallysmalltext public_event">', '<div>', $str2);
echo $event . "\n";
}
?>
</tr>
</table>
I used this same method to include a weather widget and at times a "recent post" widget. This worked like a charm in 1.4.9, and then I upgraded to 1.4.11. After I upgraded, I added, once again, the ob_start code to the top of my index.php file. Once I did that the page simply "chugged" and never loaded any information into my browser. It never does send any error text. So I took the ob_start code out and index.php comes up just fine.
Any suggestions?
Does the new version of php or mybb not like ob_start?
Is there a problem with my event.php code that 1.4.11 recognizes that 1.4.9 didn't?