vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=245)
-   -   Show Thread Enhancements - ThreadNav: scrolling New Posts navigation bar for Showthread (https://vborg.vbsupport.ru/showthread.php?t=273500)

nerbert 11-09-2011 03:37 AM

Sometime between the time I started this thread and now I went from "Contributor" to "Coder". I take that very seriously. It's my duty to get this working!

Erica1977 11-09-2011 03:40 AM

Quote:

Originally Posted by nerbert (Post 2265903)
Sometime between the time I started this thread and now I went from "Contributor" to "Coder". I take that very seriously. It's my duty to get this working!

hehe just notice that great! :up:

nerbert 11-09-2011 04:19 AM

Erica1977, try this:

In "threadnav" replace function setWidth() with this:

Code:

                function setWidth() {
                        var n=list.innerHTML.match(/<td id="td_|<td class="blank">/gi).length;
                        var tableWidth=(width)*n;
                        fetch_object('table').style.width=''+tableWidth+'px';
                        for(i=0; i<cells.length; i++) {
                            if(cells[i].id.match(/td_\d/i)||cells[i].className=='blank'){
                                cells[i].style.width=''+(width)+'px';
                            }
                        }
                }

At the top of "threadnav_bit" replace <td> with this:
Code:

<td id="td_{vb:raw thread.threadid}">

Erica1977 11-09-2011 04:30 AM

Quote:

Originally Posted by nerbert (Post 2265911)
Erica1977, try this:

In "threadnav" replace function setWidth() with this:

Code:

                function setWidth() {
                        var n=list.innerHTML.match(/<td id="td_|<td class="blank">/gi).length;
                        var tableWidth=(width)*n;
                        fetch_object('table').style.width=''+tableWidth+'px';
                        for(i=0; i<cells.length; i++) {
                            if(cells[i].id.match(/td_\d/i)||cells[i].className=='blank'){
                                cells[i].style.width=''+(width)+'px';
                            }
                        }
                }

At the top of "threadnav_bit" replace <td> with this:
Code:

<td id="td_{vb:raw thread.threadid}">

Ok did the 3 that was messed up only go take a look please.

nerbert 11-09-2011 04:55 AM

Well it's finally working.

I know there's a problem with the drop boxes not closing when you exit on the right side but I have that fixed in the file I'm going to upload to the opening post. I also see a misalignment of borders between the cell and the drop box on the left side, I'll look into that too. When I get the new file up the changes will be compatible with all your other styles so no need to make any exceptions.

Erica1977 11-09-2011 05:00 AM

Quote:

Originally Posted by nerbert (Post 2265919)
Well it's finally working.

I know there's a problem with the drop boxes not closing when you exit on the right side but I have that fixed in the file I'm going to upload to the opening post. I also see a misalignment of borders between the cell and the drop box on the left side, I'll look into that too. When I get the new file up the changes will be compatible with all your other styles so no need to make any exceptions.

Thanks for helping me out and putting up with me lol as you can see most of this thread of your mod has more post of me than anybody else hehe anyway yea about the drop box your correct and again Thanks! :up: :)

nerbert 11-09-2011 05:21 AM

The problem you had would affect anyone who uses those styles and now I see your original problem and the mess-up you had later were related. That same problem could have affected other mods and styles too. It's a good thing all those issues came up right away before I forgot some of the details of how the JavaScript works.

All in all it's a better product now.

I'll get that new file up and I think I have a guess why those borders don't align properly. More on that later.

Erica1977 11-09-2011 05:29 AM

Quote:

Originally Posted by nerbert (Post 2265925)
The problem you had would affect anyone who uses those styles and now I see your original problem and the mess-up you had later were related. That same problem could have affected other mods and styles too. It's a good thing all those issues came up right away before I forgot some of the details of how the JavaScript works.

All in all it's a better product now.

I'll get that new file up and I think I have a guess why those borders don't align properly. More on that later.

Well Glad we caught it now no one will have at least the issues i had!

nerbert 11-09-2011 05:53 AM

An improved version of the ThreadNav file is now available. I hope this is the last change but we'll just have to see if more issues come up.

@Erica1977, I'll have a look at your site tomorrow and see if I can figure out that border alignment problem if it's still there with the new file.

Erica1977 11-09-2011 06:03 AM

Quote:

Originally Posted by nerbert (Post 2265939)
An improved version of the ThreadNav file is now available. I hope this is the last change but we'll just have to see if more issues come up.

@Erica1977, I'll have a look at your site tomorrow and see if I can figure out that border alignment problem if it's still there with the new file.

Ok well i update it to the one you post it public.

nerbert 11-09-2011 03:42 PM

Erica1977, when you get the new file installed and everything is reverted, if you still have that border mis-alignment problem try replacing function show(type, id) with this:

Code:

                function show(type, id) {
                        var cell    = fetch_object('cont_'+id);
                        var field    = fetch_object('threadnav').parentNode;
                        field.style.position='relative';
                        field.style.zIndex=1;
                        var scroll  = fetch_object('threadlist').scrollLeft;
                        var offset  = cell.offsetLeft;
                        var drop    = fetch_object(type+'_'+id);       
                        var nav      = fetch_object('threadnav');
                        var left    = fetch_object('left');
                        var right    = fetch_object('right');       
                        var delta1  = left.offsetLeft + 17;
                        var delta2  = right.offsetLeft - width - 1;       
                        var position = offset-scroll - 1;
                        if(position < delta1) {
                                list.scrollLeft += position - delta1;
                                drop.style.left =''+(delta1)+'px';
                        }
                        else if(position > delta2) {
                                list.scrollLeft += position - delta2;
                                drop.style.left =''+(delta2)+'px';
                        }   
                        else {
                                drop.style.left =''+(position)+'px';
                        }
                        nodelay=1;
                        deltaY = 41;
                        drop.style.top=''+(nav.offsetTop + deltaY)+'px';
                        drop.style.display='block';
                        dropWidth=type=='info'?width:(width+36);
                        drop.style.width=''+(dropWidth-1)+'px'
                        var border='1px solid {vb:stylevar postbit_background.backgroundColor}';
                        fetch_object('name_'+id).style.borderBottom=border;
                }


Erica1977 11-09-2011 03:55 PM

Quote:

Originally Posted by nerbert (Post 2266090)
Erica1977, when you get the new file installed and everything is reverted, if you still have that border mis-alignment problem try replacing function show(type, id) with this:

Code:

                function show(type, id) {
                        var cell    = fetch_object('cont_'+id);
                        var field    = fetch_object('threadnav').parentNode;
                        field.style.position='relative';
                        field.style.zIndex=1;
                        var scroll  = fetch_object('threadlist').scrollLeft;
                        var offset  = cell.offsetLeft;
                        var drop    = fetch_object(type+'_'+id);       
                        var nav      = fetch_object('threadnav');
                        var left    = fetch_object('left');
                        var right    = fetch_object('right');       
                        var delta1  = left.offsetLeft + 17;
                        var delta2  = right.offsetLeft - width - 1;       
                        var position = offset-scroll - 1;
                        if(position < delta1) {
                                list.scrollLeft += position - delta1;
                                drop.style.left =''+(delta1)+'px';
                        }
                        else if(position > delta2) {
                                list.scrollLeft += position - delta2;
                                drop.style.left =''+(delta2)+'px';
                        }   
                        else {
                                drop.style.left =''+(position)+'px';
                        }
                        nodelay=1;
                        deltaY = 41;
                        drop.style.top=''+(nav.offsetTop + deltaY)+'px';
                        drop.style.display='block';
                        dropWidth=type=='info'?width:(width+36);
                        drop.style.width=''+(dropWidth-1)+'px'
                        var border='1px solid {vb:stylevar postbit_background.backgroundColor}';
                        fetch_object('name_'+id).style.borderBottom=border;
                }


Ok go look only on btech red only did it to that style .

nerbert 11-09-2011 04:12 PM

That seems to fix it.

Now I have to update the file again. Well, some day I'll get this perfect.

I'll post here when the fixed file is edited into the OP.

nerbert 11-09-2011 04:42 PM

Updated file in opening post.

Erica1977, when you get everything updated I have some ideas for getting the scroll buttons in seamus style looking better.

Will check back later.

Erica1977 11-09-2011 05:00 PM

Quote:

Originally Posted by nerbert (Post 2266112)
Updated file in opening post.

Erica1977, when you get everything updated I have some ideas for getting the scroll buttons in seamus style looking better.

Will check back later.

Ok going to update now Thanks! :up:

Erica1977 11-09-2011 05:47 PM

Ok have to go out be back soon.

nerbert 11-09-2011 06:20 PM

Looks like you need to revert templates again. I'm having that problem with drop boxes not closing when I exit out the left side.

nerbert 11-09-2011 08:03 PM

I looked and those are the right templates. I shall have to scratch my head and rub my chin and get a very serious look on my face. That usually works when I need to figure something out.

Ahmet Turan 11-09-2011 08:59 PM

thanx

Erica1977 11-09-2011 10:15 PM

Quote:

Originally Posted by nerbert (Post 2266205)
I looked and those are the right templates. I shall have to scratch my head and rub my chin and get a very serious look on my face. That usually works when I need to figure something out.

so are they correct my templates cause i know i reverted them.

nerbert 11-09-2011 10:54 PM

You have the right templates but there's an error in the templates (my bad!)

In your default style in "threadnav" in function hideInfo(event, id) find the line
x1=c+d+59-list.scrollLeft;
and change to 59 to 60

Now test it. Refresh the showthread page in any style, open a drop box and very slowly exit both to the right and the left. It should close exactly as you cross the border. If that works go to function hidePrev(event, id) and find
x1=c+d+59-list.scrollLeft-18;
and change 59 to 60 and test the preview drop box.

If all that works we have all the mechanical problems fixed and then we can work on fixing up the styling.

Erica1977 11-09-2011 11:08 PM

Quote:

Originally Posted by nerbert (Post 2266256)
You have the right templates but there's an error in the templates (my bad!)

In your default style in "threadnav" in function hideInfo(event, id) find the line
x1=c+d+59-list.scrollLeft;
and change to 59 to 60

Now test it. Refresh the showthread page in any style, open a drop box and very slowly exit both to the right and the left. It should close exactly as you cross the border. If that works go to function hidePrev(event, id) and find
x1=c+d+59-list.scrollLeft-18;
and change 59 to 60 and test the preview drop box.

If all that works we have all the mechanical problems fixed and then we can work on fixing up the styling.

ok i did part 1 like you said and you said default style only not sure what your asking me to open and close but i added it part 1 this x1=c+d+60-list.scrollLeft; so can you come on and test it please i only did that part and only to default style let me know if i have to do second part.

nerbert 11-09-2011 11:23 PM

The changes didn't come through. Are all these child styles of a single default style? From looking at the style menu it appears they don't have a parent style. If that's the case you will have to change each one.

Do both changes on Seamus Red and we'll see if that works

Erica1977 11-09-2011 11:28 PM

1 Attachment(s)
Quote:

Originally Posted by nerbert (Post 2266272)
The changes didn't come through. Are all these child styles of a single default style? From looking at the style menu it appears they don't have a parent style. If that's the case you will have to change each one.

Do both changes on Seamus Red and we'll see if that works

Does this answer your Question.
Attachment 134340

Erica1977 11-09-2011 11:31 PM

Quote:

Originally Posted by nerbert (Post 2266272)
The changes didn't come through. Are all these child styles of a single default style? From looking at the style menu it appears they don't have a parent style. If that's the case you will have to change each one.

Do both changes on Seamus Red and we'll see if that works

Ok did it to Seamus Red.

nerbert 11-09-2011 11:34 PM

It looks like they are all independent styles. Let's get Seamus Red done and if it works there it should work everywhere. No point changing them all since I'll be updating the xml file to incorporate this change and then you'll have to revert everything again.

I'll post instructions that should fix up the appearance of the scroll buttons for Seamus Red in the next post.

venom2124 11-09-2011 11:40 PM

1 Attachment(s)
Have a slight alignment issue on the home page. Just wondering how I might go about fixing it.

Erica1977 11-09-2011 11:47 PM

Quote:

Originally Posted by nerbert (Post 2266275)
It looks like they are all independent styles. Let's get Seamus Red done and if it works there it should work everywhere. No point changing them all since I'll be updating the xml file to incorporate this change and then you'll have to revert everything again.

I'll post instructions that should fix up the appearance of the scroll buttons for Seamus Red in the next post.

Ok will wait Thanks! :up:

nerbert 11-09-2011 11:55 PM

The changes came through on Seamus but it's still not working. I'm going to have to study this. In the mean time let's see if we can get those seamus scroll buttons looking better.

Go to "threadnav.css" and put this line at the top of .scroll

Code:

        padding:                11px 0px 12px 0px;
and while you're there change the first line of div.threadnav to this

Code:

        margin:                0px 0px 6px 0px;
That will put some space between ThreadNav and User Tag List.

Do you want to do something with those blazing white lines in ThreadNav? I thought the color at the very top of each of those red headers would look nice but maybe a medium gray would also work.

EDIT: Oops! That first instruction should be for .scroll, not .info

Erica1977 11-10-2011 12:05 AM

Quote:

Originally Posted by nerbert (Post 2266280)
The changes came through on Seamus but it's still not working. I'm going to have to study this. In the mean time let's see if we can get those seamus scroll buttons looking better.

Go to "threadnav.css" and put this line at the top of .scroll

Code:

        padding:                11px 0px 12px 0px;
and while you're there change the first line of div.threadnav to this

Code:

        margin:                0px 0px 6px 0px;
That will put some space between ThreadNav and User Tag List.

Do you want to do something with those blazing white lines in ThreadNav? I thought the color at the very top of each of those red headers would look nice but maybe a medium gray would also work.

EDIT: Oops! That first instruction should be for .scroll, not .info

like this.
Code:

.scroll {
        padding:                11px 0px 12px 0px;
        border:                none;       
        height:                        40px;
        width:                  17px;
        background:                {vb:stylevar postbithead_background};
        color:                        {vb:stylevar postbithead_color};
        cursor:                pointer;
        overflow:                hidden;
        clear:                        none;
}


nerbert 11-10-2011 12:18 AM

Didn't work -- they still have the dark gray bottom.

Let's try changing those white lines in ThreadNav. Read the instructions at the top of threadnav.css and replace "white" with "rgb(191,35,35)". See how that looks.

I'll see if I can figure out how to fix those buttons.

I have a lot of things to figure out here so I'll let you know if I have any bright new ideas.

Erica1977 11-10-2011 12:29 AM

Quote:

Originally Posted by nerbert (Post 2266297)
Didn't work -- they still have the dark gray bottom.

Let's try changing those white lines in ThreadNav. Read the instructions at the top of threadnav.css and replace "white" with "rgb(191,35,35)". See how that looks.

I'll see if I can figure out how to fix those buttons.

I have a lot of things to figure out here so I'll let you know if I have any bright new ideas.

i think the red looks better take a look.

nerbert 11-10-2011 12:37 AM

Okay, that matches the text color.

Well, I'll see if I can figure out these mechanical problems and get back later.

Thanks for your help testing all this. Everything worked fine on my forum but the coding had a lot of weak points. By the time I get it working for you it will be good solid coding.

Erica1977 11-10-2011 12:44 AM

Quote:

Originally Posted by nerbert (Post 2266308)
Okay, that matches the text color.

Well, I'll see if I can figure out these mechanical problems and get back later.

Thanks for your help testing all this. Everything worked fine on my forum but the coding had a lot of weak points. By the time I get it working for you it will be good solid coding.

Ok thanks will be here! :up:

nerbert 11-10-2011 02:17 AM

Try out these and see if you get reliable closing of the drop boxes;

Code:

                function hideInfo(event, id) {
                        mouseY=is_ie?
                        event.clientY+document.documentElement.scrollTop -document.documentElement.clientTop :
                        event.pageY;
                        mouseX=is_ie?
                        event.clientX+document.documentElement.scrollLeft-document.documentElement.clientLeft:
                        event.pageX;
                        a=fetch_object('threadnav').parentNode.offsetTop;
                        b=fetch_object('threadnav').offsetTop;
                        c=fetch_object('threadnav').parentNode.offsetLeft;
                        d=fetch_object('name_'+id).parentNode.offsetLeft;
                        y1=a+b+26
                        y2=a+b+40+98
                        x1=c+d-list.scrollLeft;
                        x2=x1+width;
                        if(mouseY<=y1||mouseX<=x1||mouseX>=x2||mouseY>=y2) {
                                fetch_object('info_'+id).style.display='none';
                                clearTimeout(hoverDelay[id]);
                                nodelay=0;
                                border='0px solid transparent';
                                fetch_object('name_'+id).style.borderBottom=border;
                        }
                }
       
                function hidePrev(event, id) {
                        mouseY=is_ie?
                        event.clientY+document.documentElement.scrollTop -document.documentElement.clientTop :
                        event.pageY;
                        mouseX=is_ie?
                        event.clientX+document.documentElement.scrollLeft-document.documentElement.clientLeft:
                        event.pageX;
                        a=fetch_object('threadnav').parentNode.offsetTop;
                        b=fetch_object('threadnav').offsetTop;
                        c=fetch_object('threadnav').parentNode.offsetLeft;
                        d=fetch_object('name_'+id).parentNode.offsetLeft;
                        y1=a+b+26+14
                        y2=a+b+40+98
                        x1=c+d-list.scrollLeft-18;
                        x2=x1+width+18;
                        if(mouseY<=y1||mouseX<=x1||mouseX>=x2||mouseY>=y2) {
                                fetch_object('prev_'+id).style.display='none';
                                clearTimeout(hoverDelay[id]);
                                nodelay=0;
                                border='0px solid transparent';
                                fetch_object('name_'+id).style.borderBottom=border;
                        }
                }


Erica1977 11-10-2011 02:31 AM

Quote:

Originally Posted by nerbert (Post 2266330)
Try out these and see if you get reliable closing of the drop boxes;

Code:

                function hideInfo(event, id) {
                        mouseY=is_ie?
                        event.clientY+document.documentElement.scrollTop -document.documentElement.clientTop :
                        event.pageY;
                        mouseX=is_ie?
                        event.clientX+document.documentElement.scrollLeft-document.documentElement.clientLeft:
                        event.pageX;
                        a=fetch_object('threadnav').parentNode.offsetTop;
                        b=fetch_object('threadnav').offsetTop;
                        c=fetch_object('threadnav').parentNode.offsetLeft;
                        d=fetch_object('name_'+id).parentNode.offsetLeft;
                        y1=a+b+26
                        y2=a+b+40+98
                        x1=c+d-list.scrollLeft;
                        x2=x1+width;
                        if(mouseY<=y1||mouseX<=x1||mouseX>=x2||mouseY>=y2) {
                                fetch_object('info_'+id).style.display='none';
                                clearTimeout(hoverDelay[id]);
                                nodelay=0;
                                border='0px solid transparent';
                                fetch_object('name_'+id).style.borderBottom=border;
                        }
                }
       
                function hidePrev(event, id) {
                        mouseY=is_ie?
                        event.clientY+document.documentElement.scrollTop -document.documentElement.clientTop :
                        event.pageY;
                        mouseX=is_ie?
                        event.clientX+document.documentElement.scrollLeft-document.documentElement.clientLeft:
                        event.pageX;
                        a=fetch_object('threadnav').parentNode.offsetTop;
                        b=fetch_object('threadnav').offsetTop;
                        c=fetch_object('threadnav').parentNode.offsetLeft;
                        d=fetch_object('name_'+id).parentNode.offsetLeft;
                        y1=a+b+26+14
                        y2=a+b+40+98
                        x1=c+d-list.scrollLeft-18;
                        x2=x1+width+18;
                        if(mouseY<=y1||mouseX<=x1||mouseX>=x2||mouseY>=y2) {
                                fetch_object('prev_'+id).style.display='none';
                                clearTimeout(hoverDelay[id]);
                                nodelay=0;
                                border='0px solid transparent';
                                fetch_object('name_'+id).style.borderBottom=border;
                        }
                }


ok its on seamus red.

nerbert 11-10-2011 03:04 AM

Working reliably for me. I'll update the xml file.

Next time you're tinkering around see what happens of you set the height in .scroll at 60px.

Erica1977 11-10-2011 03:09 AM

Quote:

Originally Posted by nerbert (Post 2266370)
Working reliably for me. I'll update the xml file.

Next time you're tinkering around see what happens of you set the height in .scroll at 60px.

Oh ok will see what happens.

Erica1977 11-10-2011 03:20 AM

Quote:

Originally Posted by Erica1977 (Post 2266373)
Oh ok will see what happens.

tryed it puts the corner arrows a little dont look right will put back at 40

nerbert 11-10-2011 03:21 AM

Now product file available.

Erica1977, you won't need to revert threadnav.css, nothing in that has changed in that. Revert any others though.


All times are GMT. The time now is 12:54 PM.

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.01524 seconds
  • Memory Usage 1,894KB
  • 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
  • (13)bbcode_code_printable
  • (18)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
  • (40)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