Channel Images

Contents

Installation For ExpressionEngine 1.6.8

  1. Copy ext.channel_images_ext.php to your /system/extensions/ folder.
  2. Copy lang.channel_images.php to your /system/language/english/ folder.
  3. Copy the folder channel_images to your /system/modules/ folder.
  4. Copy the devdemon_themes folder to your /themes/ folder.

Installation For ExpressionEngine 2.x

  1. Copy channel_images to your /system/expressionengine/third_party/ folder.
  2. Copy the devdemon_themes folder to your /themes/ folder.

Updating to a new version of Channel Images

First before anything BACKUP! Once you have done a backup, simply replace all the Channel Images files and then visit the Channel Images Control Panel to allow the update script to run.

Setup Instruction For ExpressionEngine 2.x

  1. Click on Add-Ons then Modules.
  2. On Fieldtype and Module choose Install then submit.
  3. Click on Admin then Channel Administration then Custom Fields.
  4. Choose the Field Group you want to add Channel Images to.
  5. Click Create a New Custom Field.
  6. Choose the Field Type as Channel Images.
  7. Create the Label and Field Name you want for your templates.
  8. Return to Add-Ons then Modules.
  9. Choose the Channel Images module.
  10. You MUST enable the channel you wish to use the new custom field type in.
  11. Choose the Channel you want to use.
  12. Set the Server Location Path to a folder you want the images for that channel to upload to.
  13. We recommend creating a folder in the images directory with full write (chmod 777) access.
  14. Set the Location URL to the web path of that same directory you made.
  15. You can create optional categories separated with a comma if you wish. (Not required).
  16. The Image Sizes you keep or add will be automatically added. If you do not need multiple versions remove the sizes you don't need.
  17. Return to Channel Management and make sure your channel is using the custom field group you created for Channel Images.

Primary Template Tag

{exp:channel_images:images} 
Special Note: Different variables and conditionals exist for ExpressionEngine 2.x. Please verify below that you are looking at the correct documentation for the version of ExpressionEngine you are using.

Tag Parameters

entry_id="" 
url_title="" 
cover_only="" // (Options: Yes/No - Default = No) 
skip_cover="" // (Options: Yes/No - Default = No) 
weblog="" 
weblog_id="" 
orderby="" // Options: title, order - Default = order 
sort="" // Options: asc,desc -- Default = asc 
limit="" // Default = 300 

Variables for ExpressionEngine 1.6.8

{image_url} 
{image_id} 
{image_url:size} // "size" refers to the image size you set in the settings. 
{image_title} 
{image_description} 
{image_category} 
{image_count} 
{total_images} 
{filename} 

Variables for ExpressionEngine 2.x

{image:url:size} // "size" refers to the image size you set in the settings. 
{image:id} 
{image:title} 
{image:description} 
{image:category} 
{image:count} 
{image:total} 
{image:filename} 

Conditionals for ExpressionEngine 1.6.8

{if no_images} <p>No Images Exist</p{/if} 

Conditionals for ExpressionEngine 2.x

{if image:no_images} <p>No Images Exist</p{/if} 

Channel Images Template Example for EE 1.6.8

{exp:weblog:entries weblog="default_site"}
    
<h2>Cover Image</h2>
    
{exp:channel_images:images entry_id="{entry_id}" cover_only="yes"}
        
<a href="{image_url}" title="{image_title}"><img src="{image_url:small}" alt="{image_title}" /></a>
        <
p>{image_description}</p>
    
{/exp:channel_images:images}
    
    
<h2>Other Images</h2>
    
{exp:channel_images:images entry_id="{entry_id}" skip_cover="yes"}
        
<a href="{image_url}" title="{image_title}"><img src="{image_url:small}" alt="{image_title}" /></a>
    
{/exp:channel_images:images}
    
    
<h2>All Images</h2>
    
{exp:channel_images:images entry_id="{entry_id}"}
        
<a href="{image_url}" title="{image_title}"><img src="{image_url:small}" alt="{image_title}" /></a>
    
{/exp:channel_images:images}
{
/exp:weblog:entries} 

Channel Images Template Group by Category Example for EE 1.6.8

{exp:weblog:entries weblog="default_site"}
    
<h2>Cover Image</h2>
    
{exp:channel_images:images entry_id="{entry_id}" group_by_category="yes"}
        {images}
            
<a href="{image_url}" title="{image_title}"><img src="{image_url:small}" alt="{image_title}" /></a>
            <
p>{image_description}</p>
        
{/images}
        {if no_images}
<p>No Images Available</p>{/if}
    {
/exp:channel_images:images}
{
/exp:weblog:entries} 

Channel Images Template Example for EE 2.x

{exp:channel:entries channel="about"}
    
<h2>Cover Image</h2>
    
{exp:channel_images:images entry_id="{entry_id}" cover_only="yes"}
        
<a href="{image:url:large}" title="{image:title}"><img src="{image:url:small}" alt="{image:title}" /></a>
        <
p>{image:description}</p>
    
{/exp:channel_images:images}
    
    
<h2>Other Images</h2>
    
{exp:channel_images:images entry_id="{entry_id}" skip_cover="yes"}
        
<a href="{image:url:large}" title="{image:title}"><img src="{image:url:small}" alt="{image:title}" /></a>
    
{/exp:channel_images:images}
    
    
<h2>All Images</h2>
    
{exp:channel_images:images entry_id="{entry_id}"}
        
<a href="{image:url:large}" title="{image:title}"><img src="{image:url:small}" alt="{image:title}" /></a>
    
{/exp:channel_images:images}
{
/exp:channel:entries}