Facebook  Twitter 

SMFHacks.com

+-

SMFHacks.com

+- User Information

Welcome, Guest.
Please login or register.
 
 
 
Forgot your password?

+- Forum Stats

Members
Total Members: 4263
Latest: Cekky
New This Month: 0
New This Week: 0
New Today: 0
Stats
Total Posts: 43455
Total Topics: 7557
Most Online Today: 28
Most Online Ever: 2482
(April 09, 2011, 07:02:45 pm)
Users Online
Members: 0
Guests: 34
Total: 34

Author Topic: (Parse) Error in coding line  (Read 12482 times)

0 Members and 1 Guest are viewing this topic.

Offline bopla

  • Member
  • *
  • Posts: 4
    • View Profile
(Parse) Error in coding line
« on: February 07, 2007, 10:20:20 am »
Hi there. Unfortunately I tried to fix a minor bug in this line (to prevent having the upload date/time directly behind the name of the uploader (without a space)), but it did not work out, so I tried to change the line back to original. However, it caused the Gallery to not work anymore at all, since I missed something in this line to change back correctly:

Code: [Select]
echo $txt['gallery_text_postedby'] . '<a href="' . $scripturl . '?action=profile;u=' . $context['gallery_pic']['ID_MEMBER'] . '">'  . $context['gallery_pic']['realName'] '</a> . $txt['gallery_at'] . $context['gallery_pic']['date'] . '<br />
Can anybody help, please? (What's the correct (original) code without the mistake?)

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16524
    • View Profile
Re: (Parse) Error in coding line
« Reply #1 on: February 07, 2007, 10:28:32 am »
Orignal line
Code: [Select]
echo $txt['gallery_text_postedby'] . '<a href="' . $scripturl . '?action=profile;u=' . $context['gallery_pic']['ID_MEMBER'] . '">'  . $context['gallery_pic']['realName'] . '</a>' . $txt['gallery_at'] . $context['gallery_pic']['date'] . '<br />
<br />';
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Offline bopla

  • Member
  • *
  • Posts: 4
    • View Profile
Re: (Parse) Error in coding line
« Reply #2 on: February 07, 2007, 10:39:35 am »
Thanks for your quick reply... but it still does not work for whatever reason...  :(

Here is what I get:

Quote
Parse error: parse error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ',' or ';' in .../Themes/default/Gallery.template.php on line 695

686:             ' .  $txt['gallery_form_keywords'] . ' ';
687:
688:             for($i = 0; $i < $keywordscount;$i++)
689:             {
690:                echo '<a href="' . $scripturl . '?action=gallery;sa=search2;key=' . $keywords[$i] . '">' . $keywords[$i] . '</a> ';
691:
692:             }
693:             echo '<br />';
694:

695:             echo $txt['gallery_text_postedby'] . '<a href="' . $scripturl . '?action=profile;u=' . $context['gallery_pic']['ID_MEMBER'] . '">'  . $context['gallery_pic']['realName'] '</a> . $txt['gallery_at'] . $context['gallery_pic']['date'] . '<br />

696:             <br />';
697:
698:             //Show edit picture links if allowed
699:


(line 695 marked red)

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16524
    • View Profile
Re: (Parse) Error in coding line
« Reply #3 on: February 07, 2007, 10:45:23 am »
You were missing a ' after </a>

Code: [Select]
echo $txt['gallery_text_postedby'] . '<a href="' . $scripturl . '?action=profile;u=' . $context['gallery_pic']['ID_MEMBER'] . '">'  . $context['gallery_pic']['realName'] '</a>' . $txt['gallery_at'] . $context['gallery_pic']['date'] . '<br /><br />';
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Offline bopla

  • Member
  • *
  • Posts: 4
    • View Profile
Re: (Parse) Error in coding line
« Reply #4 on: February 07, 2007, 10:52:29 am »
still not working...  :o

Quote
Parse error: parse error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ',' or ';' in .../Themes/default/Gallery.template.php on line 695

686:             ' .  $txt['gallery_form_keywords'] . ' ';
687:
688:             for($i = 0; $i < $keywordscount;$i++)
689:             {
690:                echo '<a href="' . $scripturl . '?action=gallery;sa=search2;key=' . $keywords[$i] . '">' . $keywords[$i] . '</a> ';
691:
692:             }
693:             echo '<br />';
694:

695:             echo $txt['gallery_text_postedby'] . '<a href="' . $scripturl . '?action=profile;u=' . $context['gallery_pic']['ID_MEMBER'] . '">'  . $context['gallery_pic']['realName'] '</a>' . $txt['gallery_at'] . $context['gallery_pic']['date'] . '<br />

696:             <br />';
697:
698:             //Show edit picture links if allowed
699:

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16524
    • View Profile
Re: (Parse) Error in coding line
« Reply #5 on: February 07, 2007, 10:58:04 am »
You are missing a period after $context['gallery_pic']['realName']
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Offline bopla

  • Member
  • *
  • Posts: 4
    • View Profile
Re: (Parse) Error in coding line
« Reply #6 on: February 07, 2007, 11:04:17 am »
I just copied and pasted the code you provided. I'm just no coder...  ;)

Finally it works again! Thanks a lot!  :D

 

Related Topics

  Subject / Started by Replies Last post
2 Replies
6502 Views
Last post October 03, 2007, 06:40:17 pm
by SMFHacks
2 Replies
7478 Views
Last post January 25, 2010, 09:55:46 pm
by lakestclair
19 Replies
6580 Views
Last post November 19, 2011, 06:19:07 pm
by jstop
5 Replies
4956 Views
Last post November 09, 2014, 10:38:54 am
by SMFHacks
2 Replies
1933 Views
Last post December 18, 2018, 11:57:10 am
by glenn3505

+- Recent Topics

[Mod]Tenor Posting Animated Gifs by SMFHacks
August 30, 2024, 04:04:26 pm

List of other errors after installing and trying to use by SMFHacks
August 27, 2024, 02:15:52 pm

Subject Error by SMFHacks
August 27, 2024, 02:15:46 pm

Store Not Logging Transactions or Sending Emails for Paid Items, Free Items Work by SMFHacks
August 27, 2024, 05:26:52 am

Don't Know How to Unhide Previously Hidden Items in Latest SMF Store 5.0 by Michael Vail
August 26, 2024, 11:38:33 pm

Undefined array key "session_var" and Undefined array key "session_id" Errors by SMFHacks
August 26, 2024, 11:10:54 pm

SMF Links Error by yamiacaveman
August 22, 2024, 06:21:53 pm

HTTP Error 500 by SMFHacks
August 20, 2024, 12:28:53 pm

Site upgrade to 2.1 by live627
August 18, 2024, 02:47:33 am

Uninstall issue and new licence no email by landyvlad
August 16, 2024, 08:05:48 am

Powered by EzPortal