The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
Ajax Thread (1stPost) Preview 1.5 Gold Details »» | |||||||||||||||||||||||||||
Ajax Thread (1stPost) Preview 1.5 Gold
Developer Last Online: Mar 2013
I have abandoned this modification as I find myself lacking time to do any additional modifications to get it 100% stable.
I would highly recommend that you check out this hack by magnus, as this one seems to be 100% AND looks great. I fell in love with it so I am using it myself The only thing it doesn't do is give you a preview of the attachments, so you're welcome to keep the attachments part of this hack and use it in conjunction with magnus' hack. I may just rewrite the attachments part of this hack and re-release it as a standalone. Here is the link to his modification: Collapsable First Post using AJAX (or Last Post!) https://vborg.vbsupport.ru/showthread.php?t=145187 -Sky- Supporters / CoAuthors Show Your Support
|
Comments |
#2
|
|||||||
|
|||||||
FAQ
Quote:
Find this bit of code: Code:
posToCenter = function(elem) { var scrollPos = new getScrollPos(); var pageSize = new getPageSize(); var emSize = new getElementSize(elem); var x = Math.round(pageSize.width/2) - (emSize.width /2) + scrollPos.scrollX; var y = Math.round(pageSize.height/2) - (emSize.height /2) + scrollPos.scrollY; elem.style.left = (x+400) +'px'; elem.style.top = (y+200) +'px'; } y = up <-> down You can use + or - values to adjust the position of the preview window. Example(JUST an example): Code:
elem.style.left = (x+200) +'px'; elem.style.top = (y-200) +'px'; Quote:
This hack will NOT work with vbSEO since it doesn't use showthread.php in the URL anymore. Quote:
Find in ajax_postpreview.js Code:
var strHTML = "<div id=\"ibox_w\" style=\"display:none;\"></div>"; strHTML += "<div id=\"ibox_progress\" style=\"display:none;\">"; strHTML += indicator_img_html; strHTML += "</div>"; strHTML += "<div id=\"ibox_wrapper\" style=\"display:none;\">"; strHTML += "<div id=\"ibox_content\"></div>"; strHTML += "<div id=\"ibox_footer_wrapper\"><div id=\"ibox_close\" style=\"float:right;\">"; strHTML += "<a id=\"ibox_close_a\" href=\"javascript:void(null);\" >Click here to close</a></div>"; strHTML += "<div id=\"ibox_footer\"> </div></div></div></div>"; Code:
var strHTML = "<div id=\"ibox_w\" style=\"display:none;\"></div>"; strHTML += "<div id=\"ibox_progress\" style=\"display:none;\">"; strHTML += indicator_img_html; strHTML += "</div>"; strHTML += "<div id=\"ibox_wrapper\" style=\"display:none;\">"; strHTML += "<a id=\"ibox_close_a\" href=\"javascript:void(null);\" >Click here to close</a>"; strHTML += "<div id=\"ibox_content\"></div></div>"; strHTML += "</div></div>"; Quote:
If you installed v1.3 before I got to update the zip and you have this problem, follow these steps: Find in Threadbit: Code:
<if condition="!is_member_of($vbulletin->userinfo, $postpreviewusergroups) && $vbulletin->options[ajaxpostpreview_enable] == 1 && (!(in_array($forumid, array($vbulletin->options['ajaxpostpreview_forums']))))"> <td class="alt2"><a href="showthread.php?$session[sessionurl]t=$thread[threadid]$thread[highlight]" id="thread_title_$thread[realthreadid]" onmouseover="showIbox('showthread_ajax.php?$session[sessionurl]t=$thread[threadid]',this, true);return false"><img src="$stylevar[imgdir_misc]/menu_open.gif" border="0"></td> </if> Code:
<if condition="!is_member_of($vbulletin->userinfo, $postpreviewusergroups) && $vbulletin->options[ajaxpostpreview_enable] == 1 && (!(in_array($forumid, array($vbulletin->options['ajaxpostpreview_forums']))))"> <td class="alt2"><a href="showthread.php?$session[sessionurl]t=$thread[threadid]$thread[highlight]" onmouseover="showIbox('showthread_ajax.php?$session[sessionurl]t=$thread[threadid]',this, true);return false"><img src="$stylevar[imgdir_misc]/menu_open.gif" border="0"></td> </if> Quote:
You can define a set height and width here (in the JS file) Code:
//if(params['height']) {ibox.style.height = params['height']+'px';} //else {ibox.style.height = '380px';} //if(params['width']) {ibox.style.width = params['width']+'px';} //else {ibox.style.width = '800px';} Code:
//if(params['height']) {ibox.style.height = params['height']+'px';} //else {ibox.style.height = '380px';} ibox.style.height = '480px'; //if(params['width']) {ibox.style.width = params['width']+'px';} //else {ibox.style.width = '800px';} And also set: height:45%; in the CSS file for ibox_content Quote:
THANK YOU TO RMS-Chef FOR THIS: I also made the close preview link a button image instead with this alteration (replace images/buttons/preview_close.gif with your own picture): Code:
var strHTML = "<div id=\"ibox_w\" style=\"display:none;\"></div>"; strHTML += "<div id=\"ibox_progress\" style=\"display:none;\">"; strHTML += indicator_img_html; strHTML += "</div>"; strHTML += "<div id=\"ibox_wrapper\" style=\"display:none;\">"; strHTML += "<div id=\"ibox_content\"></div>"; strHTML += "<div id=\"ibox_footer_wrapper\"><div id=\"ibox_close\" style=\"float:right;\">"; strHTML += "<a id=\"ibox_close_a\" href=\"javascript:void(null);\" ><img src=\"images/buttons/preview_close.gif\" border=\"0\"></a></div>"; strHTML += "<div id=\"ibox_footer\"> </div></div></div></div>"; Quote:
In THREADBIT Template find: Code:
<if condition="!is_member_of($vbulletin->userinfo, $postpreviewusergroups) && $vbulletin->options[ajaxpostpreview_enable] == 1 && (!(in_array($forumid, array($vbulletin->options['ajaxpostpreview_forums']))))"> <td class="alt2"><a href="showthread.php?$session[sessionurl]t=$thread[threadid]$thread[highlight]" onmouseover="showIbox('showthread_ajax.php?$session[sessionurl]t=$thread[threadid]',this, true);return false"><img src="$stylevar[imgdir_misc]/menu_open.gif" border="0"></td> </if> Code:
<if condition="!is_member_of($vbulletin->userinfo, $postpreviewusergroups) && $vbulletin->options[ajaxpostpreview_enable] == 1 && (!(in_array($forumid, array($vbulletin->options['ajaxpostpreview_forums']))))"> <td class="alt2"><a href="#nbsp;" onclick="showIbox('showthread_ajax.php?$session[sessionurl]t=$thread[threadid]',this, true);return false"><img src="$stylevar[imgdir_misc]/menu_open.gif" border="0"></a></td> </if> |
#3
|
||||
|
||||
Wow, this looks awesome. Thanks, SkyCatcher!
|
#4
|
|||
|
|||
Awesome!
|
#5
|
||||
|
||||
Might I suggest you change the title to "Thread Preview" rather than post, since that is what it is doing.
|
#6
|
|||
|
|||
suggestions...
|
#7
|
||||
|
||||
Quote:
Well since you have the pitchfork I suppose I'll take that into considderation |
#8
|
|||
|
|||
great idea, will try this tomoz
I would say the title is correct as your only preview 1 post not the thread |
#9
|
||||
|
||||
Nice Work Mate Really Nice I Will Use It
|
#10
|
|||
|
|||
i am finding a couple of things, i really don't know how to fix it. For some reason i want the Preview to pop up in the middle. However it actually opens all the way to the right and i have to scroll over. I dont know if this is a bug but The time is abit off too. Some times i will get the full 8 seconds and sometimes i will only get a sec of preview. Also, it seems to be Transparent like when i select it if there is a forum name under it then it gets mixed in with the writing
|
Thread Tools | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|