Rodin Changes

In a stack of papers called Unorganized.

  • Jan
  • 09
  • 2005

I’ve done a lot of editing to rodin this weekend. The first edit was to include a listing of all the entries inside the admin section. This way, I can edit an entry by clicking on it directly, instead of having to scroll through all the entries with the “BACK” and “NEXT” links. I used the archive toy, essentially just changing the link text to match what the links are inside the admin section when editing each entry. It works quite well. The biggest trouble was that I had to rename the “ruhroh” function for the admin section since I used INCLUDE statements to be able to call on the archive function I have included in rodin.php (more on this below). Once I renamed the admin “ruhroh” function, though, it all went fairly smooth.

The next edit was to make the home page a listing of the 5 most recent entries. I again used the archive toy. I just copied the archive function into rodin.php (which also made the first edit easier and does away with the need for an extra “archive.php” file), duplicated it, changed the names from archive and arc to listmore and listm, and in the “$query” line of the code, added “content” to the list of things to get from the database. I added a line to the fetch array for “content” as well, then just did “$listm[$j][‘content’]” where I wanted the content to appear.

A small edit was with the NEXT and BACK links. As you can see, I changed those to list the title of the previous and next entries. I think it looks better that way.

The final edit was to make each entry load into another page, so I could keep the home page as a listing of those 5 entries. I simply created a copy of index.php and renamed it entries.php. Then I included that filename in the archives and listmore functions, and the $last, $next, and $basicLink variables in rodin.php. Now, instead of loading new entries to the index page, they load to entries.php. And since I’ve removed the $content variable from the index page, it only lists those 5 most recent entries. Now I just need to figure out how to limit the size of the content of each entry on the home page and add a MORE link to the actual entry.

The big problem with all of that is that I now have to hit “Apply Changes” in the admin section twice any time I make changes to a page that involve new line breaks (either that or just hardcode the breaks myself). If I don’t, the new BR or P tags won’t show up on the home page. And it’s looking like, after a certain size, the BR and P tags are not added to edits I make. I’m sure this is all just a glitch and I’ll fix it eventually.

Oh. I also made the admin section XHTML 1.0 Transitional and the index and entries pages XHTML 1.0 Strict. The next thing with that in mind is to make this refer to a seperate style sheet instead of the style rules at the top of each page.

Comments are closed.