Main Page

Archives
Archives >> Category >> Coding
 
22
Mar
2007
  Filed under: All Entries, Site Updates, Coding
  Comments: 1 Comment »
Quick update, I installed a new plugin that spits out a list of people who commented on a post and links their name back to their respective websites. It's a comment-whoring move to let others plug their sites on yours, but oh well, seeing as how most of the traffic into my site comes in that form anyway. If you want to do the same thing (see the "complements of" after each post on the index page?), you can download it from that site. I made a few quick changes to the code, though. I wanted commas in-between each person, so I needed to have the script put in a comma after every entry other than the last one. In order to do so, after the script files all comment authors and URLs into the array $commenters, I assigned a new variable $count the integer one and got a count of the array. In code form: $result = count($commenters); $count = 1; (Hint: $count starts at 1 to account for the fact that I don't want a comma after the last commenter) After that, I concatenated a comma onto the string after each commenter and added one to the count, other than the last one, by adding the following line:
 
 
Site Stats
  • There are 100 posts, 0 pages and 105 comments in this blog.
  • 1 currently online
  • 96358 total page loads
Meta Nonsense
© the M stands for Monster 2007