Welcome to Geeklog, Anonymous Sunday, September 08 2024 @ 01:12 am EDT

Geeklog Forums

Adding minor tweaks:Adding minor tweaks:Adding Minor Tweaks


Status: offline

Flernk

Forum User
Chatty
Registered: 07/31/03
Posts: 46
First question:

Where is this line in the comments generated and how do I edit it:
"Authored by: Ethan on Wednesday, August 13 2003 @ 01:23 PM PDT"

Second question:

I want to add this line of code as the Initial Value on the comments form:

<p><img src="http://www.february28.net/images/userphotos/{username}.gif"></p>

It seems to add fine to the comments area and that line of code works great for adding a user photo to a comment, but when the "preview button" is clicked, that line of code is doubled. If I hit the preview button again, it is tripled. Etc. What's going on?
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Quote by Flernk:Where is this line in the comments generated and how do I edit it: "Authored by: Ethan on Wednesday, August 13 2003 @ 01:23 PM PDT"
Effectively, it's this line in function COM_comment() in lib-common.php:
Text Formatted Code
$retval .= ' ' . $LANG01[36] . ' ' . $A['nice_date'] . LB;
(err - with closing square brackets instead of the line breaks ...) bye, Dirk
 Quote

Status: offline

Flernk

Forum User
Chatty
Registered: 07/31/03
Posts: 46
Quote by Dirk:
Quote by Flernk:Where is this line in the comments generated and how do I edit it: "Authored by: Ethan on Wednesday, August 13 2003 @ 01:23 PM PDT"
Effectively, it's this line in function COM_comment() in lib-common.php:
Text Formatted Code
$retval .= ' ' . $LANG01[36] . ' ' . $A['nice_date'] . LB;
(err - with closing square brackets instead of the line breaks ...) bye, Dirk
How would I edit it to read, say "Ethan posted this comment on August 13 2003 @ 01:23 PM PDT" or edit it so that it would include the user image script I wrote in the first post?
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Well, I was assuming some basic PHP knowledge if you set out to making these sort of changes ... $LANG36 is a reference to the language file, so that\'s where it gets the \"Authored by\" from. $A[\'nice_date\'] is, obviously, the formatted date and time of the post. All these bits and pieces are then concatenated together. If you compare that with the actual HTML source that you see in your browser, it shouldn\'t be too hard to figure out what to modify and where. bye, Dirk
 Quote

Status: offline

Flernk

Forum User
Chatty
Registered: 07/31/03
Posts: 46
Okay, I found the lines of code in lib-common.php where the Author is diplayed and I aslo found the lines in users.php (107-110) that show the user image, but I can\'t seem to connect the two without getting a fatal error. Please help. I\'m so close I can taste it, but I don\'t have enough experience with php to connect these final dots. Thanks for all your help! You rock!
 Quote

All times are EDT. The time is now 01:12 am.

  • 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