FAP SUPPORT - [ Solved ] Error When Viewing Pic With Comments Only


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?

Last edited by Pete_Z on Sun 04 Feb, 2007 08:02; edited 1 time in total
Profile PM  
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

Subject: Re: Error When Viewing Pic With Comments Only
Regular phpbb 2.0.22

Profile PM  
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 ?

Profile PM  
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 ?

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

Profile PM  
Subject: Re: Error When Viewing Pic With Comments Only
Pete_Z wrote: [View Post]
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?

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

Code: [Download] [Hide] [Select]
//$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.

Profile PM  
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);

Profile PM  
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

Profile PM  
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)

Profile PM  
Subject: Re: [ Solved ] Error When Viewing Pic With Comments Only
Artie wrote: [View Post]
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:


Page 1 of 1


  
You cannot post new topics
You cannot reply to topics
You cannot edit your posts
You cannot delete your posts
You cannot vote in polls
You cannot attach files
You can download files
You cannot post calendar events

   

This is a "Lo-Fi" version of our main content. To view the full version with more information, formatting and images, please click here.

Powered by Icy Phoenix based on phpBB
Generation Time: 0.4454s (PHP: 5% SQL: 95%)
SQL queries: 10 - Debug Off - GZIP Enabled