View Single Post
  #117  
Old 01-21-2002, 05:42 PM
dabean dabean is offline
 
Join Date: Oct 2001
Posts: 247
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by Arsenik
I was talking about the Users them selves and not only the Admin of the board.

I mean have the members edit their options and be able to use the settings the Admin selected by default or just not to use it at all if they dont want to. And also have the members be able to select what category they want collapsed or expanded like the Admin but in their own user options and be keept in the db since Collapsing and Expanding the forums on the fly doesnt work well. (the changes arent remembered)

Right now the hack keeps in the db the settings the Admin selects but not what the Members select thats what i was wanting to say. My bad if i wasnt clear.
Um no the users choice to expand or contract a forum is saved in the database with the hack as it exisits currently. This is in addition to admins being able to choose the forums to collapse by default. The the defaults are just that a user overridable default.

To make it clear exactly how this is achived I'll go through the function found in the current version line by line

PHP Code:
function dostatesaveXP (forumIDvalue) {
 var 
ifrm;
 if (
document.getElementById("colapser")) {  <- does the iframe element exist?
 
// okay iframe exists
  
document.getElementById("colapser").setAttribute("src""updateindex.php?s=$session[sessionhash]&fid="+forumID+"&val="+value);  <- set the iframe's SRC to load the preferance update.

  document.getElementById("colapser").style.visibility="visible"; <- make iframe visible
  document.getElementById("colapser").style.display="inline"; <- display iframe

  document.getElementById("colapser").style.visibility="hidden"; <- make iframe invisible
  document.getElementById("colapser").style.display="none"; <- hide iframe
 } else { <- no iframe exists lets make one :)
  ifrm = document.createElement("IFRAME"); <- create the iframe
  ifrm.setAttribute("id","colapser"); <- set its unque identifier
  ifrm.setAttribute("src", "updateindex.php?s=$session[sessionhash]&fid="+forumID+"&val="+value); <-  set the iframe'
s SRC to load the preferance update.
  
ifrm.style.width 80+"px"; <- make the iframe small
  ifrm
.style.height 30+"px"; <- make the iframe small
  
// ifrm.onload = hideframe; <- commented out, useless currently as IE doesn't support this
  
document.body.appendChild(ifrm); <- append the iframe into the document
  document
.getElementById("colapser").style.visibility="hidden"; <- make frame invisible
  document
.getElementById("colapser").style.display="none"; <- hide frame
 
}

Now for clarity the diference between display and visibility is display controls the box visiblity whilst visibility controls the element visiblity.. A display value of none with visibilty of visible would still leave the element visible, but out of "flow" with the other elements. Just like a display value of inline and visibility of hidden would hide the element but leave it's box behind leaving a empty "hole" in the page.
Reply With Quote
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01336 seconds
  • Memory Usage 1,794KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD_SHOWPOST
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_php
  • (1)bbcode_quote
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_box
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit_info
  • (1)postbit
  • (1)postbit_onlinestatus
  • (1)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • reputationlevel
  • showthread
Included Files:
  • ./showpost.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showpost_start
  • bbcode_fetch_tags
  • bbcode_create
  • postbit_factory
  • showpost_post
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • showpost_complete