PDA

View Full Version : Sidebar(s) in forums?


Pages : [1] 2

maximux1
05-24-2004, 12:13 PM
Hi Brian,
First let me tell you what a great job you have done with the new CMPS! Very professional and well organized! Thank you!

I would like to know if it is possible to inlcude the sidebars from the CMPS onto the the forumhome?

I have tried using the sidebox hack from vbulletin.org and it does what I want, BUT - the sideblocks ALSO get created on the index. Here is an example of what I am talking about.

cmps_index.php
http://www.marijuana.com/cmps_index.php

forumhome
http://www.marijuana.com/420/

Ideally, I would like to use the blocks from CMPS instead of using the sideblock hack as the control is much better.

Has anyone given this a try yet? And if not, Brian, could you give me any suggestions?

Thanks,
Max

Brian
05-24-2004, 12:51 PM
Thank you for the compliments. :)

As for integration, check this section of the user's manual. ;)

http://www.vbadvanced.com/membersarea.php?do=viewmanual&productid=4&pageid=6

Our Sponsors
 

maximux1
05-24-2004, 02:12 PM
Sweet, bro! Didnt realize you had documention done already!

Fantastic job, Brian - be proud!

maximux1
05-24-2004, 04:13 PM
Worked like a chram, Brian -
However, I do have one other small request - how difficult would it be to have the left modules on all pages, not just FORUMHOME. I suppose there would be some editing of SHOWTHREAD as well...

Let me know if ya have any ideas, i'll re-read your doc's and see what I can come up with.

Thanks again!

Our Sponsors
 

maximux1
05-24-2004, 04:31 PM
well - i figured out how to add side columns to the showthread.php file - pretty easy if ya read the directions. There are some formatting issues that I would have to deal with in order to get it to display correctly.

Brian
05-24-2004, 04:32 PM
The steps on that page are meant to show you how to do it on just about any vBulletin page or hack - The forumhome was just used as an example. You'd apply the exact same change to the top of the file, then search for 'print_output' and do the same replacement, except you would replace 'FORUMHOME' with whatever template is in the 'print_output' funtion. ;)

*Edit* Looks like you beat me to it by about a minute. Glad you got it figured out. :)

maximux1
05-25-2004, 01:11 PM
The steps on that page are meant to show you how to do it on just about any vBulletin page or hack - The forumhome was just used as an example. You'd apply the exact same change to the top of the file, then search for 'print_output' and do the same replacement, except you would replace 'FORUMHOME' with whatever template is in the 'print_output' funtion. ;)

*Edit* Looks like you beat me to it by about a minute. Glad you got it figured out. :)

Hey Brian - here's a thought...
How difficult would it be to set the FORUMHOME up so that only unregistered guests can see the entire sidebar? Or, say a special group that does not see the sidebar?

I'd like it so that my members, or a special member group does not have the side modules on the FORUMHOME, but all others do.

Any ideas?

Thanks in advance!
Max

Brian
05-25-2004, 01:51 PM
That would probably be fairly easy with an if condition. Just edit your adv_portal template and add this if condtion around the left column:

<if condition="THIS_SCRIPT == 'index' AND !$bbuserinfo['userid']">
<if condition="$show['left_column']">

<td width="$vba_options[portal_leftcolwidth]">

$home[leftblocks]

</td>

<!-- Spacer Cell -->
<td width="$vba_options[portal_colspacing]"><img alt="" src="$vboptions[bburl]/$vboptions[cleargifurl]" width="$vba_options[portal_colspacing]" /></td>
<!-- / Spacer Cell -->

</if>
</if>

Note that the left side would still be processed and the queries for any modules on that side would still be performed, but the column would not be displayed.

maximux1
05-25-2004, 02:20 PM
thanks Brian - worked perfectly on the index page, however, I am now trying to figure out how to make the left side modules disappear for registered users on the FORUMHOME...

Do I just change
condition="THIS_SCRIPT == 'index' AND !$bbuserinfo['userid']">
to
condition="THIS_SCRIPT == 'FORUMHOME' AND !$bbuserinfo['userid']">

??? Thanks

maximux1
05-25-2004, 02:22 PM
answered my own question, again. Just as I expected - works wonderfully!

Thanks Brian!

Brian
05-25-2004, 02:24 PM
What I posted should work for the forumhome.... THIS_SCRIPT is defined as 'index' at the top of your forum/index.php file.

maximux1
05-25-2004, 02:25 PM
answered my own question, again. Just as I expected - works wonderfully!

Thanks Brian!

Well - I thought I had it...but FORUMHOME is not the change I need to make...now sidebars dont showup at all...

maximux1
05-25-2004, 02:25 PM
What I posted should work for the forumhome.... THIS_SCRIPT is defined as 'index' at the top of your forum/index.php file.

Hrm, ok ---- Let me check that again....

maximux1
05-25-2004, 02:32 PM
That would probably be fairly easy with an if condition. Just edit your adv_portal template and add this if condtion around the left column:

<if condition="THIS_SCRIPT == 'index' AND !$bbuserinfo['userid']">
<if condition="$show['left_column']">

<td width="$vba_options[portal_leftcolwidth]">

$home[leftblocks]

</td>

<!-- Spacer Cell -->
<td width="$vba_options[portal_colspacing]"><img alt="" src="$vboptions[bburl]/$vboptions[cleargifurl]" width="$vba_options[portal_colspacing]" /></td>
<!-- / Spacer Cell -->

</if>
</if>

Note that the left side would still be processed and the queries for any modules on that side would still be performed, but the column would not be displayed.


Oddly enough it does not seem to work as expected.

When I veiw either the cpms_index.php or the forumhome index as a registered user (me) I still see the left modules.

Not sure what I am doing wrong, just cant get the left modules NOT to show up when user is logged in...

maximux1
05-25-2004, 02:48 PM
<if condition="THIS_SCRIPT == 'index' AND !$bbuserinfo['userid']">
<if condition="$show['left_column']">

<td width="$vba_options[portal_leftcolwidth]">

$home[leftblocks]

</td>

<!-- Spacer Cell -->
<td width="$vba_options[portal_colspacing]"><img alt="" src="$vboptions[bburl]/$vboptions[cleargifurl]" width="$vba_options[portal_colspacing]" /></td>
<!-- / Spacer Cell -->

</if>
</if>


The way this reads is that the left modules should only show up on the FORUMHOME if the visitor does not have a userid, ie, logged out or new visitor.

This has nothing to do with the cmps_index.php page becuase THIS_SCRIPT = 'adv_index'.

This is good, as I would like the blocks to show up on the adv_index for all users, but not on the forumhome for registered users.

Hope this is making sense - I've tried a few variations on the code above and cant seem to get it right...

Brian, I have sent you a pm with registered user/pass to check it out if you have time...

Thanks again

MEk
05-25-2004, 03:06 PM
Question about sidebars integration: Why is it that the forums will not show up if you have the right hand sidebar enabled?

maximux1
05-25-2004, 03:11 PM
Question about sidebars integration: Why is it that the forums will not show up if you have the right hand sidebar enabled?
Not real sure,bro - havent gotten past the left side, yet ;)

Ok, from what I can tell this is the part that is having a problem...

'AND !$bbuserinfo['userid']'

When I change the code snippit to read like follows;

<if condition="!$bbuserinfo['userid']">
<if condition="$show['left_column']">

<td width="$vba_options[portal_leftcolwidth]">

$home[leftblocks]

</td>

<!-- Spacer Cell -->
<td width="$vba_options[portal_colspacing]"><img alt="" src="$vboptions[bburl]/$vboptions[cleargifurl]" width="$vba_options[portal_colspacing]" /></td>
<!-- / Spacer Cell -->

</if>
</if>


I never seem to get a match on !$bbuserinfo['userid'] - Im wondering if this variable is available at this stage in the script?

maximux1
05-25-2004, 05:22 PM
As I somewhat suspected, the $bbuserinfo array was unavailable to the processing function. Brian PM'd me and had me do the following;


open your forum/includes/vba_cmps_include_bottom.php file and look for this line:

global $pages, $stylevar, $headinclude, $header, $footer, $vboptions, $vba_options, $navbar, $cusid;

Replace that with:

global $pages, $stylevar, $headinclude, $header, $footer, $vboptions, $vba_options, $navbar, $cusid, $bbuserinfo;



Once I made this change the side bar starting working as expected, only showing up to unregistered visitors or those not logged in.

I would like to see this idea taken a bit farther, if possible. I think it would be cool if you could make the side bar determination using a vb group id. In this scenario it would be possible to promote users to a group where ads/sidebar content is no longer there.

Very cool.

maximux1
05-25-2004, 06:15 PM
I still cant figure out why the cmps_index.php is not showing the side bar to registered users?

at the top of cmps_index.php you have the following

define('THIS_SCRIPT', 'adv_index');


But the conditional statement is looking for THIS_SCRIPT to be defined as "index", not "adv_index".

I must be overlooking something.

maximux1
05-25-2004, 07:21 PM
hrm, ok - well, just some food for thought -
in cmps_index.php changing define('THIS_SCRIPT', 'adv_index'); to define('THIS_SCRIPT', 'adv_blank'); has no apparent effect on cmps_index.php.

Commenting out the entire line also produces no effect.

vint
05-31-2004, 01:29 AM
Any way you could integrate this into a feature in vba? Sidebars throughout the forums just ties the portal to the forums sooooo well. I think 90% of users would have sidebars turned on for their forums if it was an option.

Fantastic Portal btw

Brian
05-31-2004, 10:01 AM
There's not a way I can think of where it would be as functional. Besides that, it should take less than 30 seconds to modify the file and add the side bars, and with this method you can pick and choose which pages you want the side bar to appear on. ;)

Porthos
05-31-2004, 04:37 PM
Hmm ok I have been using the sidebar on some of my vb pages like forumhome, showthread, etc and I have noticed a few annomilies.

First off when I upload a new style to the forum on some skins the "Whats going on" box won't fit with the rest of the forum with the sidebar on. IT will be at the bottom of the page underneath the end of the sidebar

Some skins will only fit the first 2 forum categories and the rest are way down on the bottom of the page underneath the end of the sidebar.

I know these skins work without the sidebar on because I had them before I added the sidebar.

Any suggestions to fix this. I will post some screenshots to show you what I mean.

maximux1
05-31-2004, 04:58 PM
Screenshots or URL?

the "Whats going on" box won't fit with the rest of the forum with the sidebar on. IT will be at the bottom of the page underneath the end of the sidebar.


Really sounds like you have a table that is not closed properly...I'd check the module directly above the "what's going on" module.

Regards

Porthos
05-31-2004, 05:43 PM
ok here's a screenshot of the problem i am having with the sidebar with some styles I use

Porthos
06-01-2004, 04:15 PM
Anyone have any suggestions on this problem? Brian, Zachery...

Brian
06-02-2004, 11:05 AM
It looks like a problem with your style's beeing poorly coded. That would have to be a result of and unnecessary ending </table> tag somewhere.

IIstix
06-10-2004, 10:53 PM
well - i figured out how to add side columns to the showthread.php file - pretty easy if ya read the directions. There are some formatting issues that I would have to deal with in order to get it to display correctly.
How did you fix the "formatting issues"?

I've got both Left and Right columns activated on FORUMHOME & SHOWTHREAD, and the Left column boxes are showing up underneath the Center thread box.

Brian
06-10-2004, 11:17 PM
Are you using the default style, or have you edited any of the templates associated with those pages? There would have to be an unnecessary ending </table> tag somewhere for that to happen.

axecity
06-26-2004, 03:58 AM
Hey this is great. I have added the left column to all my pages and it makes everything much more seemless.

My question is, has anyone done the same to Photopost, Reviewpost, or Photopost Classifieds?

I would like to have that seemless integration of the left column on all pages including those from these addons. I looked at the code for index.php in Photopost but it appears they are using a different coding technique for print_output.

Any ideas would be appreciated.

Thanks
Rich.

Brian
06-26-2004, 04:17 PM
I'm sure it would be possible, but the technique to include the sidebar would be totally different. I'll see if I can look into that when I have some time.

Itworx4me
06-26-2004, 09:35 PM
ok, Can someone explain how to get just the Right Blocks to show on the forum home? when trying to do this I get all the modules on the forumhome page.

Thanks,
Itworx4me

axecity
07-12-2004, 11:02 AM
ok, Can someone explain how to get just the Right Blocks to show on the forum home? when trying to do this I get all the modules on the forumhome page.

Thanks,
Itworx4me

I found the instructions very very useful. They worked perfectly. Check here http://www.vbadvanced.com/membersar...ctid=4&pageid=6

It should help you.

Brian
07-12-2004, 12:54 PM
ok, Can someone explain how to get just the Right Blocks to show on the forum home? when trying to do this I get all the modules on the forumhome page.

Thanks,
Itworx4me
You have to disable the modules that you don't want present on that page.

Milorad
07-12-2004, 05:03 PM
to get the right side to show up properly (without screwing everything up) you need to display the 'custom' module in the center, even if its empty.

banjolawyer
07-17-2004, 03:12 PM
Hey this is great. I have added the left column to all my pages and it makes everything much more seemless.

My question is, has anyone done the same to Photopost, Reviewpost, or Photopost Classifieds?

I would like to have that seemless integration of the left column on all pages including those from these addons. I looked at the code for index.php in Photopost but it appears they are using a different coding technique for print_output.

Any ideas would be appreciated.

Thanks
Rich.Same here... I'd love to have the vbadvanced left column on my photopost home, but don't know how to make it work.

iwbyte
07-31-2004, 04:23 AM
Just putting in my request for vba left column on photopost. I know paying money doesn't give you more time to work on things, but let us know when you're ready to start charging for support access and i'll be right there!

wynode
08-18-2004, 06:53 AM
Exactly what I was looking foR!

I'll be buying the links directory as soon as I have time to upgrade the site!

/Happy customer :)

jesse
08-20-2004, 11:38 PM
Brian is a smart guy

after completing this all works well but get
no images it refers to
forum/forum/images/etc
why would it call out forum twice?

golfrewind
08-28-2004, 04:39 AM
Is there a solution for photopost yet? I would like to install a sidebar onto the photopost index as well.

Samir
09-16-2004, 02:10 PM
Thank you for the compliments. :)

As for integration, check this section of the user's manual. ;)

http://www.vbadvanced.com/membersarea.php?do=viewmanual&productid=4&pageid=6

I tried this for calendar.php on just the monthly view to try it out, but it would only put a sidebar on the header that says the calendar name and gives the options such as "monthly view", etc. The calendar still was full size below the sidebar and header. What else needs to be done?

Samir
10-05-2004, 09:41 AM
Tried it with all the different views in the calendar. It just won't work. :( Giving up. :(

mindstool
10-13-2004, 05:47 PM
Yeah, I did this... and the page wouldnt show up at all... wouldnt even load *shrugs*

Think it had something to do with the define code? i dunno... but it wouldnt work for meh... I tried to do the right-hand column..

Samir
10-14-2004, 01:26 AM
I didn't get that problem. It worked fine in the forums, but it wouldn't work right on the calendar where I really needed it. :(

paulmon
10-14-2004, 11:01 PM
Hrm, I've done this forum the forum index and it works with one issue. It's showing all the modules even though I've turned most of them off. The only ones on are left side "Online Users" and "Search" and center "Custom Page Content" yet I'm getting all of the blocks enabled.

Any ideas?

Paul

Samir
10-15-2004, 02:23 AM
Hrm, I've done this forum the forum index and it works with one issue. It's showing all the modules even though I've turned most of them off. The only ones on are left side "Online Users" and "Search" and center "Custom Page Content" yet I'm getting all of the blocks enabled.

The only thing I can think of is to double-check code changes. Seems like something is missing/in the wrong place/etc.

rezzz20
10-18-2004, 10:39 AM
I've noticed that if I put in the side bar to the forums -- for some reason the breadcrumb on the top of the page is messed up -- it's always displaying the last thread for some reason, anyone else have this problem

seems that the navbits or something is not being read properly -- any ideas?

Talisman
10-24-2004, 06:56 PM
I've got both Left and Right columns activated on FORUMHOME & SHOWTHREAD, and the Left column boxes are showing up underneath the Center thread box.
Are you using the default style, or have you edited any of the templates associated with those pages? There would have to be an unnecessary ending </table> tag somewhere for that to happen.

Brian...? I don't know if IIstix ever found that nasty table code problem on his board or not. But, I'm having the exact same problem that's described here. The left column always shows up BELOW the forum when using all (default and custom) styles. I've checked every template edit I've made, thus far, and can't find anything I goofed up myself.

Both the header and nav bar show up perfectly.. then a (narrow) forumhome follows, with the left column under it. When I switch off the left column modules and switch on the right column modules, the forumhome area displays correctly with the right column beside it.

At first, I figured it was a messed up <td> or <tr> or <table> code somewhere in a module. So I selected only ONE left module (the search box) and it showed up at the bottom, like before. Then I switched it by turning off that module and activated a different one -- with the same messed up result. Seems to me that this eliminates a coding problem inside one of the left-column modules.

What would you suggest I try now to find the goof? I've looked into other templates that should be shown on this page .... but I just can't find it. (I've been at this now for 4 days straight, after giving up on it for a while, two weeks ago.)

The way these things all piece together, I'm really getting lost in the tables-within-a-table and such. Can you think of any way to narrow down the possibilities?

(Thanks for the great portal, this is an awesome package.)

thejaxx
10-27-2004, 07:57 PM
Thanks Brian. I was just wondering about this one myself.

Also, I would be interested in being able to get the sidemenu's in PP as well.

memobug
10-27-2004, 09:31 PM
@axecity - If you want to have it everywhere in photopost, I would look at header-inc.php and modify that to set up a table. That's where your vbulletin header and footer get pulled in so it seems you could follow the same pattern they've used for those and you could manage it all in one fell swoop. Do you think that would work?

Photopost Gallery and Classifieds have identical header-inc.php, so I expect that Reviewpost is the same. BTW, it's "seamless."

Regards,

Matt

(Who's wondering if people forgot where the edit button is when they reply to their own posts)