Announcement

Collapse
No announcement yet.

How to make the postbit layout an user option

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #61
    Can all options be set as user prefs like this? Specifically, some members on my board like the "Yesterday/Today" option, others like the "One minute ago/2 hours ago". I'm sure it'll work on much the same principle, just wondering if someone can point out the obvious reason it wont before I go trying to make it.

    Comment


    • #62
      Both options work perfectly fine for me on my forums, I was wondering if these can be included in the next vb release :P, it could be a great amount of help, also, admin can enable/disable it for users if they wish, that would be so great!

      Comment


      • #63
        So is it possible to use this with legacy on in admin cp? I dont want legacy off by default....

        Comment


        • #64
          Originally posted by Freddie
          (1) Create a new Custom Profile Field of the your choosing (yes/no / radio / select). I am going to use a single-selection menu for this demo. I put in two options "Top" and "Left". At the very bottom of the custom profile edit page, set the Display Page option to Options: Thread Viewing. Submit your new profile field.

          (2) Now you are redirected to your list of custom profile fields. Find the new field you selected and note its Name. Mine is called field66 for example.

          (3) Then I placed this in my phpinclude_start template:
          PHP Code:
          if ($bbuserinfo['field66'] == 'Left')
          {
            
          $vboptions['legacypostbit'] = 1;

          Now everyone will default to top style but can choose left style in their User CP. You can adjust the code to default everyone to left style by enabling the vboption for legacy postbit and then changing the above code to:
          PHP Code:
          if ($bbuserinfo['field66'] == 'Top')
          {
            
          $vboptions['legacypostbit'] = 0;

          Thanks heaps ...

          /me clicks Install .. o wait - I'm in the wrong forum ...

          Just thanks that's gonna be very helpful

          Comment


          • #65
            Slight snag here I can't quite track down yet. I had this working on RC2 perfectly, and now no dice on RC3. Anyone else having this trouble? I'd sure like to know how to get it back before people start panicking .
            "I can't seem to bring myself to say, 'Well, I guess I'll be toddling along.'
            It isn't that I can't toddle. It's that I can't guess I'll toddle."

            --Robert Benchley (1889-1945)

            Comment


            • #66
              I dunno what I'm doing wrong, but I can't get this to work.

              I have the system defaulted to the legacy postbit, so I used the 2nd code example as required. But, it always shows the legacy postbit.
              vBulletin v3.8.0's Implementation of Google Adsense Should Be Avoided At All Costs - Do Your Own Adsense Implementation

              Comment


              • #67
                Me too. I've tried everything and it just won't work in RC3.
                "I can't seem to bring myself to say, 'Well, I guess I'll be toddling along.'
                It isn't that I can't toddle. It's that I can't guess I'll toddle."

                --Robert Benchley (1889-1945)

                Comment


                • #68
                  I'm using RC3, and I've updated from Gamma, which I originally started with, and applied the user option postbit to. It is working fine for me... I have one account that I use with the normal postbit, and a second account that uses the legacy postbit.

                  I'm using the following code in my phpinlude_start template:

                  PHP Code:
                  if ($bbuserinfo['field6'] == 'Left')
                  {
                  $vboptions['legacypostbit'] = 1;
                  }
                  else
                  {
                  $vboptions['legacypostbit'] = 0;

                  Field 6 is the option that is set from the User Profile Field Manager.

                  I'm attaching a screenshot of the options I have set.

                  ISP Forum
                  Attached Files

                  Comment


                  • #69
                    Okay, that one worked. The

                    PHP Code:
                    if ($bbuserinfo['field66'] == 'Left')
                    {
                      
                    $vboptions['legacypostbit'] = 1;

                    Freddie originally posted flat out isn't operating though.
                    "I can't seem to bring myself to say, 'Well, I guess I'll be toddling along.'
                    It isn't that I can't toddle. It's that I can't guess I'll toddle."

                    --Robert Benchley (1889-1945)

                    Comment


                    • #70
                      Glad 2 help.

                      Comment


                      • #71
                        That was a big help, man. Cheers for that.
                        "I can't seem to bring myself to say, 'Well, I guess I'll be toddling along.'
                        It isn't that I can't toddle. It's that I can't guess I'll toddle."

                        --Robert Benchley (1889-1945)

                        Comment


                        • #72
                          Using with custom field entered

                          Alright, this worked great for me!

                          The only problem is, when a user selects to have the postbit on the left, it does not show my custom profile field that entered in the postbit template.

                          Any ideas?
                          http://mpc-testing.com/mike/Mike.png

                          Comment


                          • #73
                            Originally posted by LLFan
                            Alright, this worked great for me!

                            The only problem is, when a user selects to have the postbit on the left, it does not show my custom profile field that entered in the postbit template.

                            Any ideas?
                            Add the field to postbit_legacy.
                            vBulletin v3.8.0's Implementation of Google Adsense Should Be Avoided At All Costs - Do Your Own Adsense Implementation

                            Comment


                            • #74
                              I added the following to my postbit to make an alternate custom profile field show up. I have NOT added which postbit they are using to the postbit, but my custom field is for other data they can submit.

                              HTML Code:
                              <div class="smallfont">
                                 <if condition="$post[field5]">
                                    $vbphrase[isp]: $post[field5]
                                 </if>
                              </div>
                              I created a custom phrase via the phrase manager just because... it's not completely required, as you can hard-code the label into the code, just not vB's way of doing it.

                              Comment


                              • #75
                                Originally posted by conqsoft
                                Add the field to postbit_legacy.
                                Thank you, that worked perfectly. =)
                                http://mpc-testing.com/mike/Mike.png

                                Comment

                                widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
                                Working...
                                X