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

Reply
 
Thread Tools
User Postbit Template Selection Details »»
User Postbit Template Selection
Version: 1.00, by WhSox21 WhSox21 is offline
Developer Last Online: Apr 2014 Show Printable Version Email this Page

Version: 3.5.0 Beta 3 Rating:
Released: 06-29-2005 Last Update: 07-07-2005 Installs: 106
Uses Plugins
 
No support by the author.

I'm just getting back into the swing of things with vBulletin 3.5. Here's my first plugin being released (Others are still in progress).

What this does:
This allows users to select which postbit they wish to use via their control panel.

Installation
Upload the plugin and create a new user profile field by following the directions below.
Once you complete the top two steps you must edit the plugin and find: field5
Then change that to your user profile field number.

Add a New User Profile Field

Profile Field Type:
Single-Selection Menu

Title: Postbit Template Selection

Description:
If you prefer the old-style postbit, using two vertical columns rather than the new horizontal layout, you can switch back to using that template with this switch.

Options:
Horizontal Postbit
Vertical Postbit (Legacy)

Set Default:
Yes, but no First Blank Option

Display Order:
This is your choice.

Field Required:
No

Field Editable by User:
Yes

Private Field:
Yes

Field Searchable on Members List
No

Show on Members List
No

Allow user to input their own value for this option
No

The rest does not matter.

Show Your Support

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

Comments
  #62  
Old 03-11-2006, 02:02 AM
bulbasnore bulbasnore is offline
 
Join Date: Dec 2004
Posts: 95
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #63  
Old 03-11-2006, 06:27 AM
welo welo is offline
 
Join Date: Jan 2004
Location: Portland, Oregon
Posts: 172
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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?
Reply With Quote
  #64  
Old 03-28-2006, 12:22 PM
jdebler jdebler is offline
 
Join Date: Sep 2002
Location: Detroit
Posts: 75
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by jdebler
Is there any easy way to make this selectable only by certain user groups?
Anyone?
Reply With Quote
  #65  
Old 04-14-2006, 03:04 AM
cmbehan cmbehan is offline
 
Join Date: Mar 2006
Posts: 13
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #66  
Old 05-01-2006, 05:11 AM
Konstantinos Konstantinos is offline
 
Join Date: Apr 2006
Posts: 443
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

it doesnt work in 3.5.4
Reply With Quote
  #67  
Old 05-01-2006, 05:53 AM
welo welo is offline
 
Join Date: Jan 2004
Location: Portland, Oregon
Posts: 172
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I've had this running in all 3.5.x versions. Works fine.
Reply With Quote
  #68  
Old 05-06-2006, 11:20 AM
Konstantinos Konstantinos is offline
 
Join Date: Apr 2006
Posts: 443
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #69  
Old 05-08-2006, 08:38 AM
FinalAngel FinalAngel is offline
 
Join Date: Nov 2002
Posts: 3
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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 ?_?
Reply With Quote
  #70  
Old 05-12-2006, 07:12 AM
VBUsers's Avatar
VBUsers VBUsers is offline
 
Join Date: Aug 2004
Posts: 830
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

finally got it to work thanks!
Reply With Quote
  #71  
Old 05-22-2006, 03:08 PM
vBulletin THEN DAYLIGHT vBulletin THEN DAYLIGHT is offline
 
Join Date: Oct 2005
Posts: 99
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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;
}
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:47 AM.


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.04931 seconds
  • Memory Usage 2,313KB
  • Queries Executed 25 (?)
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
  • (3)bbcode_code
  • (1)bbcode_php
  • (3)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