FAQ
Quote:
Question: How can I reposition the window?
|
Edit the ajax_postpreview.js file.
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';
}
x = right <-> left
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:
Question: some reason it loads the whole thread! Not just the 1st post
|
Answer:
This hack will NOT work with vbSEO since it doesn't use showthread.php in the URL anymore.
Quote:
Question: I see the "Click Here to Close" code in the js file.
It there any way to have this shown at the top of the window instead of the bottom?
|
Answer:
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>";
Replace with:
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:
Question: when I double click in the thread title to involk the AJAX title editting, instead of the title of the thread becoming editable the small mousover image is replaced with an edit window which has the html code
|
Answer:
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>
REPLACE WITH
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:
Question: Many of my threads are quite long and with auto-resize the user has to scroll the entire main window as it extends far down. If I set a defined size, the window is the proper size but there are no internal scroll bars to scroll down within that window. Am I missing something or is that a limitation?
|
Answer:
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';}
Just change to
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';}
Adding a set height to 480 in the example above. A scrollbar will show for the up/down scrolling if the post is taller than that.
And also set:
height:45%;
in the CSS file for ibox_content
Quote:
Question: Anyway i can change the Click here to close to a GIF button instead?
|
Answer:
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:
Question: How do I change it to click the image in the left column than have it invoked with the mouseover?
|
Answer: No problem.
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>
and REPLACE with:
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>