Drupal

Blog subject related to Drupal

Display lengthy legalese/explanation static text in CCK

in

Recently I had a need to make a consent form, basically to show some big block of legalese text before a text field where the user sign. And on display, show that same text and the value of the text field. Something like this:

But CCK fields just don't have any way to include lengthy text. They can have help text which are displayed below the input in gray text. The second problem is I need this text to be shown when the page is displayed but the various modules I found (markup, form_markup) do not show anything on output. So I created the nodeincck module to solve this need.

Wysiwyg filter guide

in

Drupal core comes with two input formats: Filtered HTML and Full HTML. Filtered HTML format lets both authenticated and anonymous users enter comments and contents safely by limiting the allowed HTML tags to a very limited set with the HTML Filter. Full HTML is indented for admin use only because it allows any HTML tags and attributes to be used. WYSIWYG editors make use of many more tags and attributes to satisfy the full range of format options. Since the HTML Filter is only capable of allow or dis-allow of HTML tags, it is inadequate for complete safety because Wysiwyg editors make use of a large range of HTML tags and attributes. But for safty from XSS and other attacks, HTML tags and and attributes must be very precisely controlled so the Wysiwyg editor can safely render full range of styling format. The Wysiwyg Filter precisely satisfy this need: it lets you specify exactly what tags and what attributes are allowed in such a way that gives you the full rang of HTML tags and attributes required by the Wysiwyg editors and yet keeping the format completely safe. It's a replacement of the built-in HTML Filter.

Syntaxhighlighter Drupal module

in

This module integrates the SyntaxHighlighter Javascript Library into Drupal for source code list syntax highlighting within any Drupal contents. All source code listing on this site is done with this module. See my article about this module here.

No votes yet

Nodeincck Drupal module

in

CCK is all about variable data the user enter. This module let you insert static content from another node into the CCK edit form and output. See my article about this module here to get more info.

No votes yet

Multicolumncheckboxesradios Drupal module

in

Drupal checkboxes and radio buttons goes down in one single column. If you have many checkbox/button, your page will scroll down forever. This module gives you a way to turn them into multiple column with FAPI code or CCK fields.

No votes yet

Minimaxpager Drupal module

in

This module turns Drupal's pager into a text box where you can enter the page to go directly to. It's very useful if you have many many page and need to go to any page very quickly.

Your rating: None Average: 1 (1 vote)

Accountmenu Drupal module

in

This module provides a set of pre-made menu links for 'Login', 'Register', 'My account' and 'Logout'. After the user is logged in, he/she is returned to the page from where he/she clicked the login link. The 'My account' link is integrated with the realname module to use the user's actual realname. The 'register' link can be shown to take the user directly to the register page.

No votes yet

Provide pattern and suggestion theme templates from a module

in
Pattern and suggestion theme template can reside in the theme directory only. What if you want to provide pre-built override templates out of your module and not require copying them into the theme directory. This way, module is self contain and theme can be left untouched. This makes installing and upgrading theme and module easier. Of course, user can still override these template inside theme.

Theming CCK content type output display and input edit form

in

The Content Construction Kit (CCK) lets you define custom content type with many different kinds of data fields. The default display and input form are generic looking and may not be the way you like. But the look of the node output and the node edit form are completely customizable. I will illustrate how to do this by making change to the active theme. But at the end, I will show how to do this from a module, which is a better approach because it's not married to the active theme. This is better for site maintenance and allows you to freely switch theme.

Dynamic login/logout account menu module

in
Here is a Drupal module to provide a dynamic [Login][My account][Log out] menu. Before the user is logged in, the menu shows only [Log in]. After, the menu change to [My account][Log out]. This is an alternative to the "User login" block. Maybe you do not want the "User login" block on every page, taking up valuable space and grabbing user attention away from your contents.
Syndicate content