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)

bulbasnore 03-11-2006 02:02 AM

Well, nothings happening. My admin user's field6 is 'horizontal postbit'. Here's the code:

PHP Code:

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


Our 3.5.3(with plugin security patch) is set to legacy by default.

Nothing happens.

welo 03-11-2006 06:27 AM

Try this:

Code:

global $vbulletin;
if ($vbulletin->userinfo['field6'] == 'Vertical Postbit (Legacy)')
        $this->templatename = 'postbit_legacy';
$vbulletin->options['legacypostbit'] = 1;
else if ($vbulletin->userinfo['field6'] == 'Horizontal Postbit')
        $this->templatename = 'postbit';

You might want to reconsider those radio button labels though. Who except a VB geek is going to know what they mean?

jdebler 03-28-2006 12:22 PM

Quote:

Originally Posted by jdebler
Is there any easy way to make this selectable only by certain user groups?

Anyone? :D

cmbehan 04-14-2006 03:04 AM

Quote:

Originally Posted by jdebler
Is there any easy way to make this selectable only by certain user groups?

I'm very interested in this feature also.

Konstantinos 05-01-2006 05:11 AM

it doesnt work in 3.5.4

welo 05-01-2006 05:53 AM

I've had this running in all 3.5.x versions. Works fine.

Konstantinos 05-06-2006 11:20 AM

ok it works only when u have set in admin cp horizontal postbit by default, if in the admin cp post bit setting is vertical this mod doesnt change the postbig to horizontal

FinalAngel 05-08-2006 08:38 AM

It doesn't work in my forum too, i've this Code in the Plugin System:

Code:

$fieldname = 'field8';

if ($_GET['postbit'] == 'Left') {
    $db->query('UPDATE ' . TABLE_PREFIX . 'userfield SET ' . $fieldname .' = \'Vertical Postbit\' WHERE userid=' . $vbulletin->userinfo['userid']);
    $vbulletin->userinfo['field8'] = 'Vertical Postbit';
}

if ($_GET['postbit'] == 'Top') {
    $db->query('UPDATE ' . TABLE_PREFIX . 'userfield SET ' . $fieldname .' = \'Horizontal Postbit\' WHERE userid=' . $vbulletin->userinfo['userid']);
    $vbulletin->userinfo['field8'] = 'Horizontal Postbit';
}

The other codes in this Thread doesn't work after all.

My field nr is 8, i've vb 3.5.4. I can choose between the two options but nothing happens...

Can anyone help me ?_?

VBUsers 05-12-2006 07:12 AM

finally got it to work thanks!

vBulletin THEN DAYLIGHT 05-22-2006 03:08 PM

Quote:

Originally Posted by lowandloudinc
finally got it to work thanks!

How. I can't get this to work at all :( Legacy is my default, I notice your forum has this as default as well.

What code are you using? I am using:

Code:

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



All times are GMT. The time now is 01:07 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.01068 seconds
  • Memory Usage 1,744KB
  • 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
  • (3)bbcode_code_printable
  • (1)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)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