Part of the EllisLab Network
This thread is a discussion for the wiki article: Another BBCode Helper
   
 
Another BBCode Helper
Posted: 19 July 2008 04:41 PM   [ Ignore ]  
Summer Student
Total Posts:  1
Joined  07-19-2008

There is a bug in helper.
http://codeigniter.com/wiki/Another_BBCode_Helper/

Line 123 in helper file, function parse_bbcode.

There is:

foreach ($bbcode_to_parse as $key => $val)
    
{        
        
for ($i = 1; $i <= $bbcode_to_parse[$key][2]; $i++) // loop for imbricated tags
        
{
            $t
= preg_replace($key, $bbcode_to_parse[$key][$clear], $str);
        
}
    }

Should be:

foreach ($bbcode_to_parse as $key => $val)
    
{        
        
for ($i = 1; $i <= $bbcode_to_parse[$key][2]; $i++) // loop for imbricated tags
        
{
            $str
= preg_replace($key, $bbcode_to_parse[$key][$clear], $str);
        
}
    }

Best regards,

Profile
 
 
   
 
 
‹‹ Excel Plugin      Cache headers ››
Post Marker Legend
New Topic New posts Hot Topic Hot Topic with new posts New Poll New Poll Moved Topic Moved Topic Sticky Topic Sticky topic
Old Topic No new posts Hot Old Topic Hot Topic with no new posts Old Poll Old Poll Closed Topic Closed Topic Announcement Announcements
Theme
Change Theme
Visitor Statistics
The most visitors ever was 719, on June 06, 2008 10:16 AM
Total Registered Members: 61065 Total Logged-in Users: 15
Total Topics: 73886 Total Anonymous Users: 1
Total Replies: 398530 Total Guests: 318
Total Posts: 472416    
Members ( View Memberlist )
Active Members:    audioplebchx2kCraig RodwayCrucialEthan DunhamGDmacGeorgi VeznevLuci3noutragePopcornSarah PearsonSumontomcodeYsekim