This forum is for module development and code related questions, not general module support. For general support, use the Post installation forum.

Default Drupal install XHTML validation fixes.

Hi,

I'm new to Drupal, installed 5.1 on my 'shared host', but ran into a few problems. Here are my solutions if anyone runs into the same problems.

1. Problem: mbstring.http_input was enabled on my host.
Solution: I added the following to my .htaccess file in the Drupal root directory:

<IfModule mod_php4.c>
  php_value mbstring.http_input             "pass"
  php_value mbstring.http_output            "pass"
  php_value mbstring.encoding_translation   0
</IfModule>

2. Problem: admin page went blank after I enabled a few new modules.
Solution: I added the following to my .htaccess file again:

<IfModule mod_php4.c>
  php_value memory_limit                    "32M"
</IfModule>

3. Problem: default theme 'Garland' had a warning in W3C Validator.
Solution: in the file themes/garland/page.tpl.php (on line 76) I changed ...

<span class="clear"></span>
 ... to ... 
<span class="clear">&nbsp;</span>

4.Module: addtofavorites caused a few validation errors because of generated markup.
Solution: found and fixed numerous XHTML specific markup problems.

 - onClick should be onclick
 - href="javascript: ... should be href="#" onclick="javascript: ...
-  br should be br/
- img tags should end in /

Alter a value before displaying a form...

I am getting very confused with the form API and need some help!

I have a form whereby if the user leaves an entry blank I'd like it to be reset to a default value.

I can see that form_set_value does this if the form is then submitted, and I have that working, but if the user previews the form again I'd like the default to appear in the relevant field so they can see what is going to happen.

I have been going round in circles with form_set_value, and #after_build looked promising but didn't seem to deliver.

Creating blocks visible to all regardless of Login status

I am having problems getting certain blocks to appear for everyone regardless of Login status. Currently if they are logged in they can see the blocks that I have specified; however, as soon as they are logged out, those blocks are no longer visible. Any help would be great.

How to buy points?

Hi, can somebody help me giving pointers on how to change userpoint.module along with ecommerce module so that whenever a person buys something, he gets some points from the deal?

Forms API and form_render Why don't checkboxes have name and id's ??

Need a little help here. I am trying to gather information from multiple checkboxes but looking at the source there are no names or ids for the checkboxes so they are not being sent. I am using form_render and I don't see a #name parameter for checkbox in the docs.

Keeping sane with different versions of modules

I've been working on setting up my first site with Drupal for a few months now, and I've filed some issues and submitted some patches to modules.

Pages

Subscribe with RSS Subscribe to RSS - Module development and code questions