Facebook  Twitter 

SMFHacks.com

+-

SMFHacks.com

+- User Information

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

+- Forum Stats

Members
Total Members: 4257
Latest: Alex998.
New This Month: 1
New This Week: 0
New Today: 0
Stats
Total Posts: 43295
Total Topics: 7523
Most Online Today: 175
Most Online Ever: 2482
(April 09, 2011, 07:02:45 pm)
Users Online
Members: 0
Guests: 170
Total: 170

Author Topic: (Parse) Error in coding line  (Read 12339 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: 16452
    • 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: 16452
    • 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: 16452
    • 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
6384 Views
Last post October 03, 2007, 06:40:17 pm
by SMFHacks
2 Replies
7378 Views
Last post January 25, 2010, 09:55:46 pm
by lakestclair
19 Replies
6472 Views
Last post November 19, 2011, 06:19:07 pm
by jstop
5 Replies
4857 Views
Last post November 09, 2014, 10:38:54 am
by SMFHacks
2 Replies
1831 Views
Last post December 18, 2018, 11:57:10 am
by glenn3505

+- Recent Topics

Please Help! by SMFHacks
April 17, 2024, 08:04:55 am

Rate own images by fvlog19
April 11, 2024, 10:56:53 am

Tidy Child Boards on 2.1.4 by SMFHacks
April 04, 2024, 03:54:12 pm

Problems SMF 2.0.19 > 2.1.4 SMF Gallery Pro - Recents Images to overall header by Michel68
March 30, 2024, 12:41:08 pm

Can't DROP 'id_member'; check that column/key exists Datei: by SMFHacks
March 30, 2024, 11:58:20 am

No thumbnails on new uploads by Tonyvic
March 29, 2024, 06:26:18 am

Display the Contact Page for guests by SMFHacks
March 27, 2024, 10:55:43 am

is it possible to add support for odysee.com by fvlog19
March 21, 2024, 08:47:51 am

Request for admin notification by davejo
March 10, 2024, 01:31:59 am

I need help with torrent upload by Ineedsmfhelp
March 09, 2024, 10:01:13 pm

Powered by EzPortal