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)

Martz 01-11-2002 11:44 PM

Ahh thank you - this is a completly different file to the one in the first post!

I'll try this.

/me skips off to bodge the forums...

dabean 01-11-2002 11:46 PM

arrg I'm stupid the readme dated before this post has a misplaced line, (i can only bliam lazyness, copy paste and doing html in notepad ;))

}
dostatesaveXP(itemID,1);

should read

dostatesaveXP(itemID,1);
}

This should fix the save problem.

Please do not use starbug's attachment as it contains this error, I have changed the name and fixed the above error in the attachment on the first post.

StarBuG 01-11-2002 11:52 PM

You are great!!

This corrected the error!!

(By the way: The code to correct is in the forumhome_expandjscript template at the end! ;))

Thank you so much!

Now everything works fine!!

hehe

So it was good I have "beta" tested the hack ;)

Greetings

StarBuG

dabean 01-12-2002 12:12 AM

hehe,starbug. I really need to work on packaging releases ;)

Steve, I've looked over the hack you have installed change the forumexp function in forumhome_expandjscript to read.

[change included in release]

jminiman 01-12-2002 12:18 AM

Quote:

Originally posted by dabean


You need to have a forum depth set to at least 2.
This hack can only collapse forums that would normally appear on the forum home page.

Done, but the collapse/expand icons don't show up as they should. What now?

jminiman 01-12-2002 12:20 AM

Need to set the parent forums as categories--got it!

Martz 01-12-2002 12:20 AM

Should the code look like this then?

PHP Code:

for (0fitems.lengthi++) {
  
fitems[i].style.visibility="hidden";
  
fitems[i].style.display="none";
  }
 
dostatesaveXP(itemID,1);
 }
}
 
//-->
</script

As thats whats in the read me and in the text file. I see IE do the update, but it doesn't seem to take effect.

Thanks.

dabean 01-12-2002 12:28 AM

Quote:

Originally posted by jminiman


Done, but the collapse/expand icons don't show up as they should. What now?

Show up fine for me when I visited your site.. what browser you using?

jminiman 01-12-2002 12:34 AM

I got them to show up, but I much prefer the look of parent forums acting as forums, rather than categories. Is there any way to somehow expand/collapse forums? Why were categories chosen to be collapsed, and not forums? Look at my site now . . . THIS is what I want to expand and collapse. It's much prettier, I think.

I love this look, but people complain that they want to see posted-to forums.

dabean 01-12-2002 12:51 AM

jminiman: put the modifications in * forumhome_forumbit_level1_post
insted of * forumhome_forumbit_level1_nopost
then (the exact alteration is to add $expandcontract ).

martz: yes that looks correct.

jminiman 01-12-2002 12:59 AM

Quote:

Originally posted by dabean
jminiman: put the modifications in * forumhome_forumbit_level1_post
insted of * forumhome_forumbit_level1_nopost
then (the exact alteration is to add $expandcontract ).

martz: yes that looks correct.

Did that, and no plusses or minuses show up next to parent forums on forums home. Do note that I removed the on/off (check marks) from the parent forum bits on forums home, though I don't think that should matter.

Check out http://discuss.pocketnow.com

Update: just restored everything so the parent forums are showing what they should by default, and still no plusses or minuses.

Martz 01-12-2002 01:03 AM

Still not working for me. :(

http://forums.utassault.net/index.php?s=

Isn't saving the settings, and I have double checked a lot of stuff.

jminiman 01-12-2002 01:09 AM

Got it to work, AND I moved the expand/contract images over the left-most cells so it looks a lot tighter.

Check it out: http://discuss.pocketnow.com

You like? ;)

Great hack!

SirSteve 01-12-2002 01:11 AM

Quote:

Originally posted by dabean
hehe,starbug. I really need to work on packaging releases ;)

Steve, I've looked over the hack you have installed change the forumexp function in forumhome_expandjscript to read.

PHP Code:

function forumexp(itemID) {
 var 
fitems=new Array();
 var 
i=0;
 var 
csslevel =1;

if (
document.implementation &&
document.implementation.hasFeature &&
document.implementation.hasFeature("CSS""2.0")) {
 
// The browser claims to support CSS Level 2
 // interface
  
csslevel=2;
}

if (
document.getElementById('c'+itemID).style.visibility=='hidden') {
 
document.getElementById('c'+itemID).style.visibility="visible";
 
document.getElementById('c'+itemID).style.display="inline";
 
document.getElementById('e'+itemID).style.visibility="hidden";
 
document.getElementById('e'+itemID).style.display="none";
 
document.getElementById('f'+itemID+'z').style.visibility="visible";
 if (
csslevel==1) {
   
document.getElementById('f'+itemID+'z').style.display="inline"
 } else {
   
document.getElementById('f'+itemID+'z').style.display="table-row"
 }
 
// build element collection using w3c dom level2 methods
 
while (document.getElementById('f'+itemID+i)!=null) {
  
fitems[i]= document.getElementById('f'+itemID+i);
  
i++;
 }
 
 for (
0fitems.lengthi++) {
  
fitems[i].style.visibility="visible";
  if (
csslevel==1) {
   
fitems[i].style.display="inline";
  } else {
   
fitems[i].style.display="table-row";
  }
 }
 
dostatesaveXP(itemID,0);
} else {
 
document.getElementById('c'+itemID).style.display="none";
 
document.getElementById('c'+itemID).style.visibility="hidden";
 
document.getElementById('e'+itemID).style.display="inline";
 
document.getElementById('e'+itemID).style.visibility="visible";
 
document.getElementById('f'+itemID+'z').style.visibility="hidden";
 
document.getElementById('f'+itemID+'z').style.display="none";
 
 
// build element collection using w3c dom level2 methods
 
while (document.getElementById('f'+itemID+i)!=null) {
  
fitems[i]= document.getElementById('f'+itemID+i);
  
i++;
 }
 for (
0fitems.lengthi++) {
  
fitems[i].style.visibility="hidden";
  
fitems[i].style.display="none";
  }
 }
 
dostatesaveXP(itemID,1);


The other change is to find the template you added the the Forum Posts Threads Last Post Moderator repeats per forum to and alter
<tr align="center">
<td bgcolor="

to read
<tr id="f$forum[forumid]z" align="center">
<td bgcolor="


If that modification works I'll add it to the hack readme

Works great! Check it out:

http://www.sirstevesguide.com/vbportal/forums

dabean 01-12-2002 01:16 AM

Martz: do you have phpmyadmin? to check that it is saving settings in the database.

SirSteve: cool :) and you need to add back the "function dostatesaveXP ()" found in the readme to the template.
It starts on
<!--
function dostatesaveXP (forumID, value) {

all the way down to

}

function forumexp(itemID) {

SirSteve 01-12-2002 01:47 AM

It's getting irratating that the settings are not saving... Also, I noticed in the status bar there is no "Error" on the page until I click the expand/collapse graphic...

dabean 01-12-2002 01:51 AM

sirsteve, the fix is in my post above.

Or replace forumhome_expandjscript with the attached file. This is only for people with the forum, post etc.. template hack.

SirSteve 01-12-2002 02:03 AM

I tried the file but same thing. Although the "error" is gone from the status bar but it is still not saving my settings.

dabean 01-12-2002 02:29 AM

sirsteve visited your site it works for me, apart from a minor display glitch which is fixed by adding $fhomeexpandstyle

[change included in release]

SirSteve 01-12-2002 03:11 AM

hmm.... guess I will clear my cookies and see what happens. Thanks. I added that other part as suggested.

dabean 01-12-2002 03:15 AM

SirSteve: I would recommend you redownload "forumhome_expandjscript2.txt" the version on your site does contain a small error, with out the update the hack may not from work correctly. (as of when I posted this)

SirSteve 01-12-2002 03:16 AM

Cleared everything and tried it again and now it saved just 1 setting but none of the others. err....

SirSteve 01-12-2002 03:23 AM

Ok, trying it now. Thanks.

dabean 01-12-2002 03:30 AM

SirSteve: sorry about the previous post but use this attachment. I ment to attach it above :)

If you want to check that it is installed correctly then
http://yoursitehere/updateindex.php?fid=<forumid>&val=0 to expand a collapsed forum and http://yoursitehere/updateindex.php?fid=<forumid>&val=1 to collapse a forum.



[after edit Attachment removed now part of the hack.]

SirSteve 01-12-2002 03:33 AM

That worked! BUT, when you collapse it, everything collapses correctly with the extra hack that is there (the Forum Posts Threads Last Post Moderator template hack/addition) but when you come back, that Forum Posts Threads Last Post Moderator row is there, but collapsed. I guess you have to see it for yourself to understand. Thanks again!

SirSteve 01-12-2002 03:34 AM

I guess we are both typing at the same time. :) I will try the above.

SirSteve 01-12-2002 03:37 AM

Ok, tried the new attachment and it's almost there. See post #65 above.

dabean 01-12-2002 03:39 AM

I see the problem, I'll code up a fix over the evening for you.

After edit.
Code is now part of the hack release.

SirSteve 01-12-2002 03:40 AM

Thanks. I'll check back tomorrow then. :)

dabean 01-12-2002 03:47 AM

easier than it looked fix is above.

I will package this properly into the zip tomorrow however.

SirSteve 01-12-2002 04:24 AM

That did it! Very cool and I (we) really appreciate your quick support on this!

:D

net ba 01-12-2002 10:35 AM

The + and - images don't show up so I can't expand or contract it. I know its working though because when I set a forum to be contracted on Admin CP it contracted, I just couldn't open it manually. I am running windows 98 Second Edition and using version 5.50 of MSIE.

net.ba

dabean 01-12-2002 02:09 PM

Quote:

Originally posted by net ba
The + and - images don't show up so I can't expand or contract it. I know its working though because when I set a forum to be contracted on Admin CP it contracted, I just couldn't open it manually. I am running windows 98 Second Edition and using version 5.50 of MSIE.

net.ba

sounds very much like your missing a template check that
forumhome_expandcontract exists and that
forumhome_forumbit_level1_nopost contains "$expandcontract"


Hack has been repackaged to include optional addon.

Rose 01-12-2002 04:56 PM

I'm getting a couple errors with this. :(

The first is in the cx_install - I looked and this looks slightly different from the error reported earlier.
Code:

Warning: Cannot add header information - headers already sent by (output started at /home/simpson/public_html/admin/cx_install.php:1) in /home/simpson/public_html/admin/functions.php on line 1498
ALTER TABLE forum ADD collapsed SMALLINT DEFAULT '0' NOT NULL ALTER TABLE user ADD forumviewset varchar(250) NOT NULL default ':'



And the second is on my forum home page I get:
Code:

Warning: Cannot add header information - headers already sent by (output started at /home/simpson/public_html/admin/getbrowser.php:57) in /home/simpson/public_html/admin/functions.php on line 1498
This is right above my header banner. :( I haven't messed with the functions.php.


Line 57 of the getbrowser.php is blank, so I deleted it leaving the "?>" as the last line. Reuploaded and reran the cx_install. But still errors. :(

Any help?

Rose 01-12-2002 04:58 PM

Now I'm getting a database error. :(Database error in vBulletin Control Panel 2.2.1:
______________
Invalid SQL: ALTER TABLE forum ADD collapsed SMALLINT DEFAULT '0' NOT NULL
mysql error: Duplicate column name 'collapsed'

mysql error number: 1060

Date: Saturday 12th of January 2002 01:59:01 PM
Script: http://www.simpsonsboard.com/~simpso...all.php?step=2
Referer:
______________

I have the little icons next to the forum descriptions, and if I click on 'expand' the 'collapse' button will appear, but nothing changes other than the picture.

Shenlong 01-12-2002 05:04 PM

this hack is a little corrupt, I was getting erros on the top saying stuff so I uninstalled the hack

Rose 01-12-2002 05:45 PM

I think I'm with you, Shenlong. I had to uninstall so I could reopen the site. :s

SirSteve 01-12-2002 06:05 PM

Follow the instructions, it works. Check it out at www.sirstevesguide.com/vbportal/forums

Rose 01-12-2002 07:14 PM

Quote:

Originally posted by SirSteve
Follow the instructions, it works. Check it out at www.sirstevesguide.com/vbportal/forums

As far as I know, I did follow the instructions, and rechecked them twice. :)

dabean 01-12-2002 08:14 PM

The installation script makes all the important changes on its first run... rerunning it will throw a error. That is not important however, the error mysql error: Duplicate column name 'collapsed' does show that the installer worked.

Now as for the collapse not working check that the javascript contained in "forumhome_expandjscript" has been added to the page and that forumhome_level2_post does contain
<tr id="f$forum[parentid]z$z" $fhomeexpandstyle align="center">
and yes there should be two 'z''s (only in v1.11)


All times are GMT. The time now is 07:41 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.01685 seconds
  • Memory Usage 1,869KB
  • 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
  • (2)bbcode_code_printable
  • (2)bbcode_php_printable
  • (6)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)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