vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.6 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=194)
-   -   Integration with vBulletin - Dynamic Joomla!VB wrapper (https://vborg.vbsupport.ru/showthread.php?t=172308)

cheesegrits 05-19-2008 12:39 AM

Quote:

Originally Posted by Sunsetdriver (Post 1523475)
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

cheesegrits 05-25-2008 04:02 AM

Just an FYI ...

I found a bug in vB which breaks the WYSIWYG editors in Internet Explorer if the Mootools javascript library (mootools.js) is included on a vB page. So, for instance, you can't post anything or send PM's, or do anything which uses a WYSIWYG editor. It'll keep telling you your post must have more than 10 characters.

Although Joomla 1.0.x itself doesn't include Mootools, a lot of Joomla components and templates do (like almost all the Rocket Themes ones). Joomla 1.5 does include Mootools by default.

I submitted a bug report at vbulletin.com, and it's been marked as 'confirmed and fixed', although they didn't post the fixed code yet. The bug is in vbulletin_textedit.js.

I'll update this post when I find out what the fix is.

[EDIT]

The fix is around line 1423, the two lines commnented with 'hugh' below:

Code:

                                // Force Firefox 1.0 to run it here and Firefox 1.5+ later on, see Bug #22661
                                // hugh - patched as per http://www.vbulletin.com/forum/project.php?issueid=25602
                                // if (doinit && typeof Array.prototype.map == 'undefined') { this.editdoc.designMode = 'on'; }
                                this.editdoc = this.editwin.document; // See: http://msdn.microsoft.com/workshop/author/dhtml/overview/XpSp2Compat.asp#caching
                                this.editdoc.open('text/html', 'replace');
                                this.editdoc.write(text);
                                this.editdoc.close();
                                if (doinit)
                                {
                                        this.editdoc.body.contentEditable = true;
                                        // $$$ hugh
                                        //if (typeof Array.prototype.map != 'undefined')
                                        if (is_moz)
                                        {
                                                this.editdoc.designMode = 'on';
                                        }
                                }

-- hugh

Catmag 05-29-2008 11:17 AM

I've applied the wrapper (without the $myjoomlacontent buffer) to my test site and all seems to be working relatively well. I am having an issue, though, when I apply the J! core SEF urls. The "/forum" subdirectory is being dropped in any of the links within the forum.

Has anybody run into this problem? Fix?

J! 1.0.15/VB3.7.1

EDIT*** I've managed to work this issue out. mosShowHead() in header.php was causing the problem.

illPhever 06-08-2008 12:52 PM

Quote:

Originally Posted by Catmag (Post 1534967)
I've applied the wrapper (without the $myjoomlacontent buffer) to my test site and all seems to be working relatively well. I am having an issue, though, when I apply the J! core SEF urls. The "/forum" subdirectory is being dropped in any of the links within the forum.

Has anybody run into this problem? Fix?


J! 1.0.15/VB3.7.1

EDIT*** I've managed to work this issue out. mosShowHead() in header.php was causing the problem.

thanks Catmag. i had the same problem. i'm using SEF Advance. removing mosShowHead() in head.php did the trick.

yunie_ 06-11-2008 05:47 PM

ok.. this seems abit too complicated to me (even though i have not tried it).

my concern is.. will this make my website lag? it seems like for every page there is alot of things to fetch..

illPhever 06-12-2008 06:13 AM

Quote:

Originally Posted by cheesegrits (Post 1524239)
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

those changes didn't seem to work for me. after making the change, the dropdown menu fails to appear at all, and it logs an error, "Error: 'YAHOO' is undefined"

i noticed that on shadowraith's site (http://crimsonshadows.net/forum), he has the same problem with the dropdowns, too.

any other suggestions would be greatly appreciated.

cheesegrits 06-15-2008 10:01 PM

Apologies, I should have said that fix was for 3.7.

In 3.6 I think you just need to change the 'while' line to this:

PHP Code:

    while ((obj.style.position == '' || obj.style.position == 'static') && (obj obj.offsetParent) != null

And none of that stuff commented out in the 3.7 fix exists, so no need to worry about it.

-- hugh

segwayon 06-21-2008 03:56 AM

I'm curious if there's an example of an absolute path to the Joomla installation.

The path to my template's folder is "home/domain_name/public_html/templates/template_name/" and in that "template_name" folder is the index.php as well as the new "vbulletin" folder with the new files.

Any pointers appreciated.

cheesegrits 06-22-2008 10:37 AM

The Joomla install dir is wherever your main Joomla index.php is, which in your case is almost certainly /home/domain_name/public_html

-- hugh

James Argo 06-24-2008 07:29 PM

shadowraith, thank you thank you thank you!!!

*James Argo clicked Install and Motm*

Today, I'm not only learning how to wrap, but also how to do php buffering! Precious lesson!

One little question, I tried with 2 different templates (madeyourweb and my own template)

somehow I have difficulty with the line : .$GLOBALS['cur_template'].

for example in:

PHP Code:

.$mosConfig_live_site'/templates/' .$GLOBALS['cur_template']. '/images/logo.gif" 

I must replace .$GLOBALS['cur_template']. with the template folder name to make it work. Is there any other way to work on it? (So I can just leave it .$GLOBALS['cur_template']. instead of replacing it with template's folder name)?

I tried in local server, J! 1.0.15 & vB 3.6.8.

Thanks
;)
Jaymz


All times are GMT. The time now is 10:12 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.01126 seconds
  • Memory Usage 1,792KB
  • 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
  • (2)bbcode_php_printable
  • (5)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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