WordPress.org

Ready to get started?Download WordPress

Forums

Participants Database
[resolved] I NEED HELP!! (3 posts)

  1. r3ap3r666
    Member
    Posted 1 year ago #

    I need help, i have set up the plugin perfectly etc but i want to use the setting to allow members to click a participant to see the information on its own page. now i have set it to do this but when it shows the information is looks really bad.

    Can you please help me with the CSS so it looks good? i am willing to pay some monies towards any plugin projects you have in the future :)

    Please help here is how it looks: http://clanvision.org/?page_id=1791&pdb=1329

    and here is how i would like it to look: http://clanvision.org/wp-content/uploads/2012/07/css-needed.jpg

    thanks for your help

    http://wordpress.org/extend/plugins/participants-database/

  2. jacksun
    Member
    Posted 1 year ago #

    Hi, here's what I did. File /templates/pdb-single-default.php.

    This is the code that handles the display of the single record. Lines 55 - 72 of the file.

    <dl>
    
          <?php // this prints out all the fields in the group
    			foreach( $group->fields as $field ) : 
    
              $value = Participants_Db::prep_field_for_display( $field->value, $field->form_element );
    
    					$empty_class = empty( $value ) ? 'blank-field' : '';
    
          ?>
    
          <dt class="<?php echo $field->name.' '.$empty_class?>"><?php echo $field->title ?></dt>
    
          <dd class="<?php echo $field->name.' '.$empty_class?>"><?php echo $value ?></dd>
    
        	<?php endforeach; // end of the fields loop ?>
    
        </dl>

    I changed it to:

    <div>
    
          <?php // this prints out all the fields in the group
    			foreach( $group->fields as $field ) :
    
              $value = Participants_Db::prep_field_for_display( $field->value, $field->form_element );
    
    					$empty_class = empty( $value ) ? 'blank-field' : '';
    
          ?>
    
          <p class="<?php echo $field->name.' '.$empty_class?>"><B><?php echo $field->title ?>:</B> <?php echo $value ?></p>
    
        	<?php endforeach; // end of the fields loop ?>
    
        </div>

    Now records display like this, ignore the spacing, it looks better on a web page:

    Last Name: AARON
    First Name: J
    Soldier Number:4457224
    Regt / Unit: The Durham Light Infantry

    Anyway, the area of the code above is what you need to edit to alter the display of the single record page. You can use classes and the like in the <div> tags to take advantage of your current CSS.

    Wayne

  3. r3ap3r666
    Member
    Posted 1 year ago #

    would you be able to create the CSS for me? please

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic