vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.8 Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=236)
-   -   Show Thread Enhancements - YBMF -Whos Reading a Thread Always on Top HACK (https://vborg.vbsupport.ru/showthread.php?t=201355)

TimberFloorAu 01-09-2009 10:00 PM

YBMF -Whos Reading a Thread Always on Top HACK
 
1 Attachment(s)
This version is compatible with 3.8.0. 3.7.0 works fine, not tested on 3.6.0 etc

YoBroMoFo - Whos Online Always On Top ( WOAOT Version 1.0 )

This version is for Internet explorer. ( Feel free to help develop a Firefox Version )
This displays a always on top window, showing who is currently viewing the thread ) Useful as you read thru a thread, and feel a compelling desire

to reply.

Ok dead easy to do.

Requirements:

1. upload image folder to forum root.
2. goto AdminCP
--- Styles and Templates > Search In Templates.
------- Search for SHOWTHREAD

find : </head>

Just before add this CODE
Code:

<!--YoBroMoFo.com Active Users Widget-->
<!--[if IE]>

<!--
? Dynamic Drive (www.dynamicdrive.com)
VBulletin version by ? www.yobromofo.com
This copyright notice MUST stay intact.
-->

<style>
<!--
.drag{position:relative;cursor:hand
}
#scontentmain{
position:absolute;
width:150px;
}
#scontentbar{
cursor:hand;
position:absolute;
background-color:#727272;
height:15;
width:100%;
top:0;
}
#scontentsub{
position:absolute;
width:100%;
top:15;
background-color:#ffffff;
border:2px gray;
padding:1.5px;
}
-->
</style>

<script language="JavaScript1.2">


var dragapproved=false
var zcor,xcor,ycor

function ietruebody(){
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}

function movescontentmain(){
if (event.button==1&&dragapproved){
zcor.style.pixelLeft=tempvar1+event.clientX-xcor
zcor.style.pixelTop=tempvar2+event.clientY-ycor
leftpos=document.all.scontentmain.style.pixelLeft-ietruebody().scrollLeft
toppos=document.all.scontentmain.style.pixelTop-ietruebody().scrollTop
return false
}
}
function dragscontentmain(){
if (!document.all)
return
if (event.srcElement.id=="scontentbar"){
dragapproved=true
zcor=scontentmain
tempvar1=zcor.style.pixelLeft
tempvar2=zcor.style.pixelTop
xcor=event.clientX
ycor=event.clientY
document.onmousemove=movescontentmain
}
}
document.onmousedown=dragscontentmain
document.onmouseup=new Function("dragapproved=false")
//-->
</script>

<![endif]-->
<!--end of YoBroMoFo active users widget-->

__________________________________________________ __________________

Then in same template, SHOWTHREAD

find : </body>
Just before this ADD this code

Code:

<!--YoBroMoFo Active Users Widget-->
<!--[if IE]>
<div id="scontentmain">
<div id="scontentsub">

<div id="scontentbar" >
<img align="right" src="images/misc/barbutton.gif" onClick="onoffdisplay()">
</div>
<p align="center"><br>
<if condition="$show['activeusers']">
<!-- currently active users -->
        <br />
        <table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%"

align="center">
        <tr>
                <td class="tcat" colspan="2">
                        <phrase 1="$totalonline" 2="$numberregistered" 3="$numberguest">$vbphrase[users_viewing_this_thread_x_y_z]

</phrase>
                </td>
        </tr>
        <tr>
                <td class="alt1" colspan="2">
                        <span class="smallfont">$activeusers</span>
                </td>
        </tr>
        </table>
<!-- end currently active users -->
</if></p>


</div>
</div>
</div>

<script language="JavaScript1.2">

/*
? Dynamic Drive (www.dynamicdrive.com)
VBulletin version by ? www.yobromofo.com
This copyright notice MUST stay intact.
*/

//configure the below two variables to determine where the static content will initially be positioned when the document loads, in terms of X and Y

cooridinates, respectively

var w=ietruebody().clientWidth-195
var h=50


////Do not edit past this line///////////
w+=ietruebody().scrollLeft
h+=ietruebody().scrollTop

var leftpos=w
var toppos=h
scontentmain.style.left=w
scontentmain.style.top=h

function onoffdisplay(){
if (scontentsub.style.display=='')
scontentsub.style.display='none'
else
scontentsub.style.display=''
}

function staticize(){
w2=ietruebody().scrollLeft+leftpos
h2=ietruebody().scrollTop+toppos
scontentmain.style.left=w2
scontentmain.style.top=h2
}
window.onscroll=staticize

</script>
<![endif]-->
<!--End of YoBroMoFo Active Users Widget-->


____________________________________

Done

Only works in Internet Explorer. If you need help catch me on Vbulletin.org
or direct on http://www.yobromofo.com/forum/membe...erfloorau.html

Brought to you by YoBroMoFo British Expats January 2009 Version 1.0

PLEASE MARK AS INSTALLED IF YOU USE THIS
Files and instructions included, in the ZIP.

If you mark as installed, you will get preference on code help.

TimberFloorAu 01-10-2009 08:46 PM

*Reserved*

TimberFloorAu 01-12-2009 09:14 AM

1 Attachment(s)
Reversed decision.

Info included :)

kyleforrest 04-12-2009 04:36 PM

Thanks for this :)

Jasem 04-13-2009 02:49 PM

Excellent, thank you!

Nazim 04-14-2009 12:26 PM

it doesnt work for me can you help me out please. followed the instructions and all i get is popup and nothing displayed?

TimberFloorAu 04-14-2009 08:01 PM

Please post a link to the site page, where you have added the code, so we can check for you :)


All times are GMT. The time now is 06:11 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.03163 seconds
  • Memory Usage 1,737KB
  • 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
  • (2)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (7)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete