PDA

View Full Version : Questions related to "wrapping" the forum in my Drupal theme


aharown07
07-15-2008, 08:34 AM
I'm using a modified version of the Marinelli theme... and have done a little work on defining regions in the vBulletin templates so that my sidebars, etc. will appear in the forums.
So far, only the footer is working.
What I haven't done is define regions for the header and side bar... reason: I don't know how to do it. When I look at the Blocks admin in Drupal, there isn't a region called "header" showing up in the drop downs and such.... so I'm not sure what syntax to use in vBulletin templates to make the header show up.... also not sure what template to define the region in.

I want the Marinelli header to be the forums header as well.... so top of the page.

When it comes to sidebars, similar problem. What vb template should I create the regions in?

I've only picked up the beginnings of a rudimentary knowledge of CSS and PHP so far so... any help appreciated.

bszopi
07-15-2008, 10:04 AM
Have you looked at the How-To? http://vbdrupal.org/forum/showthread.php?t=1011

aharown07
07-15-2008, 11:14 AM
Have you looked at the How-To? http://vbdrupal.org/forum/showthread.php?t=1011

Yep, that's how I got started. There's just still alot I don't understand. Goddess' code got my footer working, but doesn't seem to be turning on sidebars or header. I do have content enabled in my sidebars... as for the header, it doesn't appear in Drupal as a region you can put blocks in. So I probably need to do something there to the Drupal template. Just don't know what.

bszopi
07-15-2008, 12:06 PM
Do you have the block enabled in the vBulletin Options -> vbDrupal? You need to tell vBulletin which regions you want to show in order for them to be turned on.

As far as the template for the header, I *think* it will be in the NAVBAR template. You will just need to include a code snippet similar to the right and left block snippets in Goddess' code.

aharown07
07-15-2008, 02:27 PM
Do you have the block enabled in the vBulletin Options -> vbDrupal? You need to tell vBulletin which regions you want to show in order for them to be turned on.
I think I do. I've got Load Blocks set to Yes and Block Regions set to *


As far as the template for the header, I *think* it will be in the NAVBAR template. You will just need to include a code snippet similar to the right and left block snippets in Goddess' code.
Probably. I have a NAVBAR snippet from one of her posts as well. She said in her template it put the Drupal header stuff below the vB breadcrumb bar... but I suppose there would be a parameter in the CSS somewhere to display it top of page?

But it's not showing anywhere in my setup at the moment.

bszopi
07-15-2008, 03:04 PM
I think vidmarc was having issues when he tried * as well, so you might just try selecting 1 or 2 regions (right or left blocks for example) and see if it works that way, and then go from there.

Are you wanting the header block from Drupal below the navbar or above it?

aharown07
07-15-2008, 03:15 PM
I think vidmarc was having issues when he tried * as well, so you might just try selecting 1 or 2 regions (right or left blocks for example) and see if it works that way, and then go from there.

Are you wanting the header block from Drupal below the navbar or above it?

Will try a few things instead of * ... would like the header block above the navbar

bszopi
07-15-2008, 03:18 PM
I just looked at my site and confirmed that header does in fact work for me directly under the navbar. Since you mention that header is not even listed as an option in the dropdown, it is most likely not a valid region in the Drupal theme you are trying to use. Try setting up defaultangy and see if header becomes an option in the dropdowns. If so, then you will have to start digging into the template file of the theme you are wanting to use. And that's not something I can help you with, as I haven't messed with Drupal theming at all.

bszopi
07-15-2008, 05:52 PM
The problem is definately in the theme itself. This is code straight from the template.php file:

// regions for marinelli
function marinelli_regions() {
return array(
'sidebar_left' => t('sidebar_left'),
'sidebar_right' => t('sidebar_right'),
'content' => t('content'),
'footer' => t('footer'),
);
}

So the header region is not even defined in the theme, therefore it will never show up.

Goddess
07-16-2008, 01:58 AM
you can manually add those regions to your theme and vbdrupal if you want. i think the confusion was coming in that creating the regions in vb templates somehow made them available to drupal. it's the other way around. creating the regions in drupal and putting them in your vb template makes them available to load the blocks in vb (or drupal, if the regions are in your drupal theme file).

hth.

aharown07
07-16-2008, 08:41 AM
OK, I replaced "*" with some specific region identifiers. In the Marinelli theme I'm using, the right side bar is apparently sidebar_right. And it's visible now in vB (yay!!!), but it's at the bottom below the footer.... probably because the code that creates that region in vB is in the footer template? (or would that be a job for the CSS?)
Anybody know what the right template would be to make it appear in the proper place, to the right of the forum?

... and then I just have to get header working.
If Drupal isn't showing a region called "header" and I create a region by that name in template.php... doesn't seem to me that the result will be that the themed header will show in vB. It'll just be an empty region won't it? Maybe some of the folks that work w/the Marinelli theme can help me figure out how the header works?

Goddess
07-22-2008, 12:49 PM
the header isn't a region in your theme in this case, as the html code that creates it is generated by the the page template. you have to manually duplicate the code in your vb templates in order to duplicated it in the vb side. this is easier to pull from a "view source" of your site than the template file, as that contains lots of php variables that drupal uses to generate it instead of the final code.

on the placement, all that is done by what you've done with the vb templates to put the wrapper for your vb in there. so if it's not showing up where you want, that's it. vbd can only put the drupal blocks where the variables are, and cannot distinguish by block name the location. the trick is to match the location yourself by recreating the html code your theme uses around the vb table.

aharown07
07-25-2008, 07:47 AM
Have a guy working on this now and what you've described is apparently what he's doing. So the vb side is now displaying our Drupal sidebar in the right place and alot of our front page header... also in the right place.

Goddess
07-25-2008, 02:56 PM
glad to hear you're getting it sorted out...always nice when that stuff is where it's supposed to be, huh? :)