Difference between #20 and #21 of
How to use Highslide for image popups

Revision #21 has been created by wei on Oct 26, 2010, 2:40:48 AM with the memo:

formatting, removed missing images
« previous (#20)


Title unchanged

How to use Highslide for image popups

Category unchanged


Yii version unchanged

Tags changed

image, popups

Content changed

## About Highslide
You can download the *highslide* javascript from [http://highslide.com/](http://highslide.com/). And here is an explanation on that URL;
I am going to explain to embed *highslide* in the "blog demo" as this is a well known example.

# Installation of highslide You only have *three steps* to do. #### (1) Javascript & CSS installation
* Create `blog/js` directory. Move `highslide` directory to `blog/js/` after unzipping the *highslide* package.
<title><?php echo $this->pageTitle; ?></title>

If you would like to compress these javascript and css files, consider to use [ExtendedClientScript](http://www.yiiframework.com/extension/extendedclientscript/).

* Add a line in `blog/css/main.css` to reset floating images.
.post .nav
     -moz-border-radius:7px;     padding: 5px;      background: #F5F5F5; +      clear:left; } ~~~ #### (2) Extending Markdownparser
I have added a new grammer for ["Markdown syntax"](http://daringfireball.net/projects/markdown/syntax) to extend the exsisting [CMarkdownParser].
This is because I do not want to affect an ordinary image reference. New grammer for *highslide* is as follows.

# (3) Configuration
* Configure the image directory and bounding box in `blog/protected/config/params.php`. I asume there is a directory named `images` just under the `blog`.
Setting the value of 360 to 'imageBoundingbox' means 'imageBoundingboxWidth' = 'imageBoundingboxHeight' = 360.

# <a name="Example">Example</a> Example
Using this consists of simple steps; upload, post and click.
Upload your image using FCKEditor or other method to `blog/images`.
Images are scaled down within the bounding box you have configured in the config file. Then, they pop up in the actual size when you click them.

Here are the screen shots of this highslide enabled blog demo.
After clicking the picture:<br>
1 0
Viewed: 24 137 times
Version: 1.1
Category: Tutorials
Tags: image, popups
Written by: mocapapa
Last updated by: wei
Created on: Feb 17, 2009
Last updated: 10 years ago
Update Article


View all history