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)

Andreas 10-07-2005 12:48 AM

Quote:

Originally Posted by The Wise One
hopfully a version of that code is released to work with horizontal as default and without the extra queries. i tried playing with the plugin code, reversing and switching the code around...but was unsuccessful (no surprise there though...dont know a whole lot about php yet).

Hmm, works fine for me on gold no matter if legacy is default or not?

The Wise One 10-14-2005 10:40 PM

Quote:

Originally Posted by KirbyDE
Everybody considering to use this should use this Code: https://vborg.vbsupport.ru/showpost....1&postcount=25

The default Code of this Hack causes additional queries due to uncached Templates.

another question about this. the code you recommend to use in the link above. is the caching done because of the code change or is it because of the hook it belongs to?

as it is now...it works great. when i add the add on, using the option to switch postbits (in the thread display mode menu) doesnt change the postbit. rather...it does, but it requires a refresh after clicking the option. if i use the code in the post you linked to...but change the hook to postbit_display_complete the refresh is no longer required and using the thread display mode menu option changes the postbit accordingly.

i guess what im trying to figure out is...are the additional queries you refer to being caused because of the hook used or the code used...

Mika 10-16-2005 11:39 AM

Quote:

Originally Posted by KirbyDE
Hmm, works fine for me on gold no matter if legacy is default or not?

Here as well (3.5 gold).

WhSox21 10-17-2005 05:33 PM

If anyone with spare time wants to take over this hack's support and functioning please let me know. I'll give you full credit to this hack and if the vb mods want to they can switch the thread starter via the database.

I just don't have time to update this at the moment. Too many things going on in my life.

dieselpowered 11-22-2005 08:22 PM

Quote:

Originally Posted by Andreas
Everybody considering to use this should use this Code: https://vborg.vbsupport.ru/showpost....1&postcount=25

The default Code of this Hack causes additional queries due to uncached Templates.

Ok Andreas...the code below is the correct code to use to not get those additional queries, is that right? I just want to be sure, cause it works just fine :)

Quote:

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

Flow Fusion 11-27-2005 02:09 PM

Thanks for the Fix also!

Quillz 12-10-2005 08:55 PM

Thanks for the plug-in. Works well.

jdebler 12-30-2005 01:41 PM

Kinda new to plugins, installed a few in the past but I got an error message that I never saw before when installing this one...

Quote:

This file appears to be a Plugin, not a Product. Please use the Plugin Manager to add this file.
Is this right?

I went into the Plugin Manager and went to add it that way, but it asked me for information that I do not know, such as Hook Location.

Again, I am new to this so any help would be appreciated. Thanks!

YLP1 12-30-2005 04:56 PM

Does this plugin have the fixes stated above already included?

jesus likes pie 12-30-2005 08:17 PM

Hi.

http://www.vbulletin.com/forum/bugs3...iew&bugid=2027


Any chance of a solution to this?

jesus likes pie 12-31-2005 04:48 PM

oh whoops.....its good to read previous pages :)

fixed :)

Oblivion Knight 01-01-2006 07:47 AM

Quote:

Originally Posted by jdebler
I went into the Plugin Manager and went to add it that way, but it asked me for information that I do not know, such as Hook Location.

Again, I am new to this so any help would be appreciated. Thanks!

Don't worry, we all have to start somewhere.. :)

Basically, there are 2 different plugin types. Products and Plugins.
Products contain plugins, and are generally used for larger mods. They can also install templates, phrases and settings automatically. Plugins don't do any of that, and simply add code in to vBulletin's hooks (as opposed to editing the source code)..

Since this is a plugin, we need to upload it as one.
Admin CP -> Plugin System -> Download / Upload Plugins -> Import Plugin Definitions XML File


Quote:

Originally Posted by YLP1
Does this plugin have the fixes stated above already included?

No, they need to be applied yourself.. Although it's a relatively easy job.

Gray Matter 02-10-2006 12:36 AM

I don't know if anyone else has this problem, but this plugin makes my forum act strange with deleted posts. Usually, when posts are soft-deleted, they take on the appropriate template. With this, it's just a blank postbit template for soft-deleted posts. So I've had to disable this plugin, for now.

jdebler 02-10-2006 12:15 PM

Any way to make this admin selectable for certain user groups only?



Oh, and uh...Oblivion Knight: I forgot to thank you for the basic info. Worked like a charm! :)

Hostboard 02-27-2006 02:01 AM

Is this working on 3.5.4?

welo 02-27-2006 02:14 AM

I have it on my 3.5.4 board and it seems to be fine.

Replicators 03-04-2006 08:44 PM

It's not working for me at all i am not new to applying mods. Maybe it is just a setting wrong, idk. It keeps staying at horizontal no matter what i set it at.

Red Blaze 03-04-2006 09:08 PM

Did you set your profile field number correctly? Go to your plugins, edit the plugin that belongs to the postbit selection thingie, and check the profile number. If the number doesn't match the one you have, that's your problem.

Also, if that's not the case, check the value of the radio buttons. That also must match what you have in the plugin.

Replicators 03-04-2006 09:42 PM

It all checks out correct, i think it's a conflict with something else, only thing it can be, i will look around and see.

jdebler 03-06-2006 12:29 PM

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

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;
}


vBulletin THEN DAYLIGHT 05-22-2006 07:23 PM

No worries, fixed!!!!!!!!!!!!!!! WOOOOOOOOOOOOO!!!!!!

gopherhockey 08-08-2006 02:31 AM

The posts and replies are too difficult to follow here.

Has anyone actually gotten this, or something similar, to work if you have the legacy postbit option set on in your admincp?

I want the legacy postbit to be the default for guests and all new registrations. Therefore, I have to keep this set. If not, it usese the new postbit, which I dislike but want users to select if they wish.

Basically I want the entire thing to work backwards.

I would just paste the legacy into postbit and postbit into legacy, but there are users who have selected their option and this would create a mess.

Oblivion Knight 08-08-2006 07:01 AM

How to get this working with EITHER postbit or postbit_legacy as default.

Move the plugin to use the hook cache_templates, and replace the code with:
Code:

global $vbulletin;
if ($vbulletin->userinfo['field5'] != 'Use Forum Default')
{
        if ($vbulletin->userinfo['field5'] == 'Horizontal Postbit')
        {
                $vbulletin->options['legacypostbit'] = 0;
        }
        elseif ($vbulletin->userinfo['field5'] == 'Vertical Postbit (Legacy)')
        {
                $vbulletin->options['legacypostbit'] = 1;
        }
}

Add an additional option to the custom profile field at the TOP of the list, "Use Forum Default".

This should work on both 3.5.x and 3.6.x setups.. :)

MotMann 09-24-2006 09:42 PM

@Oblivion Knight

It's not works on Vb 3.6.1 :(

I used the last code from you...

MotMann 11-13-2006 08:57 AM

Quote:

Originally Posted by vBulletin THEN DAYLIGHT (Post 984977)
No worries, fixed!!!!!!!!!!!!!!! WOOOOOOOOOOOOO!!!!!!

And what yo do? On my side it's not working.

Konstantinos 12-17-2006 06:46 AM

it doesnt work in 3.6.4

brvheart 01-08-2007 01:47 PM

Could we get a port to 3.6.x for this? This is a great option to give the members :)

gothicuser 01-10-2007 12:41 PM

Just managed to get this working perfectly under 3.6.4 using instructions from THIS post
Many thanks Oblivion Knight :D

brvheart 01-10-2007 01:11 PM

how do you move the plugin? Sorry never done that....I will be kick myself it is so easy...


EDIT: Nevermind I got and it is working :) thank you

SoftWareRevue 04-24-2007 12:15 PM

Quote:

Originally Posted by Oblivion Knight (Post 1047326)
How to get this working with EITHER postbit or postbit_legacy as default....This should work on both 3.5.x and 3.6.x setups...

Can someone explain this in a "step-by-step guide for the complete idiot" kind of way, please? :)


All times are GMT. The time now is 04:19 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.02097 seconds
  • Memory Usage 1,829KB
  • 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
  • (4)bbcode_code_printable
  • (1)bbcode_php_printable
  • (13)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)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