vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=113)
-   -   User Postbit Template Selection (https://vborg.vbsupport.ru/showthread.php?t=91407)

WhSox21 08-06-2005 06:53 PM

Quote:

Originally Posted by Christine
Given that this isn't my hack, I would prefer for the hack author to fix and re-release it. No stepping on any toes that way.

:)

Christine,

If you have the time would/could you PM me the working code? I'll re-release it along with giving you credit for your work.

I'm very busy right now getting the Help Desk plugin converted to 3.5.

Christine 08-06-2005 08:26 PM

Done. :)

InfiniteWebby 08-11-2005 04:33 AM

Has anyone figured out how to make this work if you have postbit_legacy selected in the vboptions. Because I have racked my brain trying to get it to work to no avail. And I would like to make postbit_legacy default for members AND guests.

InfiniteWebby 08-12-2005 02:55 AM

Ok the problem lies in functions.php

PHP Code:

    if ($vbulletin->options['legacypostbit'] AND in_array('postbit'$templates))
    {
        
$templateassoc['postbit'] = $templateassoc['postbit_legacy'];
    } 

And

PHP Code:

    if ($vbulletin->options['legacypostbit'] AND $templatename == 'postbit')
    {
        
$templatename 'postbit_legacy';
    } 

vBulletin replaces the templatename of postbit with postbit_legacy if you have the setting selected in the cp, no matter what you do before hand. So short of hacking files this sort of hack will never work with postbit_legacy selected in the cp.

CMX_CMGSCCC 08-12-2005 04:06 AM

Aha, I have figured it out.

I have my forums enabled for "Legacy Postbit" by default.

Add the plugin to the hook 'cache_templates'

Use this code:

Code:

global $vbulletin;
if ($vbulletin->userinfo['field9'] == "Vertical Postbit (Legacy)")
{
        $vbulletin->options['legacypostbit'] = 1;
}
else if ($vbulletin->userinfo['field9'] == "Horizontal Postbit")
{
        $vbulletin->options['legacypostbit'] = 0;
}

CHANGE the field9 to your userfield fieldname.

This way when it caches the template, it will disable the legacypostbit option and not force it to use postbit_legacy.

-CMX

InfiniteWebby 08-12-2005 06:50 AM

Quote:

Originally Posted by CMX_CMGSCCC
Aha, I have figured it out.

I have my forums enabled for "Legacy Postbit" by default.

Add the plugin to the hook 'cache_templates'

Use this code:

Code:

global $vbulletin;
if ($vbulletin->userinfo['field9'] == "Vertical Postbit (Legacy)")
{
        $vbulletin->options['legacypostbit'] = 1;
}
else if ($vbulletin->userinfo['field9'] == "Horizontal Postbit")
{
        $vbulletin->options['legacypostbit'] = 0;
}

CHANGE the field9 to your userfield fieldname.

This way when it caches the template, it will disable the legacypostbit option and not force it to use postbit_legacy.

-CMX

Thnx for the help man, sometimes the solution is right in front of you. You just need to get some alternate thinking =)

RoryF 08-17-2005 04:37 PM

Thanks CMX_CMGSCCC, works like a charm :)

ged 09-27-2005 05:09 PM

Is there any way to do it with plugin?

Loony BoB 10-02-2005 11:17 PM

I've tried to implement this and failed miserably.

I tried using the default version and had that same problem with the deleted posts. Then I tried using the above version instead, and I got the following message whenever I tried to edit my user options...

Could not find phrase '::$values for profile fields is not an array::'.

Any ideas on whether we can get a working version of this available for download instead of downloading the file just to find it doesn't work? :(

Martz 10-03-2005 11:04 AM

Thanks for this fix :)


All times are GMT. The time now is 09:41 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.01165 seconds
  • Memory Usage 1,745KB
  • 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
  • (2)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