vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.6 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=194)
-   -   Show Thread Enhancements - Ajax Thread (1stPost) Preview 1.5 Gold (https://vborg.vbsupport.ru/showthread.php?t=138461)

RMS-Chef 02-11-2007 03:16 AM

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.

SkyCatcher 02-11-2007 11:41 AM

Quote:

Originally Posted by RMS-Chef (Post 1179636)
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>


SkyCatcher 02-11-2007 02:46 PM

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.

RMS-Chef 02-12-2007 12:51 AM

Quote:

Originally Posted by SkyCatcher (Post 1179826)
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?

SkyCatcher 02-12-2007 01:02 AM

Quote:

Originally Posted by RMS-Chef (Post 1180317)
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 :)

RMS-Chef 02-12-2007 09:12 PM

Quote:

Originally Posted by SkyCatcher (Post 1179826)
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.

SkyCatcher 02-13-2007 08:48 AM

Quote:

Originally Posted by RMS-Chef (Post 1181003)
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.

RMS-Chef 02-13-2007 11:44 AM

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 (Post 1181354)
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.


RMS-Chef 02-13-2007 04:08 PM

To solve the issue with soft deleted threads, just do the same tempalte edit that you have in threadbit in threadbit_deleted.

RMS-Chef 02-13-2007 04:28 PM

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 -->



All times are GMT. The time now is 08:30 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.01397 seconds
  • Memory Usage 1,762KB
  • 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
  • (8)bbcode_code_printable
  • (6)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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