Welcome to Geeklog, Anonymous Thursday, May 09 2024 @ 09:20 pm EDT

Geeklog Forums

Journal Comments - What's New Block


Status: offline

Leita

Forum User
Chatty
Registered: 05/11/03
Posts: 37
Location:Colorado
Hi - I tried to input the journal comment display for the What's New Block and I'm getting this error when I add it to my lib-custom.php. Any ideas what this is?

my site is 7 Deadly-Sins. But it has to be listed in config as theveil.org since it was originally moved over from the Veil.

Parse error: parse error in /home/theveil.org/html/adventures/system/lib-custom.php on line 430

Warning: Cannot modify header information - headers already sent by (output started at /home/theveil.org/html/adventures/system/lib-custom.php:430) in /home/theveil.org/html/adventures/system/lib-sessions.php on line 185

Warning: Cannot modify header information - headers already sent by (output started at /home/theveil.org/html/adventures/system/lib-custom.php:430) in /home/theveil.org/html/adventures/system/lib-sessions.php on line 197
     11  Quote

Status: offline

Turias

Forum User
Full Member
Registered: 10/20/03
Posts: 807
Sounds like you have a parse error on or before line 430 of that file. Wink

Also check for extra whitespace after ?> at the end of the file. Delete it if there is any.
 Quote

Status: offline

Leita

Forum User
Chatty
Registered: 05/11/03
Posts: 37
Location:Colorado
no blank spaces ,( I had made sure of that. All I did was add the code to the end of my lib-custom.php.
 Quote

Status: offline

Turias

Forum User
Full Member
Registered: 10/20/03
Posts: 807
Then there is a parse error. Maybe someething split onto two lines, an unescaped quotation mark, etc.
 Quote

Status: offline

Leita

Forum User
Chatty
Registered: 05/11/03
Posts: 37
Location:Colorado
Well, I'm not very good with this, so it may sound dumb. I remember reading a while back that you need to space over instead of hitting the tab key in php. So I took the coding and deleted all the spaces and spaced over with the spacebar.

Now the parse error is on line 449 and this is 449:
Text Formatted Code
$str = "<a href="{$_CONF['site_url']}/journal/index.php?mode=read"

 

this is line 450:
Text Formatted Code
."&type=entry&je_id={$item['sid']}#comments">";

 


And if I look at the code in dreamweaver,
Text Formatted Code
#comments">";
 
is in orange, like something is missing.
 Quote

Status: offline

Dazzy

Forum User
Full Member
Registered: 07/19/03
Posts: 200
Location:N. Ireland
I take it for granted you didn't use dreamweavor when you edited the file?
Dazzy
 Quote

Status: offline

Leita

Forum User
Chatty
Registered: 05/11/03
Posts: 37
Location:Colorado
That's correct - I edited it in notepad
 Quote

Status: offline

Dazzy

Forum User
Full Member
Registered: 07/19/03
Posts: 200
Location:N. Ireland
I have also tried to implemnt this on my 'test server' and receive the same error as yourself!

I'm no php expert but wouldn't the # in line 450 indicate a comment?

Text Formatted Code
."&type=entry&je_id={$item['sid']}#comments">";

 

Dazzy
 Quote

Status: offline

Turias

Forum User
Full Member
Registered: 10/20/03
Posts: 807
A # is a comment in many languages, but not in php.

The forum strips backslashes out, so you might be doing it correctly, but see how $str is a string? Since you are defining the string with double quotes, make sure you escape the double quotes inside that string with backslashes (right after the href= and right after #comments).
 Quote

Status: offline

Leita

Forum User
Chatty
Registered: 05/11/03
Posts: 37
Location:Colorado
Awesome! Thanks - that was it - so it should like like this:

Text Formatted Code
$str = "<a href=\"{$_CONF['site_url']}/journal/index.php?mode=read"
                ."&type=entry&je_id={$item['sid']}#comments\">";

 
 Quote

All times are EDT. The time is now 09:20 pm.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content