PDA

View Full Version : Understanding vBulletin's use of DHTML for popups and Quickedit


merk
03-24-2006, 05:30 AM
Having recently completely changed my style from table based to XHTML + CSS based, it appears that I have broken most of the popups (search, quicklinks, thread tools, etc) while some like the popup for a username, seem to be okay.

I have followed a uniform approach to mimic the id assignment of the table based layouts, and as far as I can tell, I havent missed any necessary variables or elements required to make it work.

I also have noticed that the quick editor fails to disappear after saving a post (which it successfully sends to the server).

Has anyone managed to work out the quirks of the vbmenu_register() and quickedit javascript functions and their requirements?

I have very limited knowledge of javascript and it is beyond me.

Freesteyelz
03-24-2006, 07:59 AM
I'll need to see an example code (e.g., search vbmenu_control + vbmenu_option) to know what you did. Did you completely re-write the .js files or did you simply change the ID names?

BTW...Much props to you, merk. One of my future projects will be a XHTML + CSS (strict) vB. I've done fully compliant XHTML + CSS sites in the past that worked across major browsers. With a board, as good as vB, it may be a challenge.

merk
03-24-2006, 08:06 AM
I have not modified the javascript files one bit, nor have i missed out on any elements that were originally in the vBulletin templates.

They were of course, linked to <table>, <td> and the like, which doesnt fit with schemantic markup for most things (popup menus should be unordered lists imo), so mostly they're assigned to other element types.

So far, I think I may have found the solution. I worked out that I did infact miss an id="edit$post[postbit]" at the start of the postbit, which has fixed the quickedit somewhat.

As for the popups, I think it has something to do with me removing style="display: none;" and replacing it with a class. Will let you know ;)

And the XHTML transition is a PITA unless you know your way around css and xhtml completely imo. It really is a shame there isnt a default style with more "proper" markup.

And thats what it was! Luckily I decided to dedicate time to understanding the javascript which now I do :)

Freesteyelz
03-24-2006, 08:39 AM
Heh...Glad you got it to work. :)

merk
03-24-2006, 10:04 AM
Well I havent finished yet, but Im getting there.

Thanks for the brain food ;)