Layout and Design

From EIRMA Wiki

Jump to: navigation, search
Quick Links

Overview and Tutorial


Pre-Installation

Installation

Post-Installation


Administration


Moderation


Design

  • Layout and Design

Advanced


Other

Contents


Introduction

Normally, LDM users are viewing the contents of a category or the results of a search. Both types of display include a list of entries. Category contents may also include a list of sub-categories and perhaps some favourites and featured entries. The layout of these pages is highly configurable.

LDM uses vBulletin's standard style and template system to control the overall design and layout of these pages and category and entry displays within the page. Templates are provided for different types of content (music, documents, photos, etc.). A range of adustable settings can be used to adjust the page display and the contents of category and entry listings. This makes it possible to customise LDM's appearance extensively, including on a per-category basis, so as to organise and present categories according to their contents.

To help you configure LDM display layouts, this page explains several important elements:

Main Page Layout

The main page layout is defined in the links_main template, and is structured as a set of boxes, organised within three columns:

LDM Command Toolbar
Left column Main column Right column
Left Box 1
Left Box 2
...
Pre-Category Box
Category Box
Post-Category Box
Sub-Category Box
Pre-Featured Box
Featured and Favourites Box
Post-Featured Box
Pre-Entries Box
Entries Box
Post-Entries Box
Closing Box
Right Box 1
Right Box 2
...

The left and right columns are only displayed when they contain some content, and their widths are adjusted using the Control Settings.

The display units shown in bold are provided by the standard LDM code. Units shown in italics are used to show the additional content that is generated by optional features and add-on extras, and are only displayed if such content has been provided. Generally, the control settings for features that provide additional content include a drop-down menu to specify which location to use. For example, the standard statistics display and the 'add on' category explorer view can be configured to appear in either the left hand or right hand column or in one of the optional units in the main column.

Programmer Information

The contents of the optional columns and units are defined using the $ldm_includeinmain array. Each of the items listed above map onto a specific array element. This element should be populated with valid html that is suitable for placing within a table data cell.

Array subscript Data content
[leftcol] Left Column
[rightcol] Right Column
[precat] Pre-Category Box
[postcat] Post-Category Box
[prefeat] Pre-Featured Box
[postfeat] Post-Featured Box
[prelink] Pre-Entry Box
[postlink] Post-Entry Box
[closing] Closing Box

Linkbits and Catbits

Within the main displays, each sub-category is displayed using a catbit template. Individual entries (including featured items and favourites) use a linkbit template, and the additional attributes within an entry use an entitybit template.

There are two main differences between LDM's use of catbit and linkbit templates and (for example) the vBulletin's postbit:

  • LDM provides catbits and linksbits with different layouts, in order to display material in a way that is best suited to its content;
  • These catbits and linkbits have accompanying settings, which allow you to construct multi-column layouts and add extra functionality in terms of contracting and expanding these parts of the display.

Two catbits are supplied with the standard LDM distribution:

Tabular: The layout contains name, description, an indication of the number of entries. This image shows the catbit used with a single column layout and including a list of subcategories.

Brief: This layout includes title and number of entries, and optionally a list of subcategories. The image shows this catbit used with a two-column layout.

Tabular category listing
Brief category listing

and six linkbits plus variants, which present short titles and descriptions and/or modify the alignment of elements within the bit.:

Modern: the current default layout, all items potentially visible and laid out using a frameset markup

Table: the original default layout, all items potentially visible and laid out in a more tabular form

Bold: a more striking layout with elements placed in highlighted bars

Photo album: intended for use with categories containing photographs

Short: a summary layout

Title: title only

Standard entry layout
Photo Library layout


Catbit and Linkbit Settings

The catbit and linkbit parameter settings can be viewed and (if necessary) modified on the LDM->Admin->Linkbits/Catbits page. The page includes a schematic of each bit.

Parameters for the supplied catbits include:

Name1 Template2 Subcategories3 Columns (def)4 Columns (max)5
Tabular links_catbit links_subcatbit 1 4
Brief links_catbit_brief links_subcatbit 2 4

Notes:

  1. Name : The name that appears on selection menus on the LDM->Admin->Settings page and Add/Edit Category pages
  2. Template : The vBulletin template used for this catbit
  3. Subbit : Template used for displaying subcategories within this catbit
  4. Columns (def) : Number of columns displayed by default when using this template.
  5. Columns (max) : Maximum number of columns that can be displayed

LDM->Admin->Settings cat_cols_display overrides the default column setting, limited to the maximum column setting.

Parameters for the supplied linkbits include:

Name1 Template2 Collapsed3 Alternate4 Columns (def)5 Columns (max)6
Modern links_linkbit links_linkbit_short 0 1 1
Modern (Short Description) links_linkbit_mshort links_linkbit_short 0 1 2
Modern (Aligned at Top) links_linkbit_mtop links_linkbit_short 0 1 1
Tabular links_linkbit_table links_linkbit_short 0 1 2
Bold links_linkbit_greg links_linkbit_short 0 1 1
Photo Album links_linkbit_photo 0 0 5 10
Featured links_linkbit_featured links_linkbit_short 0 1 3
Short (Title, Thumb, Short Description) links_linkbit_short 0 0 1 5
Short (Direct Link, No Thumb, No Description) links_linkbit_short_direct links_linkbit_table links_linkbit 1 5
Title Only links_linkbit_title 0 0 1 3
Jukebox (brief) links_linkbit_jukebox links_linkbit_short links_linkbit_jukebox 1 1

Notes:

  1. The linkbit's name, as used on selection menus on the LDM->Admin->Settings page and Add/Edit Category pages
  2. The vBulletin template normally used with this linkbit
  3. If set to the name of a template, a collapse icon will be displayed on the list of entries. Clicking this icon will toggle the display to use this template. If the setting is null, the collapse icon is not shown.
  4. If set to the name of a template, LDM will switch to using it as the linkbit template when viewing a single entry. If left blank or set to 0, the template defined by LDM->Admin->Settings template_altbit is used.
  5. Defines the number of columns that are displayed by default when using this template.
  6. Defines the maximum number of columns that can be displayed using this template.

LDM->Admin->Settings link_cols_display overrides the default column setting, limited to the maximum column setting.

For example, the Modern linkbit uses the links_linkbit template for displays of one or many entries. It offers a contract/expand button and, when contracted, uses the Short template (links_linkbit_short). This template will only provide single column displays. By comparison, the Photo Album linkbit, which uses the links_linkbit_photo template, does not contract, uses a default of five columns and a maximum of 10 columns.

Normally, it is not appropriate to change these settings. However, all the parameter settings can be modified, making it possible to create and use a different set of display bits without having to modify the standard templates. (Currently, it is only possible to replace existing bits using this form. The extra sample-addnewbit illustrates how to add additional bits without losing the existing bits.)

Control Settings

There are a large number of control settings available for 'fine-tuning' the layout.

Category Display Controls

cat_show_catbit 
Display standard category listing. If disabled, main displays will not include a list of subcategories. This option is only useful after installing an addon (such as the category explorer extra) that provides an alternative way to access categories.
template_catbit 
Template that is used to display list of categories.
cat_cols_display 
Number of columns used to display categories in main display. Default: 1
default_style 
Style used to display LDM pages. Default: the default user/board style
cat_default_sort_order 
Default order in which categories are presented
word wrap 
Set to number of characters at which to insert spaces into long titles and text to make words wrap. Set to 0 to leave all long words intact.

These controls determine which of the optional control menus are displayed:

category_filter_menu 
Display quick alphanumeric filter bar in categories
category_keyword_menu 
Display quick keyword filter dropdown in categories
category_jump_menu 
The main LDM displays include a drop-down menu to enable the user to jump directly to any category. Your board can suffer a performance hit when you have hundreds or thousands of categories. Turn this setting off to disable creation of this menu.
cat_desc_popup 
Include popup link to category's extended description in catbit.

These controls determine iconography, subtitles and related information:

count_depth 
Whether category listings show (0) the number of entries/categories in subcategory only or (1) the number of entries/categories in complete subtree below this one.
cat_icon 
Image used to flag categories in main display. Default: blank, uses the supplied category.gif icon in file_icon_dir
cat_icon_new 
Image used to flag categories that contain new entries since user's last visit. Default: blank, uses the supplied category_new.gif icon in file_icon_dir
subcat_icon 
Image used to flag subcategories in main display.
default_cat_dseq 
Default category display order. Categories with a given display order remain grouped together within the chosen sort sequence. Default: 1
cat_sub_dseq_titles 
Subtitles used to annotate separator bar introducing group of subcategories with same display order. If used, specify one subtitle per line using the format display-order title
cat_entry_dseq_titles 
Subtitles used to annotate separator bar introducing group of entries with same display order. If used, specify one subtitle per line using the format display-order title

These controls determine the appearance of subcategory information:

cat_depth_display 
Depth of subcategories shown in category listing; 1: show categories at this level only. Default: 1
cat_depth_indent 
When more than one level of subcategories is shown in category listing, this setting provides a pixel indent for deeper levels.
cat_sub_display 
Depth of categories below cat_depth_display to show as links within the catbit. 0: show none Default: 0
cat_sub_display_perline 
Maximum number of subcategories to list before starting anew line
cat_sub_display_dorder 
Line break when category display order changes; =0, no line breaks.
cat_sub_display_limit 
Maximum number of subcategories to list.
cat_sub_display_bullet 
(HTML) character(s) highlighting start of categories within the catbit.
cat_name_colwidth 
Width of left hand column (contains category name) in category listing
cat_data_colwidth 
Width of right hand column (contains descriptive information about category) in category listing

Left and right column widths:

leftcol_width
rightcol_width 
Width of left and right-side column, when shown on main displays.

Other settings:

template_category_selection 
Template to use for category selection within add link: links_addnewlink_catselect standard drop down menu; links_addnewlink_catinput check boxes. Default: links_addnewlink_catselect

Entry Display Controls

template_linkbit 
Template to use for linkbit
template_altbit 
Alternative template uses when displaying single entries
link_cols_display 
Number of columns used to display links in main displays. If not set, the default value for the selected linkbit is used. Value cannot exceed a pre-determined maximum value for each linkbit. link_cols_display is useful for establishing a non-standard display layout.
links_per_page 
If set to 0, pagination is based on VB's standard setting or, if set, the current user's settings for posts/thread. Otherwise, this specifies the number of links shown per page.
links_show_othercats 
Whether or not the main linkbit displays include a list of all the categories in which the entry appears. When this is turned on, the linkbit guides users to other parts of your library containing similar material. However, if you tend to place entries in many categories, the list quickly becomes overwhelming and so is best turned off.
show_avatars 
Display user avatars in linkbits.
links_jump_comment 
Selecting entry takes user to comments and ratings page.
length_shortname
length_shortdesc 
Number of characters shown in linkbits that use abbreviated name and description
default_link_dseq 
Sets the default priority display order for new entries. Entries with a given display order remain grouped together within the chosen sort sequence.
default_sort_order 
Default order in which entries are presented
protected_link 
How entry urls are handled when can_access_link is switched off. 0: no hyperlink shown; 1: normal hyperlink shown which generates 'no permission' error; 2: hyperlink takes user to registration dialogue.

Additional Entry Attribute Display Controls

By default, the linkbits display only the standard entry attributes. The display of any additional Entry Attributes is enabled using the LDM->Admin->Setting display_entities. These attributes will then be laid out in a tabular grid as part of the main linkbits.

File:EntryAttributeGrid.jpg

Currently, LDM does not provide alternative entitybit templates. However, the following settings control the display and layout of this grid.

display_entities 
Display entry attributes in linkbits. (This can also be set on the LDM->Admin->Entry Attributes Page.)
entity_cellwidth 
Width of attribute cell (pixels); set to 0 to allow browser to auto-scale cells
entity_cellspacing 
Spacing between attribute cells (pixels)
entity_imagesize 
Size of attribute image thumbnails
entity_perrow 
Number of attribute cells per row in the linkbit
Personal tools