On a recent Drupal project, the design for the search results page called for displaying the total number of results found in the page title: 120 results found for the term "school" I was using Apache Solr for the search solution, and to override the page title, I implement THEMENAME_preprocess_page() in template.php:
<?php
function MYTHEME_preprocess_page(&$vars) {
if(arg(1) == 'apachesolr_search') {
if (apachesolr_has_searched() && ($response = apachesolr_static_response_cache())) {
$query = apachesolr_current_query();
$keywords = $query->get_query_basic();
$num_found = $response->response->numFound;
$vars['title'] = $num_found.' results for the term "'.check_plain($keywords).'"';
}
}
}
?>
If you use the Context module, set up a context called "search" and use that condition instead:
<?php
function MYTHEME_preprocess_page(&$vars) {
$contexts = context_active_contexts();
if(array_key_exists('search', $contexts)) {
if (apachesolr_has_searched() && ($response = apachesolr_static_response_cache())) {
$query = apachesolr_current_query();
$keywords = $query->get_query_basic();
$num_found = $response->response->numFound;
$vars['title'] = $num_found.' results for the term "'.check_plain($keywords).'"';
}
}
}
?>
I recently started my first Drupal 7 project, and one of the things I had to do was theme the user registration form. After doing a bit of searching, I came across several posts on the topic, and none of them were correct. However, thanks to some great suggestions here, I came up with the solution.
The first thing I needed was a custom module, implementing hook_form_FORM_ID_alter():
<?php
function MYMODULE_form_user_register_form_alter(&$form, &$form_state, $form_id) {
$form['#theme'] = 'user_register';
}
?>This was important, as the user registration form did not have a theme function associated with it. The next step was to implement hook_theme() in my custom template.php:
<?php
function MYTHEME_theme($existing, $type, $theme, $path){
return array(
'user_register' => array(
'render element' => 'form',
'template' => 'templates/user-register',
),
);
}
?>This registers a theme function, defining a named variable and a template file to use.
Next, I implemented a preprocess funtion in template.php, to set up a bunch of variables to output in my template. I do this because I strongly dislike having function calls in my templates; in my opinion, template files should only contain markup and data, not perform any logic or fetch content. A basic version of my preprocess function looks like this:
<?php
function MYTHEME_preprocess_user_register(&$variables) {
$variables['rendered'] = drupal_render_children($variables['form']);
}
?>As you can see, I render the form, and store the rendered output in the $variables array. Lastly, I created a template, named user-register.tpl.php, and it contains all of my themed markup for the user registration form. The template can simply output the $rendered variable where I want:
<div class="some-class"><?php echo $rendered; ?></div>
When 19-year-old Zach Wahls spoke in front of the Iowa House of Representitives about his upbringing by lesbian parents, he became a civil rights hero.
Heroes are people who takes action in the face of a challenge that requires courage; Mr. Wahls did exactly that with his speech, arguing the House to vote down a bill that would outlaw same-sex marriages and the recognization of same-sex marriages from other states.
It takes a tremendous amount of courage to speak out about something so personal as sexuality, and it takes even more courage to speak out about your parent's sexuality. Homosexual rights is the newest face on the ugly discrimination card. 150 years ago, Abraham Lincoln reiterated that all men are created equal, and if you accept this ideal, then you must accept that homosexuals are equal as well. Walhs spoke of this equality, and how laws banning same-sex marriage treats homosexuals as second-class citizens.
Lincoln once argued that states had the sovereign right to allow or forbid the practice of slavery within the borders of their states, and many politicians such as John McCain have argued the same shameful position regarding same-sex marriages. Until we have federal recognition of all marriages between consenting adults, more heroes like Zach Walhs will be needed to come forth, and speak out in favor of honoring the uniquely American ideal that all men are truly equal.
I am a big fan of Robert Jordan's Wheel of Time epic fantasy. Inspired by a post on http://dragonmount.com, I wrote some Wheel of Time haikus.
When the Wolf King rides
wielding hammer, calling wolves,
The Last Battle comes.
From the White Tower
comes the last hope of mankind,
Aes Sedai ride.
Red Hand on banner,
Soldiers and horse line the road,
marching to battle.
Who but the Ogier,
long in life and memory,
remember the Song?
Today is the 25th anniversary of the loss of the crew of the space shuttle Challenger, and it's an anniversary that I have privately marked every year since the tragedy occurred.
It's amazing to me that 73 seconds can change a life, change someone's outlook, and create memories that last a lifetime. When I was ten years old, 73 seconds found me witnessing the death of another human being. It was the dream of a little boy to reach for the stars, to go to space and look down upon the earth. I dreamed about it. I watched the shuttle launches.
On the day of this particular launch, I sat in front of a television with all my third grade classmates to watch the New Hampshire teacher bring space right to our very classroom. I was so excited, and remember staring at the television, completely transfixed with anticipation.
When the engines lit, my heart raced and we all cheered. When the shuttle cleared the launchpad, we all clapped. What happened next hushed the room like a forest covered in thick snow. Nobody spoke. I heard one of the teachers gasp. My heart sank. Someone turned off the television, and we resumed our normal class schedule. I could not focus, though, as all I could think of were white smoke trails across a blue sky.
I remember sobbing for three days straight. My dream to visit space someday was shattered, and I was acutely aware of the deaths of those astronauts, and that hurt the most. President Reagan's now famous speech made me weep as if my own family had been lost.
"We will never forget them this morning as they prepared for their journey and waved goodbye and slipped the surly bonds of earth to touch the face of God."
25 years later, hearing that speech and watching video of Challenger's demise still brings tears to my eyes.
The loss of Challenger and her crew taught me the meaning of true courage; the strength to follow your dreams, despite the risks that may exist. This final lesson that Christa McAuliffe imparted on me is a lasting legacy as a teacher, and one that I shall carry with me all my life.
Drupal legend Robert Douglass has started a conversation on Twitter under the hash tag #drupalappstore, which presents the idea of a "Drupal App Store" up for discussion, arguments, and flame wars. Robert has challenged people in the Drupal community to blog about this topic, and when Robert says something about Drupal, people listen. Here's my contribution to the conversation.
As a person who makes his living by providing Drupal services, I have mixed feelings about the concept of an app store.
In the open source world, there are many people who believe that it's immoral to charge for open source software. Free is free, and if you desire to profit from using your talents to code, you're an evil capitalist who threatens the entire culture of open source.
There are many people who subscribe to the idealogy of open source because they simply wish to contribute something useful to the world. We are free to speak, free to contribute, free to share and this is a very powerful concept. There's no barrier to entry, no license fees, and no one to prevent your contribution from being shared.
Like many others, I write open source software because it feels good, I get to share the fruits of my labor, and I find it very rewarding to solve a problem with code that others can use.
The Drupal community embraces these beliefs fully. Anyone with an idea can get a CVS account on drupal.org and contribute a module or a theme. These modules range from the essential-can't-build-without-them to modules that provide specific functionality for specific use-cases, to colorful and mostly pointless modules. The point is, no one stops these modules from being contributed.
Some people are now sharing their code in places outside of Drupal, either on their own servers or on Github or other sites.
Drupal is a highly collaborative culture. Many Drupal modules are designed to work in conjunction with other modules, and many modules have multiple maintainers.
The very notion of an App store evokes thoughts of how Apple and Google have implemented the concept. Recently, Wordpress has launched an app store of its own. In these instances, what people pay for is a single, stand-alone block of code that provides discrete and atomic functionality. Wordpress plugins rarely require other plugins in order to work. iPhone apps don't depend on other iPhone apps, and neither to Android apps.
This concept doesn't translate to the Drupal community, as many modules are dependent upon other modules. The idea that a person pays $9.99 for one module, and then has to pay varying amounts for two or three other modules in order to use that module is really not feasible, in my opinion. Given that most Drupal sites have a minimum of 20 modules in use, it could get fairly expensive to build a moderately complex site in Drupal if you had to pay for all of the modules you needed.
How about the collaboration argument? If developer A has a module and developer B writes a similar module, there's no incentive to work together to merge those two modules, as they will both potentially lose money. Having several modules that perform largely similar functionality only pollutes the ecosystem and makes it difficult to select modules when building projects. What if a developer writes a module that is so absolutely useful that it ought to be merged into Drupal core? That developer will lose revenue.
And how about vetting? Apple has strict policies about what apps can be sold in their store. Would a Drupal app store do the same thing? I wouldn't want someone to tell me that I couldn't sell my app because someone else didn't find my code useful or of sufficient quality.
The only way I see a Drupal app store working is if it is implemented in a way that follows the concept of the iPhone app store; that is, fully standalone applications with no dependencies. What that means to me is that Drupal distributions would fit this model, such as OpenAtrium, or some e-commerce application. I could easily see a Magento-like application built with Drupal for sale as an app, with additional plugins for sale. Or perhaps a multi-user blogging distribution for sale.
I think that if this idea was implemented, it would go a long way toward forwarding the concept of Drupal distributions, and companies can be successful with this business model.
Why would I pay for any of these solutions when there are so many free alternatives? Superiority, support, functionality. If the Drupal community was going to go in the direction of an App store, I would expect that these three things would need to be provided by developers in order to make the case that paying for the application has more value than getting a similar application for free.
Before I begin this post, this is my opinion, and my opinion alone. I am posting this because as a contributing member of the Drupal community, I am not afraid to express my opinions. I welcome and encourage counter-opinions, as long as the tone remains respectful.
I will use words such as vagina, uterus, and penis. If these words offend you, please do not read this post.
There has been a lot of talk lately within the Drupal community about the need for more women to be included in the community, and about reaching out to women specifically as part of a gender-based recruitment strategy.
I find this offensive.
It's wrong for any organization to actively recruit people of a specific gender or race or sexual orientation; gender and race are irrelevant and have absolutely zero to do with improving Drupal. The implication is that because a person has a uterus, she must be valuable to the community. This is patently false; a person's value and usefulness doesn't stem from the genitalia. There are just as many women as men who contribute absolutely nothing to the community. Simply using Drupal doesn't make you a member of the community; to be a member, you must participate.
This may come as a surprise to some women, but your vagina doesn't make you special, any more than Dries' penis makes him special.
Webchick talks about making gender a non-issue, and not falling into the trap of "othering", and I agree 100% with her. There's nothing to be gained in the community by singling people out because of their gender, and that applies to proposed efforts to recruit women, simply because they are women. I believe that the existence of the Drupalchix group on groups.drupal.org is just another example of "othering", despite the claim that the group is for anyone. The name alone singles out anyone but females, and its purpose is to serve female interests within the Drupal community. Why is this needed? Why should "a woman who needs some help/guidance in order to get (more) involved with Drupal and the Drupal community" have to go to the Drupalchix group to get that help, when there are so many all-inclusive resources that will give you the same amount of help and don't care that you have a vagina?
Asians are underrepresented in the Drupal community - should there be an outreach effort to recruit more of them? How about Indians? Mexican paraplegics? One-eyed Russian Jews who enjoy traditional Celtic music? You might laugh at these examples, but they are no different in concept than the idea of recruiting women for the sake of recruiting women.
The Drupal community needs people with ideas, people who aren't afraid to share and take action. What I love best about Drupal is that anyone who has an idea can contribute something to the community - modules, themes, snippets, documentation, patches, blog posts - it doesn't matter what your gender is or what nationality you are. All that matters is that you share something with the community, contribute, and participate.
Drupal needs to actively recruit and encourage people who are willing to do this, and leave the genitals out of it.
It allows developers to create word processing documents by combining user-defined Microsoft Word templates with data from disparate data sources, such as XML files and databases. It is typically used to create professional, print-ready word processing documents in DOCX, DOC, RTF and PDF. LiveDocx is a Web Service that can be easily integrated into any web application without installing or configuring any software on your server. Currently, the following programming languages are supported: * ASP.NET * PHP As LiveDocx is strictly based on open standards, it is simple to add support for more programming languages. As long as SOAP (Simple Object Access Protocol) is available on the client-side system, LiveDocx runs on all operating systems and in all programming languages.This looked to be the best solution for what I was attempting to do, and best of all, it was free. All I had to do was sign up for an account, and then I was free to begin coding my solution. I knew that I wanted the solution to be dynamic; I didn't want to hard-code the author into my code. Instead, I wanted to be able to export any author's blog posts. So, step 1 was to create a form that would allow site administrators to find the author they are looking for. The form consists of a textfield with autocomplete functionality, and a select box with export options. For the purpose of this example, the only option is to export to MS Word (doc). However, LiveDocX also supports docx, rtf, and pdf.
<?php
function MYMODULE_blog_export_form() {
$form = array();
$form['export'] = array(
'#type' => 'fieldset',
'#title' => t('Blog Export Options'),
'#collapsed' => false,
'#collapsible' => false,
);
$form['export']['method'] = array(
'#type' => 'select',
'#title' => t('Export output type'),
'#options' => array(
'msword' => t('Microsoft Word'),
),
);
$form['export']['author'] = array(
'#type' => 'textfield',
'#title' => t('Author name'),
'#autocomplete_path' => 'admin/autocomplete/bloggers',
'#description' => t('Enter the name of the user.'),
);
$form['submit'] = array(
'#type' => 'submit',
'#value' => t('Submit'),
);
return $form;
}
?><?php
/**
* Menu callback function to provide autocomplete functionality for
* searching for users by username
*
* @param string $search_string
*/
function MYMODULE_autocomplete_bloggers($search_string) {
static $blogger_roles = array();
$result = db_query("SELECT r.rid FROM {role} r WHERE
r.name = '%s'", 'blogger');
while($role = db_fetch_object($result)) {
$blogger_roles[] = $role->rid;
}
$matches = array();
$result = db_query("SELECT u.uid, u.name FROM {users} u
LEFT JOIN {users_roles} ur ON ur.uid = u.uid
LEFT JOIN {role} r ON r.rid = ur.rid
WHERE u.name LIKE '%s%%' AND
r.rid IN (".join(',', $blogger_roles).")
LIMIT 50", $search_string);
while ($row = db_fetch_object($result)) {
$matches[$row->name] = $row->name;
}
print drupal_to_js($matches);
exit();
}
?><?php
function MYMODULE_blog_export_form_submit($form, $form_state) {
$uid = db_result(db_query("SELECT uid FROM {users} WHERE name = '%s'", $form_state['values']['author']));
if($uid) {
$start_func = 'MYMODULE_blog_export_'.$form_state['values']['method'];
$finished_func = 'MYMODULE_blog_export_'.$form_state['values']['method'].'_batch_process_finished';
// Add a batch set with simple operations taking an argument.
$batch = array(
'title' => t('Blog Export'), // Not displayed.
'operations' => array(
array($start_func, array($uid)),
),
'finished' => $finished_func,
);
batch_set($batch);
batch_process('admin/content/blogs/export');
}
else {
drupal_set_message('An error occurred while trying to process this action.');
}
}
?><?php
function MYMODULE_blog_export_msword($uid, &$context) {
$limit = 5;
$context['finished'] = 0;
if (!isset($context['sandbox']['progress'])) {
$max_nodes = db_result(db_query("SELECT count(n.nid) FROM {node} n WHERE n.uid = %d AND n.type = 'blog' ORDER BY nid ASC", $uid));
$context['sandbox']['progress'] = 0;
$context['sandbox']['current_node'] = 0;
$context['sandbox']['max'] = $max_nodes;
$context['sandbox']['results']['author'] = user_load(array('uid' => $uid));
$block_values = array();
$context['sandbox']['results']['block_values'] =& $block_values;
}
$nodes = array();
$result = db_query_range("SELECT n.nid, n.type FROM {node} n WHERE n.nid > %d AND n.uid = %d AND n.type = 'blog' ORDER BY nid ASC", $context['sandbox']['current_node'], $uid, 0, $limit);
while($row = db_fetch_object($result)) {
$nodes[$row->nid] = $row;
}
if(count($nodes) == 0) {
cache_set('famed:blog_export_results', 'cache', serialize($context['sandbox']['results']));
$context['finished'] = 1;
}
$context['message'] = t('Processing nodes authored by user %uid', array('%uid' => $uid));
foreach ($nodes as $node) {
// Process the node
$node = node_load($node->nid);
if($node) {
$content = node_view($node, false, true, false);
if($content) {
$context['sandbox']['results']['block_values'][] = array (
'post_title' => $node->title,
'content' => strip_tags($node->body),
'created' => date('Y-m-d h:m:s', $node->created),
'updated' => date('Y-m-d h:m:s', $node->changed),
'pub_status' => ($node->status == 1) ? 'Published' : 'Unpublished',
'tags' => $node->nodewords['keywords'],
);
}
}
// Update our progress information.
$context['message'] = t('Processing blog posts authored by user %uid', array('%uid' => $uid));
$context['results'][] = t('Processed node %node', array('%node' => $node->nid));
$context['sandbox']['progress']++;
$context['sandbox']['current_node'] = $node->nid;
}
// Inform the batch engine that we are not finished,
// and provide an estimation of the completion level we reached.
if ($context['sandbox']['progress'] != $context['sandbox']['max']) {
$context['finished'] = $context['sandbox']['progress'] / $context['sandbox']['max'];
}
}
?><?php
/**
* Batch finished handler.
*/
function MYMODULE_blog_export_msword_batch_process_finished($success, $results, $operations) {
// Load the data from Drupal's cache
$cache = cache_get('famed:blog_export_results', 'cache');
// Unserialize the cache data
$blog_data = unserialize($cache->data);
cache_clear_all('famed:blog_export_results', 'cache');
if ($blog_data) {
// Turn up error reporting
error_reporting (E_ALL|E_STRICT);
// Turn off WSDL caching
ini_set ('soap.wsdl_cache_enabled', 0);
// Define credentials for LD
$credentials = array(
'username' => 'my_user_name',
'password' => 'my_password',
);
// SOAP WSDL endpoint
$endpoint = 'https://api.livedocx.com/1.2/mailmerge.asmx?WSDL';
// Define timezone
date_default_timezone_set('Europe/Berlin');
// Create a new instance of the SoapClient object
$soap = new SoapClient($endpoint);
$soap->LogIn(
array(
'username' => $credentials['username'],
'password' => $credentials['password']
)
);
// Upload template
$path_to_template = './'.drupal_get_path('module', 'MYMODULE').'/template.doc';
$data = file_get_contents($path_to_template);
if(empty($data)) {
drupal_set_message('Failed to read the template', 'error');
watchdog('famed', 'Failed to read the template', WATCHDOG_ERROR);
return;
}
$soap->SetLocalTemplate(array(
'template' => base64_encode($data),
'format' => 'doc'
));
$fieldValues = array (
'author' => $blog_data['author']->name,
'email' => $blog_data['author']->mail,
'title' => 'Blog Posts by '.$blog_data['author']->name,
);
/**
* In the template, these field values are used on the title page of the document,
* and in the header/footer of the doucment.
*/
$soap->SetFieldValues(array (
'fieldValues' => assocArrayToArrayOfArrayOfString($fieldValues)
));
// Block values is the repeating data, in this case, the contents of each blog post
$soap->SetBlockFieldValues(array(
'blockName' => 'blogpost',
'blockFieldValues' => multiAssocArrayToArrayOfArrayOfString($blog_data['block_values'])
));
// Build the document
$soap->CreateDocument();
// Get document as DOC
$result = $soap->RetrieveDocument(array(
'format' => 'doc'
));
// Fetch the document
$data = $result->RetrieveDocumentResult;
$filename = './sites/default/files/blog.doc';
if(file_exists($filename)) {
unlink($filename);
}
// Write the document to the filesystem
file_put_contents($filename, base64_decode($data));
// Force the browser to download the document
if(file_exists($filename)) {
header ("Content-type: octet/stream");
header ("Content-disposition: attachment; filename=blog.doc;");
header("Content-Length: ".filesize($filename));
readfile($filename);
exit;
}
else {
drupal_set_message('Failed to download the file', 'error');
}
}
else {
// An error occurred.
// $operations contains the operations that remained unprocessed.
$error_operation = reset($operations);
$message = t('An error occurred while processing %error_operation with arguments: @arguments', array('%error_operation' => $error_operation[0], '@arguments' => print_r($error_operation[1], TRUE)));
}
drupal_set_message($message);
}
?><?php
/**
* Convert a PHP assoc array to a SOAP array of array of string
*
* @param array $assoc
* @return array
*/
function assocArrayToArrayOfArrayOfString ($assoc) {
$arrayKeys = array_keys($assoc);
$arrayValues = array_values($assoc);
return array ($arrayKeys, $arrayValues);
}
/**
* Convert a PHP multi-depth assoc array to a SOAP array of array of array of string
*
* @param array $multi
* @return array
*/
function multiAssocArrayToArrayOfArrayOfString ($multi){
$arrayKeys = array_keys($multi[0]);
$arrayValues = array();
foreach ($multi as $v) {
$arrayValues[] = array_values($v);
}
$_arrayKeys = array();
$_arrayKeys[0] = $arrayKeys;
return array_merge($_arrayKeys, $arrayValues);
}
?>When discussing whether or not homosexuals ought to be able to marry, the argument invariably turns to the institution of marriage, if it can be said that such a thing exists in the United States. A lot of people feel that by allowing same-sex marriages, the institution of marriage will further weaken, and thus destroy the family. To counter some of those arguments and fears, marriage must first be defined, which serves as the purpose of this writing.
There is a point to marriage. Marriage has the social benefit of trying to prevent males from mating with many different females. Historically speaking, this has never worked correctly. The recognized union between a man and a woman most certainly does not prevent adultery, nor is it truly possible to do so. The desire to mate with as many females as possible is rampant throughout the animal kingdom, and man being part of that kingdom, attempts to control such behavior through the implementation of social rules. This argument is not intended to justify promiscuous sex (although humans are the only species to attach emotional guilt to the act of procreation), but merely to illustrate that marriage serves as an attempt to control one of the most basic and innate behaviors of the male gender.
Another point of marriage is to pledge to the person you want to marry that you will spend the rest of your life with them and love them until the day you die. It has an additional purpose of tying someone else to you for life to share this life with. Granted, you do not need marriage for any of these things, but the actual marriage is a way of making the decision legally binding. Again, this purpose seems to fall short in the United States, which is experiencing a divorce rate of 51%. If more than half of all marriages fail, what does that say about the value of such an institution?
Marriage has meaning that is based on tradition. However, that definition is no longer valid for this enlightened world. Definitions must change and adapt to serve the needs of the people using the thing that is being defined. As society and civilization evolves and changes, so must its definitions of right and wrong. A hundred years ago, society deemed it correct and natural for women to stay at home and to not have any rights. Should we continue with that historical interpretation of morality?
One interpretation of marriage is the traditional Christian viewpoint of one man and one woman swearing before God. That is not the viewpoint shared by everyone, and that does not mean that their viewpoints are wrong, or that their marriage isn't as special to them as another's is to them. If marriage only had meaning in the context of a religious ceremony, there wouldn't both civil ceremonies and religious ceremonies. A man and a woman can get married in a civil ceremony without any mention of God or religion. And yet, no one questions the fact that they are married. No one even thinks twice about it. Why should this be any different for homosexuals?
In this case, marriage in the civil sense should have no religious base. Civil ceremonies by default must be without religious base. If an atheist wanted to marry another atheist, they could not have gotten married in a church, had they wanted to. And no religious leader would have performed the ceremony either. Marriages performed via civil ceremony are for people who either don't want to get married in a church, or can't get married in a church for whatever reason. Some people say that non-religious marriages are not real marriages. This would appear to be a narrow-minded point of view, reeking of religious intolerance. What it says is that if a person does not subscribe to their way of thinking and belief system, then they are wrong.
All marriages are legally binding contracts. That is why spouses are worth 50% of each other's assets, which is and should be enforced by the government. In its most basic definition, marriage is an arrangement between two consenting adults, more like a private agreement. There should be no one else involved in a marriage besides the two married people. But how can you then limit marriage to two people? Since a contract can be made between more than two parties, there is no reason why this idea should not be extended into the definition of marriage. Because people cannot be discriminated against because of religious beliefs, religious arguments against bigamy cannot be used in this situation. Once those arguments have been removed, there is no reason why bigamy should not be allowed. However, many people would take this argument and extend it to inanimate objects, such as a house or car, or the argument for marrying children and animals will be presented. If marriage is to be considered as a contract, that contract must be made between consenting adults. In most states, the age of consent for an adult is 16. Therefore, the marriage of children would not be allowed. Objects cannot consent, nor can animals. Clearly, an object such as a house is therefore a silly and ridiculous argument, and should be given no serious consideration. Similarly, all arguments for the marriage to animals must be given the same lack of consideration.
Once the traditional religious core meaning and characteristics of marriage have been removed from the argument, the concept of marriage as a contract opens up to many interpretations. The definition of marriage ought to come from a non-religiously biased referendum, not from the Bible, or another other religious text. In a free society that is not ruled by its religion, the definitions of social morality must not come from the religious base. What if, by some pure chance, the religious majority in this country suddenly endorsed sacrificing women to the Sun god? Would that be moral and right too?
In a free society, the laws ought to reflect the will of the majority, not of the religious sector, the corporations, the rich, or the elite. We have a society based upon a Constitution, a document that outlines the basic rights that people in the country are entitled to. The Constitution does not exclude people, nor does it tell them that some people can do certain things while other cannot because they have different beliefs. Denying homosexuals the right to marry is no better than telling blacks that they cannot marry either. I would like to think that America has evolved beyond this petty, discriminatory behavior.
But then again, I am an optimist...
I don't understand what the fuss is all about. Wait, yes I do.
It's about prejudice, hatred, bigotry, all carried out under the guise of religious morality. In recent years, the issue of gay rights, especially the right to marry, has exploded in this country. Liberal states such as Hawaii and Vermont have considered trumping the government by allowing such marriages, but have fallen short of this goal. What we have instead in Vermont is the legalization of "civil unions", which are a mockery of the rights that the heterosexuals of this country are allowed.
These civil unions do not carry the rights and privileges of marriage because the government and most of the other states do not recognize the union. Vermont grants some limited benefits, but it is nothing like what married people enjoy. So the question remains, why doesn't the government recognize these unions, and what exactly is the difference between a union and a marriage?
Perhaps the best way to begin answering these questions is to define marriage. Christians believe that marriage is a sacred pact with God. As an atheist, I believe it is a solemn pact with the person you are marrying. It all boils down to a promise, or set of promises, made to another person. Some of the common promises are fidelity, a pledge to care for one another, and a pledge to remain with that person until death. Many people choose to define marriage as a pledge of sexual exclusivity, fidelity, family and permanence of commitment or moral reasons between one man and one woman, their God and community. By denying same sex marriages, the implication is that homosexuals are incapable of pledging sexual exclusivity, fidelity, and permanence of commitment. There is also the unspoken societal rule that when you get married, you have to have children, which by no means should be used to define what a marriage is. This would mean that childless couples should not be considered to be married.
By including God in the definition, atheists ought to also be banned from marriage, as they do not pledge anything to a deity. The inclusion of ambiguous "moral reasons" in this definition is also problematic and faulty, as there is no standard set of "morals" agreed upon by all members of society. The problem with morality is that it is often associated with religious participation and tends to be theocratical in nature. In the United States, laws cannot be based on theocratic values, as they amount to an endorsement of a specific religion by the government.
Religious bigotry is perhaps the biggest reason why same sex marriages are illegal in this country, because there is the claim that homosexuality is condemned in the New Testament. To address this issue, let's consider some points:
The Roman Catholic Church has preserved more than 8,000 copies of the Bible written in Latin and called the Vulgate which was originally translated from Greek and Hebrew to Latin by Saint Jerome. Jerome (347-420) was born in Stridon, near the modern-day Rijeka, Croatia to Christian parents and was given a fine classical education. He spent three years (379-382) in Constantinople (present-day Istanbul) where he studied Greek and the Bible under Eastern Church father, Saint Gregory of Nazianzus. Jerome was ordained a priest.
At the age of 37, he was appointed secretary to Pope Damasus I and became an influential figure. Damasus selected Jerome to create a new Latin Bible, which was badly needed by the Church. Jerome was close to a Roman widow named Paula and her daughter. He traveled to Bethlehem in 386 to study Hebrew under Jewish scholars and was accompanied by Paula (later Saint Paula) and her daughter. At first Jerome used the Greek Septuagint for his Old Testament translation. Later he consulted the original Hebrew texts. Jerome was a contemporary of Saint Augustine (354-430) who was the leading figure in the Church in North Africa, and they were known to have met or corresponded. It may have been through this contact that Jerome obtained his Alexandrian manuscripts common in North Africa from which he translated the New Testament portion of the Latin Vulgate.
The Vulgate shows that Jerome did not use Byzantine manuscripts from the Eastern Church. Through the next 12 centuries, the text of the Vulgate was transmitted with less and less accuracy, or was deliberately revised. The Council of Trent (1545-1563) recognized the need for an authentic Latin text and authorized a revision of the extant corrupt editions. This revision is the basic Latin text still used by the Roman Catholic Church and scholars. With all of these revisions, how can Christians possibly declare the New Testament as the "Word of God"? It is the word of humans and clergy, revised to fit their own needs, politics, and beliefs. Not to mention all the "additions" to the Bible that members of the Church felt were important topics. St. John maintained that Jesus did and taught very many other things not recorded in the Bible. How can we be sure that these teachings have not been modified over the many years? In other words, the Bible is an unreliable source for spreading the "Word of God", let alone using it to dictate social policy and law.
In its most simplistic definition, marriage is a choice, made every single day. When a person wakes up in the morning, he or she has the ability to choose whether to remain married or not. By denying homosexuals the right to marry each other, the government is saying the gay people are incapable of making this promise and this choice. To understand why the government takes this position, one must recall American history.
This country is a Christian country, based on Puritan values. Since the 1600's, theocracy has melded and merged with every facet of law in America, and has shaped our society into what it is today. From the Declaration of Independence to our currency, God is everywhere, and lawmakers have used this religious premise to influence the laws. Examples of this idea are found in the subject of blue laws, which is defined as legislation regulating public and private conduct, especially laws relating to Sabbath observance. The term was originally applied to the 17th-century laws of the theocratic New Haven colony; they were called "blue laws after the blue paper on which they were printed. New Haven and other Puritan colonies of New England had rigid laws prohibiting Sabbath breaking, breaches in family discipline, drunkenness, and excesses in dress. Although such legislation had its origins in European Sabbatarian and sumptuary laws, the term "blue laws is usually applied only to American legislation. With the dissolution of the Puritan theocracies after the American Revolution, blue laws declined; many of them lay forgotten in state statute books only to be revived much later. The growth of the prohibition movement in the 19th and early 20th centuries brought with it other laws regulating private conduct. Many states forbade the sale of cigarettes, and laws prohibited secular amusements as well as all unnecessary work on Sunday; provision was made for strict local censorship of books, plays, films and other means of instruction and entertainment. Although much of this legislation has been softened if not repealed, there are still many areas and communities in the United States, especially those where religious fundamentalism is strong, that retain blue laws. [1]
Because this fundamentalism exists in the United States, people are denied rights based on those religious beliefs. Homosexual rights are a prime example of this. Homosexuals should be allowed to marry in a church that supports gay marriages. If other churches don't want to, that is fine - they have the right to govern their own religion. However, the state cannot discriminate against homosexuals on the basis of the lawmakers' religious convictions, for this is in direct violation of the Constitution of the United States, specifically in violation of the separation of Church and State clause. By using religious biases to deny marriage rights to homosexuals, the government is, in effect, sponsoring a state religion.
There is a myth in this country that marriage is an institution, that it is one of our most basic "truths" developed slowly through thousands of years of civilization, and it is a founding pillar of our society. Marriage is not an institution. It is a choice made every single day to remain with one person under law. Religion removed, marriage is a legal arrangement. When discussing the legal aspects of marriage, religious arguments cannot be used because it is an unconstitutional argument. One cannot use the moral argument either, because morals are different for each and every person, and are also founded on religion. If marriage were truly a "pillar of society", there would not be a 51% divorce rate in this country. Heterosexual immorality, to apply the defunct "moral" argument to the question, and irresponsibility has severely harmed the institutions of marriage and the family much more so than any homosexual activism.
Once the religious and moral arguments have been removed from the debate, there is very little left to debate over. Every time people don't like something in this country, they try to get it banned. When people see programs on television that they find offensive, they try to censor it. No one thinks "Hey, maybe I ought to change the channel!" Instead, they complain to the "Moral Police Squad" out there trying to tell everyone else how to run their lives. This country was founded on the freedom of choice, but people would much rather try to control others than change themselves. It is all about power over others.
So what exactly is the difference then between a marriage and a civil union? It depends on whether you are gay or not. Marriage via religious ceremony has a moral construct from the past. Civil marriages do not. The reason for this is that one religion's morals are not the same as another's. The morals of the conservative Christian right should not dictate what everyone in this country should or should not do. The way I see it is that thousands of heterosexual couples get a Justice of the Peace and have a civil ceremony. It happens everyday. No one questions whether they are married or not. In this type of marriage, there is no religious aspect. Why does this have to be different for gay people? Why can't they get married in civil ceremonies and have all of the same marriage benefits as straight couples?
Civil unions do not have the rights and privileges of marriage. Homosexuals joined in a civil union cannot file joint tax returns, get health benefits, Social Security benefits, inherit real estate, be listed as next of kin, etc. It's not just about the recognition. It's also about the benefits awarded by the government. Here is an example:
Two men have been living together in a monogamous relationship for thirty years (better than a lot of heterosexual relationships!) and one of them dies. Unless they are married, the surviving partner is not entitled to the life insurance money (must be a family member), and other benefits which require a family member as the benefactor. This is the real tragedy - homosexual couples are not even allowed to provide for each other after death.
When I die, I want to know that my wife will be taken care of (i.e. insurance, etc.) - it should be no different for homosexuals.
Many people will argue that marriage ought to be only between a man and a woman. When the counter-argument that love should be a criteria for marriage is presented, the argument is skewed to include many other situations. They will argue that "I love my lab, or another person loves a child, or another loves a house or a cat or groups of people who love each other. Are you suggesting that they also be allowed to marry whatever they love?" However, marriage is first and foremost between people, not inanimate objects or animals; real people, with real jobs, who return the love that the other is giving. The same love that a heterosexual gives his or her spouse, and receives in return.
Since it is only between someone else and religion has been removed, then marriage can better be defined as a legally binding contract. If marriage is such a contract, why should married people have any special considerations in our society? Marriage should be a private contract because it is only an issue between private parties. Then if marriage had no special benefits for the parties involved, marriage can then be further defined as a relationship in a contract or under contract law.
If this were the case, one cannot make a contract with an inanimate object, because it cannot agree to anything. That is why you can't marry your house or television, and would thus render the argument about marrying your pet or television null and void. Additionally, a child is not mentally or emotionally capable of giving consent to anything until they reach the age of 16. This argument is not a morally based argument; it is founded on current laws. This is why you cannot marry a child - they must be able to consent to the contract that you propose.
Further, if marriage were to be considered a legally binding private contract between two parties, the definition of such a contract will deny that there are such moral reasons for the contract. Marriage would then become an "arrangement" that is purely a private matter designed solely to satisfy the desires of the "married" parties. But why else do people get married? People get married to satisfy the desire of the individuals to get married. And yes, it is a private arrangement. It is nobody else's business whom I chose to marry, as it is none of my business who you chose to marry. Gay people marrying each other does not affect me, or anyone else but the two people who are getting married. For everyone in this country who has something against gay people, get over it, because it has nothing to do with you, and is none of your business in the first place.
If that is the case, there is no real reason that marriage should require exclusivity, fidelity, permanence or even a limit of two people or even to people, unless otherwise specified by the contract. Like divorce in marriage, a contract can also be dissolved through legal means, the same way that a divorce proceeds. By denying homosexuals the right to form such contracts, the conclusion is that homosexuals are incapable of honoring the exclusivity, fidelity, and permanence aspects of such a contract that is mentioned above.
The fear that same sex marriages will damage the family and the institution of marriage by forcing same sex marriages onto an institution that is a main pillar of our society is ridiculous. Marriages between two people are private, and have nothing to do with society as a whole, much less the tradition of marriage. If marriage is a choice, then there is no force involved. There is no entity which forces parties to marry each other, except in certain cultures where arranged marriages are the tradition. In such case, a legal challenge by an unwilling party would most certainly win, if the challenge was presented in the United States.
The point of marriage is to pledge to the person you want to marry that you will spend the rest of your life with them and love them until the day you die, in a traditional wedding with traditional vows. It has an additional purpose of tying someone else to you for life to share this life with. Granted, one does not need marriage for any of these things, but the actual marriage is a way of making the decision legally binding.
By denying homosexuals the right to form legally binding contracts with one another in the form of marriage, the United States is discriminating against a large population of its citizens, based on sexual preference. The time has come for the United States to recognize its obligations to all of its citizens, and act in concert with the Constitution and the Bill of Rights. Until this happens, homosexuals will continue to be discriminated against and treated like second-class citizens.
[1] http://www.encyclopedia.com/articles/01594.html
Recent comments
1 hour 40 min ago
13 hours 34 min ago
2 days 3 hours ago
4 days 7 hours ago
6 days 5 hours ago
6 days 6 hours ago
6 days 7 hours ago
6 days 14 hours ago
6 days 20 hours ago
6 days 20 hours ago