PDA

View Full Version : Miscellaneous Hacks - Postbit Toggle in User CP


a simple fa?ade
07-09-2006, 10:00 PM
Postbit Toggle in User CP

This hack was originally inspired by an old hack providing similar functions created by Darth Cow. It creates a toggle option in the User CP to determine which postbit a user wishes to use. It also includes optional instructions to include the information concerning this field in the postbits.

Template Edits: 2, optional
Files to Upload: 0
Plugins to Import: 1
Other: 3 (Add one Profile Field and change one vB Options setting; OPTIONAL - create a phrase)

====

Installation Instructions -

View the readme.txt in the ZIP archive.

====

Support -

I will offer support in this thread.

a simple fa?ade
07-10-2006, 03:46 AM
Update 1: Hack moved out of beta stage. All appears to be working well.

utw-Mephisto
07-10-2006, 04:22 AM
Nice one ... :)

a simple fa?ade
07-10-2006, 05:51 PM
Nice one ... :)
Thank you. :)

slappy
07-10-2006, 06:11 PM
How does this one differ from these?

http://www.vbulletin.com/forum/showthread.php?t=101577

https://vborg.vbsupport.ru/showthread.php?t=91620

Regards,

Snake
07-10-2006, 06:33 PM
Excellent! :)

a simple fa?ade
07-11-2006, 02:34 PM
How does this one differ from these?

http://www.vbulletin.com/forum/showthread.php?t=101577

https://vborg.vbsupport.ru/showthread.php?t=91620

Regards,
1. They both require another plugin to operate.

2. They allow the user to change their postbit view mid-thread.

This hack gives users the option, and then (this is the optional bit) allows this information to be part of the postbit (ie. Postbit: Profile on Top).

CrystaStarLight
09-27-2006, 05:14 PM
It works very good! I was wondering how to make the "Profile on Top" the default view?

Cybershaolin
12-06-2006, 03:43 AM
One problem here: Me too but on top of it I can't seem to revert to the Profile on top.. I don't get it.

I made all modifications asked and when I go to my control panel on "Modify Options" I see that the other options are there. If I choose to see my postbit at left, it works when I go to check a message, my profile info is at left. But if I select it in order to see my postbit on top, it still shows at left, like it does not want to change back on top my message's profile.

What could be wrong?

kambiz
12-06-2006, 06:12 AM
works great.
thank you man.

tansu
12-06-2006, 12:44 PM
Hi, it works for me, but no other members..
isnt it strange?

Cybershaolin
01-21-2007, 08:30 AM
Any clue to my problem?

Cybershaolin
01-25-2007, 04:19 AM
I got it working but with some problems and bugs:

1- The template postbit_legacy is not included in the cache.

2- Whenever a member decide to change his postbit choice's options, it seems to revert to the postbit_legacy all time even if my own choice is on postbit. (on top).

To correct this, I have to go in the vbulltin options under Style and language and save the settings without changing anything!

Really weird. Any idea?

It says in the first thread that this hack is supported, well, last online in September... is it really the case?

Exitilus
01-25-2007, 02:33 PM
Sounds like there may be a setup issue. Check the following plugin

legacypostbit toggle

Make sure the Field is Correct and the Option it's pointing too.

Cybershaolin
01-25-2007, 03:16 PM
This is what I have in the plugin: (the order option is set to 5 for field in my peronalized fields too).



$vbulletin->options['legacypostbit'] = 1;

if ($vbulletin->userinfo['field5'] == 'Profile on top')
{
$vbulletin->options['legacypostbit'] = 0;
}


Also, in my vBulletin Options > Style and Template Settings, 'Use Legacy (Vertical) Postbit Template' is set to No.

Exitilus
01-25-2007, 07:58 PM
Order Option? Or the actual field # ?

Cybershaolin
01-26-2007, 04:26 AM
Field1 = Biography: Order = 1
Field2 = Location: Order = 2
Field3 = Interests: Order = 3
Field4 = Occupation; Order = 4
Field5 = Postbit Toggle; Order = 5

So the answer is both.

I can't get this why it's happening. It's very annoying.

Exitilus
01-26-2007, 01:18 PM
This is My Setup. You could try and see if it makes a difference.

$vbulletin->options['legacypostbit'] = 1;

if ($vbulletin->userinfo['field5'] == 'Top')
{
$vbulletin->options['legacypostbit'] = 0;
}

The Field Options are:
Left
Top

And I have Set Default: Yes, but no First blank option

Cybershaolin
01-26-2007, 03:03 PM
And I have Set Default: Yes, but no First blank option

You mean this in User profile field?: If it's the case, it's also what I have.
59533

In Style and languages settings I also have this:
59534

I tried changing for
Left
Top

No changes. I'm without any clue.

One note, I did not install the option to have the toggle option in the message's profile, did you?

Exitilus
01-26-2007, 05:08 PM
What type of Profile Field is it ? It should be Single-Selection Menu.

Also what version of VB are you using ?

Cybershaolin
01-26-2007, 05:48 PM
I'm using 3.6.4.

Here are all options I have! :D

Exitilus
01-26-2007, 06:14 PM
I think your using the wrong Profile Field. I think your using Single-Selection Radio Buttons

You need to use Single-Selection Menu

I don't think you can change the type on a whim unless you do it via the Database.

If the option is Radio Buttons (Round circles you click) that's wrong as it doesn't determine your setting by using the "Top" "left" or whatever text you entered. It uses the position of the button selected.

Cybershaolin
01-26-2007, 08:35 PM
Oh I see! Maybe that's it because I use a translated mod and it said Radio Button List! (Single selection)...

I looked at the original mod here and you're right! How do I change this in the database? Which table, which field and what change?

Thanks a lot for your help. This was running me crazy!

Exitilus
01-27-2007, 12:25 AM
Do this at your own risk. But I use PHPMYADMIN. Go to the table PROFILEFIELD and change TYPE to SELECT for that Field.

Sometimes when I do this .. and view the Profile Field in AdminCP it gives some errors. I just hit save .... and go back in and it's fine after that.

Cybershaolin
01-27-2007, 04:02 AM
It seems to work! Bravo!

I'll see if it holds to the option using my board in the next days...

Once again thanks a lot.

steven99
01-28-2007, 04:00 AM
I changed this plugs code to:

if ($vbulletin->userinfo['fieldxxxxx'] == 'Profile on top')
{
$vbulletin->options['legacypostbit'] = 0;
}
elseif ($vbulletin->userinfo['fieldxxxx'] == 'Profile on left')
{
$vbulletin->options['legacypostbit'] = 1;
}So that the option set in Style and Language will be used for everyone that hasn't this yet set -- especially guests. I specially wanted legacy postbit off and saw no need for it to set it to off again in this plug unless it needed to by the user option.

FockerFGAA
01-28-2007, 06:27 AM
thats a nice mod. if i had seen this before i probably wouldnt have tried to figure it out on my own, but i think it was safer the way i ended up doing it for us not so code inclined (https://vborg.vbsupport.ru/showthread.php?t=136059) but my way required creating an extra style. ill have to consider this sometime so that i dont have to keep adding a duplicate style for every style i put on my site. thanks!

Cybershaolin
01-28-2007, 07:14 AM
It seems to work! Bravo!

I'll see if it holds to the option using my board in the next days...

Once again thanks a lot.

I talked too fast! :(

I really don't understand why it's not working well. After using my board today, with my postbit options set to Profile on top, it went back again to the profile displayed at left... even if I made those changes in the DB.

When it does revert to the profile on left even if my options are ser to show it on top (I have the server options displays at the bottom hack installed) it says that the postbit template is not cache. When the profile on top is displayed, it does not show that.

I had that cache problem before but with the postbit_legacy and somebody told me to add this in order to cache it:
59592

I also tried the code posted by steven99 and it does not even want to give me a profile on top, even if it's selected in the my options.

So, in conclusion, it does not seem to work for me. I'm about to uninstall it if nobody can find a solution for me. It gives me headaches. I just don't catch it.