ddhr.org | 2005 | 11 | 29 (3) about | archives | comments | rss

HTML lists Tue, Nov 29, 2005
I hate HTML lists.  By default, ordered (ol) and unordered (ul) lists automatically contain a margin at the top, at the bottom, and to the left of the list.  This might not seem like a big deal.  But go ahead, try to change it.  It's nearly impossible.  Of course anything can be done by using CSS, but for some reason, lists are especially difficult.  And for whatever reason, they never seem to work for me.  So my solution is to use some simple ASCII:  "•" which produces a bullet (•).  This has solved my problems with lists.  Nya! #technology

Divorce Tue, Nov 29, 2005
I believe in God.  And I believe in a devil.  Maybe not a horned, hooved devil.  But an opposer of God; an adversary.  Good presupposes evil.  If there is a God, there must be a devil. 

I think that one of the things the devil rejoices over is divorce.  Statistics say that about half of marriages end in divorce.  And this isn't just the devil-worshipping heathens (term used jokingly); it applies to Christian marriages too.  So then people start to think, "Why get married if it'll just end in divorce?"  The next step after serious dating then becomes living together.  While this isn't the worst thing in the world, it's like taking something good and twisting it.  I'm not saying that these people are obeying the devil.  I'm just saying that these cultural norms are all part of the devil's plan:  Opposing God.  So each time a married person gets that idea in their head, "Maybe this wasn't such a good idea," the devil is saying "Eggzelent!" and twiddling his red, pointy fingers. 

[Disclaimer:  I know some people who live together but aren't married.  I don't think they worship the devil.  And this post isn't directed at them.  It's directed at the thought pattern of people who live together as the next step after casual dating.  First comes holding hands, then kissing, then living together.  Then the breakup and starting from the beginning to do it all over again.] #religion

WordPress functions (2) Tue, Nov 29, 2005
For a while now, I've been trying to figure out how to use WordPress functions outside of the WordPress directory (i.e. in a different folder).  I just found a few posts about it on some WordPress Support pages (1, 2, 3, 4).  All you need to do is add this line of code to a PHP file:

<?php require($_SERVER['DOCUMENT_ROOT'].'/your-wordpress-directory/wp-blog-header.php'); ?>

After this statement is added, you can call any WordPress function.  For example, if you wanted to include WordPress headers and footers and the sidebar on a template in your Zenphoto installation, you would just need to include the file mentioned above and use the standard WordPress functions (get_header(), get_sidebar(), get_footer()). 

Note:  $_SERVER['DOCUMENT_ROOT'] is a call to your site's root directory (www.domain.com is the root of www.domain.com/blog/).  I'm not sure if it works everywhere, but it works for me. #technology