Announcement

Collapse
No announcement yet.

How to make the postbit layout an user option

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

  • #16
    It doesn't work for me Has anyone tried this and it works?

    Comment


    • #17
      Originally posted by Chroder
      It doesn't work for me Has anyone tried this and it works?
      works for me, make sure you change field66 to the field of yours and make the options on thje drop-down called Top, Left

      I was wondering if there was any method to get this box in the footer?
      Unlike most, I don't think I'm always right, if I'm wrong, CORRECT me.... providing you have some evidence

      Comment


      • #18
        Great! Thats Exact what I missed! Thx!

        Comment


        • #19
          Originally posted by Breaker
          works for me, make sure you change field66 to the field of yours and make the options on thje drop-down called Top, Left

          I was wondering if there was any method to get this box in the footer?
          Odd I've done everything exactly as per the instructions but this won't work for me. I have the legacy enabled by default. Selected the options Left Top with left being the default. pasted the following into the phpinclude_start for all my styles

          if ($bbuserinfo['field7'] == 'Top')
          {
          $vboptions['legacypostbit'] = 0;
          }

          The new field is named field7 and yet selecting Top has no effect. Either way it still shows the poster info on the left.

          Frugal

          Comment


          • #20
            Originally posted by Frugal
            Odd I've done everything exactly as per the instructions but this won't work for me. I have the legacy enabled by default. Selected the options Left Top with left being the default. pasted the following into the phpinclude_start for all my styles

            if ($bbuserinfo['field7'] == 'Top')
            {
            $vboptions['legacypostbit'] = 0;
            }

            The new field is named field7 and yet selecting Top has no effect. Either way it still shows the poster info on the left.

            Frugal
            I found adding an:

            else
            {
            $vboptions['legacypostbit'] = 1;
            }

            Did the trick. Seems a bit OTT, but it worked for me.
            Trained Monkeys

            Comment


            • #21
              Still no luck for me

              Comment


              • #22
                I'm in the same boat. I've switched Legacy Postbit on so that it's the default, added a user profile field ('field6'), and added this to the phpinclude_start field:

                PHP Code:
                if ($bbuserinfo['field6'] == 'Top')
                    {
                      
                $vboptions['legacypostbit'] = 0;
                    }
                    else
                    {
                      
                $vboptions['legacypostbit'] = 1;
                    } 
                Yet, changing the option in the User CP has no effect. Switching the Legacy Postbit off in the Admin CP seems to solve the problem but it means that the newer style is the default (edit: actually not the case, see posts below).

                Seems odd to me, it defies logic! The only possible explanation I could have, is if the postbit_legacy template is cached, before the phpstart_include is parsed. But, that can't be the case since changing the option in the User CP works when the new postbit is selected in the Admin CP. This one has me stumped
                Last edited by UnrealAnt; Mon 8 Dec '03, 6:20am.
                Anthony Williams
                - epiGamer, Purely Artistic Studios
                Owner and Editor-in-Chief

                Comment


                • #23
                  Originally posted by UnrealAnt
                  Switching the Legacy Postbit off in the Admin CP seems to solve the problem.

                  Seems odd to me, it defies logic!
                  You little beauty!!!!! That was it, the option in the control panel was overiding the code. Unticking it in the cp fixed it and thanks to the else statement the legacy version is still the default

                  Frugal

                  Comment


                  • #24
                    Originally posted by Frugal
                    You little beauty!!!!! That was it, the option in the control panel was overiding the code. Unticking it in the cp fixed it and thanks to the else statement the legacy version is still the default

                    Frugal
                    Actually, that's a good point, but it does render the Admin CP option useless...
                    Anthony Williams
                    - epiGamer, Purely Artistic Studios
                    Owner and Editor-in-Chief

                    Comment


                    • #25
                      Yay Mabe there should be a note saying that the "Legacy" option in the ACP has to be disabled for this to work.

                      Is there any way I can make the default postbit Legacy and still have the option? I'll go file huntin'

                      Comment


                      • #26
                        use this instead:

                        if ($bbuserinfo['field6'] == 'Left')
                        {
                        $vboptions['legacypostbit'] = 1;
                        }


                        Unlike most, I don't think I'm always right, if I'm wrong, CORRECT me.... providing you have some evidence

                        Comment


                        • #27
                          Well turning on Legacy via the AdminCP made the code not work, so I left that as default and then used this code in the phpinclude_start

                          PHP Code:
                          if($bbuserinfo['userid'])
                          {
                              if(
                          $bbuserinfo['field5'] == 'Top')
                              {
                                 
                          $vboptions['legacypostbit'] = 0;
                              }

                              else
                              {
                                  
                          $vboptions['legacypostbit'] = 1;
                              }
                          }

                          else
                          {
                              
                          $vboptions['legacypostbit'] = 1;

                          If its a user, look at the user option, if not default to legacy.

                          Comment


                          • #28
                            Originally posted by Freddie
                            I am going to use a single-selection menu for this demo. I put in two options "Top" and "Left".
                            This is the most important part. This refused to work for me until I made sure to use this type of selection.

                            Comment


                            • #29
                              Yes, you are going to need code other than I posted if you choose to use a different type of profile field, or if you turn Legacy on by default. This was just a proof of concept.

                              Comment


                              • #30
                                where is the legacy posbit options in the admincp ?
                                Digital-Forums: www.digital-forums.com | CK3 Games: www.ck3.co.uk

                                Comment

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