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)

dabean 01-30-2002 06:04 PM

mvgod, would you mind attaching a screenshot as I'm sure the fix will be easy once I can see result. I unfortunatly don't have IE5 for mac.

mvigod 01-30-2002 06:23 PM

here is a screenshot...

dabean 01-30-2002 08:03 PM

Okay that is very strange.. try this version of forumhome_expandjscript to see if it fixes the problem.

[attachment removed didn't fix]

mvigod 01-30-2002 09:09 PM

Tried it and same exact look...all the text below gets squished over to the left in the table same as before...gotta love the cross platform inconsistencies MS builds into their products.

Is it the javascript or the style sheet that is likely kicking the text over?

marc

dabean 01-30-2002 09:31 PM

The CSS embeded in the javascript. It appears that IE MAC is interpreting the display property differently to IE WIN/UNIX and NS6/Moz/Konq :(. Is this version of IE5.0 or IE5.1? As the only solution appears to be reformating each cell using even more javascript or disabling the collapse function in IE5 MAC.

Oh well there is always undocumented features to play with is this any better?

mvigod 01-30-2002 10:22 PM

Version 5.0 on the mac...do they even have a 5.1 on mac? I will check and upgrade if so...

Will try to test out macfix2 tonight sometime when the board "quiets" down a bit...

thanks,

marc

Gutspiller 02-01-2002 02:34 AM

I added this hack and I didn't have any problems with the install, but it doesn't show any + or - signs next to the forum catagory name. Do I need to enable something? :confused:

mvigod 02-02-2002 01:18 AM

Quote:

Originally posted by Gutspiller
I added this hack and I didn't have any problems with the install, but it doesn't show any + or - signs next to the forum catagory name. Do I need to enable something? :confused:
Did you upload the gif images? Where did you upload them to? Make sure they are in the right place and they should come up.

over 02-13-2002 11:19 AM

sweet hack :) cheers

LuBi 02-16-2002 02:39 AM

I'm looking to do an expand and contract on my site. I run this hack already, where woul I find the code for a non php site to expand and contract? If it has to be php that's fine but I want it so when users click the icon or title the icon changes and a link list appears below the link/icon. Does anyone know where I could find such code?

mADmAX` 02-21-2002 01:21 AM

Database error in vBulletin 2.2.2:

Invalid SQL: UPDATE user SET forumviewset='' WHERE userid='1' mysql error: Unknown column 'forumviewset' in 'field list'

mysql error number: 1054

Getting this error and I followed the steps exact. I see something about installing twice, I think I did my accident so if this is the problem, how to I reverse it?

dabean 02-21-2002 05:14 PM

Using phpMyAdmin or a sql hack or even just mysql via the shell

run this query.
ALTER TABLE user ADD forumviewset varchar(250) NOT NULL default ':'

jminiman 02-22-2002 01:30 AM

I have forums that are members of a category, which is beneath another category. So I have a structure like:

Category A
----Category C
---------Forum 1
----Category D
---------Forum 2
---------Forum 3

With this hack installed, BOTH Categories A, C, and D are collapsed on the forums home, and CANNOT be expanded. Clicking the little "+" does nothing. So, anything beneath category A can't be viewed. What template affects this? Is this a known bug? Are people able to have the above situation with no problems?

mADmAX` 02-22-2002 02:33 AM

Thanks dabean that worked =)

dabean 02-22-2002 03:07 AM

jminiman: Tested it does work, subject to creating the relivant level3 vb templates (not to do with this hack but vB its self).

Any/all templates you want the expansion/contraction buttons to appear in must contain "$expandcontract".

KISS 02-22-2002 06:49 AM

Thanks worked great only thing I had was inside of whos online shows:

/vb/updateindex.php?&fid=45&val=0

As to where I am at. Did I miss something in the hack? Everything else seems to be working fine.

dabean 02-22-2002 03:56 PM

You can fix that manually (complex/difficult not going to explain how).

Or use this hack.
https://vborg.vbsupport.ru/showthrea...threadid=32849

jminiman 02-23-2002 03:19 AM

dabean,

This is definitely one of my favorite hacks! Anyway, when I create the third tier templates, are they exact copies of the second-tier ones?

Quote:

Originally posted by dabean
jminiman: Tested it does work, subject to creating the relivant level3 vb templates (not to do with this hack but vB its self).

Any/all templates you want the expansion/contraction buttons to appear in must contain "$expandcontract".


dabean 02-23-2002 03:33 AM

jminiman: When I tested third and infact fourth tier templates I just made exact copies of the level 2 templates. So in answer to your question yes :)

s o r o k a 03-30-2002 01:38 PM

perhaps you can help me, i installed the hack and I have the forum/posts/threads hack, and I think I did everything properly, but now when I expand or contract it, all that happens is that the forum/posts/threads expands or contracts. What have i done wrong?

Here is my forum: http://www.ti-arts.com/forums/index.php

dabean 03-30-2002 02:40 PM

hmmm,

s o r o k a: The change needed to fix the hack is relatively tiny.

open up forumhome_expandjscript and change
while (document.getElementById('f'+itemID+i)!=null) {
fitems[i]= document.getElementById('f'+itemID+i);
i++;
}

to

while (document.getElementById('f'+itemID+'z'+i)!=null) {
fitems[i]= document.getElementById('f'+itemID+'z'+i);
i++;
}

s o r o k a 03-30-2002 02:57 PM

hmmm... still no luck, I just thought I should mention that I changed index.php from the original

PHP Code:

  if (getViewSetting($forum['parentid'])==1) {
   
$fhomeexpandstyle="style=\"visibility:hidden; display:none;\"";
  } elseif (
getViewSetting($forum['parentid'])==2) {
   
$fhomeexpandstyle="";
  } 

to:

PHP Code:

// auto collapse forums for user
  
if (getViewSetting($forum['parentid'])==1) {
   
$fhomeexpandstyle="style=\"visibility:hidden; display:none;\"";
  } elseif (
getViewSetting($forum['parentid'])==2) {
   
$fhomeexpandstyle="";
  }

  
// auto collapse forums, post thing for user
  
if (getViewSetting($forum['forumid'])==1) {
   
$fhomeexpandstyle="style=\"visibility:hidden; display:none;\"";
  } elseif (
getViewSetting($forum['forumid'])==2) {
   
$fhomeexpandstyle="";
  } 


s o r o k a 03-30-2002 04:11 PM

alright, i downloaded the most recent version, but now it minimizes fine, but when i maximize it only the forum/posts etc. show up.???

s o r o k a 03-30-2002 04:17 PM

alright i figured out the problem, if anyone else is having this problem, it is because i teeny bit of code was left out in Template_Option. What is missing is a +'z' in the first while statement. I have included a new version that will work.

Code:

<script language="JavaScript" type="text/javascript">
<!--
function dostatesaveXP (forumID, value) {
var ifrm;
    if (document.getElementById("colapser")) {
            document.getElementById("colapser").setAttribute("src", "updateindex.php?s=$session[sessionhash]&fid="+forumID+"&val="+value);
            document.getElementById("colapser").style.visibility="visible";
        document.getElementById("colapser").style.display="inline";
            document.getElementById("colapser").style.visibility="hidden";
        document.getElementById("colapser").style.display="none";
    } else {
        ifrm = document.createElement("IFRAME");
        ifrm.setAttribute("id","colapser");
            ifrm.setAttribute("src", "updateindex.php?s=$session[sessionhash]&fid="+forumID+"&val="+value);
        ifrm.style.width = 80+"px";
        ifrm.style.height = 30+"px";
            // ifrm.onload = hideframe;
            document.body.appendChild(ifrm);
            document.getElementById("colapser").style.visibility="hidden";
        document.getElementById("colapser").style.display="none";
    }
}

function hideframe() {
        document.getElementById("colapser").style.visibility="hidden";
        document.getElementById("colapser").style.display="none";
}

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+'z'+i)!=null) {
  fitems[i]= document.getElementById('f'+itemID+'z'+i);
  i++;
 }
 
 for (i = 0; i < fitems.length; i++) {
  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+'z'+i)!=null) {
  fitems[i]= document.getElementById('f'+itemID+'z'+i);
  i++;
 }
 for (i = 0; i < fitems.length; i++) {
  fitems[i].style.visibility="hidden";
  fitems[i].style.display="none";
  }
  dostatesaveXP(itemID,1);
 }
}
//-->
</script>


hypedave 04-11-2002 03:32 AM

okay I applied the hack and i dont see anything at all,
can someone hel pme out, i downloaded the files on the top page, after going through 10 pages, I am totally confused as to how to get this hack working, can anybody help me out

www.mindsights.com if you need to take a look

dabean 04-11-2002 06:02 PM

hyperdave, firstly you have added the 2 new templates? and made the other template alterations.

hypedave 04-11-2002 06:05 PM

yep I sure have, :bunny:

dabean 04-11-2002 06:14 PM

Quote:

Originally posted by hypedave
yep I sure have, :bunny:
good, now lets see where abouts in the code something has gone wrong.

does this line exisit?
PHP Code:

eval("\$expandcontract = \"".gettemplate("forumhome_expandcontract")."\";"); 


hypedave 04-11-2002 06:18 PM

im like half sleep
where should that coding exist

Tungsten 04-23-2002 03:02 PM

Here are some more icons to replace the expand / collapse.gif images included with the original archive. I drafted them up for my site and was going to use them, but have switched back to some plain white ones for the time being.

Just my small contribution as a way of thanking dabean for this excellent hack. :D

TheComputerGuy 04-27-2002 04:07 PM

Invalid SQL: UPDATE forum
SET
styleid='1', title='Military Firearms', description='Sponser of our Military Firearms forums',
active='1', displayorder='5', parentid='-1', parentlist='16,-1',
allowposting='1', cancontainthreads='0',
sponsorname='Tapco',sponsorimg='community.gif',
sponsorurl='http://www.tapco.com/departments.asp?dept=75&rc=GUNGAME',daysprune='30' ,
newpostemail='', newthreademail='',
moderatenew='0', allowhtml='0', allowbbcode='1',
allowimages='0', allowsmilies='1', allowicons='1',
styleoverride='0', allowratings='1', countposts='1',
moderateattach='0', 'collapsed='0'
WHERE forumid='16'
mysql error: You have an error in your SQL syntax near ''collapsed='0'
WHERE forumid='16'' at line 12

I get that error when I try to put it to the collapse the forums...I get an error..any idea?

dabean 04-27-2002 07:16 PM

Quote:

Originally posted by TheComputerGuy
Invalid SQL: UPDATE forum
SET
styleid='1', title='Military Firearms', description='Sponser of our Military Firearms forums',
active='1', displayorder='5', parentid='-1', parentlist='16,-1',
allowposting='1', cancontainthreads='0',
sponsorname='Tapco',sponsorimg='community.gif',
sponsorurl='http://www.tapco.com/departments.asp?dept=75&rc=GUNGAME',daysprune='30' ,
newpostemail='', newthreademail='',
moderatenew='0', allowhtml='0', allowbbcode='1',
allowimages='0', allowsmilies='1', allowicons='1',
styleoverride='0', allowratings='1', countposts='1',
moderateattach='0', 'collapsed='0'
WHERE forumid='16'
mysql error: You have an error in your SQL syntax near ''collapsed='0'
WHERE forumid='16'' at line 12


I get that error when I try to put it to the collapse the forums...I get an error..any idea?

remove the ' before collapsed

TheComputerGuy 04-27-2002 07:56 PM

I get a java error, is there an idea on what is causing it...

www.gunandgame.com/forums

dabean 04-27-2002 08:07 PM

Quote:

Originally posted by TheComputerGuy
I get a java error, is there an idea on what is causing it...

www.gunandgame.com/forums

Have you changed the "forumhome_forumbit_level2_post" template as described by the readme?

TheComputerGuy 04-28-2002 11:53 AM

I sure have made, went back and did everything twice

dabean 04-28-2002 01:41 PM

Quote:

Originally posted by TheComputerGuy
I sure have made, went back and did everything twice
hmmm, whilst I know one of your templates needs editing could you turn on template names? then attach a snippet of final page in particular something around..
PHP Code:

<tr align="center">
    <
td rowspan="2" bgcolor

as directly before that is the name of the template that will need editing.

TheComputerGuy 04-28-2002 03:11 PM

This
PHP Code:

TEMPLATEforumhome_forumbit_level2_post -->
<
tr align="center">
    <
td rowspan="2" bgcolor="#C3C3C3" colspan="2" align="left">
    <
table cellpadding="0" cellspacing="0" border="0"><tr>
        <
td valign="top"><img src="aftermath/off.gif" border="0" alt=""></td>
        <
td><img src="aftermath/clear.gif" width="9" height="0" border="0" alt=""></td>
        <
td><a href="forumdisplay.php?forumid=59"><font face="verdana" size="1"><b>Forum News</b></font></a><br>
        <
font face="verdana" size="1">Stay updated with the information on the newsposted by the Admin</font></td>
    </
tr></table>
    </
td>
    <
td colspan="2" bgcolor="#C3C3C3"><font face="verdana" size="1"><b>Forum Info:</b></font></td>
</
tr><tr>
    <
td bgcolor="#D7D7D7"><font face="verdana" size="1">
    
Posts: <b>18</b> | Threads: <b>17</b><br>
    
Moderators: <b>&nbsp;</b>
    </
font></td>
    <
td align="right" bgcolor="#D7D7D7"><font face="verdana" size="1"


dabean 04-28-2002 03:32 PM

Quote:

Originally posted by TheComputerGuy
This
[php]TEMPLATE: forumhome_forumbit_level2_post -->
<tr align="center">
<td rowspan="2" bgcolor="#C3C3C3" colspan="2" align="left">
<snip>

open up the "forumhome_forumbit_level2_post" template(s)
and change <tr align="center"> into
<tr id="f$forum[parentid]z$z" $fhomeexpandstyle align="center">


You will need to do this for each/every style.

FleaBag 04-29-2002 01:37 PM

I just upgraded my board from version 2.2.4 to 2.2.5, and have started re-hacking. I cannot find the references made to code in the admin/index.php file? I've tried searching for single words of the lines of code, but no results are found! Has admin/index.php dramatically changed in this version?

FleaBag 04-29-2002 02:15 PM

Now I am confused. I didn't do any of the admin/index.php file changes, but the hack works fine? Check www.gamerforums.com/board for an example. If the admin files aren't required what do they do? Thanks in advance.


All times are GMT. The time now is 12:00 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.02065 seconds
  • Memory Usage 1,866KB
  • 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
  • (1)bbcode_code_printable
  • (5)bbcode_php_printable
  • (7)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