Icy Phoenix
Archived phpBB Topics (Styles, Mods, Support) - FAP SUPPORT - [ Solved ] Error When Viewing Pic With Comments Only
Pete_Z [ Tue 16 Jan, 2007 08:06 ]
Post subject: FAP SUPPORT - [ Solved ] Error When Viewing Pic With Comments Only
Hello, hopefully this post makes it and I wont get banned agian :mrorange:
Okay.. I been having this problem since I installed. when viewing a picture, everyithing is fine. normal. but when viewing a picture that has a comment, I get the following errors in my header:
Warning: strpos() [function.strpos]: Empty delimiter. in /home/xPo0/public_html/forum/album_mod/album_bbcode.php on line 2788
About 80+ of these... then the last are:
Warning: Cannot modify header information - headers already sent by (output started at /home/xPo0/public_html/forum/album_mod/album_bbcode.php:2788) in /home/xPo0/public_html/forum/includes/page_header.php on line 925
Warning: Cannot modify header information - headers already sent by (output started at /home/xPo0/public_html/forum/album_mod/album_bbcode.php:2788) in /home/xPo0/public_html/forum/includes/page_header.php on line 927
Warning: Cannot modify header information - headers already sent by (output started at /home/xPo0/public_html/forum/album_mod/album_bbcode.php:2788) in /home/xPo0/public_html/forum/includes/page_header.php on line 928
lines 928 and 927
header ('Expires: 0');
header ('Pragma: no-cache');
album_bbcode.php - hmm, couldn't I use phpbb bbcode.php instead?
andrea75 [ Tue 16 Jan, 2007 09:04 ]
Post subject: Re: Error When Viewing Pic With Comments Only
What version of forum you are using?
I don't have this error on Icy Phoenix 1.0.6.6
Pete_Z [ Tue 16 Jan, 2007 09:25 ]
Post subject: Re: Error When Viewing Pic With Comments Only
Regular phpbb 2.0.22
Artie [ Tue 16 Jan, 2007 23:40 ]
Post subject: Re: Error When Viewing Pic With Comments Only
The first error is the one of interest.... ignore the 80 plus others
Have you tried re-uploading album_bbcode.php ?
Pete_Z [ Thu 18 Jan, 2007 05:28 ]
Post subject: Re: Error When Viewing Pic With Comments Only
Hi Artie, Yes I've even re downloaded FAP and overwrote album_bbcode.php just to be sure.
I commented out lines in album_bbcode.php untill I no longer got that error, but all that did was disable my smilies. what's wrong with FAP using phpbb's bbcode.php ?
Artie [ Thu 18 Jan, 2007 21:07 ]
Post subject: Re: Error When Viewing Pic With Comments Only
If I remember correctly (from MG.com) you were concernd that FAP and the smiley managment MOD may have a conflict.
I'm think that you may need to speak with MG about this..... I do not have a clue. :cry:
Unforntunately he is away at this time. Try bumping this thread around Monday of next week.
Mighty Gorgon [ Tue 23 Jan, 2007 01:45 ]
Post subject: Re: Error When Viewing Pic With Comments Only
album_bbcode.php - hmm, couldn't I use phpbb bbcode.php instead?
No... because standard bbcode.php could be difficult to be integrated if you have modified it... that's why I have created a new bbcode file just for FAP.
Can you please tell me which lines you have commented out so I can check what could be wrong with your configuration?
Pete_Z [ Wed 31 Jan, 2007 10:01 ]
Post subject: Re: Error When Viewing Pic With Comments Only
The only reason I think it was the smiley managment MOD was, because of the code I had to comment out has most to do with smilies. But I do not know for sure. I overwrote fresh copies of bbcode.php and still had the same problem.
Here is what I commented out in album_bbcode.php
There may be another line, but these are pretty much it...
//$pos = strpos($this->html, $code);
while($pos !== false)
{
$valid = false;
// check previous character
$prev_char = $pos > 0 ? substr($this->html, $pos - 1, 1) : '';
if(in_array($prev_char, $valid_chars_prev))
{
// check next character
$next_char = substr($this->html, $pos + $code_len, 1);
if(in_array($next_char, $valid_chars_next))
{
// make sure we aren't inside html code
//$pos1 = strpos($this->html, '<pos>html, '>', $pos + $code_len);
if($pos2 === false || ($pos1 && $pos1 < $pos2))
{
// make sure we aren't inside nosmilies zone
//$pos1 = strpos($this->html, BBCODE_NOSMILIES_START, $pos + $code_len);
//$pos2 = strpos($this->html, BBCODE_NOSMILIES_END, $pos + $code_len);
So when I do this, smilies are not :usable: text is, and no error.
Artie [ Thu 01 Feb, 2007 00:46 ]
Post subject: Re: Error When Viewing Pic With Comments Only
Wonder if this missing line is the culprit.
bbcode wrote:
$pos = strpos($this->html, $code);
while($pos !== false)
{
$valid = false;
// check previous character
$prev_char = $pos > 0 ? substr($this->html, $pos - 1, 1) : '';
if(in_array($prev_char, $valid_chars_prev))
{
// check next character
$next_char = substr($this->html, $pos + $code_len, 1);
if(in_array($next_char, $valid_chars_next))
{
// make sure we aren't inside html code
$pos1 = strpos($this->html, '<', $pos + $code_len);
$pos2 = strpos($this->html, '>', $pos + $code_len);
if($pos2 === false || ($pos1 && $pos1 < $pos2))
{
// make sure we aren't inside nosmilies zone
$pos1 = strpos($this->html, BBCODE_NOSMILIES_START, $pos + $code_len);
$pos2 = strpos($this->html, BBCODE_NOSMILIES_END, $pos + $code_len);
Pete_Z [ Sun 04 Feb, 2007 07:56 ]
Post subject: Re: Error When Viewing Pic With Comments Only
Wooo! I figured a fix without disabling my smilies!
In album_bbcode.php I have to comment in line 2788
if(strpos($this->text,$this->allowed_smilies[$i]['code']) !== false)
and add a @ to line 2810 ( a little trick I learned from CyberAlian )
Doesn't get rid of the problem, but hides it. I think that's how it goes anyway.
$pos = @strpos($this->html, $code);
Thanks for you time Artie, and thanks to Mighty Gorgon for this great Photo Album :D
Artie [ Sun 04 Feb, 2007 15:14 ]
Post subject: Re: [ Solved ] Error When Viewing Pic With Comments Only
Glad you finally got it going your way. :up:
Only wish we could have helped to get you fixed your problem fixed sooner. 8)
Mighty Gorgon [ Mon 05 Feb, 2007 00:38 ]
Post subject: Re: [ Solved ] Error When Viewing Pic With Comments Only
Glad you finally got it going your way. :up:
Only wish we could have helped to get you fixed your problem fixed sooner. 8)
Another great job my friend... :wink: