Forum Replies Created
-
AuthorPosts
-
wemmons53
ParticipantPastebin now set to public. Sorry about that.
Looking at the members template you mentioned above, would this be a better route for me to make a template of my own? Looks like it has both the php and css files for that template. Look interesting. Will look at it in detail.
What I am actually trying to get now is just a clean printable directory. The church has specifics on how they wanted it to look.
I have what I need from the tile-plus template for all my online needs. That works great.
What I could make is a tile-print template to remove all the unnecessary info and display just what is needed to the printed directory. (and maybe set it up as a plugin).
Then I will donate the code if you would lie can pass it on like the members template if you like.
-
This reply was modified 10 years ago by
wemmons53.
wemmons53
ParticipantFYI
I have been working on the function and have done some updates. The pastebin link above now has current version.
The problem I now have is that the array data for each individual is not being pulled, ie the get phone number block brings up the family record info, not the individual.
The individuals name and relation shows ie Husband: Firstname Lastname
but the if stmts to pull the individuals data displays the family record data instead.wemmons53
ParticipantAnother question. I added a couple lines of code to the tile-plus.pho file to add my own shortcode (show_family_detail) so I can turn it on/off as needed.
Can the tile-plus.php file be overridden like the card.php file?
Or is the a filter or action that can be added to include the new shortcode?
wemmons53
ParticipantHere is copy of my function on Pastebin.com
Function: getFamilyMemberDetailsBlock
This is a copy of the getFamilyMemberBlock function with the few modes you told me to make. It does not work on the call. I added simple echo and return to make sure it was being called correctly and that shows fine. When I commented out my test line, it fails somewhere.
I don’t know how to debug it. I’m using Firefox browser.
The call from card.php works fine. I have an template override file, using method you point me to early on. That works great. It’s just getting the internals of the functions to work that I’m have a problem with.
Thanks Steve, appreciate your help.
Bill
wemmons53
ParticipantSeems like the shortcodes used in $atts[‘show_phonumbers’] is not initialized.
Do we have to add filter to add these shortcodes. All the if stmts using these codes fail in my custom function.
wemmons53
ParticipantFYI
Turns out to be browser specific. Firefox overrode the border settings.
Firefox required something extra. Cross browser issue are a real pain!abbr.dtstart { text-decoration: none ; }Needed to set the text-decoration to none. Works fine now across all browsers I have.
wemmons53
ParticipantIn tile-plus.php, I added a short code called “show_family_detail” so I can turn on/off my info in the html.
I added my function “getFamilyMemberDetailBlock” to class.entry-output.php, as instructed above.
I added following to the tile card.php after the series of “if” statements, for the calls to show_phonenumbers, show_emails, etc.
<div style="display: inline-block;"> <?php if ( $atts['show_family_detail'] ) $entry->getFamilyMemberDetailBlock( $atts, $entry ); /*** ADDED BY WHE ***/ ?> </div>In my function, I added code after the “foreach ( $relations as $relationData )” loop the was enclosed in ”
<
div>” I put some examples to show what I want. See the image of a tile below. Div is boxed is red.
I would like to be able to access the data for each of the relative entries using a series of if stmts like used in card.php, like one following.
if ( $atts['show_phonumbers'] ) $html = $html . $entry->getPhoneNumberBlock( array( 'format' => $atts['phone_format'] , 'type' => $atts['phone_types'] ) );How would I need to change this to access the data particular to each family member?
I can’t figure that out at this point.
Could you help? Thanks Steve, Bill
-
This reply was modified 10 years ago by
wemmons53.
-
This reply was modified 10 years ago by
wemmons53.
-
This reply was modified 9 years, 10 months ago by
Steven Zahm.
wemmons53
ParticipantSteven,
I see how the above works to modify the card.php and card-single.php files, but not just a single function. If found the functions in class.entry-output.php, but would rather not copy entire file over.
Is there an easy way to override just the getFamilyMemberBlock() function?
I would just copy that function and make my changes to it. Not the original.Since I use the My Custom Functions plugin (like Code Snippets plugin), could I add it there to override the original?
I had put the code you gave me to override the the default entry type there. See forum post “Add Entry Default Settings”
wemmons53
ParticipantGot it.
Look forward to giving it a try.
Thanks
wemmons53
Participant -
This reply was modified 10 years ago by
-
AuthorPosts
