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 07-26-2002 05:53 PM

Quote:

Originally posted by carpman
If someone told me what they are for i could make my own mind up?
Quoting the readme, "If you have the forum, post, threads, template hack now please read Template_Option.txt"

Quote:

I have uploaded updateindex.php, this is the one that came in the zip file!!!
Yes updatedateindex is the correct filename, I couldn't remeber the exact name, and this "problem" has been reported many times before in 99% of the cases its the result of a file not being uploaded.

Next, up have you uploaded getforumview.php to your admin directory. If you have then open updateindex.php?fid=<forumid>&val=1
- you should see the word "done" appear
- no results a file isn't uploaded (reread the instructions)
- error means your not a logged in user.

carpman 07-26-2002 08:55 PM

Quote:

Originally posted by dabean


Next, up have you uploaded getforumview.php to your admin directory. If you have then open updateindex.php?fid=<forumid>&val=1
- you should see the word "done" appear
- no results a file isn't uploaded (reread the instructions)
- error means your not a logged in user.

Thanks for reply, yes i had doon all that and when i ran above it came back ok.

When ever i view forum and changed expand contract my setting are never remembered?

dabean 07-26-2002 09:14 PM

Quote:

Originally posted by carpman


Thanks for reply, yes i had doon all that and when i ran above it came back ok.

When ever i view forum and changed expand contract my setting are never remembered?

url?

carpman 07-27-2002 07:12 AM

Thanks for reply and help,

http://www.carpchat.co.uk/index.php

dabean 07-27-2002 08:36 PM

Quote:

Originally posted by carpman
Thanks for reply and help,

http://www.carpchat.co.uk/index.php

if you have, phpmyadmin installed, what is the current contents of the "forumviewset" field, after you try to expand a category.

Erwin 07-27-2002 09:16 PM

There's no way of making this compatible with Opera, is there... just wondering.

dabean 07-27-2002 09:24 PM

Quote:

Originally posted by Erwin
There's no way of making this compatible with Opera, is there... just wondering.
No, and until a version of Opera is released with W3C DOM level 1 and level support 2 support will be impossible.

carpman 07-28-2002 06:26 AM

Quote:

Originally posted by dabean


if you have, phpmyadmin installed, what is the current contents of the "forumviewset" field, after you try to expand a category.

Ok i have a test user account which did read 1|1:
after chaging forum expand state it changed to
1|1:4|1:9|2:

after freshing page and or going into forum and retuning to main forum page, changing expand state it stayed the same, and forum catagory expand state always returns to default setting


My admin account stayed the same at
1|2:9|1:20|1:13|1:<forumid>|1:4|1:

It seems to enter 1st data but does remeber it or replace it?

thanks for help

Erwin 07-28-2002 06:32 AM

Is there a way to make a link where when it is clicked ALL forums are expanded or contracted?

dabean 07-28-2002 04:52 PM

Quote:

Originally posted by carpman


It seems to enter 1st data but does remeber it or replace it?

thanks for help

That fact fact that the hack is storing the data has me puzzled.

My gut feeling is that another hack is somehow conflicting with this one.

To test this theory I've attached modified version a one file which would cure such a problem. This file is direct replacement for the existing one in the zip file.


Quote:

Originally posted by Erwin
Is there a way to make a link where when it is clicked ALL forums are expanded or contracted?

This is possible but would require exentsive modification to how the hack works.

carpman 07-29-2002 08:14 AM

Quote:

Originally posted by dabean


That fact fact that the hack is storing the data has me puzzled.

My gut feeling is that another hack is somehow conflicting with this one.

To test this theory I've attached modified version a one file which would cure such a problem. This file is direct replacement for the existing one in the zip file.



works a treat :)

many thanks

PeterNRG 08-01-2002 08:14 AM

Instead of contracting all the forums to just the category titles, it would be cool if you could also contract to just the category + forum titles (so without the forum descriptions, and maybe the moderators)

I think the forum descriptions are only needed for new visitors. Once you are a regular visitor to a board, you don't really read the forum descriptions anymore, thus they take up a lot of space, which forces the (lazy) user to scroll more :).

What do you think? It would be a cool addition to this hack IMHO.

dabean 08-01-2002 07:36 PM

Quote:

Originally posted by PeterNRG
Instead of contracting all the forums to just the category titles, it would be cool if you could also contract to just the category + forum titles (so without the forum descriptions, and maybe the moderators)

I think the forum descriptions are only needed for new visitors. Once you are a regular visitor to a board, you don't really read the forum descriptions anymore, thus they take up a lot of space, which forces the (lazy) user to scroll more :).

What do you think? It would be a cool addition to this hack IMHO.

The extremely simple and lazy way. :rambo:

template: forumhome_expandcontract
PHP Code:

<div id="c$forum[forumid]style="$divcollapse"><img alt="Collapse" title="Contract Category" src="{imagesfolder}/collapse.gif" onclick="forumexp('$forum[forumid]')" /><a href="forumdisplay.php?s=$session[sessionhash]&amp;forumid=$forum[forumid]">$forum[title]</a>
    <
br>$forum[description]</div>
<
div id="e$forum[forumid]style="$divexpand"><img alt="Expand" title="Expand Category" src="{imagesfolder}/expand.gif" onclick="forumexp('$forum[forumid]')" /><a href="forumdisplay.php?s=$session[sessionhash]&amp;forumid=$forum[forumid]">$forum[title]</a>
    </
div

template: forumhome_forumbit_level1_nopost
PHP Code:

<tr class="cat">
    <
td colspan="6">$expandcontract</td>
</
tr

:banana:

carpman 08-06-2002 09:04 AM

I have been playing about with adding sub catagories to some of my forum catagories, however this does not work with this hack.

Sub catagory does not collapse with main catagory and the forums in the sub catagory do not have collapse contact options.

If you understand what i am talking about, is it possible to acheive this?

cheers

dabean 08-06-2002 06:09 PM

Quote:

Originally posted by carpman
I have been playing about with adding sub catagories to some of my forum catagories, however this does not work with this hack.

Sub catagory does not collapse with main catagory and the forums in the sub catagory do not have collapse contact options.


If you understand what i am talking about, is it possible to acheive this?


cheers

Seeing as this question pops up regularly I've added a FAQ
Qouting from it..

Q: How do I show a forum depth greater than 2?
A: Open vB Admin cp set forum depth to your required level. Then create the additional templates. For template examples see https://vborg.vbsupport.ru/show...0465#post250465

Q: Can sub-forums be collapsed?
A: Yes. See the above answer for example templates.

carpman 08-06-2002 07:20 PM

cheers, i will give it a go

DarkDraco07 08-13-2002 10:12 AM

PHP Code:

Parse errorparse errorexpecting `']'' in /home/darkneme/public_html/forums/index.php(435) : eval()'d code on line 4 

what does this mean?????

DarkDraco07 08-13-2002 09:46 PM

can someone help???

dabean 08-13-2002 11:25 PM

Quote:

Originally posted by DarkDraco07
PHP Code:

Parse errorparse errorexpecting `']'' in /home/darkneme/public_html/forums/index.php(435) : eval()'d code on line 4 

what does this mean?????

Parse errors mean that your code is just plain wrong and cannot/will not run.

To fix the error you need to look at what is wrong with line(s) mentioned, which in these cases are lines 435 and 4?
The PHP interpreter is trying to help you fix this by telling you what it expected to find ( '] ).

The problem and the solution is unique to your index.php, I would assume due to mispasting from the readme.

If you don't know what you did wrong or can't find the problem then you need to revert index.php (just index.php not the db) to the backup version you should have taken before attempting to make the modifications required by this hack. Then re-add the changes this hack requires.


When the readme is followed to the letter this hack will and does work "out of the box" so to speak.

DarkDraco07 08-14-2002 09:41 AM

i uninstalled and reinstalled it 3 times, i couldnt have messed up 3 times

DarkDraco07 08-14-2002 09:55 AM

i just tried again, i even replaced my index.php with the original file and it still shows the error

DarkDraco07 08-14-2002 10:23 AM

MY FORUMS HAVE BEEN CURRUPTED AHHHHHHHHHHHHHHHH
i unistalled every step, took out and unedited template, took out the tables, unedited the file AND IT STILL SHOWS THE ERROR!!!

dabean 08-14-2002 04:30 PM

Quote:

Originally posted by DarkDraco07
MY FORUMS HAVE BEEN CURRUPTED AHHHHHHHHHHHHHHHH
i unistalled every step, took out and unedited template, took out the tables, unedited the file AND IT STILL SHOWS THE ERROR!!!

Paste the full error message.

Paste the contents of the line(s) mentioned in the error message. If as a suspect the line is some like eval("\$blahblah = \"".gettemplate('sometemplate')."\";"); Paste the contents of the template named too.

And do you still get a parse error when using the default stock index.php supplied with vB?

DarkDraco07 08-14-2002 05:12 PM

error

PHP Code:

Parse errorparse errorexpecting `']'' in /home/darkneme/public_html/forums/index.php(380) : eval()'d code on line 4 

line 4

PHP Code:

$templatesused='forumhome_birthdaybit,error_nopermission,forumhome_pmloggedin,forumhome_welcometext,forumhome_logoutcode,forumhome_newposts,forumhome_todayposts,forumhome_logincode,forumhome_loggedinuser,forumhome_loggedinusers,forumhome_lastpostby,forumhome_moderator,forumhome_forumbit_level1_nopost,forumhome_forumbit_level1_post,forumhome_forumbit_level2_nopost,forumhome_forumbit_level2_post,forumhome,forumhome_unregmessage'

line 380

PHP Code:

eval("\$forumbits .= \"".gettemplate("forumhome_forumbit_level$depth$tempext")."\";"); 


dabean 08-14-2002 05:31 PM

Quote:

Originally posted by DarkDraco07

line 380

PHP Code:

eval("\$forumbits .= \"".gettemplate("forumhome_forumbit_level$depth$tempext")."\";"); 


Please paste the contents of
"forumhome_forumbit_level1_nopost",
"forumhome_forumbit_level2_post" &
"forumhome_forumbit_level2_nopost"

DarkDraco07 08-14-2002 07:46 PM

forumhome_forumbit_level1_nopost
PHP Code:

<tr id="cat">
    <
td bgcolor="{ categorybackcolor}" colspan=" 7">
<
a href="forumdisplay.php?s=$session[s
essionhash]&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 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}"><normalfont>$count</normalfont></td>
    <
td bgcolor="{ firstaltcolor}"><smallfont>$forum[lastpostinfo]</smallfont></td>
<
form><td bgcolor="{ secondaltcolor}" 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

forumhome_forumbit_level2_nopost
PHP Code:

<tr id="cat">
  <
td bgcolor="{ categorybackcolor}"><smallfont>&nbsp;</smallfont></td>
  <
td bgcolor="{categorybackcolor}" colspan="7">
   <
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


DarkDraco07 08-14-2002 08:33 PM

o wait, there was a space between a variable in the template, THANK YOU SO MUCH FOR POINTING THAT OUT!!!!

I LOVE YOU :banana:

dabean 08-14-2002 09:00 PM

<snipped> figured out the error I see.

herby 09-01-2002 02:25 PM

Hello,

Anyone installed this on 2.2.7?

I've tried and it does not seem to work. No errors. The forum display just remains as is.

The only thing I can see that might be the problem is that

global $bbforumview;

is no longer in the index.php for 2.2.7

Hence, will these lines below that still be there, as per the hack instuctions?

// expand collapse hack
global $BrowserDOM, $collapsedstate;
// end expand collapse hack

Thanks in advance.

Herby

dabean 09-01-2002 05:53 PM

Quote:

Originally posted by herby
Hello,

Anyone installed this on 2.2.7?

I've tried and it does not seem to work. No errors. The forum display just remains as is.

The only thing I can see that might be the problem is that

global $bbforumview;

is no longer in the index.php for 2.2.7

Hence, will these lines below that still be there, as per the hack instuctions?

// expand collapse hack
global $BrowserDOM, $collapsedstate;
// end expand collapse hack


Thanks in advance.

Herby

Tested and works on vB 2.2.7. Whilst the line "global $bbforumview;" has been removed from vB 2.2.7 you do still need to add
PHP Code:

// expand collapse hack
global $BrowserDOM$collapsedstate;
// end expand collapse hack 

Below what remains from the large location fragment.

If your not sure what I mean by this then the readme's inside the zip have been updated to reflect 2.2.7.

herby 09-01-2002 06:18 PM

Thanks.

I've pretty much followe the instructions to the letter, but no joy on the collapsing.

>> http://iafma.org/gm/forums/

Where are the obvious places to look under the hood?

Thanks,

Herby

dabean 09-01-2002 07:20 PM

Quote:

Originally posted by herby
Thanks.

I've pretty much followe the instructions to the letter, but no joy on the collapsing.

>> http://iafma.org/gm/forums/

Where are the obvious places to look under the hood?

Thanks,

Herby

define more clearly what's wrong with the collapsing?

1. No + - icons?
2. The icons exist but groups don't collapse?
3. Collapsed state is not remebered?

Solutions
1. Sounds very much like your missing a template check that
forumhome_expandcontract exists and that
forumhome_forumbit_level1_nopost contains "$expandcontract"
2. Check the template "forumhome_expandjscript" exists and "forumhome" contains $expandcontractscript.
3. Check "updateindex.php" is in your forums directory.

I would look at your site but the registration system requiring multiple accounts put me off.

herby 09-01-2002 07:40 PM

1. No + - icons?

All solution steps checked.

I've just PMed a temp username/pass

Many thanks,

Herby

Quote:

Originally posted by dabean


define more clearly what's wrong with the collapsing?

1. No + - icons?
2. The icons exist but groups don't collapse?
3. Collapsed state is not remebered?

Solutions
1. Sounds very much like your missing a template check that
forumhome_expandcontract exists and that
forumhome_forumbit_level1_nopost contains "$expandcontract"
2. Check the template "forumhome_expandjscript" exists and "forumhome" contains $expandcontractscript.
3. Check "updateindex.php" is in your forums directory.

I would look at your site but the registration system requiring multiple accounts put me off.


dabean 09-01-2002 08:10 PM

Quote:

Originally posted by herby
1. No + - icons?

All solution steps checked.

Many thanks,

Herby


Okay all required templates seem to exist on the defualt template set. So I'd now suggest that a code modification hasn't been made.
Firstly what PHP version?

Secondly does
PHP Code:

// expand collapse hack
require('./admin/getbrowser.php');
require(
'./admin/getforumview.php');
$BrowserDOM=GetBrowserDOM2();
$templatesused.=',forumhome_expandcontract,forumhome_expandjscript';
// end expand collapse hack 

Exist?

now does
PHP Code:

global $BrowserDOM$collapsedstate

Exist?

does
PHP Code:

if ($BrowserDOM==True) {
  eval(
"\$expandcontractscript = \"".gettemplate('forumhome_expandjscript')."\";");


Exist?

Is getbrowser.php in your admin directory?

What is the output of phpinfo.php (included in the vBulletin archive)?
If you don't want to post the output of phpinfo then PMing it is fine.

herby 09-01-2002 09:29 PM

Oops!

Running PHP Version 4.0.6

Will get that upgraded and see what happens.

Thanks,

Herby

dabean 09-01-2002 09:36 PM

Quote:

Originally posted by herby
Oops!

Running PHP Version 4.0.6

Will get that upgraded and see what happens.

Thanks,

Herby

Open getbrowser.php change
PHP Code:

 function GetBrowserDOM2() {
  if (isset(
$_SERVER['HTTP_USER_AGENT'])) {
     
$htuagent trim($_SERVER['HTTP_USER_AGENT']); 

into
PHP Code:

 function GetBrowserDOM2() {
  global 
$HTTP_SERVER_VARS;
  if (isset(
$HTTP_SERVER_VARS['HTTP_USER_AGENT'])) {
     
$htuagent trim($HTTP_SERVER_VARS['HTTP_USER_AGENT']); 

Which should make it work.

herby 09-01-2002 09:53 PM

Perfect. That did the trick.

I assume that after upgrading to the latest version PHP, I have to reverse the above again?

Cheers,

Herby

PS How can I make the forums collapsed by default?

dabean 09-01-2002 10:42 PM

Quote:

Originally posted by herby
Perfect. That did the trick.

I assume that after upgrading to the latest version PHP, I have to reverse the above again?

Cheers,

Herby

PS How can I make the forums collapsed by default?

No, you don't need to undo the change $HTTP_SERVER_VARS is still supported on 4.1.x and 4.2.x. The reason I choose use $_server was to encourage upgrading to 4.1.x or newer.

Collapsing forums by default can be done in your admin cp by selected "collapsed" for the parent forum. Currently forums can't be collapsed based on usergroups.

herby 09-01-2002 10:58 PM

I was getting the mysql 1054 error when navigating the forums.

Running the following seems to have cured that.

ALTER TABLE user ADD forumviewset varchar(250) NOT NULL default ':'


However. when setting the "collapsed" option in the parent forum via the CP, I'm getting this...

Database error in vBulletin Control Panel 2.2.7:

Invalid SQL: UPDATE forum
SET
styleid='1', title='iAfma.org Manifesto', description='',
active='1', displayorder='5', parentid='-1', parentlist='69,-1',
allowposting='0', cancontainthreads='0', daysprune='30',
newpostemail='forums@iafma.org', newthreademail='forums@iafma.org',
moderatenew='1', allowhtml='0', allowbbcode='1',
allowimages='0', allowsmilies='1', allowicons='1',
styleoverride='0', allowratings='1', countposts='1',
moderateattach='1', collapsed='1'
WHERE forumid='69'
mysql error: Unknown column 'collapsed' in 'field list'

mysql error number: 1054

dabean 09-01-2002 11:03 PM

Quote:

Originally posted by herby
I was getting the mysql 1054 error when navigating the forums.
However. when setting the "collapsed" option in the parent forum via the CP, I'm getting this...

Database error in vBulletin Control Panel 2.2.7:

Invalid SQL: UPDATE forum
SET
styleid='1', title='iAfma.org Manifesto', description='',
active='1', displayorder='5', parentid='-1', parentlist='69,-1',
allowposting='0', cancontainthreads='0', daysprune='30',
newpostemail='forums@iafma.org', newthreademail='forums@iafma.org',
moderatenew='1', allowhtml='0', allowbbcode='1',
allowimages='0', allowsmilies='1', allowicons='1',
styleoverride='0', allowratings='1', countposts='1',
moderateattach='1', collapsed='1'
WHERE forumid='69'
mysql error: Unknown column 'collapsed' in 'field list'

mysql error number: 1054

The installer is designed for php 4.1.x or newer to.

You need to run "ALTER TABLE forum ADD collapsed SMALLINT DEFAULT '0' NOT NULL" to add the additional field to the database.


All times are GMT. The time now is 05:30 PM.

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.04878 seconds
  • Memory Usage 1,920KB
  • 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
  • (17)bbcode_php_printable
  • (22)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