well, I deleted the OLD ‘below the fold’ stuff — basically it was a clumsy way of doing it.

Mostly because it basically did “The Loop”, but after a single post (the latest), it then changed the format of subsequent posts to “excerpts”, and through the magic of styling and divs, changed the format of THOSE to a different location (”below the fold”) as well as a different style.

Its clumsy, because if you SEARCH for different items, your results will ALSO end up the same way; the first item will be okay, but the rest of your search results will be styled “below the fold” — which is REALLY supposed to be for INDEPENDENT, footer-type items … latest posts, latest links, a detailed “about” and so on.

Therefore, a new “below the fold” is the following:

1) truly independent, and in the “footer.php”
2) will include the following items, independent of whats above the fold:
a) latest entries / popular entries
b) latest “news” (aka magnolia or delicious entries)
c) blog roll — popular other blogs
d) a true footer

To accomplish this, you fundamentally need to sort out the trick to get multiple loops on the same page.

Why? The latest series of posts above the loop — that’s loop #1. The last series of entries below the loop, to show up on every single page independently of what’s above the loop (it could just be headlines a la “crate“) is loop #2.

The Codex has what seems to be a good explanation of how to do more than one loop AND be able to select which posts to select IN that loop:

http://codex.wordpress.org/The_Loop#Multiple_Loops

Jun
11
2006
11:54 pm

(I don’t know if there’s going to be a part II … )
But, Wordpress has an interesting way of dealing with “control structures” — that is, ifs, whiles, etc etc.

Although you can add “tags” to create and modify pages (and The Loop), at its heart, it MUST adhere to the rules of PHP — because that’s how Wordpress is built upon.

Therefore, its curious how it deals with its control structures, because THERE ARE NO CURLY BRACKETS!

That is, when you usually use an “IF”, the actual stuff which follws the operator is usually enclosed in curly brackets!

To wit: (more…)

Jun
10
2006
12:09 am

Quick and Dirty Rails

1. Create rails: “rails recipe_book”
2. Create databasei in mysql
3. Create table in database — PLURAL, e.g. “recipes” NOT “recipe”
4. EDIT ruby database so it points to database — “config/database.yml”
5. Create model of table: go to apps directory “ruby script\generate model TABLE_NAME (i.e. recipe)” [SINGULAR]
6. Create controller of table: go to apps dire “ruby script\generate controller TABLE_NAME (i.e. recipe)” [SINGULAR]
7. Edit controller so it creates scaffold: “scaffold :TABLE_NAME” [SINGULAR]

** all done!**
8. You can edit all elements of CRUD — just edit the apps/view
9. LIST: appls/view –> create list.rhtml, and edit it.

** relational tables
10. If there is a higher group that it belongs to do the following
11. Create table in database — PLURAL, e.g. “groups”
12. EDIT FIRST table so it has one entry — TABLE_NAME_id (singluar!)
13. Create model of table and controller table
14. EDIT model of first table so it says “belongs to :TABLE2″ (SINGULAR)
15. EDIT model of second table so it says “has_many : TABLE1″ (PLURAL)

Mar
29
2006
12:31 am