Transparent iframe Background in IE

When setting background-color: transparent for an iframe in IE, it just doesn't work.  It shows up as white instead.  Of course, it works in every other browser, but not IE.  So what's the deal? How do you fix it?

This one may not come up very often for everyone, but it did for me, and took me an hour of googling to find the answer:

<iframe src='example.html' allowtransparency='true'></iframe>

You see what I did there?  allowtransparency='true'.  Apparently in IE you have to explicitly state it or it will just ignore the CSS attribute.  Thanks IE!

And while I'm on it, if you want to get rid of the border that IE places on iframes, you have do to this:

<iframe src='example.html' frameborder='0'>

That's right.  frameborder='0'.  I've said it before: IE is the best, most logical browser around.

RP Forum - Drupal 6 Module

Latest version: 1.6.3.2, 12-14-2011
application/zip iconrpforum-v1.6.3.2.zip - details
     View past releases

Additional downloads:  
    Spanish translation provided by Maximiliano MéndezClick here to download the .po file.
    Italian translation provided by Bruno Ravera. Click here to download the .po file.

Do you have a Drupal site and need a simple forum solution?  My new module, RP Forum, is a simple, all-in-one forum solution for Drupal 6. It installs with as few additional modules as possible, and works right out of the box.  It even includes a convertor to help you move from SMF (simple machines forum).

Try out a live demo of RP Forum now!

rpforum3.pngRP Forum provides many of the same features as other popular open-source forums, like phpbb and SMF.  While it does not have as many features as Drupal's premiere forum solution, Advanced Forum, it requires considerably fewer supporting modules and configurations (Advanced Forum requires between 15 - 20 additional modules, all with separate configurations, to replicate the functionality of phpbb or SMF).  From experience, I can tell you that setting up and themeing Advanced Forum with all those extra modules can take hours.

RP Forum requires just 3 additional modules to run, and comes with the most common features  expected of a forum.  That said, if you feel like you would prefer the flexibility of Advanced Forum, please give it a try; it is an excellent solution.  RP Forum is designed for novice (or lazy ;)  webmasters and their less-than-tech-savvy clients who just want a basic forum solution up and running in 15 minutes.

Features (included without additional modules!) 

  • Ability to ban users based on IP and IP ranges
  • You may filter out curse words (or any unwanted text) from posts
  • User signatures and avatars
  • User ranks based on # of posts
  • Moderators per forum
  • Subforums (1-level deep)
  • Automatic word wrap of long URLs or strings in the body of a post
  • View/Edit access control per forum (based on user role)
  • Custom search functionality
  • "Report abuse" functionality
  • Administrators can move and split topics, as well as move individual posts
  • Includes an attractive default theme and icons
  • Simple WYSIWYG BBCode editor - may be disabled, and fckeditor or any other editor may be used instead
  • Smiley package (included with WYSIWYG editor)
  • Automatic RSS/Atom feed of posts (may be disabled)
  • Users can "subscribe" (be emailed of replies) to posts
  • Automatically interfaces with Privatemsg and User Panel
  • Comes with a configurable "Recent Posts" block
  • All posts are CCK nodes, not comments.  So users can easily attach images or files or any other field type simply by adding the field to the rp_forum_post content type.
  • Spanish language translation provided by Maximiliano Méndez.
  • Italian language translation provided by Bruno Ravera.

 


Software License Fine Print

This code is considered "open source," and is released under the GNU Public License version 3 or any later version (http://www.gnu.org/copyleft/gpl.html). In a nut shell, you can change this code however you want, and redistribute it, but ONLY if it is ALSO under the GNU Public License version 3 or later.  This code/software is given "as-is", with no warranty or guarantee.

If you use this code/software, I would appreciate credit and a link back to this site (richardpeacock.com), though this is not required.

Interview with "A Rant With Good Grammar"

In addition to being an avid PHP and Drupal programmer, I also sometimes create video games in my spare time in either Java or C# (for the Xbox 360).

a_rant.pngIt's for the latter effort that I was recently interviewed by the video game blog, A Rant with Good Grammar regarding my professioal career, my Xbox Live Indie game Alien Pyramid Challenge, and my take on harsh working conditions for programmers. 

If you've got a minute, check it out.

Also, if you're curious about my other video game efforts, please check out peacockgames.com.

Thanks!

Find the True URL of Something, Following Redirects

Have you ever wanted to know the definitive URL to something on the Internet, following any 301 redirects?  I am working on a podcast-related site right now, and recently had to keep track of a multitide of podcast URL's, even when they change.  The following PHP code saved the day:

function get_final_url($url) {
 
  $ch = curl_init($url);
  curl_setopt($ch,CURLOPT_FOLLOWLOCATION,true);
  curl_setopt($ch,CURLOPT_RETURNTRANSFER,true);
  curl_exec($ch);
  $url = curl_getinfo($ch, CURLINFO_EFFECTIVE_URL);
  curl_close($ch);  
 
  return $url;
}

To use, let's say you have a url of "http://example123.com/index.html"  but, unbeknownst to you, that URL actually has a 301 redirect to "http://example123.com/welcome.html". 

You can use the function this way:

$url = get_final_url("http://example123.com/index.html");

And $url will now contain "http://example123.com/welcome.html".

Enjoy!

Amazon S3 Logs - Drupal 6 Module

Note!  This project is now an official Drupal project.  You may download it by going here: http://drupal.org/project/amazon_s3_logs

as3l-sc1.pngUsing an Amazon S3 account is ideal for web sites with lots of content, but unfortunately Amazon doesn't make it easy for you to track traffic and visitors to your site.  That is where this drupal 6 module comes in.  Assuming you have correctly set up a log bucket on your account, this module makes it easy to get basic usage stats at a glace for all your files.

You're site doesn't even need to be a drupal site to use this.  If you want, you can always have a drupal installation whose only purpose is to run this module.

See this module's project page on drupal.org for instructions on installing and setting it all up.

Amazon AWS S3 Query String Authentication with PHP

Okay, this one took me hours to figure out, so I figured I would put my results here for others to find.  Hopefully it will spare others the hours of frustration I went through!

If you do not know what Amazon AWS S3 is, you should read up on it.  Basically, it's super-cheap online file storage for your web site or even personal use.  You can even make it so that files are private, and can only be downloaded with a self-expiring URL (which might only be valid for, say, 1 hour).

Here is how, in PHP, to do just that.  Please note, these code snippits were pieced together from various sources online until I finally got everything working the way it is supposed to.

Arrange Fields - Drupal 6 Module

 Note!  This project is now an official Drupal project.  You may download it by going here: http://drupal.org/project/arrange_fields

 ar-screen1.pngHave you ever used CCK or Webform with Drupal, and found yourself wishing you could easily arrange the fields in a horizontal style, or just easily resize textfields and areas on the fly?  Then this module is for you.  It gives you a simple drag-and-drop interface to to arrange fields on your forms.

Tab indexing is also respected, so no matter how you arrange your fields, you can still tab through them in a logical order.

Features

  • Drag and drop fields into any arrangement you want. Makes CCK and webforms look more like pen-and-paper forms.
  • Resize textfields and textareas by dragging.
  • Edit CCK configurations for each field (required, help text, allowed values, etc) in a popup without having to leave the page.

Collapsible Fieldsets Without jQuery

Attached File(s): 

c_fieldset.jpgYou know those nifty collapsible fieldsets that Drupal uses?  No?  Oh... well, let me explain: Drupal often uses fieldsets to represent information, which can collapse at the click of a mouse.  This lets visitors to your site hide information or forms they don't care about.  It's accomplished using some jQuery wizardry and is uber slick.

What I have created does not use jQuery, and is not uber slick.  But, it does provide the same basic functionality.  The reason I chose not to use jQuery is so that you are not required to download and install any extra libraries.

What I have created is a simple PHP function which, when called, will generate all of the HTML, CSS, and Javascript necessary to give you a collapsible fieldset.

Click here to see a demo of it in action.  (And use the download link at the top of this post to get the source code).

 


Software License Fine Print

Creative Commons LicenseThis code is licensed as-is, with no warranty or guarantee, under a Creative Commons Attribution 3.0 Unported License.

You may use this code however you want, even in commercial products, but only if you include attribution to me, Richard Peacock, as the original author of this small portion of code, but not in a way that implies I endorse your project.

For example, on a Help/Credits screen:  Portions of this project were based on work freely obtained from these developers: Richard Peacock (http://richardpeacock.com), NAME HERE, etc.  These outside developers neither endorse nor support this software.

If you use this code, feel free to email me to let me know!  I'll include a link to your project here.

Daily Site Backup - Drupal 6 Module

Attached File(s): 

hardrive_000.jpg

Update! You can now split backups into chunks for easier emailing.

This module is intended for drupal sites running linux or unix.  It will create an archive of your site (or multi-site) allowing you to specify included and/or excluded files and directories. Ex: modules, themes, etc.  It can then email it to an address of your choice.  I recommend a gmail account, as you get several gigs of storage for free.

This module will actually issue a tar command to the command line.  This is why you need to be running either unix or linux.

Note:  This module plays very nicely with my other module, Daily MySQL Backup!

Also of note: This module plays especially well with my new desktop backup program, psBackup, which is able to download files from the web as well as regular file backups.

 


Software License Fine Print

Creative Commons LicenseThis code is licensed as-is, with no warranty or guarantee, under a Creative Commons Attribution 3.0 Unported License.

You may use this code however you want, even in commercial products, but only if you include attribution to me, Richard Peacock, as the original author of this small portion of code, but not in a way that implies I endorse your project.

For example, on a Help/Credits screen:  Portions of this project were based on work freely obtained from these developers: Richard Peacock (http://richardpeacock.com), NAME HERE, etc.  These outside developers neither endorse nor support this software.

If you use this code, feel free to email me to let me know!  I'll include a link to your project here.

Top 10 Sites' Web Server Operating Systems

Out of curiosity, I decided to find out what the top web sites in the world were running on their servers-- Linux, Unix, Windows, etc.  Here are my results, retrieved Friday, April 2, 2010:

Ranking from http://www.alexa.com/topsites
Results from http://uptime.netcraft.com/up/
 

  1. Google ... Linux
  2. Facebook ... Linux
  3. Yahoo ... Linux
  4. Youtube ... Linux
  5. Live ... Win Server 2003
  6. Wikipedia .... Linux (Ubuntu)
  7. Blogger ... Linux
  8. Baidu (?) ... unknown OS, running Apache
  9. MSN ... Win Server 2003
  10. QQ (?) ... Linux

Baidu and QQ both appear to be Chinese or Korean web sites, I am not sure which.  As you can see, 7 out of the top 10 are running some flavor of Linux.  I think that speaks volumes about the reliability of the OS.

Syndicate content