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
  #17  
Old 07-26-2005, 12:19 AM
Christine's Avatar
Christine Christine is offline
 
Join Date: Oct 2001
Location: PA
Posts: 472
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Heya,

This hook location conflicts with the ignore user function as well as the soft-delete noted above.

No biggie -- it is just an issue of when it is being called.

Tested with a minor change to the code and moving the hook to global_start. Add in the template cache I PM'd ya, and you are all set.

Reply With Quote
  #18  
Old 07-26-2005, 06:47 AM
Neutral Singh's Avatar
Neutral Singh Neutral Singh is offline
 
Join Date: Sep 2004
Location: Sikh Philosophy Network
Posts: 545
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Exactly what i was looking for thanks...
Reply With Quote
  #19  
Old 08-01-2005, 11:56 AM
trancetopia trancetopia is offline
 
Join Date: Feb 2005
Location: Wales, UK.
Posts: 161
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Works a treat. Thanks.
Reply With Quote
  #20  
Old 08-04-2005, 04:09 AM
CMX_CMGSCCC CMX_CMGSCCC is offline
 
Join Date: Sep 2003
Posts: 1,218
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Can you attach the minor change you did to the code to fix the problem?

-CMX
Reply With Quote
  #21  
Old 08-06-2005, 06:51 PM
Christine's Avatar
Christine Christine is offline
 
Join Date: Oct 2001
Location: PA
Posts: 472
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.

Reply With Quote
  #22  
Old 08-06-2005, 06:53 PM
WhSox21 WhSox21 is offline
 
Join Date: Feb 2004
Posts: 328
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #23  
Old 08-06-2005, 08:26 PM
Christine's Avatar
Christine Christine is offline
 
Join Date: Oct 2001
Location: PA
Posts: 472
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Done.
Reply With Quote
  #24  
Old 08-11-2005, 04:33 AM
InfiniteWebby InfiniteWebby is offline
 
Join Date: Nov 2001
Location: Downunda.
Posts: 149
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #25  
Old 08-12-2005, 02:55 AM
InfiniteWebby InfiniteWebby is offline
 
Join Date: Nov 2001
Location: Downunda.
Posts: 149
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #26  
Old 08-12-2005, 04:06 AM
CMX_CMGSCCC CMX_CMGSCCC is offline
 
Join Date: Sep 2003
Posts: 1,218
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #27  
Old 08-12-2005, 06:50 AM
InfiniteWebby InfiniteWebby is offline
 
Join Date: Nov 2001
Location: Downunda.
Posts: 149
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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 =)
Reply With Quote
  #28  
Old 08-17-2005, 04:37 PM
RoryF RoryF is offline
 
Join Date: Apr 2005
Posts: 34
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks CMX_CMGSCCC, works like a charm
Reply With Quote
  #29  
Old 09-27-2005, 05:09 PM
ged's Avatar
ged ged is offline
 
Join Date: Feb 2005
Location: Istanbul, Turkey
Posts: 207
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Is there any way to do it with plugin?
Reply With Quote
  #30  
Old 10-02-2005, 11:17 PM
Loony BoB's Avatar
Loony BoB Loony BoB is offline
 
Join Date: Mar 2004
Posts: 13
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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?
Reply With Quote
  #31  
Old 10-03-2005, 11:04 AM
Martz's Avatar
Martz Martz is offline
 
Join Date: Oct 2001
Location: UK
Posts: 156
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks for this fix
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 02:46 PM.


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.04895 seconds
  • Memory Usage 2,353KB
  • Queries Executed 30 (?)
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
  • (2)bbcode_code
  • (2)bbcode_php
  • (2)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
  • (3)pagenav_pagelink
  • (16)post_thanks_box
  • (16)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (16)post_thanks_postbit_info
  • (15)postbit
  • (16)postbit_onlinestatus
  • (16)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