![]() |
Default or Retro
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. :) |
Yay! So simple, and so smart. Thanks!
I will surely encorporate this into my forums in some way. |
please to post demo
thanks |
it's very nice
thanks |
Quote:
|
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?! |
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?
|
Quote:
|
I did, sorry to sound rude.
I mean i have added this profile but where in the User CP can i find it? |
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.
|
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) |
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. |
Sounds like you didnt finish the conditional somewhere...
|
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?
|
Double check all your if statments, if it is not closed properly it will mess it up
|
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 |
i fixed it , my own fault
thanks for the help |
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
PHP Code:
|
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'"> |
No it shouldnt you should never use single quotes inside of conditionals.
|
only way i could get it to work and it does really work.
|
Zachery,
Nice work as usual. :) |
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 |
If you revert it, it should still work if you reapply the mod
|
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. |
Disregard it tells me all of my templates are up to date.
|
dope thanks!
|
Hello,
how can I use this in a custom style? |
Quote:
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? |
Maybe I am doing something wrong.
I got field options appearing in user Cp but changing the options doesn't do anything.... :( |
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? |
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.
|
will this work with 3.5 or is there another option?
|
All times are GMT. The time now is 04:44 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|