Sunteți pe pagina 1din 3

Disabling_right click <SCRIPT language=JavaScript> <!-- http://www.spacegun.co.uk --> var message = "function disabled"; function rtclickcheck(keyp){ if (navigator.

appName == "Netscape" && keyp.which == 3){ alert(message); return false; } if (navigator.appVersion.indexOf("MSIE") != -1 && event.button == 2) { alert(message); return false; } } document.onmousedown = rtclickcheck; </SCRIPT> ***** **Zooming

Per Image

For images you want to display wherever in your templates: {{{ <img src="{{ uri options="image 2" }}&[ImageRatio]=30" /> }}}

for setting the Ratio value, or: {{{ #!css+smarty <img src="{{ uri options="image 2" }}&[ImageWidth]=210&[ImageHeight]=175" /> }}} to set Width and Height values. Remember you can set only one of those values, so this would be valid too: {{{ #!css+smarty <img src="{{ uri options="image 2" }}&[ImageWidth]=210" /> }}}
#!css+smarty <link rel="stylesheet" type="text/css" href="/javascript/yui/build/container/assets/container.css" > <link rel="stylesheet" type="text/css" href="/javascript/yui/extend/photoviewer/assets/skins/blackmin/blackmin.css" > <script type="text/javascript" dom-event.js"></script> <script type="text/javascript" ></script> <script type="text/javascript" min.js" ></script> <script type="text/javascript" min.js"></script> src="/javascript/yui/build/yahoo-dom-event/yahoosrc="/javascript/yui/build/dragdrop/dragdrop-min.js" src="/javascript/yui/build/animation/animationsrc="/javascript/yui/build/container/container-

<script type="text/javascript" src="/javascript/yui/build/connection/connectionmin.js"></script> <script type="text/javascript" src="/javascript/yui/extend/photoviewer/build/photoviewer_base-min.js"></script>

#!javascript <script type="text/javascript"> // config YAHOO.photoViewer.config = { viewers: { "blackmin" : { properties: { id: "blackmin", grow: 0.6, fade: 0.6, modal: true, dragable: false, fixedcenter: true, xy: [0,0], loadFrom: "html", position: "absolute", easing: YAHOO.util.Easing.easeBothStrong, buttonText: { next: "next &#x00BB;", prev: "&#x00AB; prev", close: "Close" } } } } };

4- Last step, this is where you say which images will be affected by the zooming effect, and remember you can do that for images inserted via editor and images coded in templates.

Images inserted via editor: - Look for the line you use to display article body, which usually looks like this: {{{ #!css+smarty <p class="article_fulltext">{{ $gimme->article->full_text }}</p> }}}

... and wrap it with a new DIV element for photoviewer. Important: id must match viewer name in configuration (blackmin in this case.) So now, it should look like this: {{{ #!css+smarty <div id="blackmin"><p class="article_fulltext">{{ $gimme->article->full_text }}</p></div> }}}

Images coded in template file: - Line should be like this: {{{ #!css+smarty

<div id="blackmin"> <a href="{{ uri options="image 1" }}" title="Caption goes here" class="photoViewer"><img src="{{ uri options="image 1" }}&[ImageWidth]=180" alt="Image title goes here" /></a> </div> }}} title and alt options as part of a and img tags are mandatories, no matter if they are empty.

If you want all the images in your article view to be zoomable, just make the div block to wrap everything, like in this simple sample template: {{{ #!css+smarty <div class="article_title">{{ $gimme->article->title }}</div> <div id="blackmin"> <div class="article_main_photo"> <a href="{{ uri options="image 1" }}" title="Caption goes here" class="photoViewer"><img src="{{ uri options="image 1" }}&[ImageWidth]=180" alt="Image title goes here" /></a> </div> <div class="article_intro">{{ $gimme->article->intro }}</div> <div class="article_full_text">{{ $gimme->article->full_text }}</div> </div> }}}

S-ar putea să vă placă și