vBadvanced Forums  
Go Back   vBadvanced Forums > vBadvanced Products > vBadvanced CMPS > vBa CMPS v1.x (Archive - Closed for Posting) > Troubleshooting / "How do I..." Questions

 
 
Thread Tools Display Modes
  #1  
Old 05-24-2004, 12:13 PM
maximux1 maximux1 is offline
Senior Member
 
Join Date: Feb 2004
Posts: 101
Default Sidebar(s) in forums?

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
__________________
"There are two ways of being creative. One can sing and dance. Or one can create an environment in which singers and dancers flourish."
-- Warren G. Bennis (b. 1925), American writer, educator, University of Southern California sociologist

Last edited by maximux1; 08-10-2004 at 12:46 PM.
  #2  
Old 05-24-2004, 12:51 PM
Brian's Avatar
Brian Brian is offline
Administrator
 
Join Date: Jan 2004
Location: Georgia, USA
Posts: 34,240
Default Re: Sidebar(s) in forums?

Thank you for the compliments.

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

http://www.vbadvanced.com/membersare...tid=4&pageid=6
  #3  
Old 05-24-2004, 02:12 PM
maximux1 maximux1 is offline
Senior Member
 
Join Date: Feb 2004
Posts: 101
Default Re: Sidebar(s) in forums?

Sweet, bro! Didnt realize you had documention done already!

Fantastic job, Brian - be proud!
__________________
"There are two ways of being creative. One can sing and dance. Or one can create an environment in which singers and dancers flourish."
-- Warren G. Bennis (b. 1925), American writer, educator, University of Southern California sociologist
  #4  
Old 05-24-2004, 04:13 PM
maximux1 maximux1 is offline
Senior Member
 
Join Date: Feb 2004
Posts: 101
Default Re: Sidebar(s) in forums?

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!
__________________
"There are two ways of being creative. One can sing and dance. Or one can create an environment in which singers and dancers flourish."
-- Warren G. Bennis (b. 1925), American writer, educator, University of Southern California sociologist
  #5  
Old 05-24-2004, 04:31 PM
maximux1 maximux1 is offline
Senior Member
 
Join Date: Feb 2004
Posts: 101
Default Re: Sidebar(s) in forums?

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.
__________________
"There are two ways of being creative. One can sing and dance. Or one can create an environment in which singers and dancers flourish."
-- Warren G. Bennis (b. 1925), American writer, educator, University of Southern California sociologist
  #6  
Old 05-24-2004, 04:32 PM
Brian's Avatar
Brian Brian is offline
Administrator
 
Join Date: Jan 2004
Location: Georgia, USA
Posts: 34,240
Default Re: Sidebar(s) in forums?

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.
  #7  
Old 05-25-2004, 01:11 PM
maximux1 maximux1 is offline
Senior Member
 
Join Date: Feb 2004
Posts: 101
Default Re: Sidebar(s) in forums?

Quote:
Originally Posted by Brian
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
__________________
"There are two ways of being creative. One can sing and dance. Or one can create an environment in which singers and dancers flourish."
-- Warren G. Bennis (b. 1925), American writer, educator, University of Southern California sociologist
  #8  
Old 05-25-2004, 01:51 PM
Brian's Avatar
Brian Brian is offline
Administrator
 
Join Date: Jan 2004
Location: Georgia, USA
Posts: 34,240
Default Re: Sidebar(s) in forums?

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.
  #9  
Old 05-25-2004, 02:20 PM
maximux1 maximux1 is offline
Senior Member
 
Join Date: Feb 2004
Posts: 101
Default Re: Sidebar(s) in forums?

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
__________________
"There are two ways of being creative. One can sing and dance. Or one can create an environment in which singers and dancers flourish."
-- Warren G. Bennis (b. 1925), American writer, educator, University of Southern California sociologist
  #10  
Old 05-25-2004, 02:22 PM
maximux1 maximux1 is offline
Senior Member
 
Join Date: Feb 2004
Posts: 101
Default Re: Sidebar(s) in forums?

answered my own question, again. Just as I expected - works wonderfully!

Thanks Brian!
__________________
"There are two ways of being creative. One can sing and dance. Or one can create an environment in which singers and dancers flourish."
-- Warren G. Bennis (b. 1925), American writer, educator, University of Southern California sociologist
  #11  
Old 05-25-2004, 02:24 PM
Brian's Avatar
Brian Brian is offline
Administrator
 
Join Date: Jan 2004
Location: Georgia, USA
Posts: 34,240
Default Re: Sidebar(s) in forums?

What I posted should work for the forumhome.... THIS_SCRIPT is defined as 'index' at the top of your forum/index.php file.
  #12  
Old 05-25-2004, 02:25 PM
maximux1 maximux1 is offline
Senior Member
 
Join Date: Feb 2004
Posts: 101
Default Re: Sidebar(s) in forums?

Quote:
Originally Posted by maximux1
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...
__________________
"There are two ways of being creative. One can sing and dance. Or one can create an environment in which singers and dancers flourish."
-- Warren G. Bennis (b. 1925), American writer, educator, University of Southern California sociologist
  #13  
Old 05-25-2004, 02:25 PM
maximux1 maximux1 is offline
Senior Member
 
Join Date: Feb 2004
Posts: 101
Default Re: Sidebar(s) in forums?

Quote:
Originally Posted by Brian
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....
__________________
"There are two ways of being creative. One can sing and dance. Or one can create an environment in which singers and dancers flourish."
-- Warren G. Bennis (b. 1925), American writer, educator, University of Southern California sociologist
  #14  
Old 05-25-2004, 02:32 PM
maximux1 maximux1 is offline
Senior Member
 
Join Date: Feb 2004
Posts: 101
Default Re: Sidebar(s) in forums?

Quote:
Originally Posted by Brian
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...
__________________
"There are two ways of being creative. One can sing and dance. Or one can create an environment in which singers and dancers flourish."
-- Warren G. Bennis (b. 1925), American writer, educator, University of Southern California sociologist
  #15  
Old 05-25-2004, 02:48 PM
maximux1 maximux1 is offline
Senior Member
 
Join Date: Feb 2004
Posts: 101
Default Re: Sidebar(s) in forums?

Code:
<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
__________________
"There are two ways of being creative. One can sing and dance. Or one can create an environment in which singers and dancers flourish."
-- Warren G. Bennis (b. 1925), American writer, educator, University of Southern California sociologist
  #16  
Old 05-25-2004, 03:06 PM
MEk MEk is offline
Junior Member
 
Join Date: Apr 2004
Posts: 12
Default Re: Sidebar(s) in forums?

Question about sidebars integration: Why is it that the forums will not show up if you have the right hand sidebar enabled?
  #17  
Old 05-25-2004, 03:11 PM
maximux1 maximux1 is offline
Senior Member
 
Join Date: Feb 2004
Posts: 101
Default Re: Sidebar(s) in forums?

Quote:
Originally Posted by MEk
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;
Code:
<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?
__________________
"There are two ways of being creative. One can sing and dance. Or one can create an environment in which singers and dancers flourish."
-- Warren G. Bennis (b. 1925), American writer, educator, University of Southern California sociologist
  #18  
Old 05-25-2004, 05:22 PM
maximux1 maximux1 is offline
Senior Member
 
Join Date: Feb 2004
Posts: 101
Default Re: Sidebar(s) in forums?

As I somewhat suspected, the $bbuserinfo array was unavailable to the processing function. Brian PM'd me and had me do the following;

Quote:
open your forum/includes/vba_cmps_include_bottom.php file and look for this line:
Code:
global $pages, $stylevar, $headinclude, $header, $footer, $vboptions, $vba_options, $navbar, $cusid;
Replace that with:
Code:
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.
__________________
"There are two ways of being creative. One can sing and dance. Or one can create an environment in which singers and dancers flourish."
-- Warren G. Bennis (b. 1925), American writer, educator, University of Southern California sociologist
  #19  
Old 05-25-2004, 06:15 PM
maximux1 maximux1 is offline
Senior Member
 
Join Date: Feb 2004
Posts: 101
Default Re: Sidebar(s) in forums?

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
Code:
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.
__________________
"There are two ways of being creative. One can sing and dance. Or one can create an environment in which singers and dancers flourish."
-- Warren G. Bennis (b. 1925), American writer, educator, University of Southern California sociologist

Last edited by maximux1; 05-25-2004 at 06:21 PM.
  #20  
Old 05-25-2004, 07:21 PM
maximux1 maximux1 is offline
Senior Member
 
Join Date: Feb 2004
Posts: 101
Default Re: Sidebar(s) in forums?

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.
__________________
"There are two ways of being creative. One can sing and dance. Or one can create an environment in which singers and dancers flourish."
-- Warren G. Bennis (b. 1925), American writer, educator, University of Southern California sociologist
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 02:52 AM.

Forums Powered by vBulletin, Copyright ©2000-2009, Jelsoft Enterprises Ltd.
Please note that vBadvanced is in no way affiliated with Jelsoft Enterprises Ltd, nor will Jelsoft be able to provide any support for our products.