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)

Erica1977 11-10-2011 03:21 AM

Oh by the way you should change your version been 1.0 ever since you made this mod should probably be at 2.0 version.

nerbert 11-10-2011 03:32 AM

What you could do for Seamus Red scroll buttons is change the background to this:

Code:

        background:                rgb(80,16,21);  /*{vb:stylevar postbithead_background};*/
That's the average color of the red part. It just won't have the texture. If you don't like it you can change it back easily.

venom2124 11-10-2011 03:38 AM

disregard. I'm stupid and posting to the wrong mod.

nerbert 11-10-2011 04:13 AM

Surely with all the graphics on your forum someone could make some image buttons for your various styles. Just don't change the width!

I noticed another problem: in the Btech red and the others below it the last cell in Threadnav is only partly exposed. The problem is the JavaScript gets a measure of the width of the available space and calculates the cell width based on that. Normally in the course of loading the page it gets that dimension after the scroll bar on the left has popped up. On these styles there's a delay between the scroll bar popping up and the page narrowing to fit. Apparently it's getting the width at the wrong time and making the cells too wide. I'll work on an event listener or some other method to determine whether the width has narrowed.

Erica1977 11-10-2011 04:29 AM

Quote:

Originally Posted by nerbert (Post 2266399)
Surely with all the graphics on your forum someone could make some image buttons for your various styles. Just don't change the width!

I noticed another problem: in the Btech red and the others below it the last cell in Threadnav is only partly exposed. The problem is the JavaScript gets a measure of the width of the available space and calculates the cell width based on that. Normally in the course of loading the page it gets that dimension after the scroll bar on the left has popped up. On these styles there's a delay between the scroll bar popping up and the page narrowing to fit. Apparently it's getting the width at the wrong time and making the cells too wide. I'll work on an event listener or some other method to determine whether the width has narrowed.

Oh ok Thanks just let me know and i'll keep working with you on this Mod Thanks! :):up:

nerbert 11-10-2011 02:14 PM

Updated xml file to resolve more style incompatibility issues and problem with IE

Erica1977, this should make the cells come out correctly in all styles.

Erica1977 11-10-2011 03:12 PM

1 Attachment(s)
Quote:

Originally Posted by nerbert (Post 2266548)
Updated xml file to resolve more style incompatibility issues and problem with IE

Erica1977, this should make the cells come out correctly in all styles.

problem with this update see pic.

Attachment 134351

nerbert 11-10-2011 04:00 PM

Okay, the cells come out too narrow for you and too wide for me, but for the average viewer they should come out just right!

I looked at the source code for Btech and I see why there's a problem, and I have a vague intuitive phantom-like notion of how to solve it. I shall work on bringing my notion into concrete form

nerbert 11-10-2011 10:51 PM

Erica1977, replace the entire threadnav template with this and see how it works

HTML Code:

<form method="post">       
        <link rel="stylesheet" type="text/css" href="{vb:raw vbcsspath}threadnav.css" />
        <div class="threadnav" id="threadnav">
                <button type="button" class="scroll" id="left"
                        onmousedown="move(this);"
                        onmouseup="stop(this);"
                        onmouseout="stop(this);">

                        <vb:if condition="!is_browser('opera')">
                                <div style="margin:-3px 0px 0px -2px;font-size:13px;"></div>
                        <vb:else />
                                <div style="margin:-4px 1px 0px 0px;font-size:16px;"></div>
                        </vb:if>
                </button>
               
                <button type="button" class="scroll" id="right"
                        onmousedown="move(this);"
                        onmouseup="stop(this);"
                        onmouseout="stop(this);">

                        <vb:if condition="!is_browser('opera')">
                                <div style="margin:-3px -2px 0px 0px;font-size:13px;"></div>
                        <vb:else />
                                <div style="margin:-4px 0px 0px 1px;font-size:16px;"></div>
                        </vb:if>
                </button>
       
                <div class="threadlist" id="threadlist">
                        {vb:raw threadbits}
                </div>
        </div>
       
        <input type="hidden" name="s" value="{vb:raw session.sessionhash}" />
        <input type="hidden" name="securitytoken" value="{vb:raw bbuserinfo.securitytoken}" />
       
        <script type="text/javascript">
        <!--
                function move(obj) {
                        x = obj.id == 'left' ? -6 : 6;       
                        interval=setInterval('list.scrollLeft += x', 20);
                        obj.style.opacity=0.8;
                        obj.style.filter='Alpha(opacity=80)';       
                }
               
                function stop(obj) {
                        clearInterval(interval);
                        obj.style.opacity=1.0;
                        obj.style.filter='Alpha(opacity=100)';       
                }               
       
                function delay(type, id) {
                        if(nodelay==0){
                                hoverDelay[id]=setTimeout("show('"+type+"', '"+id+"')", 200);
                        }
                        else {
                                show(type,id);
                        }
                }
               
                function show(type, id) {
                        var cell    = fetch_object('cont_'+id);
                        var scroll  = fetch_object('threadlist').scrollLeft;
                        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 offset  = cell.offsetLeft;       
                        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;
                }
               
                function prevFirst(id) {
                        show('prev', id);
                        fetch_object('prevlasttext_'+id).style.display='none';
                        fetch_object('prevfirsttext_'+id).style.display='block';
                        fetch_object('prevfirst_'+id).style.backgroundColor='white';
                        fetch_object('prevlast_'+id).style.backgroundColor='transparent';
                        fetch_object('info_'+id).style.display='none';
                        nodelay=1;
                }
       
                function prevLast(id) {
                        show('prev', id);
                        fetch_object('prevlasttext_'+id).style.display='block';
                        fetch_object('prevfirsttext_'+id).style.display='none';
                        fetch_object('prevlast_'+id).style.backgroundColor='white';
                        fetch_object('prevfirst_'+id).style.backgroundColor='transparent';
                        fetch_object('info_'+id).style.display='none';
                        nodelay=1;
                }
       
                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('name_'+id).parentNode.offsetLeft;
                        y1=a+b+26
                        y2=a+b+40+98
                        x1=x0+c-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('name_'+id).parentNode.offsetLeft;
                        y1=a+b+26+14
                        y2=a+b+40+98
                        x1=x0+c-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;
                        }
                }
       
                function getThreads() {
                        newThreadCheck = new vB_AJAX_Handler(true);
                        newThreadCheck.onreadystatechange(addCells);
                        var url='showthread.php?do=search';
                        newThreadCheck.send(url);
                }
               
                function addCells() {
                        list.innerHTML=newThreadCheck.handler.responseText;
                        setWidth();
                }
       
                function setWidth() {
                        var n=list.innerHTML.match(/<td id="?td_\d+"?|<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';
                                }
                        }
                }
       
                var y1=0;
                var y2=0;
                var x1=0;
                var x2=0;
                var x;
                var nodelay=0;
                var refresh = {vb:raw vboptions.TN_refresh};
                var limit= {vb:raw vboptions.TN_refresh_limit};
                var list=fetch_object('threadlist');;               
                var hoverDelay = new Array();
                var interval = null;
                var newThreadCheck;
                var windowWidth;

                var field = fetch_object('threadnav').parentNode;
                field.style.position='relative';
                field.style.zIndex=1;

                var e=fetch_object('threadnav');
                var b=document.getElementsByTagName('body')[0];
                var x0=0;
                if (e.style.position=='absolute') {
                        x0=e.offsetLeft-e.scrollLeft;
                }
                else {
                        while ((e!=null) && (e!=b) && (e.style.position!='absolute')) {
                                x0+=e.offsetLeft-e.scrollLeft;
                                if((e.parentNode)&&(e.parentNode.scrollLeft))x0-=e.parentNode.scrollLeft;
                                e=e.offsetParent;
                        }
                }

                listWidth=fetch_object('right').offsetLeft-19-17+1;
                var width=(listWidth/(Math.floor(listWidth/{vb:raw vboptions.TN_cell_width})));
                width = Math.round(width);
                var cells = new Object();
                cells=document.getElementsByTagName('td');
               
                var update = setInterval("if(nodelay==0) getThreads();", refresh*1000);
                setTimeout("clearInterval(update)", limit*60*1000);
                      setWidth();
        //-->

        </script>
</form>
       


Erica1977 11-10-2011 11:34 PM

Quote:

Originally Posted by nerbert (Post 2266750)
Erica1977, replace the entire threadnav template with this and see how it works

HTML Code:

<form method="post">       
        <link rel="stylesheet" type="text/css" href="{vb:raw vbcsspath}threadnav.css" />
        <div class="threadnav" id="threadnav">
                <button type="button" class="scroll" id="left"
                        onmousedown="move(this);"
                        onmouseup="stop(this);"
                        onmouseout="stop(this);">

                        <vb:if condition="!is_browser('opera')">
                                <div style="margin:-3px 0px 0px -2px;font-size:13px;"></div>
                        <vb:else />
                                <div style="margin:-4px 1px 0px 0px;font-size:16px;"></div>
                        </vb:if>
                </button>
               
                <button type="button" class="scroll" id="right"
                        onmousedown="move(this);"
                        onmouseup="stop(this);"
                        onmouseout="stop(this);">

                        <vb:if condition="!is_browser('opera')">
                                <div style="margin:-3px -2px 0px 0px;font-size:13px;"></div>
                        <vb:else />
                                <div style="margin:-4px 0px 0px 1px;font-size:16px;"></div>
                        </vb:if>
                </button>
       
                <div class="threadlist" id="threadlist">
                        {vb:raw threadbits}
                </div>
        </div>
       
        <input type="hidden" name="s" value="{vb:raw session.sessionhash}" />
        <input type="hidden" name="securitytoken" value="{vb:raw bbuserinfo.securitytoken}" />
       
        <script type="text/javascript">
        <!--
                function move(obj) {
                        x = obj.id == 'left' ? -6 : 6;       
                        interval=setInterval('list.scrollLeft += x', 20);
                        obj.style.opacity=0.8;
                        obj.style.filter='Alpha(opacity=80)';       
                }
               
                function stop(obj) {
                        clearInterval(interval);
                        obj.style.opacity=1.0;
                        obj.style.filter='Alpha(opacity=100)';       
                }               
       
                function delay(type, id) {
                        if(nodelay==0){
                                hoverDelay[id]=setTimeout("show('"+type+"', '"+id+"')", 200);
                        }
                        else {
                                show(type,id);
                        }
                }
               
                function show(type, id) {
                        var cell    = fetch_object('cont_'+id);
                        var scroll  = fetch_object('threadlist').scrollLeft;
                        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 offset  = cell.offsetLeft;       
                        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;
                }
               
                function prevFirst(id) {
                        show('prev', id);
                        fetch_object('prevlasttext_'+id).style.display='none';
                        fetch_object('prevfirsttext_'+id).style.display='block';
                        fetch_object('prevfirst_'+id).style.backgroundColor='white';
                        fetch_object('prevlast_'+id).style.backgroundColor='transparent';
                        fetch_object('info_'+id).style.display='none';
                        nodelay=1;
                }
       
                function prevLast(id) {
                        show('prev', id);
                        fetch_object('prevlasttext_'+id).style.display='block';
                        fetch_object('prevfirsttext_'+id).style.display='none';
                        fetch_object('prevlast_'+id).style.backgroundColor='white';
                        fetch_object('prevfirst_'+id).style.backgroundColor='transparent';
                        fetch_object('info_'+id).style.display='none';
                        nodelay=1;
                }
       
                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('name_'+id).parentNode.offsetLeft;
                        y1=a+b+26
                        y2=a+b+40+98
                        x1=x0+c-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('name_'+id).parentNode.offsetLeft;
                        y1=a+b+26+14
                        y2=a+b+40+98
                        x1=x0+c-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;
                        }
                }
       
                function getThreads() {
                        newThreadCheck = new vB_AJAX_Handler(true);
                        newThreadCheck.onreadystatechange(addCells);
                        var url='showthread.php?do=search';
                        newThreadCheck.send(url);
                }
               
                function addCells() {
                        list.innerHTML=newThreadCheck.handler.responseText;
                        setWidth();
                }
       
                function setWidth() {
                        var n=list.innerHTML.match(/<td id="?td_\d+"?|<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';
                                }
                        }
                }
       
                var y1=0;
                var y2=0;
                var x1=0;
                var x2=0;
                var x;
                var nodelay=0;
                var refresh = {vb:raw vboptions.TN_refresh};
                var limit= {vb:raw vboptions.TN_refresh_limit};
                var list=fetch_object('threadlist');;               
                var hoverDelay = new Array();
                var interval = null;
                var newThreadCheck;
                var windowWidth;

                var field = fetch_object('threadnav').parentNode;
                field.style.position='relative';
                field.style.zIndex=1;

                var e=fetch_object('threadnav');
                var b=document.getElementsByTagName('body')[0];
                var x0=0;
                if (e.style.position=='absolute') {
                        x0=e.offsetLeft-e.scrollLeft;
                }
                else {
                        while ((e!=null) && (e!=b) && (e.style.position!='absolute')) {
                                x0+=e.offsetLeft-e.scrollLeft;
                                if((e.parentNode)&&(e.parentNode.scrollLeft))x0-=e.parentNode.scrollLeft;
                                e=e.offsetParent;
                        }
                }

                listWidth=fetch_object('right').offsetLeft-19-17+1;
                var width=(listWidth/(Math.floor(listWidth/{vb:raw vboptions.TN_cell_width})));
                width = Math.round(width);
                var cells = new Object();
                cells=document.getElementsByTagName('td');
               
                var update = setInterval("if(nodelay==0) getThreads();", refresh*1000);
                setTimeout("clearInterval(update)", limit*60*1000);
                      setWidth();
        //-->

        </script>
</form>
       


ok just changed it with this code btech red.

Erica1977 11-10-2011 11:40 PM

Quote:

Originally Posted by Erica1977 (Post 2266760)
ok just changed it with this code btech red.

Did UO Purple and UO Blue as well.

nerbert 11-11-2011 02:54 AM

I've watched that page load several times and can see no general method of catching it at just the right stage with any general purpose code. There's just too many things going on with all those modifications.

But ....

Here's a little work-around just for your site. Find
Code:

                listWidth=fetch_object('right').offsetLeft-19-17+1;
near the bottom of threadnav and just below it add this line
Code:

                if(',50,29,31,41,'.match(/{vb:raw style.styleid}/))listWidth-=34;
It anticipates the problem styles will shrink 34 pixels horizontally and subtracts that much from the calculated width of the space available.

Erica1977 11-11-2011 02:57 AM

Quote:

Originally Posted by nerbert (Post 2266815)
I've watched that page load several times and can see no general method of catching it at just the right stage with any general purpose code. There's just too many things going on with all those modifications.

But ....

Here's a little work-around just for your site. Find
Code:

                listWidth=fetch_object('right').offsetLeft-19-17+1;
near the bottom of threadnav and just below it add this line
Code:

                if(',50,29,31,41,'.match(/{vb:raw style.styleid}/))listWidth-=34;
It anticipates the problem styles will shrink 34 pixels horizontally and subtracts that much from the calculated width of the space available.

which style all?

nerbert 11-11-2011 03:21 AM

Duh! I didn't need to figure out that fancy conditional, each style has its own template (It's been a long day)

Just put in

Code:

                listWidth-=34;
in the templates for btech red and all the styles below it in the list.

Erica1977 11-11-2011 03:46 AM

Quote:

Originally Posted by nerbert (Post 2266818)
Duh! I didn't need to figure out that fancy conditional, each style has its own template (It's been a long day)

Just put in

Code:

                listWidth-=34;
in the templates for btech red and all the styles below it in the list.

ok where do i add this line under what.

nerbert 11-11-2011 04:06 AM

Same place as I stated earlier.

socialteenz 11-11-2011 04:49 PM

Installed & nominated :)

*****

nerbert 11-11-2011 05:45 PM

Quote:

Originally Posted by socialteenz (Post 2266980)
Installed & nominated :)

*****

Thanks!

Do check back, I'm working on an upgraded version that will work with more styles. The present version will work with most styles but I'm trying to get it more general.

nerbert 11-11-2011 09:03 PM

Erica1977, I think the problem here is your min-width setting. When btech page loads it resizes twice, first for the scrollbar and then again when all the forum content is finished. As far as I know the body min-width + all the padding, borders, outline and margins must add to less than 1024 regardless of how wide the user has the page. You have it set at 980px which is much too wide. I think you could set that as low as 650px. Go to StyleVars > Common > doc-minWidth and try something much smaller, then check if the page has to resize. This should speed page loading and make it a lot cleaner.

The next thing to do is eliminate the resizing for the scrollbar. Practically every vBulletin page is too tall to display on the screen so they all need scrollbars. But as it is now the page loads starting at the top, and when it gets to the bottom of the window it has to stop, put in a scrollbar, resize eveything and proceed to finish the page. It ought to have a scrollbar from the get-go. If you want to fix this for SHOWTHREAD only go to the SHOWTHREAD template and find the body tag and add style="overflow-y:scroll;" inside the tag. But a simpler way to do it for all pages is go to vbulletin.css and in the .body properties add the line overflow-y:scroll;. There is only one page I know of that doesn't need a scrollbar and that's the vBulletin Message page, but who's going to notice an inactive scrollbar there anyway?

Once this project is done I'm doing this for all my styles.

Now to get rid of the attempts to fix ThreadNav: If changing min-width eliminates the resizing of the page you can get rid of the line I suggested earlier. And if you add the scroll property to vbulletin.css, then in threadnav, go to the line

listWidth=fetch_object('right').offsetLeft-19-17+1;

and edit out "-17" (And you thought I was just too lazy to do my arithmetic!)

FReeSTER 11-12-2011 10:12 AM

For some reason any of the updates seen to work at my board. I dont see the navbox

nerbert 11-12-2011 12:37 PM

FReeSTER:

Did an earlier version work?

Do you mean nothing shows at all?

Do you have any other products that place something at the top of the page?

FReeSTER 11-12-2011 01:19 PM

yes mate none of the versions ever shows up :(

nerbert 11-12-2011 01:38 PM

Check your admin CP that you do have ThreadNav in settings > options, if you do, it is installed.

What about other products? If another product is using the same template hook and it isn't written correctly it will eliminate the other products.

nerbert 11-17-2011 05:22 PM

I've uploaded an improved file with a new system for opening and closing the drop boxes.

I think I've fixed all the problems. Thanks to all for your patience and feedback.

warrior uw 11-22-2011 07:40 AM

i just installed this but it is not even showing up on my forums, i am using 4.1.8

Any ideas?

nerbert 11-22-2011 07:49 AM

It won't show if there are no new threads to view, such as if you just clicked Mark Forums Read.

What I suspect though, is that you have another product that uses the same template hook and it's interfering with it.

Do you have any other products that place anything at the top of the showthread page? If so I can probably help you fix the problem.

But maybe there's something changed in vB4.1.8, I haven't upgraded to that yet.

penmai.com 11-22-2011 05:10 PM

Hi just installed the mod! may i know how to place it above "ad_location.global_below_navbar"

nerbert 11-23-2011 05:14 AM

It's doable but a little complicated as it will be a manual template placement. I'll be away until early next week but I can look into it.

By the way, what vB version are you using?

FReeSTER 11-23-2011 12:58 PM

this is adding a box on the post title one one of my custom styles

penmai.com 11-23-2011 01:42 PM

Let me know which template i have to edit. i am using vb4.1.5.

Alan_SP 12-01-2011 01:21 PM

How server intensive is this mod? Does it do one search for all users who have access to it, or one search for each user every minute (or whatever we specify in ACP)?

nerbert 12-03-2011 12:14 AM

Quote:

Originally Posted by penmai.com (Post 2271164)
Let me know which template i have to edit. i am using vb4.1.5.

Sorry I didn't get back to this earlier. Thanksgiving vacation, business, blah blah blah.....

I think this should do it -- Modify the ThreadNav Search plugin as follows:

PHP Code:


if(($vbulletin->options['TN_onoff'] AND $show['member']  
AND 
$vbulletin->userinfo['tn_control'] != 0
OR (!
$show['member'] AND $vbulletin->options['TN_allow_guests'])) 

    
$threadbits search(); 
    if(
$numthreads 0
    {         
        
$templater vB_Template::create('threadnav'); 
            
$templater->register('threadbits'$threadbits); 
        
//$template_hook['showthread_above_posts'] .= $templater->render(); 
        
$templatevalues['threadnav'] = $templater->render(); 
        
vB_Template::preRegister('SHOWTHREAD'$templatevalues);
    }         

if(
$_REQUEST['do'] == search

    
$threadbits search(); 
    die(
$threadbits); 


Now place {vb:raw threadnav} wherever you wish in the navbar template. If the drop boxes don't show I'll have to find the appropriate division and edit in a z-index. See how it works.

nerbert 12-03-2011 12:16 AM

Quote:

Originally Posted by Alan_SP (Post 2273661)
How server intensive is this mod? Does it do one search for all users who have access to it, or one search for each user every minute (or whatever we specify in ACP)?

I searches every minute for every member. You can set the refresh interval to a very large number and save server loading and bandwidth

osix 12-05-2011 07:26 PM

i just install it on my new forum 4.1.8
after some setting it does not seem to appear .

any idea .

nerbert 12-05-2011 11:18 PM

Do you have any other product that puts anything at the top of the showthread page?

nerbert 12-06-2011 12:23 AM

If you don't have any other products at the top of showthread I'll have you do a simple diagnostic. Paste the following in at the bottom of the Threadnav Search plugin:

PHP Code:

$diagnose 1;
if(
$vbulletin->userinfo['username'] == 'osix' AND $diagnose == 1)
{
        die(
$numthreads ' threads found');


Change "osix" to your forum username. Refresh showthread and you should get a white page with the number of threads found in the search. If you have just clicked "Mark Forums Read" you won't get any results until someone posts a new thread. You may want to go to your user settings and click on ThreadNav Control and switch to "Today's Posts". You can disable the code I just posted by editing $diagnose to a value of 0

bada_bing 12-19-2011 03:48 AM

I like this mod but I would like to see a feature that allows you to only include the forums you want to show up rather then exclude forums, I have way more forums I want to exlude then include and this becomes a pain to manage when you have sponsors that come and go and forums that get altered.

thang28101993 01-19-2012 11:58 PM

not work http://downloadphimhd.com, help me

nerbert 01-20-2012 01:17 PM

Quote:

Originally Posted by thang28101993 (Post 2290046)
not work http://downloadphimhd.com, help me

This hasn't been working for some other people either and I'm not sure why.

Try this:

Admin CP > Options > General Settings > Thread/Forum Read Marking Type.

If it's not set to "Database (automatic forum marking)", change it to that and put some number in the next option if there isn't one there already. See if that makes it work.

osix 03-02-2012 10:27 PM

is this working for 4.1.10


All times are GMT. The time now is 02:21 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.01692 seconds
  • Memory Usage 1,985KB
  • 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
  • (7)bbcode_code_printable
  • (2)bbcode_html_printable
  • (2)bbcode_php_printable
  • (10)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)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