Twin City FM Club recently appointed me as webmaster. I was given ~30mb of content all done in FrontPage [barf!]. I pretty much tossed all of it and came up with what's currently here. I'm new to Drupal, so there might be a better way to do some of what I've done, but there it is... ;)
This is the Civicspace distro of Drupal 4.6 running on LAMP. (apache 2.x, php 4.x, Debian GNU/Linux)
Theme is Fancy, with tweaks: remove breadcrumbs and a few other un-needed things, stretch top gradient to 100px to fit club logo, etc.
Lots of modules running here, due to feature requests by comittee. :P
Custom hack: Email forwarding from foo@website's domain to the user's email address.
This uses a custom profile.module field for the left-hand side of the address (foo@example.org) and another custom profile.module field for the "on/off" flag. This is run at the command line on the linux machine that handles http, database and smtp for the domain in question. If you don't have all the services for your domain all on the same machine, this probably won't work out of the box for you. I run this shell script out of crontab every 10 minutes. Postfix is configured to include hash:/vhost/tcfmc.org/virtuals.db as a virtual address table.
#!/bin/bash
cd /vhost/tcfmc.org
/usr/bin/php -f ./emails.php >virtual 2>/dev/null
/usr/sbin/postmap virtual
... which calls emails.php:
$user="databaseuser";
$password="databasepw";
$database="mydatabase";
mysql_connect(localhost,$user,$password);
@mysql_select_db($database) or die( "Unable to select database");
// Look at the profile_labels table using phpmyadmin or another tool to see which "fid"
// your custom fields have been assigned. In this case, fid=9 is the "on/off" checkbox.
$uidresult=mysql_query("select uid from profile_values where (fid=9 AND value=1);");
$i=0;
while ($i < mysql_numrows($uidresult)) {
$uid=mysql_result($uidresult,$i);
// Again, profile_labels will tell you the correct field to use for the
// left-hand side of your user's address. In this case, I use fid=6.
$callresult=mysql_query("select value from profile_values where (fid=6 AND uid=" . $uid . ") limit 1;");
if (mysql_numrows($callresult) > 0) {
$call=strtolower(mysql_result($callresult,0));
} else {
$i++;
continue;
}
$emailresult=mysql_query("select mail from users where uid=" . $uid . " limit 1;");
if (mysql_numrows($emailresult) > 0) {
$email=strtolower(mysql_result($emailresult,0));
} else {
$i++;
continue;
};
if (strlen($call) > 2 && ereg("^[a-z0-9]+$", $call) ) {
printf("%s@example.org %s\n", $call, $email);
}
$i++;
}
mysql_close();
Comments
You may want to submit that
You may want to submit that code to the relevant section of this website (sorry I can't help you there) as this showcase section is simply to showcase drupal websites and not code...
But I'm sure someone out there has a use for that code and it may be more useful in the right place.
As for your website - I find the colors disconcerting - but if the users don't mind and only love the content and fucntionality then that should be ok.
Is that points system you have a module for drupal or is it custom made?
Its a little hard to navigate... as all the main links are on the top - normally they are all listed in the sidebars... but in your website you have all the fancy links like whos online and a poll...
marcopolo ---
Blog | Photography | Sydney | Celebrities | Best Designed Drupal Websites | Share Trading |