SMFHacks.com
** Home Forum Index Hacks Products Login Register Search
Welcome, Guest. Please login or register.
May 24, 2012, 09:27:59 pm

Login with username, password and session length
Members
Total Members: 10071
Latest: cdavidson012
Stats
Total Posts: 28687
Total Topics: 4977
Online Today: 94
Online Ever: 2482
(April 09, 2011, 07:02:45 pm)
Users Online
Users: 0
Guests: 50
Total: 50
+ 
|-+ 
| |-+ 
| | |-+ 
| | | |-+ 
0 Members and 1 Guest are viewing this topic. « previous next »
Pages: [1] Go Down Print
Author Topic: (Parse) Error in coding line  (Read 5306 times)
bopla
Newbie
*
Offline Offline

Posts: 4


View Profile
« 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:
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?)
Logged
SMFHacks
Administrator
Hero Member
*****
Offline Offline

Posts: 9678


View Profile
« Reply #1 on: February 07, 2007, 10:28:32 am »

Orignal line
Code:
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 />';
Logged
bopla
Newbie
*
Offline Offline

Posts: 4


View Profile
« Reply #2 on: February 07, 2007, 10:39:35 am »

Thanks for your quick reply... but it still does not work for whatever reason...  Sad

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)
Logged
SMFHacks
Administrator
Hero Member
*****
Offline Offline

Posts: 9678


View Profile
« Reply #3 on: February 07, 2007, 10:45:23 am »

You were missing a ' after </a>

Code:
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 />';
Logged
bopla
Newbie
*
Offline Offline

Posts: 4


View Profile
« Reply #4 on: February 07, 2007, 10:52:29 am »

still not working...  Shocked

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:
Logged
SMFHacks
Administrator
Hero Member
*****
Offline Offline

Posts: 9678


View Profile
« Reply #5 on: February 07, 2007, 10:58:04 am »

You are missing a period after $context['gallery_pic']['realName']
Logged
bopla
Newbie
*
Offline Offline

Posts: 4


View Profile
« Reply #6 on: February 07, 2007, 11:04:17 am »

I just copied and pasted the code you provided. I'm just no coder...  Wink

Finally it works again! Thanks a lot!  Cheesy
Logged
Pages: [1] Go Up Print 
« previous next »
Jump to:  

Recent
[Today at 08:02:50 am]

[Today at 04:11:41 am]

[May 21, 2012, 08:54:11 am]

[May 20, 2012, 11:06:52 am]

[May 20, 2012, 05:58:11 am]

[May 19, 2012, 06:16:58 pm]

[May 19, 2012, 05:42:37 pm]

[May 18, 2012, 03:08:38 pm]

[May 17, 2012, 06:07:46 pm]

[May 17, 2012, 02:22:07 pm]
Random Picture
Donate to SMFHacks.com
Help Support the SMFHacks.com mod making.
Powered by SMF 1.1.16 | SMF © 2006-2011, Simple Machines LLC
TinyPortal v0.9.7 © Bloc
SMF and SimpleMachines are registered trademarks of Simple Machines. SMFHacks.com is not affiliated with nor endorsed by Simple Machines.
Page created in 0.238 seconds with 20 queries.