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)
-   -   Miscellaneous Hacks - Support Forums (https://vborg.vbsupport.ru/showthread.php?t=129737)

Adrian Schneider 11-21-2006 02:06 AM

Try re-applying the template edit.

mauro1947 11-21-2006 09:46 AM

Hi!
Thanks for your answer.
How can i do that? (that you can see i'm totally newbie)
Thanks for your help!!!
Thanks!
Bye!

Adrian Schneider 11-21-2006 10:28 PM

In the instructions it outlines a template edit you need to make. Just do it again for any styles that aren't working.

mauro1947 11-21-2006 10:33 PM

Hi!
Thanks!!
When i can probe, i will tell you the results.
Thanks!!!
Bye!

akanevsky 11-21-2006 11:12 PM

Nice hack, and I'll probably install it at visionscripts, but I am concerned with the fact that some of the plugin code is referring to vBulletin options that do not exist. Also, variables are not properly initialized which causes notice errors at error_reporting(E_ALL) level...

Adrian Schneider 11-22-2006 12:00 AM

I usually make a strong mental note to init variables, but in this case it doesn't really matter as vBulletin generates around 20 notices per page, and unlike other scenarios - this wouldn't affect functionality. If you want to "fix" it, just edit the "Support Forum - Sort By Open" plugin: find
PHP Code:

if (in_array($foruminfo['forumid'], $checkForums) and strpos($sqlsortfield'lastpost') !== false)
{
    
$sqlsortfield "thread.open desc, $sqlsortfield";
    
$hook_query_where .= ' and thread.open <> 10';
    
$vbulletin->options['openAtTop'] = true;


, below it add
PHP Code:

else
{
    
$vbulletin->options['openAtTop'] = false;
}

$openThread 0;
$closedThreads 0;
$lastOpenStatus 'zz'


akanevsky 11-22-2006 02:15 PM

Ok. Also, perhaps you should replace the vBulletin options with a list of IDs with a per-forum bitfield setting...

and where did $vbulletin->options['supportforum_subforums'] come from? It is not in vBulletin options..

also, what is the reason you check for:
strpos($sqlsortfield, 'lastpost') !== false

and for:
!$thread['sticky']

?

Also, perhaps the thread conditional logic is a bit wrong. Maybe it should be this:

Code:

                        <if condition="can_moderate($foruminfo['forumid'], 'canopenclose')">
                                <if condition="$thread['postuserid'] == $vbulletin->userinfo['userid']">
                                        <strong>Notice:</strong>:
                                        This issue has been resolved!  You may re-open it if you are still having problems.
                                <else />
                                        <strong>Notice</strong>:
                                        This issue has been resolved!  The thread starter may re-open it if he wishes.
                                </if>
                        <else />
                                <strong>Notice</strong>:
                                This issue has been resolved!  If you have a similar issue, please create a <a href="newthread.php?$session[sessionurl]f=$foruminfo[forumid]">new thread</a>.
                        </if>


Adrian Schneider 11-22-2006 05:34 PM

Wanted to start off simple, as I'm busy with 100 other things. ;)

You're the lucky one to notice the option is missing, Ive been meaning to issue an update but nobody noticed yet lol.

I use strpos because between 3.5 and 3.6 (or something along those lines) they changed that value which broke it on some boards.

I use !$thread['sticky'] because the separator is dependent on the transitions between the different thread types. It should ignore sticky threads or else you'll get a "Closed Issues" header at the very top of your stickies.

My condition is correct. I tested yours and it doesn't work properly.

akanevsky 11-22-2006 06:04 PM

Quote:

I use strpos because between 3.5 and 3.6 (or something along those lines) they changed that value which broke it on some boards.
Why check for the value? I removed the check and it seems to work correctly. Why does it matter what the sort is?

Quote:

I use !$thread['sticky'] because the separator is dependent on the transitions between the different thread types. It should ignore sticky threads or else you'll get a "Closed Issues" header at the very top of your stickies.
That's right, didn't think about it.

Quote:

My condition is correct. I tested yours and it doesn't work properly.
Yep, it doesn't. But I changed it to the following, and that's what I am using (and it does work properly):

Code:

<if condition="$show['supportforum_message']">
<center>
        <span class="smallfont">
                <strong>
                <if condition="$thread['postuserid'] == $vbulletin->userinfo['userid']">
                        Notice: This issue has been resolved! If you are still experiencing problems, you may reopen the thread.
                <else />
                        <if condition="can_moderate($foruminfo['forumid'], 'canopenclose')">
                                Notice: This issue has been resolved! The thread may be reopened by the thread starter if he or she is continuing to experience problems.
                        <else />
                                Notice: This issue has been resolved! If you are experiencing a similar issue, please create another thread.
                        </if>
                </if>
                </strong>
        </span>       
</center>
<br />
</if>

It is better because if you do not need to call a can_moderate function (and thus avoid an overhead), then why do?

Adrian Schneider 11-22-2006 06:08 PM

It changes the sort order so that it sorts by sticky, then closed/open, then last post time IF you have it set to last post time (default). They changed it to or from (trying to remember exact values) lastposttime to thread.lastposttime. So it's not required, but I don't want it affecting other sort orders.

That final template looks better.


All times are GMT. The time now is 03:30 AM.

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.01252 seconds
  • Memory Usage 1,755KB
  • 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
  • (2)bbcode_php_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (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