View Full Version : Default or Retro
Zachery
29 Mar 2004, 13:55
This will super simple mod will allow your users to have either a new styled vB3 postbit or the old vB2 postbit with out using phpinclude_start OR hacking :)
Step 1
Add a new profile field that is a single selction menu
Title: Postbit Style
Description: How all postbits will appear to you.
Options:
Default
Legacy
OR
Legacy
Default
(depending on WHICH you want to be default)
Default: Yes but not blank.
Now, Im going to assume you have NOT modifed your postbit template much and give you 2 predone full template bits, ill also give you 2 non predone bits that you must fill in for your self.
You need to chage the top line of any of the text files to make sure you have the number of the profile field replaced for X.
:)
Bad Bunny
29 Mar 2004, 14:37
Yay! So simple, and so smart. Thanks!
I will surely encorporate this into my forums in some way.
Nhat_Long
31 Mar 2004, 01:14
please to post demo
thanks
it's very nice
thanks
أحم أحم
This will also avoid that extra query kura's hack takes care of.
OK please tell me what exactly to do!? This isnt very helpful...
what exactly are the 3 attached files?!
Zachery
23 Apr 2004, 20:59
Basicly, there are 3 attached files,
The first is the regular vB3 new styled postbit as the default
The second is the Old vB2 styled postbit as the default
the thrid is if you have heavily modifed one or the other and just the conditions to use.
Ah ok, but where will the users be able to change this in their profile?
Zachery
23 Apr 2004, 21:41
Step 1
Add a new profile field that is a single selction menu
Title: Postbit Style
Description: How all postbits will appear to you.
Options:
Default
Legacy
OR
Legacy
Default
(depending on WHICH you want to be default)
Default: Yes but not blank.
You read the instructions ;)
I did, sorry to sound rude.
I mean i have added this profile but where in the User CP can i find it?
Zachery
24 Apr 2004, 20:28
Try UserCP > Edit Profile.
Might want to add, if i understand this correctly, any future mods to postbit where you would modify postbit and postbit_legacy would now be done 2 times to each section of this new postbit: once in the default section, then again in the legacy section. the postbit_legacy would be ignored completely.
imported_Keyser Söze
16 May 2004, 01:00
worked like a charm, took some figureing out tho, guys need to remeber some of us are really dlow witted ppl ;p
here is a quick explination of how to do it for the other slow folks around here
open the admin cp and scroll down to edit profile fields, follow th einstructions in the 1st post on that, look at it when ur done and remeber what it says next to feild (will prolly say field5)
go edit ur templates, ur going to replace 2 templates, the "postbit" template (replace that with the default.txt file) and the postbit_legacy template (replace with the legacy.txt file
thats it, pretty easy
-edit-
how would i go about making the postbit width (avatar side) noot be so wide? i dont need it that wide (legacy)
imported_Keyser Söze
18 May 2004, 09:03
worked fine on my test forum, now on my main one when i install it i get this error
The following error occurred when attempting to evaluate this template:
Parse error: parse error, expecting `T_STRING' or `T_VARIABLE' or `T_NUM_STRING' in /home/virtual/site1/fst/var/www/html/forums/includes/adminfunctions_template.php(3037) : eval()'d code on line 5
This is likely caused by a malformed conditional statement. It is highly recommended that you fix this error before continuing, but you may continue as-is if you wish.
Zachery
18 May 2004, 09:46
Sounds like you didnt finish the conditional somewhere...
imported_Keyser Söze
18 May 2004, 11:29
i dont understand, i didnt hack the postbit at all so i just used the standard, and i changed the feildX, what else besides making the profile field am i suppose to do?
Zachery
18 May 2004, 11:37
Double check all your if statments, if it is not closed properly it will mess it up
imported_Keyser Söze
18 May 2004, 23:09
one thing that is diffrent the filed is 7, it was 5 on the other, the test forum i have is just a plain install, this one is a upgrade from vb2, i think maybe the other feild is a hack, but its not listed
any idea, i at one point had the hack profile custom feild installed
imported_Keyser Söze
19 May 2004, 04:28
i fixed it , my own fault
thanks for the help
ImportPassion
06 Jun 2004, 22:14
ok, now I am getting that parse error. wtf is going on? This is not that difficult to do. individually they save fine, together they don't
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
ImportPassion
06 Jun 2004, 22:24
well, looks like it was a typo in the no code template.
you have
<if condition="$bbuserinfo[field60] == Legacy">
should be
<if condition="$bbuserinfo[field60] == 'Legacy'">
Zachery
07 Jun 2004, 15:38
No it shouldnt you should never use single quotes inside of conditionals.
ImportPassion
07 Jun 2004, 15:39
only way i could get it to work and it does really work.
MegaHertz
11 Jun 2004, 17:45
Zachery,
Nice work as usual. :)
MegaHertz
03 Jul 2004, 02:02
Zachery,
Is there anything that needs to be done in light of 3.0.2?
I noticed that the postbit_legacy template is listed as needing to be reverted.
Thanks
Zachery
03 Jul 2004, 02:46
If you revert it, it should still work if you reapply the mod
MegaHertz
03 Jul 2004, 02:52
IIRC your text files contain the complete contents of the template.
Won't there be some code that needs to be added or am I thinking about this the wrong way?
Thanks again.
MegaHertz
03 Jul 2004, 02:57
Disregard it tells me all of my templates are up to date.
escoson
24 Nov 2004, 01:04
dope thanks!
Hexemer
25 Nov 2004, 11:35
Hello,
how can I use this in a custom style?
GetGamer.com
01 Jan 2005, 21:31
No it shouldnt you should never use single quotes inside of conditionals.I had to do the same thing to get it working on my site.
Also, if I understand this code correctly, I don't really need to edit both postbit templates. I can edit the one template I've configured vBulletin to use (Default in my case), since the Legacy Postbit is not called or configured. Or am I missing something?
DefenceTalk
17 Jan 2005, 18:58
Maybe I am doing something wrong.
I got field options appearing in user Cp but changing the options doesn't do anything.... :(
Gutspiller
01 Aug 2005, 21:52
I am running 3.0.7 (Will this work on it?)and don't want to use your prepostbit files, so I'm using the 3rd. Umm, where do I place the code in the 3rd text file?
Also, do I need to include both parts? The stuff above and the stuff below the "OR" or is it both of them? Are you saying "OR" or is that part of the code?
Gutspiller
02 Aug 2005, 17:18
OK, I tried it and I can't get it to work on 3.0.7, it errors out when trying to save the postbit. Can somebody help getting this hack working on 3.0.7 please.
GeekFury
05 Nov 2005, 17:22
will this work with 3.5 or is there another option?
vBulletin® v3.6.12, Copyright ©2000-2012, Jelsoft Enterprises Ltd.