I like 1and1 as a web hosting service, but there are some annoyances when running Drupal. The latest problem I had were “error 500 - internal server error” returns and thanks to Gregory Tucker, I found this solution. Adding this line of code to the .htaccess file:
AddType x-mapp-php5 .php
Another problem was a memory limitation via PHP, but 1and1 does allow you to include a php.ini file which did the trick:
Here is the code in my PHP.ini, which is placed in the same directory that Drupal runs.
register_globals=off
upload_max_filesize=20 M
max_execution_time=300
memory_limit=40 M
post_max_size=20 M
SMTP:localhost
Smashing magazine did a review/study of the trends in blog design (specifically large blogs). Full article is here.
Below is the bottom-line of the studies:
* large blogs require a multi-column layout solution (usually 3 columns suffice) (58%);
* layouts are usually centered (94%),
* layouts usually have a fixed width (px-based) (92%),
* the width of the fixed layout varies between 951 and 1000px (56%),
* 58% of the overall site layout is used to display the main content,
* CSS-layouts are used (90%),
* the background is light, the body text is dark (98%),
* the most usual (not necessarily most user-friendly) line length lies between 80 and 100 characters,
* Verdana, Lucida Grande, Arial and Georgia are used for body text (90%),
* the font size of body text varies between 12 and 14px (78%),
* Arial and Georgia are used for headlines (52%),
* headlines have the font size between 17 and 25px.
* usually right-hand side vertical (58%) and top horizontal navigation (52%) are used;
* the start page presents excerpts of 10-20 posts (62%),
* related and popular posts are displayed on every second top blog (50%),
* footer contains copyright information (90%), links to about-page (40%) and link to contact information (30%),
* on average popular blogs have 5,84 advertising blocks per start page,
* on average popular blogs have 5,96 advertising blocks per article page,
* articles often contain no ads (76%),
* layouts usually contain ads on the right-hand side (88%),
* social icons are often placed under the post (54%),
* RSS-buttons are displayed in the above area of the layout (66%),
* “standard” RSS-icons are used more often than text links (66%),
* most publishers use one main RSS-feed instead of multiple feeds (64%),
* tag clouds are not used (90%),
* pagination is used rarely (22%),
* search box in the right upper corner of the site layout (62%),
* 96% of top blogs are not standard-conform.
so, I had to import hundreds of user profiles from a CSV file and the User import module for Drupal is fantastic. However, I noticed that when creating a view of the profiles, they were showing up duplicated in the view results. DavidwhThomas posted a fix in the Drupal community on this:
To solve this, temporarily comment out the case ‘insert’: line in profile_user in:
/modules/profile/profile.module line 177
remove the ‘comment out’ after the import
<?php
/**
* Implementation of hook_user().
*/
function profile_user($type, &$edit, &$user, $category = NULL) {
switch ($type) {
case 'load':
return profile_load_profile($user);
case 'register':
return profile_form_profile($edit, $user, $category, TRUE);
case 'update':
return profile_save_profile($edit, $user, $category);
case 'insert':
//return profile_save_profile($edit, $user, $category, TRUE); //comment out this line!
case 'view':
return profile_view_profile($user);
case 'form':
return profile_form_profile($edit, $user, $category);
case 'validate':
return profile_validate_profile($edit, $category);
case 'categories':
return profile_categories();
case 'delete':
db_query('DELETE FROM {profile_values} WHERE uid = %d', $user->uid);
}
}
?>
Thanks David,
putting htm anchors in flash swf’s doesn’t seem to work, so we need a Javascript option:
in the html header:
<script language="JavaScript">
function openNewWindow(URLtoOpen, windowName, windowFeatures){
newWindow=window.open(URLtoOpen, windowName, windowFeatures);
}
in the flash call:
getURL("javascript:openNewWindow('html_page.htm#anchor_name','_parent')");
I’m diggin’ this for a global font setting (in terms of readability):
p {
font-size: .88em;
line-height:2em;
margin-bottom: 1.33em;
}
The font family is relative to the style of the site, but I tend to prefer san-serifs for body text (Georgia, Verdana, Arial)
I’m not sure this is the best way to do this, but it works. Basically if you want a background image to (repeat) span the height of your page, just have the parent div (usually first parent after body) contain the bgnd image. So, if I have a container div that houses the content columns (left, main, right), I just add a parent div (let’s call it page) and that does the trick:
#page {
background:#xxx url(images/xxx.jpg) repeat-y scroll 0%;
}
I’ve tried adding 100% height to the container div, min-heights, columns, etc… and nothing else worked well.
sometimes when you are using a shared webhost, they may have register globals enabled. You will get an error message regarding this when trying to setup a DB on that host. If so, just create a php.ini file on the directory of the Drupal install and put this code in:
register_globals=off
A friend of mine is using this free gallery tool — it looks very slick.
I need to try it sometime
Steps to spring cleaning your PC:
1. WinDirStat: This free app gives you an x-ray of your HD and shows you the fat.
2. CCleaner: Removes junk files.
3. Diskeeper: Best defragmenter in town.
IE6 has this problem where forms will always take priority (z-index), and so the suckerfish CSS menu will be problematic overlaying a form. To resolve this, and I’m not sure why it works, but by making the primary menu position:relative and a z-index of higher than 1, the menu suddenly works in IE6.
A good chef retains recipes for reference, inspiration, and experimentation. In my opinion, a web designer/developer is very much like a chef, using a combination of choices and recipes.
This is my personal data-log of recipes. The posts can be on anything creative, such as code I want to retain for reference; highlights of work for inspiration; editorials on future trends; and of course tips on development; content management; photography; music; video; etc…