Thread: Integration with vBulletin - Dynamic Joomla!VB wrapper
View Single Post
  #42  
Old 05-19-2008, 12:39 AM
cheesegrits's Avatar
cheesegrits cheesegrits is offline
 
Join Date: May 2006
Posts: 500
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Sunsetdriver View Post
1) if I change the default style in Joomla's backend (same template but different style), it doesn't change in forum page. Of course it happens 'cause I have to manually change parameters in /vbulletin/head.php. Is there a way to let head.php read parameters directly from template's index.php?
What you could do is extract any style definition lines from the head.php and index.php, create another file to put them in, and 'require' that file from your two versions of the template.

Quote:
2) How can I display correctly modules in forum page? I tried it but they didn't got displayed well;
I don't seem to have any problems with CMPS modules, can't help you there.

Quote:
3) There's a bug with vb's dropdown menus. As I click on them, they got displayed away from menu (see pic).
This is a semi-well known quirk of vB's menu control javascript. It assumes there are no blocks on the page between the menu location and the document root which use 'position=absolute' or 'position=relative'. In other words, vB always assumes it is calculating coordinates relative to the top left of the document. But if the menu is within any block which uses positioning (like your J! template), it is then rendered with the coordinates being relative to that block. So the menu is shifted down and to the right.

The only cure I've found for this is a vB file edit, which I hate doing, but I've yet to find a workaround for it. In ./clientscript/vbulletin_menu.js, edit the following function to look like this:

Code:
vB_Popup_Menu.prototype.fetch_offset = function(obj)
{
	/*
	if (obj.getBoundingClientRect)
	{
		// better, more accurate function for IE
		var rect = obj.getBoundingClientRect();

		var scrollTop = Math.max(document.documentElement.scrollTop, document.body.scrollTop);
		var scrollLeft = Math.max(document.documentElement.scrollLeft, document.body.scrollLeft);

		if (document.documentElement.dir == 'rtl')
		{
			// IE returns a positive scrollLeft, but we need a negative value to actually do proper calculations.
			// This actually flips the scolloing to be relative to the distance scrolled from the default.
			scrollLeft = scrollLeft + document.documentElement.clientWidth - document.documentElement.scrollWidth;
		}

		return { 'left' : rect.left + scrollLeft, 'top' : rect.top + scrollTop };
	}
	*/

	var left_offset = obj.offsetLeft;
	var top_offset = obj.offsetTop;

	while (YAHOO.util.Dom.getStyle(obj, 'position') == 'static' && (obj = obj.offsetParent) != null)
	{
		left_offset += obj.offsetLeft;
		top_offset += obj.offsetTop;
	}

	return { 'left' : left_offset, 'top' : top_offset };
};
As always with code edits, make sure you keep an original copy of the file in case you moof it up.

-- hugh
Reply With Quote
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01245 seconds
  • Memory Usage 1,779KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD_SHOWPOST
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code
  • (3)bbcode_quote
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_box
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit_info
  • (1)postbit
  • (1)postbit_onlinestatus
  • (1)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • reputationlevel
  • showthread
Included Files:
  • ./showpost.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showpost_start
  • bbcode_fetch_tags
  • bbcode_create
  • postbit_factory
  • showpost_post
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • showpost_complete