• Resolved bhavens

    (@bhavens)


    I’m new to the whole php/css world (yeah, sorry) so I’m working my way through this. Love the plugin so far I just need some help going forward.

    My Participants database has three “types” of participants: venues, troupes, performers

    – I created separate groups for the type-specific fields and a common group for the common fields.
    – My submission_type field captures the page slug of the sign-on page used

    I have three list pages that use the php_list shortcode using groups= and some filtering to get the results that I want.

    ** All is working up to this point **

    GOAL:
    On each list page I want to click a field (‘ld_name’ is a common field) and have it display a single record page…. with that single record only displaying the appropriate groups for its submission_type.

    SO FAR:
    I created a copy of pdb-single-default.php and put it in the templates folder of my current WP template, renaming it pdb-single-performer.php.

    I edited the exclude statement so that it excludes the venue and troupe fields.

    Yay, all this works. For *performers*…

    PDBTEMPLATE CLASS ISSUES:
    I assume the answer lies with the PDbTemplate class and using the Switch/Case structure (??) to set up each single record response the way I want it to display.

    BUT… I ran into problems right away so I kept cutting my file down further and further.

    At this point I have a VERY simple pdb-single-submission.php file in my templates folder only it isn’t returning anything.

    I am VERY new to all of this, so I’m guessing I am missing something really basic.

    <?php
    /*
     * template for displaying a single record using IBinfo data
     *
     * single record template
     */
    
    // get the template object for this record
    $this_submission = new PDb_Template($this);
    ?>
    
    <h1>
      <?php $this_submission->print_field('ld_name') ?>
    </h1>

    That’s the extent of my file…

    I appreciate assistance.

    https://ww.wp.xz.cn/plugins/participants-database/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter bhavens

    (@bhavens)

    oh, stupid, stupid… I didn’t realize that the theme I was using (which is on white background for the record) has h1,h2,h3, etc. as WHITE. It was there all along but I wasn’t seeing it. Eesh.

    I would love to hear feedback, however, on if the Switch/Case is the way to go with this.

    Thanks!

    B.

    Plugin Author Roland Barker

    (@xnau)

    I can’t really comment too specifically about your switch/case question…but I will say that if you want to catch several specific fields in the loop and modify them, using switch/case is a good choice.

    Thread Starter bhavens

    (@bhavens)

    The switch/case did work – a case for each type with the type-specific fields inside the case.

    Now on to getting the graphic to display larger on the single record (but not in the lists)… I have it in an if statement so it only displays if it exists (stole that from somewhere here on the forum) but I can’t figure out what I need to do to make it display larger.

    (This really is a terrific plug-in.)

    Plugin Author Roland Barker

    (@xnau)

    To control the sizes of things on the page, you need to add some new CSS rules. The plugin does not have formatting settings built in, it’s designed to let the WP theme handle that. There is a convenient place to put your CSS that targets the plugin output in the settings, under the “custom CSS” tab.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Need basic help with PDbTemplate class’ is closed to new replies.