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)
-   -   Subforums on Forumhome (no extra queries Version) (https://vborg.vbsupport.ru/showthread.php?t=49037)

Xenon 05-02-2003 10:17 AM

which error did you get?

that would help enourmously ^^

vB-Host.com 05-02-2003 08:24 PM

different ones about char undfined or not expected.. different ones as i tried to move the coding around to make it work. I don't know custom php coding well yet so I put something in wrong somewhere... what i am trying to do is put an image before the word "subforums" of course doing so in the forum home template places the image even if there isn't sub forums.

Xenon 05-03-2003 01:36 PM

hmm you have this code:
Code:

SET subforums=CONCAT(subforums,IF(subforums='', '<br>Subforums: ', ', ')
just change it into that:
Code:

SET subforums=CONCAT(subforums,IF(subforums='', '<br><img src=\"arrow.gif\">Subforums: ', ', ')
be carefull not to have an unslashed " in your text :)

vB-Host.com 05-03-2003 09:20 PM

when I go to update now.. I get Database error in vBulletin Control Panel 2.2.9:

Invalid SQL: UPDATE forum

SET subforums=CONCAT(subforums,IF(subforums='', '<br><img src="images/arrow.gif">Subforums: ', ', ') '<a href="forumdisplay.php?forumid=17"></A><A HREF=\"http://www.vb-host.com/hangman.php\">Play A Game Of Hangman</a>') WHERE forumid != 17 AND forumid IN (17,7,-1)
mysql error: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near ''<a href="forumdisplay.php?forumid=17"></A><A HREF=\"http://www

mysql error number: 1064

Date: Saturday 03rd of May 2003 03:19:18 PM
Script: http://www.vb-host.com/admin/forum.php
Referer: http://www.vb-host.com/admin/forum.p...dit&forumid=47

Boofo 05-04-2003 04:20 PM

I just did it and it works fine here. This is what I used:

PHP Code:

SET subforums=CONCAT(subforums,IF(subforums='''<br><img src=\"{ imagesfolder}/arrow.gif\"><b>Subforums:</b> '', '

Take the space out of the imagesfolder variable, though.

vB-Host.com 05-04-2003 07:15 PM

Thanks Bob, but, getting the same error still... It appears it is having the forum as links hack is causing it. It doesn't like the </a><A HREF="http://www.vb-host.com/hangman.php">click here to play hangman</A> in the SQL syntax....

The error reads...
Code:

Invalid SQL: UPDATE forum

SET subforums=CONCAT(subforums,IF(subforums='', '<br><img src="images/
arrow.gif">Subforums: ', ', ') '<a href="forumdisplay.php?forumid=17"></A>
<A HREF=\"http://www.vb-host.com/hangman.php\">Play A Game Of
Hangman</a>') WHERE forumid != 17 AND forumid IN (17,7,-1)
mysql error: You have an error in your SQL syntax. Check the manual that
corresponds to your MySQL server version for the right syntax to use near
''<a href="forumdisplay.php?forumid=17"></A><A HREF=\"http://www

mysql error number: 1064

Date: Saturday 03rd of May 2003 03:19:18 PM
Script: http://www.vb-host.com/admin/forum.php
Referer: http://www.vb-host.com/admin/forum....edit&forumid=47


Boofo 05-04-2003 07:25 PM

It looks like it doesn't like the dash in your site name.

lifesourcerec 05-11-2003 11:14 PM

Hehe still can't get it to work.

I put the $forum[subforums] in forumhome_forumbit_level2_nopost and editted one of my forums; still did nothing.

FreDy 05-12-2003 03:51 PM

It works fine!! Thanks :)

This is just I needed.

lifesourcerec: I had the same problem when I installed the hack... try to add the $forum[subforums] code in several forumhome_forumbit_levelx_(no)post

I add the code to
forumhome_forumbit_level1_post
forumhome_forumbit_level2_post
forumhome_forumbit_level2_nopost

And all works correctly. Try it.

lifesourcerec 05-12-2003 04:55 PM

Quote:

Today at 05:51 PM FreDy said this in Post #49
It works fine!! Thanks :)

This is just I needed.

lifesourcerec: I had the same problem when I installed the hack... try to add the $forum[subforums] code in several forumhome_forumbit_levelx_(no)post

I add the code to
forumhome_forumbit_level1_post
forumhome_forumbit_level2_post
forumhome_forumbit_level2_nopost

And all works correctly. Try it.

Well, I only want it under "forum description".

Quote:

"<smallfont color="{categoryfontcolor}">$forum[description] <br>$forum[subforums]</smallfont>

lifesourcerec 05-12-2003 04:57 PM

Quote:

Today at 05:51 PM FreDy said this in Post #49
It works fine!! Thanks :)

This is just I needed.

lifesourcerec: I had the same problem when I installed the hack... try to add the $forum[subforums] code in several forumhome_forumbit_levelx_(no)post

I add the code to
forumhome_forumbit_level1_post
forumhome_forumbit_level2_post
forumhome_forumbit_level2_nopost

And all works correctly. Try it.

Well, I only want it under "forum description".

"<smallfont color="{categoryfontcolor}">$forum[description] <br>$forum[subforums]</smallfont>

Doesn't show anything.

FreDy 05-12-2003 05:56 PM

Hmm...

I added the code to 'forumhome_forumbit_level2_nopost' template only (under forum description) and it doesn't work for me too.
Then I added the same code to several templates (under forum description too) and it works.

I think that 'forumhome_forumbit_level2_nopost' isn't the correct template to show the subforums.

Try adding the code to more forumhome_forumbit_levelx_(no)post templates.

Good luck

lifesourcerec 05-12-2003 06:32 PM

Quote:

Today at 07:56 PM FreDy said this in Post #52
Hmm...

I added the code to 'forumhome_forumbit_level2_nopost' template only (under forum description) and it doesn't work for me too.
Then I added the same code to several templates (under forum description too) and it works.

I think that 'forumhome_forumbit_level2_nopost' isn't the correct template to show the subforums.

Try adding the code to more forumhome_forumbit_levelx_(no)post templates.

Good luck

Yeah, but where (to get it under the forum description)?

FreDy 05-12-2003 06:39 PM

Find in these templates $forum[description] and add $forum[subforum] under it.

Xenon 05-12-2003 06:45 PM

as an description for the templatenames:

level1 is over level2 on forumhome
_nopost is for categorie forums
_post ist for normal forums

if you add it to _nopost and your forums on forumhome are no categories, you obviously won't see anything.

standart vb template system, i'd advise you to get familiar with it apart from my hack, because it's usefull to know everywhere :)

WEForums 05-12-2003 10:47 PM

Hmm...this may seem simple but how to you get the "Subforums" to appear in bold? I tried changing it in the forum.php file and nothing happened. Then I totally removed the <br>Subforums part and Subforums STILL stayed. What's the part that needs to be changed?

Also note I don't want the subforum links in bold...

lifesourcerec 05-12-2003 11:37 PM

Quote:

Yesterday at 08:39 PM FreDy said this in Post #54
Find in these templates $forum[description] and add $forum[subforum] under it.

I know that, but I can only find $forum[description] in level2_nopost.

WEForums 05-13-2003 03:04 AM

Quote:

Today at 01:37 AM lifesourcerec said this in Post #57
I know that, but I can only find $forum[description] in level2_nopost.
You're supposed to add $forum[subforum] to that template.

The way I believe it is:

forumhome_forumbit_level2_post for REGULAR forum

forumdisplay_forumbit_level2_post for SUB-FORUMS

Editing those files should result in what you're looking for.

lifesourcerec 05-13-2003 03:08 AM

I got it :)... now to getting the "subforums:" to be bold...

Xenon 05-13-2003 08:00 AM

@WE and life:
To get the subforums bold you have to edit the part in forum.php and after that, you have to edit a forum to update the cache like you have to do when you first install the hack.

lifesourcerec 05-13-2003 01:16 PM

Quote:

Today at 10:00 AM Nietzsche said this in Post #60
@WE and life:
To get the subforums bold you have to edit the part in forum.php and after that, you have to edit a forum to update the cache like you have to do when you first install the hack.

Thanks. Worked like a charm. :)

csidlernet 06-17-2003 04:55 AM

Thankyou!

/me hits install button

kaotic 07-19-2003 05:20 AM

I would really like to install this nice little hack, but sadly, I'm getting an error:

Quote:

Database error in vBulletin Control Panel 2.3.0:

Invalid SQL: UPDATE forum SET subforums=''
mysql error: Unknown column 'subforums' in 'field list'

mysql error number: 1054
I triple checked the query that I was suppose to run. It worked perfectly. Can someone point me in the right direction?

Xenon 07-19-2003 10:05 AM

you must have made an error while runing the alter table query.
do it again, i can't help any further....

kaotic 07-20-2003 03:14 AM

Is there another method that I could use to update the cache? Like a query that I could run myself.

Xenon 07-20-2003 11:57 AM

to update the cache yourself you have to run a lot of queries yourself, so i don't suggest you'd do that ^^

also the problem you reported above is not because of the caching, but because you haven't installed the hack correctly

kaotic 07-28-2003 01:16 AM

I knew I followed instructions correctly. After running repair.php, it finally started working. Thanks for the hack. :)

Xenon 07-28-2003 09:51 AM

ah, ok a db problem could always produce unknown bugs ^^

:)

Oblivion Knight 07-30-2003 03:03 AM

Working like a charm, as always Xenon :)

lifesourcerec 08-07-2003 11:10 PM

Can't get it to work on v2.3.0

Xenon 08-10-2003 03:26 PM

i don't know of any problems with 2.3.0 as i've written it with 2.3.0.

follow the instructions carefully and it'll work

lifesourcerec 08-10-2003 11:05 PM

I re-did it step by step twice and no go. Added
Quote:

$forum[subforums]
to level2_post and level2_nopost and it still doesn't work. I did edit forum and save. Nothing happening.

Xenon 08-19-2003 08:30 PM

then i can't help, as it's not reproducable on my testboards...
are you sure you've uploaded the files correctly?

The Realist 08-21-2003 03:33 PM

Its level1_nopost and level2_nopost templates not level2_post. Could that be your problem?

Quote:

08-11-03 at 01:05 AM lifesourcerec said this in Post #72
I re-did it step by step twice and no go. Added to level2_post and level2_nopost and it still doesn't work. I did edit forum and save. Nothing happening.

The Realist 08-21-2003 03:34 PM

Now I have a problem. Did the hack 100% working fine but every sub forum I have is showing up as a link under the main section header?

How can I only show the sub forums I need?

Xenon 08-21-2003 10:43 PM

the realist, sorry but this feature isn't included right now. you'd have to exclude every forumid you don't want yourself in the code

alqafelah 08-22-2003 12:16 AM

sory Xenon,

can you make it as dropdown ?

Xenon 08-22-2003 11:28 AM

nope, as i hate dropdowns :)
but all you have to do is to change the html code the function generates for yourself and you can make a dropdown out of it, shouldn't be hard i think.

Sooner95 08-29-2003 01:03 AM

Took me a day or 2, but i got it.

Thanks for the awsome hack

cerebro 10-06-2003 02:16 AM

Works fine for VB 2.3.2??


All times are GMT. The time now is 01:02 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.01273 seconds
  • Memory Usage 1,826KB
  • 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_code_printable
  • (1)bbcode_php_printable
  • (10)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)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