vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   Collapsable forums on forum home (https://vborg.vbsupport.ru/showthread.php?t=33961)

Master Ares 01-12-2002 11:27 PM

Ok maybe I'm on crack here but I've followed everything to the letter within the 3b release at the start of those thread, and I get 1 of 2 errors depending on what I do with the jscript file.

1) if I use the one in the readme, when y ou hit + or - nothing happens. I see it zoom by with its call to the updatethread file but notta. This occurs on two different machine though both use IE6+ with XP.

2) if I use the one that adds the

document.getElementById('f'+itemID+'z').style.visi bility="visible";

line (in the template_options file included with the archive) then I get an error line 72 when I contract (object required) and at line 98 when I expand (object required). For the life of me I can't see the error so maybe you've run into it and I have yet to see this question asked in this thread which it may have but I have missed it :D

Anyways thanks for any help.

Site = http://forums.endlessfantasy.com

net ba 01-12-2002 11:30 PM

Works like a charm

dabean 01-12-2002 11:40 PM

Master Ares, for you forum setup you need to use the version in the read me and upon visiting your site it was obvious to me that your forumhome_level2_post template had not been altered to include... id="f$forum[parentid]z$z" $fhomeexpandstyle (hint <tr align="center"> where to put those bits is discribed in the readme. Additionally you need make that modification to the forumhome_level2_nopost template because you have level2 forums that don't contain posts.

Master Ares 01-12-2002 11:45 PM

Hah I knew I missed something:-) Thanks muchly

Works perfectly now:-) Thanks again. I put the changes in the forumbit not forumhome section:-P

dabean 01-12-2002 11:52 PM

Master Ares, easy enough mistake to make. ;)

Erwin 01-13-2002 01:09 AM

Cool hack! Works like a charm! Easy to make mistakes with this one - follow the instructions CAREFULLY! :)

incursio 01-13-2002 01:23 PM

It seems to work here, but unless I've botched the install, I may have found a bug.

Lets say I go to the forums home page, and close all the sections but 2 of them. That seems to have worked fine - it remembers it, even when I revisit the site. However, if I open up a new section, then visit one of the forums inside of that section, then reload the forums home page, only my original sections are left open (i..e the 3rd one is still closed). Any ideas?

incursio 01-13-2002 01:29 PM

Another update. I've closed all the sections, then reloaded, and they are still closed. I open one, reload, they are all still closed.

dabean 01-13-2002 03:15 PM

incursio, does it remeber setting for any section you open after collapsing it?

as a test try http://<yourforums>/updateindex.php?fid=<categoryid>&val=0 where categoryid is a forum you have collapsed. That should expand the the forum.

StarBuG 01-13-2002 04:14 PM

I just can say:

Guys... THIS HACK WORKS GREAT!!!

Thank you so much dabean for coding it and for your GREAT support!!

Greetings

StarBuG

Martz 01-13-2002 04:41 PM

Yup, it works great for me too!

5 Stars

incursio 01-13-2002 07:15 PM

Quote:

Originally posted by dabean
incursio, does it remeber setting for any section you open after collapsing it?

as a test try http://<yourforums>/updateindex.php?fid=<categoryid>&val=0 where categoryid is a forum you have collapsed. That should expand the the forum.

Yes, that works fine. I load the URL you mention above in one window, then refresh my forums home page in another, and all loads fine.

However, the problem is still there. Take a look:

http://www.wetcanvas.com/forums

Lucky 01-13-2002 07:19 PM

Great hack!

Thanks.

dabean 01-13-2002 08:04 PM

Quote:

Originally posted by incursio


Yes, that works fine. I load the URL you mention above in one window, then refresh my forums home page in another, and all loads fine.

However, the problem is still there. Take a look:

http://www.wetcanvas.com/forums

Thats a old version of the hack.. and by the look of the javascript possibly the orginal db release.. download the latest "3b" release or alternatively.
Change
}
dostatesaveXP(itemID,1);
}

to
dostatesaveXP(itemID,1);
}
}


This problem was cured in later releases.

Sven 01-17-2002 06:48 PM

Possible enhancement?

What about adding an option into the user's cp so they can pre-define which categories to collapse by default?

I really don't know how to code it and I appreciate the current capabilities - but due to the lack of IE to save the settings this would be a great option!

Shenlong 01-17-2002 08:31 PM

figured id try again, this script doesnt work on v2.2.1, just tried it and a blank page is showing, heres my URLs

Index.PHP
Forum.PHP

dabean 01-17-2002 09:48 PM

Quote:

Originally posted by Shenlong
figured id try again, this script doesnt work on v2.2.1, just tried it and a blank page is showing, heres my URLs

Index.PHP
Forum.PHP

Upload getbrowser.php to your admin directory
Upload getforumview.php to your admin directory

Once you've done that it will work.. as there is nothing syntatically wrong the code.

Shenlong 01-17-2002 10:27 PM

Hehe, I did, I did. Theres no error coming up, just the image isnt coming up, here is my templates too:

forumhome_expandjscript
forumhome_expandcontract

dabean 01-17-2002 10:40 PM

Quote:

Originally posted by Shenlong
Hehe, I did, I did. Theres no error coming up, just the image isnt coming up, here is my templates too:

forumhome_expandjscript
forumhome_expandcontract

and you have edited forumhome_forumbit_level1_nopost or forumhome_forumbit_level1_post and forumhome_forumbit_level2_post?

Shenlong 01-17-2002 10:45 PM

aye aye matey! I have, images just wont show up, I will reupload and try again, I got all the files saved in a folder, and didn't even re-edit the templates to switch them back to normal

wait, i was supossed to edit forumhome_lvl_one_post?

the instructions only say nopost

Shenlong 01-17-2002 10:49 PM

just for the record:

forumhome_forumbit_level1_nopost:

PHP Code:

<tr id="cat">
    <
td bgcolor="{categorybackcolor}" colspan="6">$expandcontract<a href="forumdisplay.php?s=$session[sessionhash]&forumid=$forum[forumid]"><normalfont color="{categoryfontcolor}"><b>$forum[title]</b></normalfont></a>
    <
br><smallfont color="{categoryfontcolor}">$forum[description]</smallfont></td>
</
tr

forumhome_forumbit_level2_post:

PHP Code:

<tr id="f$forum[parentid]z$z$fhomeexpandstyle align="center">
    <
td bgcolor="{secondaltcolor}" valign="top"><img src="{imagesfolder}/$forum[onoff].gif" border="0" alt=""></td>
    <
td bgcolor="{firstaltcolor}" align="left"><a href="forumdisplay.php?s=$session[sessionhash]&forumid=$forum[forumid]"><normalfont><b>$forum[title]</b></normalfont></a>
    <
br><smallfont>$forum[description]</smallfont></td>
    <
td bgcolor="{secondaltcolor}"><normalfont>$forum[replycount]</normalfont></td>
    <
td bgcolor="{firstaltcolor}"><normalfont>$forum[threadcount]</normalfont></td>
    <
td bgcolor="{secondaltcolor}"><smallfont>$forum[lastpostinfo]</smallfont></td>
    <
form><td bgcolor="{firstaltcolor}" valign="middle" align="right" nowrap>
<
IMG align="absmiddle" SRC="{imagesfolder}/team.gif">
<
SELECT NAME="newLoc" onChange="jumpPage(this.form.newLoc)" style="font-size: 7pt; background-color: #dfdfdf; font-family: Arial, Tahoma;" maxlength="20">
<
OPTION VALUE="#">moderators</OPTION>
<
OPTION VALUE="#">---------------------</OPTION>
$forum[moderators]</select></td></form></tr


dabean 01-17-2002 10:52 PM

level1_post should only be edited if you don't have parent forums as categories, which generally seems a rare configuration.

Shenlong 01-17-2002 10:54 PM

NM i misunderstood, anyway, i guess this hack just wont work with 2.2.1, thanx for ur help anyway

dabean 01-17-2002 11:10 PM

This hack will and does work with vb 2.2.1.

Shenlong 01-17-2002 11:25 PM

apparently not for me

I gave u links to everyone of my files, posted my edited templates here, and if u looked through them and approved, not much more I can do to fix

dabean 01-17-2002 11:49 PM

Shenlong : try this attached style, upload it as a NEW style and change your style to use it. Do not upload it on top of your existing style(s) as it will overwrite them.

Shenlong 01-18-2002 01:07 AM

what shall I name it?

dabean 01-18-2002 01:16 AM

Quote:

Originally posted by dabean
Shenlong : try this attached style, upload it as a NEW style and change your style to use it. Do not upload it on top of your existing style(s) as it will overwrite them.
Anything

Sven 01-18-2002 06:28 AM

Quote:

Originally posted by Shenlong
apparently not for me


I installed it yesterday and it works perfect with 2.2.1!

Just a little annoying though that settings are not saved for users - that's why I asked for the enhancement on the previous page.

Dabean, any comment on this?

Shenlong 01-18-2002 10:27 AM

Quote:

Originally posted by dabean


Anything

so thats gonna help me? cool

dabean 01-18-2002 02:10 PM

Quote:

Originally posted by Sven

I installed it yesterday and it works perfect with 2.2.1!

Just a little annoying though that settings are not saved for users - that's why I asked for the enhancement on the previous page.

Dabean, any comment on this?

They should be saved if the hack is installed correctly..
have you uploaded updateindex.php to your forums directory?

When i visited your site I received a 404 page not found when requesting that file, suggesting it has not been uploaded.

Shenlong: The name that you give the provided style set is not important what is important is that when you view your site via the the provided style the collapse/expand buttons should appear.

Sven 01-18-2002 02:56 PM

I feel like a little dumbass...
I uploaded it to the admin dir....

Now it's working, thx a lot ;)

Arsenik 01-20-2002 06:31 PM

I installed the hack and works the way it was written for. Great job!

It would be very usefull if users could edit their user settings so that the forums status are remembered:

1- select if all the forums should be collapsed or expanded
2- select the categories they want collapsed or expanded
3- choose to use the default settings defined by the admin or not...

Since only the settings defined by the Admin for the default collapse/expand status of categories are remembered it would be nice if the users could edit their settings that way changes are remembered. Since changes arent remembered on the fly it would be a good way around the problem it seems.

dabean 01-20-2002 11:27 PM

Quote:

Originally posted by Arsenik
I installed the hack and works the way it was written for. Great job!

It would be very usefull if users could edit their user settings so that the forums status are remembered:

1- select if all the forums should be collapsed or expanded
2- select the categories they want collapsed or expanded
3- choose to use the default settings defined by the admin or not...

Since only the settings defined by the Admin for the default collapse/expand status of categories are remembered it would be nice if the users could edit their settings that way changes are remembered. Since changes arent remembered on the fly it would be a good way around the problem it seems.

Item 1., I'll consider it for a future version.
Item 2. how is this different to the current behaviour?
Item 3. ditto.

Both item 2 and 3 should be satisfied by hack as it exists currently when correctly installed.

Common installation errors are:
- updateindex.php not being uploaded to the forum directory.
- old version of the forumhome_expandjscript template.. not 100% sure why people are still having problems with this as the current zip contains a working version of the template.

Arsenik 01-21-2002 02:22 AM

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. :(

dabean 01-21-2002 05:42 PM

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.

philphee 01-22-2002 12:46 AM

dabean,

After I reread the instrustions and applied the changes specified to "forumhome_forumbit_level2_post" instead of "forumhome_forumbit_level1_post" it worked like a charm.

(Perhaps I should stop smoking crack :stupid: )

Thanks again for the great hack!!!

mvigod 01-30-2002 02:46 AM

Just for clarity before I install this what exactly is Template_Option.txt in the instructions? What option does this refer to? Have no idea what you mean by

Quote:

If you have the forum, post, threads, template hack

dabean 01-30-2002 12:26 PM

Quote:

Originally posted by mvigod
Just for clarity before I install this what exactly is Template_Option.txt in the instructions? What option does this refer to? Have no idea what you mean by


Basically that exention was provided as a request to cover sites with the template modification that adds a "header" to each grouping.
For a example Scroll back towards the begining somewhere around page 2 or 3 for posts by sirsteve.

mvigod 01-30-2002 05:03 PM

Great hack!

Just installed it, followed the well written instructions and worked perfect on 2.2.1

I tested it on IE on the PC and it works fine...BUT...tried it on IE 5.0 on the Macintosh and when you collapse a forum all the forum titles, thread titles, descriptions and tables below the collapsed forum get squeezed to the left (take up maybe 30% of the left hand side of the table instead of running normally to fill the whole table left to right).

If you have a Mac with IE you can test it at my forum to see it.

http://www.rcuniverse.com

Any idea how to fix?

Also attached some images to match the default vbulletin style for anyone who wants them.

marc


All times are GMT. The time now is 04:17 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01711 seconds
  • Memory Usage 1,876KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (3)bbcode_php_printable
  • (12)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete