Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.6 > vBulletin 3.6 Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Ajax Thread (1stPost) Preview 1.5 Gold Details »»
Ajax Thread (1stPost) Preview 1.5 Gold
Version: 1.5 Gold, by SkyCatcher SkyCatcher is offline
Developer Last Online: Mar 2013 Show Printable Version Email this Page

Category: Show Thread Enhancements - Version: 3.6.4 Rating:
Released: 02-03-2007 Last Update: Never Installs: 101
Uses Plugins Template Edits
Additional Files  
No support by the author.

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

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #102  
Old 02-11-2007, 03:16 AM
RMS-Chef RMS-Chef is offline
 
Join Date: Aug 2003
Location: MA, USA
Posts: 326
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Overall the most frequent feedback I am getting is people rather click the image in the left column than have it involked with the mouseover. They are getting lots of accidental activations.
Reply With Quote
  #103  
Old 02-11-2007, 11:41 AM
SkyCatcher's Avatar
SkyCatcher SkyCatcher is offline
 
Join Date: Feb 2003
Location: Germany
Posts: 310
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by RMS-Chef View Post
Overall the most frequent feedback I am getting is people rather click the image in the left column than have it involked with the mouseover. They are getting lots of accidental activations.
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="#" 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>
Reply With Quote
  #104  
Old 02-11-2007, 02:46 PM
SkyCatcher's Avatar
SkyCatcher SkyCatcher is offline
 
Join Date: Feb 2003
Location: Germany
Posts: 310
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

v1.32 released. Just a minor update to fix the column span issues.

Announcements will still be 1 column short and I'll come up with something soon, but since there's no hook to intercept it it may take a while.

Simply follow the steps in the upgrade.txt file to upgrade. It's 1 template edit an re-installing the product with overwrite: yes to include another plugin.
Reply With Quote
  #105  
Old 02-12-2007, 12:51 AM
RMS-Chef RMS-Chef is offline
 
Join Date: Aug 2003
Location: MA, USA
Posts: 326
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by SkyCatcher View Post
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="#" 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>
Thanks for the update.

I am still getting the same display with soft deleted threads.

Thanks for the edit to have the preview invoked with a click. The only problem with that is when I click the image it does open the preview but also moves the main page to the top. It is not real intuitive to be scrolled half way down a thread listing, click the button and have to scroll back down and find your place after closing the preview. Any way to get it to only open the preview while maintaining screen position in the main page/window with a mouse click?
Reply With Quote
  #106  
Old 02-12-2007, 01:02 AM
SkyCatcher's Avatar
SkyCatcher SkyCatcher is offline
 
Join Date: Feb 2003
Location: Germany
Posts: 310
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by RMS-Chef View Post
Almost there.
The only problem with that is when I click the image it does open the preview but also moves the main page to the top. It is not real intuitive to be scrolled half way down a thread listing, click the button and have to scroll back down and find your place after closing the preview. Any way to get it to only open the preview while maintaining screen position in the main page/window with a mouse click?

It's 4 am so I won't be able to take a look right now but changing the mouseover to click isn't going to have an affect on that. Usually it's when you edit something in the JS file that's not really supposed to be removed or changed in that way.

PM me your JS file and I'll check it out when I wake up
Reply With Quote
  #107  
Old 02-12-2007, 09:12 PM
RMS-Chef RMS-Chef is offline
 
Join Date: Aug 2003
Location: MA, USA
Posts: 326
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by SkyCatcher View Post
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="#" 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>
FYI.
SkyCatcher, you should edit the above in the post per your PM to me because the little alteration seems to have worked great. If you instead 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>
It will open the preview with a mouse click on the icon rather than a mouseover and it seems to maintain it's current window position.

My last issue that I can see is secondary usergroups. I plan to use this as a feature for only staff and a vip usergroup. The vip group's users maintain registered (ID: 2) as their primary group and when they subscribe, the vip group is added as a secondary group. If I do NOT place the vip group as being excluded they still cannot view the preview since their primary group (registered: 2) is still blocking them. I am hoping there is a workaround like perhaps adding a ACP field of groups to ALLOW that will override the excluded if it is a secondary group or whatever...or something along those lines.
Reply With Quote
  #108  
Old 02-13-2007, 08:48 AM
SkyCatcher's Avatar
SkyCatcher SkyCatcher is offline
 
Join Date: Feb 2003
Location: Germany
Posts: 310
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by RMS-Chef View Post
My last issue that I can see is secondary usergroups. I plan to use this as a feature for only staff and a vip usergroup. The vip group's users maintain registered (ID: 2) as their primary group and when they subscribe, the vip group is added as a secondary group. If I do NOT place the vip group as being excluded they still cannot view the preview since their primary group (registered: 2) is still blocking them. I am hoping there is a workaround like perhaps adding a ACP field of groups to ALLOW that will override the excluded if it is a secondary group or whatever...or something along those lines.
That could be a problem. Right now it's checking all usergroups: primary + secondary and if a member is in one of the usergroups you've excluded then he/she can't use it.

i.e.

Exclude: 18,19,20

User's Primary usergroupid is 2
Users Secondary usergroupid is 19
=
User cannot access the preview.

and vice-versa.


I'll do some digging.
Reply With Quote
  #109  
Old 02-13-2007, 11:44 AM
RMS-Chef RMS-Chef is offline
 
Join Date: Aug 2003
Location: MA, USA
Posts: 326
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

That's why it may be better and more effective to have the ACP setting be groups that CAN use the hack.

It's just that I imagine the majority of boards run their user account upgrades this way so it could be a problem for many.

Quote:
Originally Posted by SkyCatcher View Post
That could be a problem. Right now it's checking all usergroups: primary + secondary and if a member is in one of the usergroups you've excluded then he/she can't use it.

i.e.

Exclude: 18,19,20

User's Primary usergroupid is 2
Users Secondary usergroupid is 19
=
User cannot access the preview.

and vice-versa.


I'll do some digging.
Reply With Quote
  #110  
Old 02-13-2007, 04:08 PM
RMS-Chef RMS-Chef is offline
 
Join Date: Aug 2003
Location: MA, USA
Posts: 326
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

To solve the issue with soft deleted threads, just do the same tempalte edit that you have in threadbit in threadbit_deleted.
Reply With Quote
  #111  
Old 02-13-2007, 04:28 PM
RMS-Chef RMS-Chef is offline
 
Join Date: Aug 2003
Location: MA, USA
Posts: 326
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

And as a temporary fix for announcements in template threadbit_announcement

After the first <tr>
I added:
Code:
<!-- THREAD PREVIEW -->
<if condition="!is_member_of($vbulletin->userinfo, $postpreviewusergroups) && $vbulletin->options[ajaxpostpreview_enable] == 1 && (!(in_array($forumid, array($vbulletin->options['ajaxpostpreview_forums']))))">
		<td class="alt2">&nbsp;</td>
</if>
<!-- / THREAD PREVIEW -->
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 01:46 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.06121 seconds
  • Memory Usage 2,334KB
  • Queries Executed 26 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (8)bbcode_code
  • (6)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete