Tagged: 

Viewing 3 reply threads
  • Author
    Posts
    • #4628
      justin
      Member

      Hi,

      This is sorta in relation to this ticket: https://piklist.com/support/topic/user-flow-0-9-9-2/

      With the new upgrade, now the profile page is empty except for the update profile button.

      This is my user_header.php flow that was working before on 0.9.9.2

      <?php
      /*
      Flow: User Workflow
      Page: profile.php, user-edit.php
      Header: true
      Position: title
      */
      
      // NOTE: Because of the way the some of the admin forms work we just can't remove the 
      //       fields or the form will throw errors, so instead we hide them when necessary
      ?>
      
        <?php 
          if (in_array($pagenow, array('profile.php', 'user-edit.php'))): 
        ?>
         
          <div class="wrap">
            <h2>
              <?php if ($pagenow == 'profile.php'): ?>
                <?php _e('Edit Your Profile'); ?>
              <?php
                else:
                  $user = get_user_by('id', (int) $_REQUEST['user_id']); 
              ?>
                <?php _e('Edit User: ' . $user->user_login); ?> <a href="user-new.php" class="page-title-action"><?php _e('Add New'); ?></a>
              <?php endif;?>
            </h2>
          </div>
      
          <style type="text/css">
          
          
            <?php 
      
              // Updated this conditional to only trigger on 'profile' page
              if (isset($_REQUEST[piklist::$prefix]['flow_page']) && !in_array($_REQUEST[piklist::$prefix]['flow_page'], array('profile'))):
      
            ?>
      
              body.piklist-workflow-active.user-edit-php #your-profile .piklist-meta-box-title,
              body.piklist-workflow-active.profile-php #your-profile .piklist-meta-box-title,
              body.piklist-workflow-active.user-edit-php #your-profile .piklist-form-table,
              body.piklist-workflow-active.profile-php #your-profile .piklist-form-table,
              body.piklist-workflow-active.user-edit-php #your-profile p.submit,
              body.piklist-workflow-active.profile-php #your-profile p.submit {
                display: block;
              }
      
                body.piklist-workflow-active.user-edit-php #your-profile > *,
                body.piklist-workflow-active.profile-php #your-profile > * {
                  display: none;
                }
      
                  /* Show Piklist meta boxes */
                  body.piklist-workflow-active.user-edit-php #your-profile .piklist-meta-box,
                  body.piklist-workflow-active.profile-php #your-profile .piklist-meta-box {
                    display: block;
                  }
        
            <?php endif;?>
            
            body.piklist-workflow-active.user-edit-php #profile-page h1,
            body.piklist-workflow-active.profile-php #profile-page h1 {
              display: none;
            }
      
          </style>
          
        <?php 
          elseif ($pagenow == 'edit-tags.php'): 
            $taxonomy = get_taxonomy($taxnow);
        ?>
          
          <div class="wrap">
            <h2><?php echo $taxonomy->labels->edit_item; ?></h2>
          </div>
      
          <style type="text/css">
        
            <?php if (isset($_REQUEST[piklist::$prefix]['flow_page']) && !in_array($_REQUEST[piklist::$prefix]['flow_page'], array('common', 'common_term'))): ?>
      
              body.piklist-workflow-active.edit-tags-php .term-name-wrap,
              body.piklist-workflow-active.edit-tags-php .term-slug-wrap,
              body.piklist-workflow-active.edit-tags-php .term-parent-wrap,
              body.piklist-workflow-active.edit-tags-php .term-description-wrap {
                display: none;
              }
      
            <?php endif;?>
        
            body.piklist-workflow-active.edit-tags-php h1 {
              display: none;
            }
      
          </style>
            
        <?php endif;

      I also tried using the header in the demo but that does not work as well, and I have tried to use just the comment section without additional code. I am not using sub-tabs, just normal tabs. I right clicked into the source using “inspect” and it looks like it is just being hidden.

    • #4632
      Kevin
      Keymaster

      @justin-

      Grab v0.9.9.4 and check out the demo-common-profile.php and the demo-header.php files. We built in the functionality you have into a comment block parameter:

      Default Form: true/false

      This will allow you to show the default form for that admin page on that tab.

      Thanks,

      Kevin

    • #4634
      justin
      Member

      0.9.9.4 and the example’s in the demo as fixed this. Thank you.

      Solved.

    • #4635
      Steve
      Keymaster

      Great! Closing ticket.

Viewing 3 reply threads
  • The topic ‘user Flow 0.9.9.3’ is closed to new replies.