Yeah thats what I was saying. He was asking to have the actual month added in. Instead of a number. I am glad I have seen this thread though. Because like I said no one has ever brought it up so I never really thought about it. SO I will either add the plugin above (if it works haha) or the expanded format. I personally like how it is set now. But after reading this it is time to reconsider.
That isn't the issue that is prevalent with 3.8. With 3.8 it says "this must be uploaded as a plugin" when you try to upload it in the product manager. So I had to manually enter the values and add it as a plugin, but it doesn't work.
No ..................... I clearly suggested putting the month in (Jan, Feb, Mar, Apr) I dont know how I could make the suggestion any clearer
Well thats much better as far as confusion/understanding is concerned, thanks. However, you may find its a bit long for some dates (like September). JFYI, what I suggested is d-M-Y
Nick I have *something* working on 3.8.1 that allows user selection - it involves a plugin and a custom profile field I think. I'll have a look later at how it's done, because to be honest I can't for the life of me remember what I used. I do know that I also have it showing at registration. I've never had a problem with it.
Ok checked and I have the same one Nick's trying to use, the one where you upload the plugin and create two user profile fields. However you do have to edit the plugin afterwards to reflect the id numbers of the two custom profile fields. Definitely working on 3.8.1 though. You can even set the fields to show at registration.
That's what I did, Mark. Here is the plugin: View attachment 303 Here are the contents of the plugin (the PHP code): PHP: <![CDATA[if ($vbulletin->userinfo['userid']) {// ############ Date Format as Uservalue ################switch ($vbulletin->userinfo['field21']) {case 'US Format':$vbulletin->options['dateformat'] = 'm-d-y';break;case 'Expanded US Format':$vbulletin->options['dateformat'] = 'M jS, Y';break;case 'European Format':$vbulletin->options['dateformat'] = 'd-m-y';break;case 'Expanded European Format':$vbulletin->options['dateformat'] = 'jS M Y';break;default:$vbulletin->options['dateformat'] = 'm-d-y';}// ############ Time Format as Uservalue ################switch ($vbulletin->userinfo['field22']) {case '12-Hour Time Format':$vbulletin->options['timeformat'] = 'h:i A';break;case '24-Hour Time Format':$vbulletin->options['timeformat'] = 'H:i';break;default:$vbulletin->options['timeformat'] = 'h:i A';}}]]> ... Is that the same as yours (except for the field IDs?) And here are the profile fields: View attachment 302 And when I adjust the settings in my UserCP, nothing changes in terms of date stamps on posts. You can try it out here. Am I missing something?
Here is my plugin: Code: if ($vbulletin->userinfo['userid']) { // ############ Date Format as Uservalue ################ switch ($vbulletin->userinfo['field47']) { case 'US Format': $vbulletin->options['dateformat'] = 'm-d-y'; break; case 'Expanded US Format': $vbulletin->options['dateformat'] = 'F jS, Y'; break; case 'European Format': $vbulletin->options['dateformat'] = 'd-m-y'; break; case 'Expanded European Format': $vbulletin->options['dateformat'] = 'jS F Y'; break; default: $vbulletin->options['dateformat'] = 'jS F Y'; } // ############ Time Format as Uservalue ################ switch ($vbulletin->userinfo['field48']) { case '12-Hour Time Format': $vbulletin->options['timeformat'] = 'h:i A'; break; case '24-Hour Time Format': $vbulletin->options['timeformat'] = 'H:i'; break; default: $vbulletin->options['timeformat'] = 'H:i'; } } And these are my profile fields: View attachment 304 View attachment 305 Obviously this will give a UK format default but that can be changed easily enough.
Yes...you've copied the XML code from the file as well as the actual plugin code. Trim that out and it ought to work.
Can't wait to use '{vb:date post.dateline,{vb:raw bbuserinfo.fieldx}}' in styles in the future. fieldx would simply reference the User Profile Field where they store the format they want.
....And it works. Enjoy guys. Again, the settings are in your UserCP -> Edit Options -> Date and Time Options
I've mixed feelings on that, insofar as it's fantastic BUT the thought of trawling through my 4,568 (approx!) customised templates and changing everything makes me feel a bit ill.
Brilliant, glad you got it working and glad to have been of assistance. Perhaps our plugin code should be deleted now, as effectively we've "released" the modification here now....and it should really only be obtained via vbulletin.org.
Your vBulletin 3 templates aren't going to be compatible with vBulletin 4. No one's will. It will be the same thing that happened when we switched from vBulletin 2 to vBulletin 3. And yes, it is a big pain for everyone. Off-topic here now though the thread is resolved so...
Oh yes, I'm not really complaining about it as such, it's just not a job I'm looking forward to...nor even necessarily going to bother with at all. Besides the licensing issues, I'm not sure vB4 will offer anything for my site at all, and given the obvious fact that most plugins will fail, would in many ways be a backward step for us, at least until the main hacks are converted over. I remember the vb2 > vb3 change, although from memory a "basic" representation of your vb2 styles was created, which in my case worked pretty well and I just tweaked from that point to make it 100%. But my board is more customised now than then, some of the plugins I have written myself and I will struggle to convert those as I just don't understand the new variables..... None of this is a criticism of vB just the position I find myself in. My years of tweaks and experience will go down the pan with vb4 and I'm not sure I have inclination to re-learn it all.