Task title: Create new preview elements for Style Guide module

Task description:

Background
The Style Guide module for Drupal provides a visual testing page for Drupal themes. Quickly compare the display of common elements across installed Drupal themes, and verify that selected themes addresses all common style elements.

Be sure to use the latest version of HEAD, which incorporates the changes in #949070: Create plugins for Style Guide module [Task 1].

Preparation
-- Download and install Drupal 7.
-- Visit the 'Appearance' page in the administration interface to find the Style Guide links.

New plugins

Using the API (styleguide.api.php, in the module download), create a patch to styleguide.styleguide.inc that adds preview elements only when optional core modules are enabled:

[Task 2: 8 hrs]
-- Forum (4 hrs)
--- theme_forums()
--- theme_forum_form()
--- theme_forum_list()
--- theme_forum_topic_list()
-- Image (4 hrs)
--- theme_image_style(), for all active styles.
-- theme_feed_icon() (1 hr)

Deliverables:

-- Patch(es) to include the desired features to the Style Guide module.

Resources:

Style Guide module: Style guide module

Primary contact:

agentrickard

Estimated time: 8 hours

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

agentrickard’s picture

Issue tags: +gci-research, +gci-hard, +gci-task, +gci-ui

Tagging.

chalet16’s picture

FileSize
3.21 KB

There is no theme guide for theme_forums() because I found that it's only a wrapper for theme_forum_form() and theme_forum_list().

agentrickard’s picture

Status: Active » Needs review

OK, I just scanned the list of theme function, so we'll see how you solved that problem.

chalet16’s picture

What should I do next?

agentrickard’s picture

Status: Needs review » Needs work

Well, first, we want to move the forum specific functions into a module plugin file. Only core functions really belong in styleguide core.

For this task, the RSS Feed item can stay in styleguide.inc, the others go in forum.inc and image.inc, which handle the 'module_exists' checks for us and autoload the tests.

If you are using the HEAD checkout from CVS, look at how the 'modules' directory is structured. See the reference to #949070: Create plugins for Style Guide module [Task 1], the first task in the list.

Also watch the use of tabs and spacing in the code. There are instances where control statements are not properly formatted, and several tabs where there should be two spaces.

chalet16’s picture

FileSize
1.05 KB

OK, Resubmitted. I need to use a tar file because I can't run "cvs add" with no write access. So I include 1 patch and 2 new file to add instead.

chalet16’s picture

FileSize
1.05 KB

Forgot to include patch file.

agentrickard’s picture

Status: Needs work » Needs review

You want cvs diff -upN as documented here: http://drupal.org/patch/create

But the tar file is fine, thanks.

agentrickard’s picture

FileSize
2.97 KB

Like so. The trick is editing the "Entries" file for the CVS folder where the new files are added.

agentrickard’s picture

Status: Needs review » Reviewed & tested by the community
FileSize
3.85 KB

Excellent. Note the code cleanup that I did to conform to coding standards. I also added a few inline comments for clarity.

Love the image handling. Do you think we need to do both vertical and horizontal?

Committing this version.

agentrickard’s picture

Status: Reviewed & tested by the community » Closed (fixed)