1
wanikoo
XOOPS(Cube) Default Theme Hack-(Block Drag&Drop&Resize Theme Hack)
  • 2006/4/3 12:32

  • wanikoo

  • Not too shy to talk

  • Posts: 129

  • Since: 2003/12/27


My first Theme Hack!!
Anyway...
// ------------------------------------------------------------------------ //
// XOOPS(Cube) Default Theme Hack Ver2.0 //
// Just enjoy! Internet for everyone!! //
// wanikoo < http://www.wanisys.net/ > /
// ------------------------------------------------------------------------ //
// Based on XOOPS(Cube) Default Theme //
// ---JavaScript Author-- //
// - prototype.js ( Sam Stephenson http://prototype.conio.net/ ) //
// - rico.js ( Sabre Airline Solutions http://openrico.org/rico/ ) //
// ------------------------------------------------------------------------ //

With this Theme,
You can D&D(Drag and Drop) each block of your XOOPS(Cube) Site!
It means visitor can reorder blocks freely by D&Ding each of them.
^^;;
-Ver2.0-
Now you can minimize/restore each block of your XOOPS(Cube) Site like Windows.

--
I changed some codes of rico.js to fix some bugs and add new functions!
so...when you use these themes, you have to use the rico.js modified by me and included in this package.

You can download it here:
http://dev.xoops.org/modules/xfmod/project/showfiles.php?group_id=1189&release_id=967&dl=2348
(some typo fixed in themes for XOOPS Cube 2.1...if you have never seen this message before and use XOOPS Cube 2.1, please download it again. No change in themes for XOOPS 2.0.x and XOOPS 2.0 JP...)
-----------------------

---------------------
D&D function
------------
When some page is loaded,
Basically,
each of blocks is fixed(I mean you cannot drag it)and has a Drag button.
So..
If you want to drag any block, you have to click(toggle) its Drag button.
When its Drag buttion clicked, it will be changed into the Draggable mode(I mean you can drag it now)
and its button will be toggled into UnDrag button.
Umm...
And..
When you finish D&Ding(Drag and Drop) any block,
you should/had better make it Undraggable mode...(especially the block has form elements)
by click(toggle)ing its UnDrag button.
( When its UnDrag button clicked, it will be changed into the Undraggable mode and its button will be toggled into Drag button.
Umm...if you want to D&D it again, Just click/toggle its Drag button again )
^^;;

In brief,
Just click/toggle its button!!!!!

--------------------
Resizing function
--------------
When some page is loaded,
Basically,
each of blocks has a Minimize button.
So..
If you want to minimize any block, you have to click(toggle) its Minimize button.
When its Minimize buttion clicked, it will be resized into the Minimized-mode
and its button will be toggled into Restore button.
And..
When you want to restore it,
just click its Restore button and it will be restored and its buttion will be toggled into Minimize button.
( If you want to minimize it again, Just click/toggle its Minimize button again )
^^;;

In brief,
Just click/toggle its button like Windows!!!!!
----------------------

-----------------------

---------------------

.most of code modified to fix some bugs of Ver1.0
( when you click/select some form elements in block, old themes behaved in a strange way. )
.Resizing function added.
(you can minimize/restore each block of your XOOPS Cube Site like Windows.)
--------

--------
.first-release with D&D(Drag and Drop) function!
----------------------
---------------------------------------------------------------------------
Themes included in this package
------------------------------------------------------------------------------
--------------------
cube_windefault theme ( for XOOPS Cube 2.1 )
---------------------
Name="Default Theme-Win(Drag and Drop and Resizing) Version"
Depends=Legacy_RenderSystem
Url="http://xoopscube.org and http://www.wanisys.net/"
Version="2.00"
Author=XOOPS Cube Project Team and Wanikoo and Authors of rico and prototype
ScreenShot="screenshot.png"
Description="Default theme-Win(Drag and Drop and Resizing) Version of XOOPS Cube 2.1"

------------------
windefault theme ( for XOOPS 2.0.x JP)
-------------------
Name="Default Theme-Win(Drag and Drop and Resizing) Version"
Url="http://xoopscube.org and http://www.wanisys.net"
Version="2.00"
Author=XOOPS Cube Project Team and Wanikoo and Authors of rico and prototype
ScreenShot="screenshot.png"
Description="Default theme-Win(Drag and Drop and Resizing) Version of XOOPS 2.0 JP"

------------------
winxdefault theme ( for XOOPS 2.0.x )
-------------------
Name="Default Theme-Win(Drag and Drop and Resizing) Version"
Url="https://xoops.org and http://www.wanisys.net"
Version="2.00"
Author=XOOPS Project Team and Wanikoo and Authors of rico and prototype
ScreenShot="screenshot.png"
Description="Default theme-Win(Drag and Drop and Resizing) Version of XOOPS 2.0.X"

--------------------
cube_dddefault theme ( for XOOPS Cube 2.1 )
---------------------
Name="Default Theme-DD (Drag and Drop) Version"
Depends=Legacy_RenderSystem
Url="http://xoopscube.org and http://www.wanisys.net/"
Version="2.00"
Author=XOOPS Cube Project Team and Wanikoo and Authors of rico and prototype
ScreenShot="screenshot.png"
Description="Default theme-DD(Drag and Drop)Version of XOOPS Cube 2.1"

------------------
dddefault theme ( for XOOPS 2.0.x JP)
-------------------
Name="Default Theme-DD(Drag and Drop)Version"
Url="http://xoopscube.org and http://www.wanisys.net"
Version="2.00"
Author=XOOPS Cube Project Team and Wanikoo and Authors of rico and prototype
ScreenShot="screenshot.png"
Description="Default theme-DD(Drag and Drop)Version of XOOPS 2.0 JP"

------------------
ddxdefault theme ( for XOOPS 2.0.x )
-------------------
Name="Default Theme-DD(Drag and Drop)Version"
Url="https://xoops.org and http://www.wanisys.net"
Version="2.00"
Author=XOOPS Project Team and Wanikoo and Authors of rico and prototype
ScreenShot="screenshot.png"
Description="Default theme-DD(Drag and Drop)Version of XOOPS 2.0.X"

--------------------
cube_sizedefault theme ( for XOOPS Cube 2.1 )
---------------------
Name="Default Theme-SIZE (Resizing) Version"
Depends=Legacy_RenderSystem
Url="http://xoopscube.org and http://www.wanisys.net/"
Version="2.00"
Author=XOOPS Cube Project Team and Wanikoo and Authors of rico and prototype
ScreenShot="screenshot.png"
Description="Default theme-SIZE (Resizing) Version of XOOPS Cube 2.1"

------------------
sizedefault theme ( for XOOPS 2.0.x JP)
-------------------
Name="Default Theme-SIZE (Resizing) Version"
Url="http://xoopscube.org and http://www.wanisys.net"
Version="2.00"
Author=XOOPS Cube Project Team and Wanikoo and Authors of rico and prototype
ScreenShot="screenshot.png"
Description="Default theme-SIZE (Resizing) Version of XOOPS 2.0 JP"

------------------
sizexdefault theme ( for XOOPS 2.0.x )
-------------------
Name="Default Theme-SIZE (Resizing) Version"
Url="https://xoops.org and http://www.wanisys.net"
Version="2.00"
Author=XOOPS Project Team and Wanikoo and Authors of rico and prototype
ScreenShot="screenshot.png"
Description="Default theme-SIZE (Resizing) Version of XOOPS 2.0.X"

-----------------------------------------------------------------------------

-----------------------------------------
Credit of Javascripts used in these themes
-----------------------------------------
prototype.js
/* Prototype JavaScript framework, version 1.4.0
* (c) 2005 Sam Stephenson
*
* Prototype is freely distributable under the terms of an MIT-style license.
* For details, see the Prototype web site: http://prototype.conio.net/
*
/*--------------------------------------------------------------------------*/

Rico.js
/**
*
* Copyright 2005 Sabre Airline Solutions
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this
* file except in compliance with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under the
* License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
* either express or implied. See the License for the specific language governing permissions
* and limitations under the License.
**/

------------------
Browser Support:
------------------
This has been tested on IE 5.5, IE 6, Firefox 1.0x/Win, Camino/Mac, Firefox 1.5x/Mac.
( Currently, not supported on Safari )
-------------------
How to install
------------------
Just copy it to /themes dir.
and..
Make it workable through Preference configuration section of Admin menu
----------------
--------------------------------------------

2
wanikoo
Re: XOOPS(Cube) Default Theme Hack-(Block Drag&Drop&Resize Theme Hack)
  • 2006/4/3 12:34

  • wanikoo

  • Not too shy to talk

  • Posts: 129

  • Since: 2003/12/27


You can easily apply these functions(D&D and Resizing) to other XOOPS(Cube) Themes!

--------------------------------
in case of D&D and Resizing
--------------------------------
1) add this after css link


2) add this after xoops_js
<script type="text/javascript">

script>


<
script type="text/javascript">

script>

<
script type="text/javascript">

script>

3) modify each block-loop like this!
ex)
<table cellspacing="0">
    <
tr>
      <
td id="leftcolumn">
        
        <{foreach 
name=lblockloop item=block from=$xoops_lblocks}>
    <
div id="ldropzone<{$smarty.foreach.lblockloop.iteration}>">
    <
div id="DDlblock<{$smarty.foreach.lblockloop.iteration}>">
    <
div class="blockTitle">
    <{
$block.title}>
    <
a href="javascript:toggleSelect('xoopsDDlblock<{$smarty.foreach.lblockloop.iteration}>', 'DDlblock<{$smarty.foreach.lblockloop.iteration}>', 'ldragimage<{$smarty.foreach.lblockloop.iteration}>', <{$smarty.foreach.lblockloop.iteration}> );"><img id="ldragimage<{$smarty.foreach.lblockloop.iteration}>" src="<{$xoops_imageurl}>drag.gif" alt="Click me if you want to drag this block" />a>&nbsp;<a href="javascript:toggleEffect('resizelblock<{$smarty.foreach.lblockloop.iteration}>', 'lsizeimage<{$smarty.foreach.lblockloop.iteration}>', <{$smarty.foreach.lblockloop.iteration}>)"><img id="lsizeimage<{$smarty.foreach.lblockloop.iteration}>" src="<{$xoops_imageurl}>minimize.gif" alt="Click me if you want to minimize this block" />a>
    div>
    <
div id="resizelblock<{$smarty.foreach.lblockloop.iteration}>" class="blockContent">
    <{
$block.content}>
    div>
    div>
    div>
        <{/foreach}>
        

      td>

      <
td id="centercolumn">

        
        <{if 
$xoops_showcblock == 1}>

        <
table cellspacing="0">
          <
tr>
            <
td id="centerCcolumn" colspan="2">

            
            <{foreach 
name=ccblockloop item=block from=$xoops_ccblocks}>
    <
div id="ccdropzone<{$smarty.foreach.ccblockloop.iteration}>">
    <
div id="DDccblock<{$smarty.foreach.ccblockloop.iteration}>">
    <
div style="padding: 5px;">
      <
fieldset>
        <
legend class="blockTitle"><{$block.title}>
    <
a href="javascript:toggleSelect('xoopsDDccblock<{$smarty.foreach.ccblockloop.iteration}>', 'DDccblock<{$smarty.foreach.ccblockloop.iteration}>', 'ccdragimage<{$smarty.foreach.ccblockloop.iteration}>', <{$smarty.foreach.lblockloop.iteration+$smarty.foreach.ccblockloop.iteration}> );"><img id="ccdragimage<{$smarty.foreach.ccblockloop.iteration}>" src="<{$xoops_imageurl}>drag.gif" alt="Click me if you want to drag this block" />a>&nbsp;<a href="javascript:toggleEffect('resizeccblock<{$smarty.foreach.ccblockloop.iteration}>', 'ccsizeimage<{$smarty.foreach.ccblockloop.iteration}>', <{$smarty.foreach.lblockloop.iteration+$smarty.foreach.ccblockloop.iteration}>)"><img id="ccsizeimage<{$smarty.foreach.ccblockloop.iteration}>" src="<{$xoops_imageurl}>minimize.gif" alt="Click me if you want to minimize this block" />a>
    legend>
        <
div  id="resizeccblock<{$smarty.foreach.ccblockloop.iteration}>" class="blockContent"><{$block.content}>div>
      fieldset>
    div>
    div>
    div>
            <{/foreach}>
            

            td>
          tr>
          <
tr>
            <
td id="centerLcolumn">

            
              <{foreach 
name=clblockloop item=block from=$xoops_clblocks}>
    <
div id="cldropzone<{$smarty.foreach.clblockloop.iteration}>">
    <
div id="DDclblock<{$smarty.foreach.clblockloop.iteration}>">
    <
div style="padding: 0px 0px 0px 8px;">
      <
fieldset>
        <
legend class="blockTitle"><{$block.title}>
    <
a href="javascript:toggleSelect('xoopsDDclblock<{$smarty.foreach.clblockloop.iteration}>', 'DDclblock<{$smarty.foreach.clblockloop.iteration}>', 'cldragimage<{$smarty.foreach.clblockloop.iteration}>', <{$smarty.foreach.lblockloop.iteration+$smarty.foreach.ccblockloop.iteration+$smarty.foreach.clblockloop.iteration}> );"><img id="cldragimage<{$smarty.foreach.clblockloop.iteration}>" src="<{$xoops_imageurl}>drag.gif" alt="Click me if you want to drag this block" />a>&nbsp;<a href="javascript:toggleEffect('resizeclblock<{$smarty.foreach.clblockloop.iteration}>', 'clsizeimage<{$smarty.foreach.clblockloop.iteration}>', <{$smarty.foreach.lblockloop.iteration+$smarty.foreach.ccblockloop.iteration+$smarty.foreach.clblockloop.iteration}>)"><img id="clsizeimage<{$smarty.foreach.clblockloop.iteration}>" src="<{$xoops_imageurl}>minimize.gif" alt="Click me if you want to minimize this block" />a>
    legend>
        <
div  id="resizeclblock<{$smarty.foreach.clblockloop.iteration}>" class="blockContent"><{$block.content}>div>
      fieldset>
    div>
    div>
    div>
              <{/foreach}>
            

            td><td id="centerRcolumn">

            
              <{foreach 
name=crblockloop item=block from=$xoops_crblocks}>
    <
div id="crdropzone<{$smarty.foreach.crblockloop.iteration}>">
    <
div id="DDcrblock<{$smarty.foreach.crblockloop.iteration}>">
    <
div style="padding: 0px 5px 0px 0px;">
      <
fieldset>
        <
legend class="blockTitle"><{$block.title}>
    <
a href="javascript:toggleSelect('xoopsDDcrblock<{$smarty.foreach.crblockloop.iteration}>', 'DDcrblock<{$smarty.foreach.crblockloop.iteration}>', 'crdragimage<{$smarty.foreach.crblockloop.iteration}>', <{$smarty.foreach.lblockloop.iteration+$smarty.foreach.ccblockloop.iteration+$smarty.foreach.clblockloop.iteration+$smarty.foreach.crblockloop.iteration}> );"><img id="crdragimage<{$smarty.foreach.crblockloop.iteration}>" src="<{$xoops_imageurl}>drag.gif" alt="Click me if you want to drag this block" />a>&nbsp;<a href="javascript:toggleEffect('resizecrblock<{$smarty.foreach.crblockloop.iteration}>', 'crsizeimage<{$smarty.foreach.crblockloop.iteration}>', <{$smarty.foreach.lblockloop.iteration+$smarty.foreach.ccblockloop.iteration+$smarty.foreach.clblockloop.iteration+$smarty.foreach.crblockloop.iteration}>)"><img id="crsizeimage<{$smarty.foreach.crblockloop.iteration}>" src="<{$xoops_imageurl}>minimize.gif" alt="Click me if you want to minimize this block" />a>
    legend>
        <
div  id="resizecrblock<{$smarty.foreach.crblockloop.iteration}>" class="blockContent"><{$block.content}>div>
      fieldset>
    div>
    div>
    div>
              <{/foreach}>
            

            td>
          tr>
        table>

        <{/if}>
        

        <
div id="content">
          <{
$xoops_contents}>
        div>
      td>

      <{if 
$xoops_showrblock == 1}>

      <
td id="rightcolumn">
        
        <{foreach 
name=rblockloop item=block from=$xoops_rblocks}>
    <
div id="rdropzone<{$smarty.foreach.rblockloop.iteration}>">
    <
div id="DDrblock<{$smarty.foreach.rblockloop.iteration}>">
    <
div class="blockTitle"><{$block.title}>
    <
a href="javascript:toggleSelect('xoopsDDrblock<{$smarty.foreach.rblockloop.iteration}>', 'DDrblock<{$smarty.foreach.rblockloop.iteration}>', 'rdragimage<{$smarty.foreach.rblockloop.iteration}>', <{$smarty.foreach.lblockloop.iteration+$smarty.foreach.ccblockloop.iteration+$smarty.foreach.clblockloop.iteration+$smarty.foreach.crblockloop.iteration+$smarty.foreach.rblockloop.iteration}> );"><img id="rdragimage<{$smarty.foreach.rblockloop.iteration}>" src="<{$xoops_imageurl}>drag.gif" alt="Click me if you want to drag this block" />a>&nbsp;<a href="javascript:toggleEffect('resizerblock<{$smarty.foreach.rblockloop.iteration}>', 'rsizeimage<{$smarty.foreach.rblockloop.iteration}>', <{$smarty.foreach.lblockloop.iteration+$smarty.foreach.ccblockloop.iteration+$smarty.foreach.clblockloop.iteration+$smarty.foreach.crblockloop.iteration+$smarty.foreach.rblockloop.iteration}>)"><img id="rsizeimage<{$smarty.foreach.rblockloop.iteration}>" src="<{$xoops_imageurl}>minimize.gif" alt="Click me if you want to minimize this block" />a>
    div>
        <
div  id="resizerblock<{$smarty.foreach.rblockloop.iteration}>" class="blockContent"><{$block.content}>div>
    div>
    div>
        <{/foreach}>
        
      td>

      <{/if}>

    tr>
  table>

4)That's all! Just enjoy!!

--------------------------------
in case of only D&D
--------------------------------
1) add this after css link


2) add this after xoops_js
<script type="text/javascript">

script>


<
script type="text/javascript">

script>

3) modify each block-loop like this!
ex)
<table cellspacing="0">
    <
tr>
      <
td id="leftcolumn">
        
        <{foreach 
name=lblockloop item=block from=$xoops_lblocks}>
    <
div id="ldropzone<{$smarty.foreach.lblockloop.iteration}>">
    <
div id="DDlblock<{$smarty.foreach.lblockloop.iteration}>">
    <
div class="blockTitle">
    <{
$block.title}>
    <
a href="javascript:toggleSelect('xoopsDDlblock<{$smarty.foreach.lblockloop.iteration}>', 'DDlblock<{$smarty.foreach.lblockloop.iteration}>', 'ldragimage<{$smarty.foreach.lblockloop.iteration}>', <{$smarty.foreach.lblockloop.iteration}> );"><img id="ldragimage<{$smarty.foreach.lblockloop.iteration}>" src="<{$xoops_imageurl}>drag.gif" alt="Click me if you want to drag this block" />a>
    div>
    <
div class="blockContent">
    <{
$block.content}>
    div>
    div>
    div>
        <{/foreach}>
        

      td>

      <
td id="centercolumn">

        
        <{if 
$xoops_showcblock == 1}>

        <
table cellspacing="0">
          <
tr>
            <
td id="centerCcolumn" colspan="2">

            
            <{foreach 
name=ccblockloop item=block from=$xoops_ccblocks}>
    <
div id="ccdropzone<{$smarty.foreach.ccblockloop.iteration}>">
    <
div id="DDccblock<{$smarty.foreach.ccblockloop.iteration}>">
    <
div style="padding: 5px;">
      <
fieldset>
        <
legend class="blockTitle"><{$block.title}>
    <
a href="javascript:toggleSelect('xoopsDDccblock<{$smarty.foreach.ccblockloop.iteration}>', 'DDccblock<{$smarty.foreach.ccblockloop.iteration}>', 'ccdragimage<{$smarty.foreach.ccblockloop.iteration}>', <{$smarty.foreach.lblockloop.iteration+$smarty.foreach.ccblockloop.iteration}> );"><img id="ccdragimage<{$smarty.foreach.ccblockloop.iteration}>" src="<{$xoops_imageurl}>drag.gif" alt="Click me if you want to drag this block" />a>
    legend>
        <
div class="blockContent"><{$block.content}>div>
      fieldset>
    div>
    div>
    div>
            <{/foreach}>
            

            td>
          tr>
          <
tr>
            <
td id="centerLcolumn">

            
              <{foreach 
name=clblockloop item=block from=$xoops_clblocks}>
    <
div id="cldropzone<{$smarty.foreach.clblockloop.iteration}>">
    <
div id="DDclblock<{$smarty.foreach.clblockloop.iteration}>">
    <
div style="padding: 0px 0px 0px 8px;">
      <
fieldset>
        <
legend class="blockTitle"><{$block.title}>
    <
a href="javascript:toggleSelect('xoopsDDclblock<{$smarty.foreach.clblockloop.iteration}>', 'DDclblock<{$smarty.foreach.clblockloop.iteration}>', 'cldragimage<{$smarty.foreach.clblockloop.iteration}>', <{$smarty.foreach.lblockloop.iteration+$smarty.foreach.ccblockloop.iteration+$smarty.foreach.clblockloop.iteration}> );"><img id="cldragimage<{$smarty.foreach.clblockloop.iteration}>" src="<{$xoops_imageurl}>drag.gif" alt="Click me if you want to drag this block" />a>
    legend>
        <
div class="blockContent"><{$block.content}>div>
      fieldset>
    div>
    div>
    div>
              <{/foreach}>
            

            td><td id="centerRcolumn">

            
              <{foreach 
name=crblockloop item=block from=$xoops_crblocks}>
    <
div id="crdropzone<{$smarty.foreach.crblockloop.iteration}>">
    <
div id="DDcrblock<{$smarty.foreach.crblockloop.iteration}>">
    <
div style="padding: 0px 5px 0px 0px;">
      <
fieldset>
        <
legend class="blockTitle"><{$block.title}>
    <
a href="javascript:toggleSelect('xoopsDDcrblock<{$smarty.foreach.crblockloop.iteration}>', 'DDcrblock<{$smarty.foreach.crblockloop.iteration}>', 'crdragimage<{$smarty.foreach.crblockloop.iteration}>', <{$smarty.foreach.lblockloop.iteration+$smarty.foreach.ccblockloop.iteration+$smarty.foreach.clblockloop.iteration+$smarty.foreach.crblockloop.iteration}> );"><img id="crdragimage<{$smarty.foreach.crblockloop.iteration}>" src="<{$xoops_imageurl}>drag.gif" alt="Click me if you want to drag this block" />a>
    legend>
        <
div class="blockContent"><{$block.content}>div>
      fieldset>
    div>
    div>
    div>
              <{/foreach}>
            

            td>
          tr>
        table>

        <{/if}>
        

        <
div id="content">
          <{
$xoops_contents}>
        div>
      td>

      <{if 
$xoops_showrblock == 1}>

      <
td id="rightcolumn">
        
        <{foreach 
name=rblockloop item=block from=$xoops_rblocks}>
    <
div id="rdropzone<{$smarty.foreach.rblockloop.iteration}>">
    <
div id="DDrblock<{$smarty.foreach.rblockloop.iteration}>">
    <
div class="blockTitle"><{$block.title}>
    <
a href="javascript:toggleSelect('xoopsDDrblock<{$smarty.foreach.rblockloop.iteration}>', 'DDrblock<{$smarty.foreach.rblockloop.iteration}>', 'rdragimage<{$smarty.foreach.rblockloop.iteration}>', <{$smarty.foreach.lblockloop.iteration+$smarty.foreach.ccblockloop.iteration+$smarty.foreach.clblockloop.iteration+$smarty.foreach.crblockloop.iteration+$smarty.foreach.rblockloop.iteration}> );"><img id="rdragimage<{$smarty.foreach.rblockloop.iteration}>" src="<{$xoops_imageurl}>drag.gif" alt="Click me if you want to drag this block" />a>
    div>
        <
div class="blockContent"><{$block.content}>div>
    div>
    div>
        <{/foreach}>
        
      td>

      <{/if}>

    tr>
  table>

4)That's all! Just enjoy!!

--------------------------------
in case of only Resizing
--------------------------------
1) add this after css link


2) add this after xoops_js
<script type="text/javascript">

script>

3) modify each block-loop like this!
ex)
<table cellspacing="0">
    <
tr>
      <
td id="leftcolumn">
        
        <{foreach 
name=lblockloop item=block from=$xoops_lblocks}>
    <
div class="blockTitle">
    <{
$block.title}>
    <
a href="javascript:toggleEffect('resizelblock<{$smarty.foreach.lblockloop.iteration}>', 'lsizeimage<{$smarty.foreach.lblockloop.iteration}>', <{$smarty.foreach.lblockloop.iteration}>)"><img id="lsizeimage<{$smarty.foreach.lblockloop.iteration}>" src="<{$xoops_imageurl}>minimize.gif" alt="Click me if you want to minimize this block" />a>
    div>
    <
div id="resizelblock<{$smarty.foreach.lblockloop.iteration}>" class="blockContent">
    <{
$block.content}>
    div>
        <{/foreach}>
        

      td>

      <
td id="centercolumn">

        
        <{if 
$xoops_showcblock == 1}>

        <
table cellspacing="0">
          <
tr>
            <
td id="centerCcolumn" colspan="2">

            
            <{foreach 
name=ccblockloop item=block from=$xoops_ccblocks}>
    <
div style="padding: 5px;">
      <
fieldset>
        <
legend class="blockTitle"><{$block.title}>
    <
a href="javascript:toggleEffect('resizeccblock<{$smarty.foreach.ccblockloop.iteration}>', 'ccsizeimage<{$smarty.foreach.ccblockloop.iteration}>', <{$smarty.foreach.lblockloop.iteration+$smarty.foreach.ccblockloop.iteration}>)"><img id="ccsizeimage<{$smarty.foreach.ccblockloop.iteration}>" src="<{$xoops_imageurl}>minimize.gif" alt="Click me if you want to minimize this block" />a>
    legend>
        <
div  id="resizeccblock<{$smarty.foreach.ccblockloop.iteration}>" class="blockContent"><{$block.content}>div>
      fieldset>
    div>
            <{/foreach}>
            

            td>
          tr>
          <
tr>
            <
td id="centerLcolumn">

            
              <{foreach 
name=clblockloop item=block from=$xoops_clblocks}>
    <
div style="padding: 0px 0px 0px 8px;">
      <
fieldset>
        <
legend class="blockTitle"><{$block.title}>
    <
a href="javascript:toggleEffect('resizeclblock<{$smarty.foreach.clblockloop.iteration}>', 'clsizeimage<{$smarty.foreach.clblockloop.iteration}>', <{$smarty.foreach.lblockloop.iteration+$smarty.foreach.ccblockloop.iteration+$smarty.foreach.clblockloop.iteration}>)"><img id="clsizeimage<{$smarty.foreach.clblockloop.iteration}>" src="<{$xoops_imageurl}>minimize.gif" alt="Click me if you want to minimize this block" />a>
    legend>
        <
div  id="resizeclblock<{$smarty.foreach.clblockloop.iteration}>" class="blockContent"><{$block.content}>div>
      fieldset>
    div>
              <{/foreach}>
            

            td><td id="centerRcolumn">

            
              <{foreach 
name=crblockloop item=block from=$xoops_crblocks}>
    <
div style="padding: 0px 5px 0px 0px;">
      <
fieldset>
        <
legend class="blockTitle"><{$block.title}>
    <
a href="javascript:toggleEffect('resizecrblock<{$smarty.foreach.crblockloop.iteration}>', 'crsizeimage<{$smarty.foreach.crblockloop.iteration}>', <{$smarty.foreach.lblockloop.iteration+$smarty.foreach.ccblockloop.iteration+$smarty.foreach.clblockloop.iteration+$smarty.foreach.crblockloop.iteration}>)"><img id="crsizeimage<{$smarty.foreach.crblockloop.iteration}>" src="<{$xoops_imageurl}>minimize.gif" alt="Click me if you want to minimize this block" />a>
    legend>
        <
div  id="resizecrblock<{$smarty.foreach.crblockloop.iteration}>" class="blockContent"><{$block.content}>div>
      fieldset>
    div>
              <{/foreach}>
            

            td>
          tr>
        table>

        <{/if}>
        

        <
div id="content">
          <{
$xoops_contents}>
        div>
      td>

      <{if 
$xoops_showrblock == 1}>

      <
td id="rightcolumn">
        
        <{foreach 
name=rblockloop item=block from=$xoops_rblocks}>
    <
div class="blockTitle"><{$block.title}>
    <
a href="javascript:toggleEffect('resizerblock<{$smarty.foreach.rblockloop.iteration}>', 'rsizeimage<{$smarty.foreach.rblockloop.iteration}>', <{$smarty.foreach.lblockloop.iteration+$smarty.foreach.ccblockloop.iteration+$smarty.foreach.clblockloop.iteration+$smarty.foreach.crblockloop.iteration+$smarty.foreach.rblockloop.iteration}>)"><img id="rsizeimage<{$smarty.foreach.rblockloop.iteration}>" src="<{$xoops_imageurl}>minimize.gif" alt="Click me if you want to minimize this block" />a>
    div>
        <
div  id="resizerblock<{$smarty.foreach.rblockloop.iteration}>" class="blockContent"><{$block.content}>div>
        <{/foreach}>
        
      td>

      <{/if}>

    tr>
  table>

4)That's all! Just enjoy!!
--------------------------------------------

From wanikoo

3
wanikoo
Re: XOOPS(Cube) Default Theme Hack-(Block Drag&Drop&Resize Theme Hack)
  • 2006/4/3 13:06

  • wanikoo

  • Not too shy to talk

  • Posts: 129

  • Since: 2003/12/27


Quote:

I wrote:
modify each block-loop like this!

Umm...
Be careful about
href="(tammairanslip)

lol
this forum system filters javascript-related words.
anyway..
it should be
href="j a v a s c r i p t:

..anyway..
please,refer to file source!

4
defwind77
Re: XOOPS(Cube) Default Theme Hack-(Block Drag&Drop&Resize Theme Hack)
  • 2006/4/3 15:05

  • defwind77

  • Not too shy to talk

  • Posts: 180

  • Since: 2005/11/11


this sounds interesting, but as there's no demo site I'll have to leave it for now...

5
wanikoo
Re: XOOPS(Cube) Default Theme Hack-(Block Drag&Drop&Resize Theme Hack)
  • 2006/4/3 18:51

  • wanikoo

  • Not too shy to talk

  • Posts: 129

  • Since: 2003/12/27


Some typo fixed in themes for XOOPS Cube 2.1.
If you have never seen this message before and use XOOPS Cube 2.1alpha, please download it again.
No change in themes for XOOPS 2.0.x and XOOPS 2.0 JP.

You can download it here:
http://dev.xoops.org/modules/xfmod/project/showfiles.php?group_id=1189&release_id=967&dl=2348

Quote:

defwind77 wrote:
this sounds interesting, but as there's no demo site I'll have to leave it for now...

Hi,defwind77
Umm...
I've installed these themes in my XOOPS Korean Support Site!

XOOPS Korean Support Site:
http://kjw0815.codns.com/wanisys/korean/xoops/html/

6
rowdie
Re: XOOPS(Cube) Default Theme Hack-(Block Drag&Drop&Resize Theme Hack)
  • 2006/4/3 19:23

  • rowdie

  • Just can't stay away

  • Posts: 846

  • Since: 2004/7/21


Very cool

Nice work!

7
studioC
Re: XOOPS(Cube) Default Theme Hack-(Block Drag&Drop&Resize Theme Hack)
  • 2006/4/3 19:26

  • studioC

  • Friend of XOOPS

  • Posts: 922

  • Since: 2003/12/7


thanks for sharing this, wanikoo

8
wanikoo
Re: XOOPS(Cube) Default Theme Hack-(Block Drag&Drop&Resize Theme Hack)
  • 2006/4/20 17:55

  • wanikoo

  • Not too shy to talk

  • Posts: 129

  • Since: 2003/12/27


// ------------------------------------------------------------------------ //
// XOOPS Cube/XOOPS Default Theme Hack Ver3.0 //
// Just enjoy! Internet for everyone!! //
// wanikoo < http://www.wanisys.net/ > /
// ------------------------------------------------------------------------ //
// Based on XOOPS Cube/XOOPS Default Theme //
// ---JavaScript Author-- //
// - prototype.js ( Sam Stephenson http://prototype.conio.net/ ) //
// - rico.js ( Sabre Airline Solutions http://openrico.org/rico/ ) //
// - Scriptaculous ( Thomas Fuchs http://script.aculo.us ) //
// ------------------------------------------------------------------------ //


With this Theme,
You can D&D(Drag and Drop) each block of your XOOPS Cube/XOOPS Site!
It means visitor can reorder blocks freely by D&Ding each of them.
^^;;
-Ver3.0-
Now you can slide up/down each block and each blocksecton of your XOOPS Cube/XOOPS Site.
and
With Handle,you can D&D(Drag and Drop) each block of your XOOPS Cube/XOOPS Site.

-Ver2.0-
Now you can minimize/restore each block of your XOOPS Cube/XOOPS Site like Windows.

Download:(Ver3.0)
http://dev.xoops.org/modules/xfmod/project/showfiles.php?group_id=1189&release_id=967&dl=2394

-----------------------

---------------------

.New themes(with new functions) added to this package.
( You can slide up/down each block or each blocksecton(ex:left blocksection) of your XOOPS Cube Site. )
( With Handle,you can D&D(Drag and Drop) each block of your XOOPS Cube/XOOPS Site. )

-------------------------------------------------------------------------------
Ver3.0 New themes added to this package!
------------------------------------------------------------------------------
--------------------
cube_dd2default theme ( for XOOPS Cube 2.1 )
---------------------
Name="Default Theme-DD2(Drag and Drop with Handle) Version"
Depends=Legacy_RenderSystem
Url="http://xoopscube.org and http://www.wanisys.net/"
Version="3.00"
Author=XOOPS Cube Project Team and Wanikoo and Authors of scriptaculous and prototype
ScreenShot="screenshot.png"
Description="Default theme-DD2(Drag and Drop with Handle)Version of XOOPS Cube 2.1"

--------------------
cube_dd3default theme ( for XOOPS Cube 2.1 )
---------------------
Name="Default Theme-DD3(Free Drag and Drop with Handle) Version"
Depends=Legacy_RenderSystem
Url="http://xoopscube.org and http://www.wanisys.net/"
Version="3.00"
Author=XOOPS Cube Project Team and Wanikoo and Authors of scriptaculous and prototype
ScreenShot="screenshot.png"
Description="Default theme-DD3(Free Drag and Drop with Handle)Version of XOOPS Cube 2.1"

--------------------
cube_size2default theme ( for XOOPS Cube 2.1 )
---------------------
Name="Default Theme-SIZE2(Slide Resize) Version"
Depends=Legacy_RenderSystem
Url="http://xoopscube.org and http://www.wanisys.net/"
Version="3.00"
Author=XOOPS Cube Project Team and Wanikoo and Authors of scriptaculous and prototype
ScreenShot="screenshot.png"
Description="Default theme-SIZE2(Slide Resize) Version of XOOPS Cube 2.1"

--------------------
cube_size3default theme ( for XOOPS Cube 2.1 )
---------------------
Name="Default Theme-SIZE3(Slide Resize Dx) Version"
Depends=Legacy_RenderSystem
Url="http://xoopscube.org and http://www.wanisys.net/"
Version="3.00"
Author=XOOPS Cube Project Team and Wanikoo and Authors of scriptaculous and prototype
ScreenShot="screenshot.png"
Description="Default theme-SIZE (Slide Resize Dx) Version of XOOPS Cube 2.1"

------------------
dd2default theme ( for XOOPS 2.0.x JP)
-------------------
Name="Default Theme-DD2(Drag and Drop with handle)Version"
Url="http://xoopscube.org and http://www.wanisys.net"
Version="3.00"
Author=XOOPS Cube Project Team and Wanikoo and Authors of scriptaculous and prototype
ScreenShot="screenshot.png"
Description="Default theme-DD2(Drag and Drop with handle)Version of XOOPS 2.0 JP"
------------------
dd3default theme ( for XOOPS 2.0.x JP)
-------------------
Name="Default Theme-DD3(Free Drag and Drop with handle)Version"
Url="http://xoopscube.org and http://www.wanisys.net"
Version="3.00"
Author=XOOPS Cube Project Team and Wanikoo and Authors of scriptaculous and prototype
ScreenShot="screenshot.png"
Description="Default theme-DD3(Free Drag and Drop with handle)Version of XOOPS 2.0 JP"
------------------
size2default theme ( for XOOPS 2.0.x JP)
-------------------
Name="Default Theme-SIZE2(Slide Resize) Version"
Url="http://xoopscube.org and http://www.wanisys.net"
Version="3.00"
Author=XOOPS Cube Project Team and Wanikoo and Authors of scriptaculous and prototype
ScreenShot="screenshot.png"
Description="Default theme-SIZE2(Slide Resize) Version of XOOPS 2.0 JP"
------------------
size3default theme ( for XOOPS 2.0.x JP)
-------------------
Name="Default Theme-SIZE3(Slide Resize Dx) Version"
Url="http://xoopscube.org and http://www.wanisys.net"
Version="3.00"
Author=XOOPS Cube Project Team and Wanikoo and Authors of scriptaculous and prototype
ScreenShot="screenshot.png"
Description="Default theme-SIZE3(Slide Resize Dx) Version of XOOPS 2.0 JP"

-------------------------------------------------------------------------------
------------------
dd2xdefault theme ( for XOOPS 2.0.x)
-------------------
Name="Default Theme-DD2(Drag and Drop with handle)Version"
Url="https://xoops.org and http://www.wanisys.net"
Version="3.00"
Author=XOOPS Project Team and Wanikoo and Authors of scriptaculous and prototype
ScreenShot="screenshot.png"
Description="Default theme-DD2(Drag and Drop with handle)Version of XOOPS 2.0.x"
------------------
dd3xdefault theme ( for XOOPS 2.0.x)
-------------------
Name="Default Theme-DD3(Free Drag and Drop with handle)Version"
Url="https://xoops.org and http://www.wanisys.net"
Version="3.00"
Author=XOOPS Project Team and Wanikoo and Authors of scriptaculous and prototype
ScreenShot="screenshot.png"
Description="Default theme-DD3(Free Drag and Drop with handle)Version of XOOPS 2.0.x"
------------------
size2xdefault theme ( for XOOPS 2.0.x)
-------------------
Name="Default Theme-SIZE2(Slide Resize) Version"
Url="https://xoops.org and http://www.wanisys.net"
Version="3.00"
Author=XOOPS Project Team and Wanikoo and Authors of scriptaculous and prototype
ScreenShot="screenshot.png"
Description="Default theme-SIZE2(Slide Resize) Version of XOOPS 2.0.x"
------------------
size3xdefault theme ( for XOOPS 2.0.x)
-------------------
Name="Default Theme-SIZE3(Slide Resize Dx) Version"
Url="https://xoops.org and http://www.wanisys.net"
Version="3.00"
Author=XOOPS Project Team and Wanikoo and Authors of scriptaculous and prototype
ScreenShot="screenshot.png"
Description="Default theme-SIZE3(Slide Resize Dx) Version of XOOPS 2.0.x"
--------------------------------------------------------------------------------


-----------------------------------------
Credit of Javascripts used in these themes
-----------------------------------------
prototype.js
/* Prototype JavaScript framework, version 1.4.0
* (c) 2005 Sam Stephenson
*
* Prototype is freely distributable under the terms of an MIT-style license.
* For details, see the Prototype web site: http://prototype.conio.net/
*
/*--------------------------------------------------------------------------*/

Rico.js
/**
*
* Copyright 2005 Sabre Airline Solutions
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this
* file except in compliance with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under the
* License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
* either express or implied. See the License for the specific language governing permissions
* and limitations under the License.
**/

scriptaculous.js
// Copyright (c) 2005 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us)
// MIT-style license
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:

------------------
Browser Support:
------------------
This has been tested on IE 5.5, IE 6, Firefox 1.0x/Win, Camino/Mac, Firefox 1.5x/Mac.
( Currently, not supported on Safari )
-------------------
How to install
------------------
Just copy it to /themes dir.
and..
Make it workable through Preference configuration section of Admin menu
----------------

----------------------------------------------------------------------------------
How to apply new func(of Ver3.0) to other XOOPS Cube/XOOPS themes
---------------------------------------------------------------------------------
You can easily apply these functions( (Free)D&D with handle and Slide Resize of Block orBlockSection ) to other XOOPS(Cube) Themes!
1) add this after css link


2) add some javascript code after xoops_js
please refer to theme.html of each theme ! You can easily find it.
3) modify each block-loop refering to theme.html of each theme!
I believe you can do this job easily.

--------------------------------------------

From wanikoo

the most educational site, wanisys.net

9
script_fu
Re: XOOPS(Cube) Default Theme Hack-(Block Drag&Drop&Resize Theme Hack)

Interesting concept...

http://www.dotnetnuke.com

They have been doing this for years. You can also edit your content and move/re-arrange blocks right on the front page when logged in as admin.

10
damaster
Re: XOOPS(Cube) Default Theme Hack-(Block Drag&Drop&Resize Theme Hack)
  • 2006/4/20 23:07

  • damaster

  • Just can't stay away

  • Posts: 556

  • Since: 2003/5/11


Quote:

script_fu wrote:
Interesting concept...

http://www.dotnetnuke.com

They have been doing this for years. You can also edit your content and move/re-arrange blocks right on the front page when logged in as admin.



Yep, but you can't run it on your XOOPS Site!


And this is Xoops, XOOPS Cube !

I like people more than machines or money. But that's me!
Lets do something good and great: Lets do open source!

Login

Who's Online

353 user(s) are online (256 user(s) are browsing Support Forums)


Members: 0


Guests: 353


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits