Themes

Vdrag by Venom, or how to play with its blocks !!

kris_fr  30 Jul 2007 10:23 PM 9219 Reads   10 Comment(s) 
Download & Demo

Envy to make of Drag and Drop with your themes
The site “http://www.dhtmlgoodies.com” proposes a simple script to us: you should call just a file “js” in theme.html (will find it to you in file “JS” of the archive, he is appointed dragable-content.js) with the top of <{$xoops_module_header}> between <"head"> et <"/head">.
le="color: #000000"><?php <script type="text/javascript"> var rememberPositionedInCookie = true; var rememberPosition_cookieName = 'dragable'; </script> <script type="text/javascript" src="<{xoImgUrl /js/dragable-content.js}>"></script>


Then you must create a new < "div" > which surrounds each block which must move.
Example for the elements “content” :
le="color: #000000"><?php <div class="dragableElement"> <div id="xo-content"><{$xoops_contents}></div> </div>


For the block of left and right to amend blockzone.hmtl like those :
le="color: #000000"><?php <{foreach from=$blocks item=block}> <div class="dragableElement"> <div class="xo-block <{$block.module}>"> <{if $block.title}><div class="xo-blocktitle"><{$block.title}></div><{/if}> <div class="xo-blockcontent"><{$block.content}></div> </div> </div> <{/foreach}>


Then correctly to dimension your blocks, you ensure to have yourselves will find at the end of block.css of our theme the sizes to be informed imperatively.
le="color: #000000"><?php /* block central top and bottom */ #xo-page-topleftblocks .xo-block, #xo-page-toprightblocks .xo-block,#xo-page-bottomleftblocks .xo-block, #xo-page-bottomrightblocks .xo-block { width: 280px; } /*block central */ #xo-page-topcenterblocks .xo-block, #xo-page-bottomcenterblocks .xo-block { width: 600px; } /* block right */ #xo-canvas-rightcolumn .xo-block { width: 170px; } /* block left */ #xo-canvas-leftcolumn .xo-block { width: 190px; }


Here are the blocks are “dragable” and they are recorded in the cookie on the computer of the visitor, all the pages can be differently personalised.
Thank you Kris_fr for the debug.
Rating 0/5
Rating: 0/5 (0 votes)
Voting is disabled!


Login

Donat-O-Meter

Stats
Goal: $15.00
Due Date: Jul 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $15.00
Make donations with PayPal!

Latest GitHub Commits

Categories