Forums/ThemeSnap Knowledge Base

PinBoard Theme Guide

Jason S
posted this on April 18, 2012 12:53

Below you'll find a list of theme files for the PinBoard theme. This list illustrates where you can find certain functionality and information within the theme itself.

Other PinBoard Resources

Theme description page:

Roadmap documentation for PinBoard:

PinBoard App Instructions:

PinBoard forums:

+++++++++++++++++++++++++++++++++++++++++++++++++++

NOTICE: Please make sure that "clean URLs" are turned on and working for your installation. See http://drupal.org/getting-started/clean-urls for more information on getting clean URLs working with your hosting provider and your Drupal theme.

+++++++++++++++++++++++++++++++++++++++++++++++++++

1. Functional structure of "PinBoard"

1. Features of the PinBoard theme files:

/sites/all/themes/pinboard/pinboard.info

Contains information about theme name, default settings, available regions, and also enabling of stylesheet files and scripts

/sites/all/themes/pinboard/html.tpl.php

Contains template of basic code of page

/sites/all/themes/pinboard/page.tpl.php

Contains template of appearance design for internal pages of the site

/sites/all/themes/pinboard/node.tpl.php

Contains template of appearance design for all nodes of all content types except pin content type

/sites/all/themes/pinboard/node--pin.tpl.php

Contains template of appearance design for all nodes of pin content type

/sites/all/themes/pinboard/block.tpl.php

Contains template of appearance design for blocks except block regions Sidebar Right and Menu

/sites/all/themes/pinboard/block--menu--menu-navigation.tpl.php

Contains template of appearance design for menu blocks

/sites/all/themes/pinboard/block--sidebar_right.tpl.php

Contains template of appearance design for block region Sidebar Right

/sites/all/themes/pinboard/comment-wrapper.tpl.php

Contains template of appearance design of comments container except pin comments

/sites/all/themes/pinboard/comment.tpl.php

Contains template of appearance design of a separate comment container except pin comments

/sites/all/themes/pinboard/comment-wrapper--node-pin.tpl.php

Contains template of appearance design of comments container for pin

/sites/all/themes/pinboard/comment--node-pin.tpl.php

Contains template of appearance design of a separate comment container for pin

/sites/all/themes/pinboard/user-profile.tpl.php

Contains template of appearance design and code of user page ouput

/sites/all/themes/pinboard/views-view-fields--originally-pinned-by--block.tpl.php

/sites/all/themes/pinboard/views-view-unformatted--originally-pinned-by--block.tpl.php

Contain templates of appearance design of Views block Originally pinned by, and is used on a pin page

/sites/all/themes/pinboard/views-view-fields--pinned-onto-the-board--block.tpl.php

/sites/all/themes/pinboard/views-view-unformatted--pinned-onto-the-board--block.tpl.php

Contain templates of appearance design of Views block pinned onto the board, and is used on a pin page

/sites/all/themes/pinboard/views-view-fields--uploaded-pins--block.tpl.php

/sites/all/themes/pinboard/views-view-unformatted--uploaded-pins--block.tpl.php

Contain templates of appearance design of Views block uploaded pins, and is used on a pin page

/sites/all/themes/pinboard/template.php

Contains auxiliary php code required for functioning of the theme

/sites/all/themes/pinboard/screenshot.png

Screenshot of the theme

/sites/all/themes/pinboard/logo.gif

Default logo of the theme

/sites/all/themes/pinboard/author-picture.gif

Default user avatar

/sites/all/themes/pinboard/base.css

/sites/all/themes/pinboard/css/skeleton.css

/sites/all/themes/pinboard/css/layout.css

/sites/all/themes/pinboard/css/a_main_styles.css

/sites/all/themes/pinboard/css/a_block.css

Stylesheet files of the site design

/sites/all/themes/pinboard/css/header.css

Stylesheets file of title design

/sites/all/themes/pinboard/css/top_menu_subj_bar.css

Stylesheets file of the upper menu design

/sites/all/themes/pinboard/css/pin_box.css

Stylesheets file of pin teaser design

/sites/all/themes/pinboard/css/pin_overlay.css

Stylesheets file of pin page design

/sites/all/themes/pinboard/css/profile.css

Stylesheets file of profile design

/sites/all/themes/pinboard/css/board.css

Stylesheets file of board design

/sites/all/themes/pinboard/css/page.css

Stylesheets file of pages design

/sites/all/themes/pinboard/img/

This folder contains image files for the theme design

/sites/all/themes/pinboard/scr/

This folder contains JavaScript files that provide functionality of the theme

2. Site Structure

Pages consist of the following regions:

  • Sidebar Top Left
  • Sidebar Top Right
  • Sidebar Top Menu
  • Sidebar Top Button
  • Content
  • Sidebar Right (is absent on the view of pin pages and user profile)
  • Footer One
  • Footer Two
  • Footer Three
  • Footer Four
  • Footer Copyright

Content types:

  • Basic page is used for separate pages such as "About Us"
  • Pin is used for placing images and video on pinboard
  • Sections of pins display are implemented using module Views
  • Taxonomy vocabulary Tags is used for pins section
  • Taxonomy vocabulary Categories is used for pins section

3. Site Settings and Configurations (we'll be adding to this as needed)

A. Change the number of Pins on the frontpage, popular page, and taxonomy page:

The number of pins output at one time by default is 10. If you want to increase the number of pins on the frontpage, popular pins page, and the taxonomy (category) pages, then you need to simply change parameter "Pager" in the Views settings of Views.

Node View: sitename.com/admin/structure/views/view/node/edit

Taxonomy term: sitename.com/admin/structure/views/view/taxonomy_term/edit

Popular pins: sitename.com/admin/structure/views/view/popular/edit

B. Changing the words "media-pin" from showing in the URL

On Pin Content Type edit page: www.site.name/admin/structure/types/manage/pin -- In field “Pattern for the title” you need to change the contents of the field to: 

<?php 
if (isset($node->body) and is_array($node->body)){ 
reset($node->body); 
$d = current($node->body); 

if (empty($d[0]['value'])) $d[0]['value'] = ''; 
$out = truncate_utf8(strip_tags($d[0]['value']), 120, true, true); 
return $out ? $out : 'Media pin'; 
?>

C. Managing the Appearance of fonts, backgrounds, and colors

Go to: Appearance > Settings (beside the thumbnail of the PinBoard theme). Then, scroll to the bottom of the page for the dropdown list of theme color, background, and font options.

D. Managing Pin "fields"

Make the appropriate settings of the form for adding a pin on the "manage fields" page for the Pin Content Type at:

/admin/structure/types/manage/pin/fields

Field "Separator - Advanced Settings" must be present on the settings form "manage fields"

All fields above this field are displayed as expanded on the form of adding a pin. All fields below this field are displayed as collapsed in block "Advanced Settings."

The sorting of fields on the form of adding a pin corresponds to the sorting made on this settings page. Remember that you need to click on the "Save" button in the bottom of the form to save all changes made on the settings page. Also, you can make visibility settings of block "Advanced Settings" on the settings page "Permission":

/admin/people/permissions

The setting is called "Visible Advanced Settings"

Remember that if you disable the visibility of block "Advanced Settings," then this block must not have required fields, otherwise it will make adding a pin impossible.

Clear Drupal cache and refresh the contents of a browser by clicking F5 button.

E. Changing the Text Messages and URLs for certain PinBoard pages

  1. Built in text messages that are formed by module pinboard_helper and PinBoard theme for pages like: /addpinit and /addboardpin
  2. The ability to change URLs for built in pages that are formed by module pinboard_helper.

If you want to change the built in lines and URLs noted in 1 & 2 above, you can do it in file:

/sites/all/modules/pinboard_helper/pinboard_helper.define.inc

The pinboard_helper.define.inc is also where you can change or rename "arguments" for Pinboard, such as the "Like" button text or similar.

F. Changing the currency symbol from $ to Euros, etc. for "Gift" Pins added

Go to: /admin/structure/types/manage/pin/fields/field_price

Scroll down to the "Prefix" field and change the symbol to any other specified and supported currency symbol, such as "€" for example.

G. Controlling or managing the display Pins on front page

Add "Promoted to front page" in the filter section in the View "Node" on this page: /admin/structure/views/view/node/edit

H. How do you let anonymous users vote on a Pin?

admin/structure/rate/1/edit - PERMISSIONS

I. How to change default board name?

/admin/config/people/accounts Predefined Boards on bottom left menu block.

4. Issues and Troubleshooting

Issue: Pin It Button does not work

Solution: Check to make sure you have curl PHP extension installed on your server. In Debian or Ubuntu it is very easy to install: sudo apt-get install php5-curl

5. Warnings and Notices about PinBoard

  1. It's necessary to make a backup of all files and a database before updating any modules, theme or Drupal core.
  2. The output of node content on the main page is limited to the "Pin" content type. Setting the checkbox for other content types to "promote to front page" doesn’t affect the placement of content on the main page.
  3. If you add new content types for the output in categories or on the main page, then remember you'll need a template the same as for pin type, otherwise you will break the appearance of these pages created.
  4. It’s not recommended to change the settings for "Rate widgets" since you may break the functionality of your site.
  5. It’s not recommended to change the settings for Automatic Nodetitles module, since it may break the functionality of your site.
  6. Disabling Pin Board Helper module will lead to a full non-operable website. Never, ever, ever, ever, ever disable this module. ;-)
  7. Disabling Automatic Nodetitles, Rate, Voting API, Views, or Video Embed Field modules will lead to the loss of the functionality of your site, and likely to the loss of operability of the entire site.
  8. We guarantee that the video embed video capture feature in our PinBoard theme will work perfectly only with videos from Youtube and Vimeo services. However you can try to capture video from other services and you may or may not succeed in grabbing the video for pinning.
  9. Pathauto works with the theme. However, we found that the video embed pins (video pins) to not respond to Pathauto's settings. We are working with the module maintainer to make some additions to correct this.
 
Topic is closed for comments