51
jurgis
toggle show/hide block contents
  • 2004/2/27 13:04

  • jurgis

  • Just popping in

  • Posts: 72

  • Since: 2003/3/20


This is double post, but it seems to fit better here .



52
jurgis
Re: Toggle Show/Hide Title in Blocks
  • 2004/2/27 12:38

  • jurgis

  • Just popping in

  • Posts: 72

  • Since: 2003/3/20


1)
take a look at your theme.html
now U can try sth like (this is for left blocks)
<{foreach item=block from=$xoops_lblocks}>
<{if}> <{$block.title != "block U want to hide"}>
<div class="blockTitle"><{$block.title}></div>
<{/if}>
<div class="blockContent"><{$block.content}></div>
<{/foreach}>


2)
well I have some kind of similar idea to have ability to toggle block content and to set it (in)visible by default.
see in this post how I deal with it now.

3)
I would like even some other very convenient feature - to be able to controll Groups' access to blocks from the blocks panel. (and Groups pane would be left for manipulating member).



53
jurgis
wuold be practical: debug output just to admin's
  • 2004/2/27 12:23

  • jurgis

  • Just popping in

  • Posts: 72

  • Since: 2003/3/20


well, for example I am messing around with some mod or block, whitch is accessible/visible just to admins.

if debug would be shown just to admins, other users wouldn't experience all kinds of notices/warnings from other mods or system (which I am too lazy to fix, as they are not harmfull ;).

I don't want to temporaly close my site, as U understand :).



54
jurgis
Re: Shoutbox Problem
  • 2004/2/26 21:54

  • jurgis

  • Just popping in

  • Posts: 72

  • Since: 2003/3/20


I also had similar problems
in my case I was hacking around.. and I have 2.05 and ShoutBox2Fixed

1) as I remember, soutframe was in not in shoutbox/blocks/ but in shoutbox/ dir.
2) I had a double <head> declaration, that was the problem in my case, I guess
3) there are and several <?php tags , I changed them to <?

thats all..



55
jurgis
warnings with default theme or sth [might be a problem for not working shoutbox]
  • 2004/2/26 12:01

  • jurgis

  • Just popping in

  • Posts: 72

  • Since: 2003/3/20


in debug mode I get
Notice [PHP]: Undefined indexdefault_theme in file class/smarty/plugins/resource.db.php line 17
Notice 
[PHP]: Undefined indexdefault_theme in file class/smarty/plugins/resource.db.php line 23
Notice 
[PHP]: Undefined indexdefault_theme in file class/smarty/plugins/resource.db.php line 71
Notice 
[PHP]: Undefined indexdefault_theme in file class/smarty/plugins/resource.db.php line 77
Notice 
[PHP]: Undefined variablefile_path in file class/smarty/plugins/resource.db.php line 96
Notice 
[PHP]: Undefined indexxoops_lblocks in file class/smarty/Smarty.class.php line 626


and in my shout box I can't write anything - I get
Warning [PHP]: Cannot send session cache limiter headers already sent (output started at /home/ktusa/somsa/public_html/xoops/modules/shoutbox/shoutframe.php:6in file include/common.php line 158
Notice 
[PHP]: Undefined variableusername in file modules/shoutbox/shoutframe.php line 21



56
jurgis
JS: Hide-and-Find blocks
  • 2004/2/22 20:00

  • jurgis

  • Just popping in

  • Posts: 72

  • Since: 2003/3/20


and there is what I managed to use myself
It helps some blocks not to be annoying. U can check athttp://somsa.ktusa.lt/xoops/ (click block Titles :)

theme.html: in column template code I put sth like this
<{foreach item=block from=$xoops_lblocks}> <span style="cursor:hand; cursor: pointer;"  onclick="toggle('<{$block.title}>');" 
<!-- 
cursor style IE handMozilla pointer -->
<
div class="blockTitle"><{$block.title}></div></span>
            <
div id="<{$block.title}>"  class="blockContent"><{$block.content}></div>
            <{/foreach}>


Block template Edit: to hide block content initially
<div id="Recent Topics_inside" style="display:none"
template code...
</
div>

well, here things depend on "Block Title", so they are kind of hardCoded :\, bul efect is worth it :).

js could be included directly in xoops.js or after it in theme.html file.
<script type="text/javascript">
<!--
<{
$xoops_js}>
//-->
</script>
<
script type="text/javascript">
<!-- 
// toggle visibility         sinchronizing 2 nested divs
// in my case all blocks are visible by default 
// _inside block gives ability to make a blok invisible through "Templates management"
function toggletargetId ){
     
target xoopsGetElementByIdtargetId );
     
target2 xoopsGetElementById''targetId '_inside' ); 

var 
base_display_property;
if (
target2) { base_display_property target2.style.display;} // if some value is forced through templates
else { base_display_property target.style.display;};
if ( 
target.style.display == 'none'
 
base_display_property 'none';  // outer div
if (target// I could check it earlier ;)
{if ( base_display_property == "none"){
       
target.style.display "block";
       if (
target2target2.style.display "block";
    } else {
       
target.style.display "none";
       if (
target2target2.style.display "none";
     }
   }
}
-->
</
script>


would be useful some cookie or other session stuff to remember, whicth blocks (contents) (in)visible

some other block-dynamics examples:
http://www.dynamicdrive.com/dynamicindex17/agallery.htm
http://simon.incutio.com/code/js/easytoggle/example2.html
http://www.dyn-web.com/dhtml/slide/slide-onclick.html



57
jurgis
JS rulezz : dynamics not only for menu ;)
  • 2004/2/22 19:02

  • jurgis

  • Just popping in

  • Posts: 72

  • Since: 2003/3/20


Hi, Yesterday I searched a lot about js and css.
found several interesting and even amazing things:

Pure CSS pop-out menus
[to my surprise doesnt work on IE but works on Mozilla :))]
http://www.meyerweb.com/eric/css/edge/menus/demo.html

ToolBox 1
sorting tables, dynamic tree from UL, words search&highlight
http://www.kryogenix.org/code/browser/
Dynamic Tree could be used in threads to reverse the order of posts.
ToolBox 2
Pay attention to "Anchor Position" it can help with Tigra menu in fixed-width columns layout to make it find its position ;)
http://www.mattkruse.com/javascript/

http://www.javascript-games.org/gamelib/

Misc
some nice drag&drop and tooltips
http://www.walterzorn.com
SyntaxHihtglight with js - cute thing
http://simon.incutio.com/js/syntaxHighlight.html
I think, it would also be convenient to use js for message-edit preview (sometimes my bandwith gets on my nerves :\)
FontSize
http://www.dyn-web.com/dhtml/sizefont/
(morehttp://www.stcassociates.com/lab/fontbrowser.html)
fun sutff
http://javascript.internet.com/games/picture-puzzle.html (ups, it made my Moziila not responding..)
http://javascript.internet.com/games/picture-memory.html
evenhttp://javascript.internet.com/games/javascript-chess-with-cpu-oppo.html

I also found more general js API's out there for dealing with DOM.
www.cross-browser.com (X and CBE) //I guess, X is the lightest of all
http://sourceforge.net/projects/dynapi/
http://www.dithered.com/javascript/index.html

a pile of work-arounds www.quirksmode.org

a workaround to deal with non-js browsers
if (document.getElementById){ 
document.write('<style type="text/css">n')
document.write('.dyncontent{display: none; width: 250px; height: 60px;}n')
document.write('</style>')
// could be whatever
}


the idea to get elements by class_name
<script type="text/javascript">
function 
getElementbyClass(classname){
var 
inc=0
var alltags=document.getElementsByTagName("*");
for (
i=0i<alltags.lengthi++){
if (
alltags[i].className==classname)
customcollection[inc++]=alltags[i]
}
}
getElementbyClass("dyncontent")
</
script>




58
jurgis
Re: e-learning module developement!!
  • 2004/2/17 21:11

  • jurgis

  • Just popping in

  • Posts: 72

  • Since: 2003/3/20


In pedagogical viewpoint Moodle is the best according to (thers a long article, so Ctr+F ;)
http://www.xplana.com/whitepapers/archives/Open_Source_Courseware

but I am interesed what what will add-up if You modularize it for xoops? - it has nearly optional collection of features
(I mised just ability to comment on eatch given activity)
( ah, well, adn maybe ability to import html files ..)

anyway, maybe I would also try to help a little somehow, good luck to us all



59
jurgis
why no nested ... in newbb
  • 2004/2/17 2:52

  • jurgis

  • Just popping in

  • Posts: 72

  • Since: 2003/3/20


in comments we have flat/threaded/nested

and in newbb just flat/threaded

is it only me, who thinks nested is missing in newbb??
and where is the clue



60
jurgis
xoopsComments module - when U want to search comments
  • 2004/2/16 0:42

  • jurgis

  • Just popping in

  • Posts: 72

  • Since: 2003/3/20


the fread ish in Q and A right there
but i think it's more suitable here .
answers are appreciated anywhere :)




TopTop
« 1 ... 3 4 5 (6) 7 »



Login

Who's Online

191 user(s) are online (128 user(s) are browsing Support Forums)


Members: 0


Guests: 191


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