11
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
<script type="text/javascript" src="<{$xoops_imageurl}>prototype.js"></script>
<script type="text/javascript" src="<{$xoops_imageurl}>rico.js"></script>
2) add this after xoops_js
<script type="text/javascript">
<!--
window.onload = function()
{

<{foreach 
name=lblockcount item=block from=$xoops_lblocks}>
dndMgr.registerDropZone( new Rico.Dropzone("ldropzone<{$smarty.foreach.lblockcount.iteration}>") );
<{/foreach}>

<{if 
$xoops_showcblock == 1}>
<{foreach 
name=ccblockcount item=block from=$xoops_ccblocks}>
dndMgr.registerDropZone( new Rico.Dropzone("ccdropzone<{$smarty.foreach.ccblockcount.iteration}>") );
<{/foreach}>
<{foreach 
name=clblockcount item=block from=$xoops_clblocks}>
dndMgr.registerDropZone( new Rico.Dropzone("cldropzone<{$smarty.foreach.clblockcount.iteration}>") );
<{/foreach}>
<{foreach 
name=crblockcount item=block from=$xoops_crblocks}>
dndMgr.registerDropZone( new Rico.Dropzone("crdropzone<{$smarty.foreach.crblockcount.iteration}>") );
<{/foreach}>
<{/if}>

<{if 
$xoops_showrblock == 1}>
<{foreach 
name=rblockcount item=block from=$xoops_rblocks}>
dndMgr.registerDropZone( new Rico.Dropzone("rdropzone<{$smarty.foreach.rblockcount.iteration}>") );
<{/foreach}>
<{/if}>

}
// -->
</script>


<
script type="text/javascript">
<!--
   var 
selectDone = new Array();
   var 
myDraggable = new Array();

   function 
toggleSelect(typehtmlelementselectimgidnumber) {
      if ( !
selectDone[idnumber] ) {
         
registerD(typehtmlelementidnumber);
         
selectDone[idnumber] = true;
         $(
selectimg).src '<{$xoops_imageurl}>undrag.gif';
         $(
selectimg).alt 'Click me if you want to fix this block';

      }
      else {
         
unregisterD(idnumber);
         
selectDone[idnumber] = false;
         $(
selectimg).src '<{$xoops_imageurl}>drag.gif';
         $(
selectimg).alt 'Click me if you want to drag this block';
      }
   }

   function 
registerD(typehtmlelementidnumber) {
  
myDraggable[idnumber] = new Rico.Draggable(typehtmlelement)
  
dndMgr.registerDraggablemyDraggable[idnumber] );
   }

   function 
unregisterD(idnumber) {
  
dndMgr.deregisterDraggablemyDraggable[idnumber] );
   }

// -->
</script>

<
script type="text/javascript">
<!--
   var 
startHeight = new Array();
   var 
effectDone = new Array();
   var 
original = new Array();
   function 
toggleEffect(resizetargettoggleimgidnum) {
      if ( !
effectDone[idnum] ) {
         
original[idnum] = $(resizetarget).innerHTML;
         $(
resizetarget).innerHTML "";
         
startEffect(resizetarget);
         
effectDone[idnum] = true;
         $(
toggleimg).src '<{$xoops_imageurl}>restore.gif';
         $(
toggleimg).alt 'Click me if you want to restore this block';
      }
      else {
         $(
resizetarget).innerHTML original[idnum];
         
resetEffect(resizetarget);
         
effectDone[idnum] = false;
         $(
toggleimg).src '<{$xoops_imageurl}>minimize.gif';
         $(
toggleimg).alt 'Click me if you want to minimize this block';
      }
   }

   function 
startEffect(resizetarget) {
      
startHeight = $(resizetarget).offsetHeight;
      new 
Rico.Effect.Size( $(resizetarget), null050010, {complete:function() {setStatus();}} );
   }

   function 
setStatus() {
   }

   function 
resetEffect(resizetarget) {
      $(
resizetarget).style.height startHeight;
   }
// -->
</script>

3) modify each block-loop like this!
ex)
<table cellspacing="0">
    <
tr>
      <
td id="leftcolumn">
        <!-- 
Start left blocks loop -->
        <{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}>
        <!-- 
End left blocks loop -->

      </
td>

      <
td id="centercolumn">

        <!-- 
Display center blocks if any -->
        <{if 
$xoops_showcblock == 1}>

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

            <!-- 
Start center-center blocks loop -->
            <{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}>
            <!-- 
End center-center blocks loop -->

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

            <!-- 
Start center-left blocks loop -->
              <{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}>
            <!-- 
End center-left blocks loop -->

            </
td><td id="centerRcolumn">

            <!-- 
Start center-right blocks loop -->
              <{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}>
            <!-- 
End center-right blocks loop -->

            </
td>
          </
tr>
        </
table>

        <{/if}>
        <!-- 
End display center blocks -->

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

      <{if 
$xoops_showrblock == 1}>

      <
td id="rightcolumn">
        <!-- 
Start right blocks loop -->
        <{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}>
        <!-- 
End right blocks loop -->
      </
td>

      <{/if}>

    </
tr>
  </
table>

4)That's all! Just enjoy!!

--------------------------------
in case of only D&D
--------------------------------
1) add this after css link
<script type="text/javascript" src="<{$xoops_imageurl}>prototype.js"></script>
<script type="text/javascript" src="<{$xoops_imageurl}>rico.js"></script>
2) add this after xoops_js
<script type="text/javascript">
<!--
window.onload = function()
{

<{foreach 
name=lblockcount item=block from=$xoops_lblocks}>
dndMgr.registerDropZone( new Rico.Dropzone("ldropzone<{$smarty.foreach.lblockcount.iteration}>") );
<{/foreach}>

<{if 
$xoops_showcblock == 1}>
<{foreach 
name=ccblockcount item=block from=$xoops_ccblocks}>
dndMgr.registerDropZone( new Rico.Dropzone("ccdropzone<{$smarty.foreach.ccblockcount.iteration}>") );
<{/foreach}>
<{foreach 
name=clblockcount item=block from=$xoops_clblocks}>
dndMgr.registerDropZone( new Rico.Dropzone("cldropzone<{$smarty.foreach.clblockcount.iteration}>") );
<{/foreach}>
<{foreach 
name=crblockcount item=block from=$xoops_crblocks}>
dndMgr.registerDropZone( new Rico.Dropzone("crdropzone<{$smarty.foreach.crblockcount.iteration}>") );
<{/foreach}>
<{/if}>

<{if 
$xoops_showrblock == 1}>
<{foreach 
name=rblockcount item=block from=$xoops_rblocks}>
dndMgr.registerDropZone( new Rico.Dropzone("rdropzone<{$smarty.foreach.rblockcount.iteration}>") );
<{/foreach}>
<{/if}>

}
// -->
</script>


<
script type="text/javascript">
<!--
   var 
selectDone = new Array();
   var 
myDraggable = new Array();

   function 
toggleSelect(typehtmlelementselectimgidnumber) {
      if ( !
selectDone[idnumber] ) {
         
registerD(typehtmlelementidnumber);
         
selectDone[idnumber] = true;
         $(
selectimg).src '<{$xoops_imageurl}>undrag.gif';
         $(
selectimg).alt 'Click me if you want to fix this block';

      }
      else {
         
unregisterD(idnumber);
         
selectDone[idnumber] = false;
         $(
selectimg).src '<{$xoops_imageurl}>drag.gif';
         $(
selectimg).alt 'Click me if you want to drag this block';
      }
   }

   function 
registerD(typehtmlelementidnumber) {
  
myDraggable[idnumber] = new Rico.Draggable(typehtmlelement)
  
dndMgr.registerDraggablemyDraggable[idnumber] );
   }

   function 
unregisterD(idnumber) {
  
dndMgr.deregisterDraggablemyDraggable[idnumber] );
   }

// -->
</script>

3) modify each block-loop like this!
ex)
<table cellspacing="0">
    <
tr>
      <
td id="leftcolumn">
        <!-- 
Start left blocks loop -->
        <{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}>
        <!-- 
End left blocks loop -->

      </
td>

      <
td id="centercolumn">

        <!-- 
Display center blocks if any -->
        <{if 
$xoops_showcblock == 1}>

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

            <!-- 
Start center-center blocks loop -->
            <{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}>
            <!-- 
End center-center blocks loop -->

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

            <!-- 
Start center-left blocks loop -->
              <{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}>
            <!-- 
End center-left blocks loop -->

            </
td><td id="centerRcolumn">

            <!-- 
Start center-right blocks loop -->
              <{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}>
            <!-- 
End center-right blocks loop -->

            </
td>
          </
tr>
        </
table>

        <{/if}>
        <!-- 
End display center blocks -->

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

      <{if 
$xoops_showrblock == 1}>

      <
td id="rightcolumn">
        <!-- 
Start right blocks loop -->
        <{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}>
        <!-- 
End right blocks loop -->
      </
td>

      <{/if}>

    </
tr>
  </
table>

4)That's all! Just enjoy!!

--------------------------------
in case of only Resizing
--------------------------------
1) add this after css link
<script type="text/javascript" src="<{$xoops_imageurl}>prototype.js"></script>
<script type="text/javascript" src="<{$xoops_imageurl}>rico.js"></script>
2) add this after xoops_js
<script type="text/javascript">
<!--
   var 
startHeight = new Array();
   var 
effectDone = new Array();
   var 
original = new Array();
   function 
toggleEffect(resizetargettoggleimgidnum) {
      if ( !
effectDone[idnum] ) {
         
original[idnum] = $(resizetarget).innerHTML;
         $(
resizetarget).innerHTML "";
         
startEffect(resizetarget);
         
effectDone[idnum] = true;
         $(
toggleimg).src '<{$xoops_imageurl}>restore.gif';
         $(
toggleimg).alt 'Click me if you want to restore this block';
      }
      else {
         $(
resizetarget).innerHTML original[idnum];
         
resetEffect(resizetarget);
         
effectDone[idnum] = false;
         $(
toggleimg).src '<{$xoops_imageurl}>minimize.gif';
         $(
toggleimg).alt 'Click me if you want to minimize this block';
      }
   }

   function 
startEffect(resizetarget) {
      
startHeight = $(resizetarget).offsetHeight;
      new 
Rico.Effect.Size( $(resizetarget), null050010, {complete:function() {setStatus();}} );
   }

   function 
setStatus() {
   }

   function 
resetEffect(resizetarget) {
      $(
resizetarget).style.height startHeight;
   }
// -->
</script>

3) modify each block-loop like this!
ex)
<table cellspacing="0">
    <
tr>
      <
td id="leftcolumn">
        <!-- 
Start left blocks loop -->
        <{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}>
        <!-- 
End left blocks loop -->

      </
td>

      <
td id="centercolumn">

        <!-- 
Display center blocks if any -->
        <{if 
$xoops_showcblock == 1}>

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

            <!-- 
Start center-center blocks loop -->
            <{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}>
            <!-- 
End center-center blocks loop -->

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

            <!-- 
Start center-left blocks loop -->
              <{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}>
            <!-- 
End center-left blocks loop -->

            </
td><td id="centerRcolumn">

            <!-- 
Start center-right blocks loop -->
              <{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}>
            <!-- 
End center-right blocks loop -->

            </
td>
          </
tr>
        </
table>

        <{/if}>
        <!-- 
End display center blocks -->

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

      <{if 
$xoops_showrblock == 1}>

      <
td id="rightcolumn">
        <!-- 
Start right blocks loop -->
        <{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}>
        <!-- 
End right blocks loop -->
      </
td>

      <{/if}>

    </
tr>
  </
table>

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

From wanikoo



12
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 Stephensonhttp://prototype.conio.net/ ) //
// - rico.js ( Sabre Airline Solutionshttp://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.

-<notice>-
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...)
-----------------------
<How to Use>
---------------------
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!!!!!
----------------------

-----------------------
<change>
---------------------
<ver2.0>
.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.)
--------
<ver1.0>
--------
.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 andhttp://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 andhttp://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 andhttp://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 andhttp://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 andhttp://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 andhttp://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 andhttp://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 andhttp://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 andhttp://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 <sam@conio.net>
*
* 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
----------------
--------------------------------------------



13
wanikoo
Re: Korean language pack for XOOPS 2.2.4x Available!
  • 2006/3/7 19:55

  • wanikoo

  • Not too shy to talk

  • Posts: 129

  • Since: 2003/12/27


Korean language pack upgraded for XOOPS 2.2.4x and 2.0.13!

for EUC-KR
xoops-2.0.13-lang-kr-euckrdiff.zip
xoops-2.2.4x-lang-kr-euckrdiff.zip
for UTF-8
xoops-2.0.13-lang-kr-utf8diff.zip
xoops-2.2.4x-lang-kr-utf8diff.zip

And for XOOPS Cube
xoops-2.0.13-JP-lang-kr-euckrdiff.zip
xoops-2.0.13-JP-lang-kr-utf8diff.zip
for xoopscube2.1(sooner or later)

You can download them at XOOPS korean project page!

Project Name:
XOOPS Korean Version
Project URL:
http://dev.xoops.org/modules/xfmod/project/?group_id=1189

From wanikoo



14
wanikoo
Re: XOOPS PM(Private Message)-Hack
  • 2005/8/16 0:32

  • wanikoo

  • Not too shy to talk

  • Posts: 129

  • Since: 2003/12/27


First,
I feel I have to apologize to you guys using this pm-hack... for no maintenance/upgrade ...for a long time.
Very sorry!!
( Umm...as you guess...many reasons...(--);;
but...I don't want to mention about it.)

Quote:

lina26 wrote...long ago(--;;)
I use this PM Hack at my XOOPS 2.0.10 site.
what about the comapatibility with future XOOPS versions
how to update to XOOPS 2.2

Umm..
I know...XOOPS 2.2.x got its own PM module and this PM-hack definitely needs some modification/upgrade for compatibility with XOOPS 2.2.x.
Umm..
sooner or later...I will !!


Quote:

leandersukov wrote:
The hack is not just two days old

Thank you for your attention to my humble hack.
Umm...
As you wrote, this pm-hack is not just two days old
and
I still have passion for this pm-hack.


Quote:

Mithrandir wrote...long ago(--;;)
if you want to add more functionality, maybe it would be worth thinking about doing it as a module, too?

Umm...
maybe..you're right.
Before..I was a little confused with roadmap of XOOPS.(I mean..PM-module or core-embeded PM-system)
but..now...XOOPS 2.2.x adopts its own..PM-module.
....
I think it's the right time to make a module version of this pm-hack.
Sooner or later I will !!

PS:
Umm...
I am also...a member of XOOPS Japan Community making its own XOOPS-clone(XOOPS Cube)...as you know.
and moreover...a webmaster of XOOPS Korean Support Site.
(btw...We,XOOPS Korean Community decide to continue to adopt XOOPS not XOOPS Cube...)
...Umm...
anyway...this situation really makes me confused...
Sigh!!



15
wanikoo
Re: XOOPS PM(Private Message)-Hack
  • 2005/4/25 11:31

  • wanikoo

  • Not too shy to talk

  • Posts: 129

  • Since: 2003/12/27


Quote:

WarDick wrote:
I have a request. Would it be practicle to add group permissions. I have abusers of the forum who have been placed in groups with limited access and now they are abuseing the pm system.

Umm...
Now..
I have a new idea about Access Control System for this pm-hack!
Maybe you will see it in the next test(^^;;) version.
(......Umm...maybe....^^;; )



16
wanikoo
Re: Let's make XOOPS valid xhtml1.0 transitional!
  • 2005/4/22 17:05

  • wanikoo

  • Not too shy to talk

  • Posts: 129

  • Since: 2003/12/27


Quote:

I mentioned this before:
--------------------------------------------
& -> &amp;
--------------------------------------------
/html/search.php
line 191
$search_url .= "&mid=$mid&action=showall&andor=$andor";
line 253
$search_url .= "&mid=$mid&action=$action&andor=$andor";
line 255
$search_url .= "&uid=$uid";
line 261
$search_url_prev = $search_url."&start=$prev";
line 269
$search_url_next = $search_url."&start=$next";

Umm...
My mistake!
(--);;
----------------
line 253
$search_url .= "&mid=$mid&action=$action&andor=$andor";
line 255
$search_url .= "&uid=$uid";
line 261
$search_url_prev = $search_url."&start=$prev";
line 269
$search_url_next = $search_url."&start=$next";
---------------
these are correct..because it has the process of htmlspecialchars() at the last stage..like this.
echo '<a href="'.htmlspecialchars($search_url_prev).'">'._SR_PREVIOUS.'</a></td>
~~~
echo '
<td align="right"><a href="'.htmlspecialchars($search_url_next).'">'._SR_NEXT.'</a></td>

My stupid mistake(--);;
Sorry!
(--)........-(_._)-.



17
wanikoo
Re: XOOPS PM(Private Message)-Hack
  • 2005/4/20 21:39

  • wanikoo

  • Not too shy to talk

  • Posts: 129

  • Since: 2003/12/27


^^;;
PS:
Interesting Tip from www.xoopscube.jp:
(author:okuhiki)
http://www.xoopscube.jp/modules/newbb/viewtopic.php?topic_id=7923&forum=11&viewmode=flat&order=ASC&start=20
--------
#type1
--------
Quote:

xxx wrote:
test
test1
test2

reply
---------
$type2 ( like e-mail)
---------
xxx wrote:
>test
>test1
>test2
reply

With this tip,
you can use #type2 instead of #type1 when you reply

Just change like this^^
ex: pmlite.php

From:
$message  "[quote]n";
$message .= sprintf(_PM_USERWROTE,$pm_uname);
$message .= "n".$pm->getVar("msg_text""E")."n[/quote]";


To:
//$message  = "[quote]n";
//$message .= sprintf(_PM_USERWROTE,$pm_uname);
$pm_msg_text $pm->getVar("msg_text""E");
$pm_msg_text_split split("n"$pm_msg_text);
$message "[quote]n";
$message .= sprintf(_PM_USERWROTE,$pm_uname);
$message .= "n>".implode("n>"$pm_msg_text_split)."n[/quote]";
//$message .= "n".$pm->getVar("msg_text", "E")."n[/quote]";


Umm...
If you don't need the quote-box, just remove Quote:
and



18
wanikoo
Re: Auto PM greeting?
  • 2005/4/20 20:21

  • wanikoo

  • Not too shy to talk

  • Posts: 129

  • Since: 2003/12/27


Quote:

It's written in Japanese.

^^;;

------------
First, open the file, /html/register.php.
and then find this code!
line 200-209
$newid $newuser->getVar('uid');
        if (!
$member_handler->addUserToGroup(XOOPS_GROUP_USERS$newid)) {
            echo 
_US_REGISTERNG;
            include 
'footer.php';
            exit();
        }
        if (
$xoopsConfigUser['activation_type'] == 1) {
            
redirect_header('index.php'4_US_ACTLOGIN);
            exit();
        }

Just add hack-code(//Welcome PM Hack start ~~ //Welcome PM hack end) like this^^;;
(please, write your own subject and message...instead of mine)
$newid $newuser->getVar('uid');
if (!
$member_handler->addUserToGroup(XOOPS_GROUP_USERS$newid)) {
echo 
_US_REGISTERNG;
include 
'footer.php';
exit();
}

//Welcome PM Hack start
//Yeah,already defined above^^
$pm_handler =& xoops_gethandler('privmessage');
$pm =& $pm_handler->create();
$pm->setVar("subject""Welcome To Wanisys^^and thanks for your join!!");
$pm->setVar("msg_text""Hi^^I am wani,administrator of Wanisys!nThanks for your join!!nHave a nice time!!n");
//Newuser's id
$pm->setVar("to_userid"$newid);
// Admin's id, it's 1 in most case
$pm->setVar("from_userid"1);
if (!
$pm_handler->insert($pm)) {
// echo "Failed to send Welcome Private Message!!";
// No need to echo this failure-message here,I think so!!...Just optional^^
}
//Welcome PM Hack end

if ($xoopsConfigUser['activation_type'] == 1) {
redirect_header('index.php'4_US_ACTLOGIN);
exit();
}



19
wanikoo
Re: XOOPS PM(Private Message)-Hack
  • 2005/4/20 18:51

  • wanikoo

  • Not too shy to talk

  • Posts: 129

  • Since: 2003/12/27


Quote:

Gambero wrote:
It looks ugly (no offense please :P).
There is too many functions on a too small place ... hope you understand me.
I think you could create a box that looks nicer.

^^;;
Umm...
It's the right time to equip this pm-hack with template???
(Frankly speaking,I am not inclined to do this job...
...because I don't think it's absolutely necessary.
Without it, I guess, you can easily change the design of this pm-hack.
Anyway....
I will try to equip this pm-hack with template in the next version.
PS:

Q:There is too many functions on a too small place..
P: You can easily turn each functon of this pm-hack off.. if you don't need it.
Please, read readme.txt for more info.

Quote:

nick_ginie wrote:
May you also add the functions of attaching files
and give a reply to sender that the user have read in the PM?

Q: May you also add the functions of attaching files...
A: Umm...(..I've mentioned it before....)
To my regret, I have no plan to add that function to this pm-hack at this point.
because I still think it's not security-safe...
Q: give a reply to sender that the user have read in the PM?
A: Umm...
I guess you mean a kind of confirmation-reply that assures the sender that receiver really read PM.
(^^;; correct? )
Umm...
In my humble opinion,
I think it's not necessary..in this pm-system...
...because without that function,you can easily judge whether your partner really read/deleted your PM.
Please refer to the definiton of SENTBOX.
-----------------------------
<RECEIVE>
INBOX( For New PMs[delete button])
READBOX(for PMs already read[delete button,save button])
RSAVEBOX(for saved PMs[delete button])
RTRASHBOX(for PMs deleted by you(receiver) but still not deleted by sender.You can undelete these PMs but can't read them in this box.)
<POST>
OUTBOX(Posted PMs, not read or not deleted without reading by your partner[delete button])
SENTBOX(Posted PMs, read or deleted without reading by your partner[delete button,save button])
PSAVEBOX(saved PMs[delete button])
PTRASHBOX(for PMs deleted by you(sender) but still not deleted by receiver. You can undelete this PMs but can't read them in this box.)
-------------------------------



20
wanikoo
Re: XOOPS PM(Private Message)-Hack
  • 2005/4/15 16:52

  • wanikoo

  • Not too shy to talk

  • Posts: 129

  • Since: 2003/12/27


Upgraded to Ver4.7 !!

Umm...
Basically, this upgrade(4.6->4.7) is for Code Refinement.

<Change>
------Ver4.7-------(2005/4/15)
Basically, this upgrade(4.6->4.7) is for Code Refinement.

>>Code Refinement!
I rewrote lots of codes to make this pm-hack valid xhtml1.0 transitional!
please, refer to this topic:
https://xoops.org/modules/newbb/viewtopic.php?topic_id=34205&forum=14
>>User Interface improved!
****************************
Some suggestion from suico:
Is it possible to, when we set that users can t set the refusal or filter, those options disappear from the config form?
ON the [PM System Function Status] could you make it showing only for admins?
The members when they see a feature that is disable he asks us to have it and sometimes we don t want it and don t want to explain why.
Also in the same screen a good idea would be to not show the whole column backup when we chose to not enable backup for members, the way it is we see a column without the options but the column is there
****************************
All fixed and improved!

>>Tiny bugs fixed!!(readpmsg.php etc)
(Just tiny bugs^^;; )
>>Automatic insert of "No subject" message.
Hey! you forgot to write subject?? Don't worry! Now...this pm system will insert "No subject" message automatically.(--;;)
>>Advanced Viewmode upgraded!!
Now you can control font-size of your PM in Advanced View Popup-Window.
(For more visibility and accessibility...)
please, refer to this page:
http://www.alistapart.com/articles/relafont/
----------------------------

How to upgrade 4.6->4.7

1, No change on PM DB^^No touch^^
2, Open this file(/html/language/{yourlanguage}/pmsg.txt[or pmsg_upgrade3x-47.txt])
Add the upgraded contents( under//WANISYS.NET PM HACK4.7) of pmsg.txt to pmsg.php.
3, Overwrite All files into proper directories!!
[Exception] pmhackconfig.php
- If you customized this file for your system, you must not overwrite pmhackconfig.php[/html/pmhackconfig.php and /html/cache/pmhackconfig.php])
4, That'a all! Enjoy this new PM system4.7!!

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

How to install[new install]

1, Open this file(/html/wanipmhack.sql) and execute the sql query on the file^^
( Use phpmyadmin...if you are DB-novice!!Please, watch out table prefix[xoops_])
2, Copy/Overwrite All files into proper directories!!
(You must back-up original files...before this hack!!!!)
[Notice]
- We need /html/modules/newbb/fpdf/ for PM PDF function.(using fpdf of newbb2.0)
but you don't have to install newbb2.0...because it needs just "~/fpdf" ...not all newbb system.
So...
(1)If you have already installed newbb2.0, you don't have to copy it(/html/modules/newbb/fpdf/).
(2)If you're using newbb1.0, Just add ~/fpdf to newbb1.0..(I mean,just copy it)
(3)If you don't have/use newbb, Just make the directory,"/html/modules/newbb/". and Copy it!!
3, Open this file(/html/language/{yourlanguage}/pmsg.txt[and pmsg_upgrade3x-47.txt if it exists])
Add the contents of pmsg.txt to pmsg.php.
4, Open this file(/html/footer.txt)
Add the wanipmhack section(I mean ////////////////WANIPMHACK3.0) of footer.txt to footer.php.
5, That's all!! Enjoy this new PM system!!
PS:
#Download WYSIWYG editors here(Project: WYSIWYG editors for XOOPS)
http://dev.xoops.org/modules/xfmod/project/showfiles.php?group_id=1155
------------------------------

How to uninstall

1, Replace all changed files with your original files.
(html/viewpmsg.php,readpmsg.php,pmlite.php,footer.php)
(html/kernel/privmessage.php)
(html/language/{yourlanguage}/pmsg.php)
2, Delete all new files.
(html/ configpmsg.php, printpmsg.php, backuppmsg.php, pmgrouplite.php, usersearch.php, userkeysearch.php, pmhackconfig.php, overlib_mini.js, pdfpmsg.php, read2pmsg.php)
(html/cache/ pmhackconfig.php)
(html/include/ pm_functions.php)
(html/include/pm/ large.css, medium.css, small.css, style.css, x-small.css, xx-small.css, styleswitcher.js )
(html/kernel/ privmessageconfig.php, pmuserkey.php)
(html/images/ inbox.gif, readbox.gif, rsavebox.gif, rtrashbox.gif, outbox.gif, sentbox.gif, psavebox.gif, ptrashbox.gif, pmhelp.png, xoopspm_slogo.png)
(html/images/icons/ backuppm.gif, forwardpm.gif, gforwardpm.gif, printpm.gif, pmuserkey.gif, pmcheck.gif, pdfpm.gif, pmadvanceview.gif)
(html/images/pmsubject/icon1.gif, pm_normal_u.gif, pm_normal.gif, pm_normal_e.gif, pm_re_u.gif, pm_re.gif, pm_re_e.gif, pm_fw_u.gif, pm_fw.gif, pm_fw_e.gif, pm_gpm_u.gif, pm_gpm.gif, pm_gfw_u.gif, pm_gfw.gif)
3, Open this file(/html/wanipmhack_uninstall.sql) and execute the sql query on the file^^
( Use phpmyadmin...if you are DB-novice!!Please, watch out table prefix[xoops_])
4, That's all!! Very simple^^;;
--------------------------------

Demo:

http://kjw0815.codns.com/wanisys/japanese/xoops/html/modules/news/

Downloads: (All PHP4/PHP5 Compatible and OK!!!!)
------------------------------------------------
-Stable Version => Ver2.85(default)
http://www.wanisys.net/data/wanipmhack.zip
-DB-toolkit for DB-novice(only for Ver2.85!!New install/uninstall)
http://www.wanisys.net/data/wanipmhack_dbtoolkit285.zip
----------------------------------------------------
-Test Version => Ver4.7(+pmconfig+GroupPM+etc)
http://www.wanisys.net/data/wanipmhack47.zip
-DB-toolkit for DB-novice(only for New install/uninstall)
http://www.wanisys.net/data/wanipmhack_dbtoolkit47.zip
---------------------------------------------------

2005/4/15

From wani[wani@wanisys.net]

the most educational site, wanisys.net [http://www.wanisys.net ]
_________________

PS:
Quote:

suico wrote:
ON the [PM System Function Status] could you make it showing only for admins? The members when they see a feature that is disable he asks us to have it and sometimes we don t want it and don t want to explain why.

please, open the file, configpmsg.php
and find this code! (line70-71)

//ver4.7 pm functions status show admin only(1) or not(0)
$pmfunctions_show = 0;

and change 0 to 1 ^^;;




TopTop
« 1 (2) 3 4 5 ... 12 »



Login

Who's Online

310 user(s) are online (202 user(s) are browsing Support Forums)


Members: 0


Guests: 310


more...

Donat-O-Meter

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

Latest GitHub Commits