I ADDED THE DATE!!!
27th February, 2010From 1230am to 130am I spent some time researching how I might add the date to my slideshow of posts on the main page, to no avail, so I went to bed and was determined to figure it out after some sleep, later this morning.
And woohoo, I did! It surpisingly only took me 10 minutes too. I tweeted the whole event.
I had added the comment count as well as the date but thought it looked funny and besides how many of you would KNOW what that number represented at first glance? So I removed it.
Are you curious as to how difficult it was to add?
Extremely. Php, the code this bit is written in, is so sensitive. And the language so intricate. But I LOVE languages!!! And am so natural at figuring them out. My dream WAS to become a Linguist. Did you know that? I wanted to work for Wycliffe.
Well, how’d I write the php for this addition?
I first read lots about a few computer languages. Really just trying to find the code that matched the existing code. I found what I thought was the code I needed, but I couldn’t see how I could manuipulate it in a way that would produce a date realistically. And that was last night.
This morning, after a good sleep, I woke up refreshed with a little cramping, but took some meds and was ready. Again, this time starting my research with a question that was written in a more precise, logical way, now realizing what the heck I was dealing with. And voila. I found some code. Although not similiar to the existing one, I felt I could manipulate it enough to make it work. And sure enough.
helpful code I found…

this was the existing code… and if you look closely you can see the code I added from the bit I found above…

It did work. but it was all crunched together. No spaces. the Post’s Title, comment count, and date were all sitting on one line. So next I had to figure out how to manuever them with spaces to make them readable and look pretty. And THAT my friends is a little different than HTML. Instead, of taking a bit of code like <BR> for a break or ENTER in HTML I had to take an entire string of code that looked like this: $ret .= “<p>”; And think of it as a simple <p> which in HTML is a paragraph marker. THEN, thinking a paragraph or double ENTER was ugly for that little space for the exerpt, I thought how do I make that string a br and not a p? hehe And it was waaaay easier than I was making it out to be. Just replace the P with the BR of course. Pfffff duh! right?
And voila it works!!! yay!
So there you have it folks. The date being there should help you be less confused with the order of posts… have a great day, and I’m soooo glad I could figure it out without Jeff’s help. Yay me!