Difference between revisions of "Gallery3:Modules:code block" - Gallery Codex
Personal tools

Difference between revisions of "Gallery3:Modules:code block"

From Gallery Codex

m (Text replacement - "codex.gallery2.org" to "codex.galleryproject.org")
Line 3: Line 3:
 
|link=http://codex.galleryproject.org/images/a/a3/Code_block.zip
 
|link=http://codex.galleryproject.org/images/a/a3/Code_block.zip
 
|description=codex
 
|description=codex
|version=2}}
+
|version=3}}
  
 
== Code Block ==
 
== Code Block ==
 
Display a code block on the sidebar. <br />
 
Display a code block on the sidebar. <br />
Adds 3 configurable blocks to the sidebar.<br />
+
Adds 4 configurable blocks to the sidebar.<br />
Ability to name the tilte and content of each block.  Three blocks are available.
+
Ability to name the tilte and content of each block.  Four blocks are available.
  
 
== Description ==
 
== Description ==

Revision as of 21:54, 12 November 2013

Code Block

Display a code block on the sidebar.
Adds 4 configurable blocks to the sidebar.
Ability to name the tilte and content of each block. Four blocks are available.

Description

Add your own html/js/php to a block in the sidebar
Ability to select what block should show on what type of page; album/collection or photo or both.

Screen shots

Code block admin.png Code block sidebar.png

Installation

  • Download the module from: here.
  • Extract the module to the module directory of your G3 install.
  • Activate the module: Login -> Admin -> Modules. Check the box next to the module. Click update at the bottom of the page.
  • If you have the edit_tinymce module installed, you will get a rich text editor for the code blocks.

Usage

  • Admin -> settings -> Code Block. Edit the tile and block content as needed.
    • Only HTML is allowed for security reasons. If you need to add JS and or PHP code see Advanced usage.
  • Admin -> Appearance -> Manage sidebar. Verify that the code block is moved from the 'Available blocks' to 'Active blocks' and in the order you desire with other blocks.

Advanced usage

Edit the modules/code_block/views/code_block.html.php to add JS / PHP code.
Edit the file to add the desired php/jsp directly into the code block.