amr plus video formats and linktypes

Video url formats and linktypes

A request was received with definition in various stages:

  • if a video url exists, display a video icon and link to video, else display nothing
  • if a video url exists, display a custom uploaded video icon and link to a member detail page
  • as above but link to a custom (non-amr-user list) details page passing a userid parameter

The code supplied in the purchaseable add-on plugin download offers the following:

Video Url field formatting:

  1. if a video url exists, display  wordpress default video icon and link to video (default)
  2. if a video url exists, display custom video icon and link to video (comment out the code for step above and uncomment the code to display custom icon)
  3. link to a custom third party details page (that hopefully has the video) (Uncomment the code to do this)
link types

link types and wordpress video icon

video on file

custom video icon on file

Requirements:

  • user meta fields called ‘video_url’ must exist
video url in phpmyadmin

video url in phpmyadmin

Additional Link Types:

For use on fields that do NOT already have custom formatting.  IE: do not use on the video url field above, but could be used on other user fields as demonstrated.

  1. Link to a amr-user list page called ‘memberdetails’.  Edit to suit.  Demo here.
  2. Link to a custom third party page called ‘details.php’ passing parameter userid=x.  Location of custom file may have to be edited.

Note if a wordpress ‘author’ template is intended, then use the already provided ‘author archive’ link.

Linktypes added

Linktypes added

Requirements:

  1. for 1) above, a wp page with a amr-users list must exists.  This list must include any user whose id may be passed to it from the starting list
  2. for 2) a suitably named php file must exist that will accept a userid parameter

Download:

Note: the price here reflects the custom nature of this work and the unlikelihood that there will ever be more than one or two purchasers.    This code and the optional alternatives (currently commented out) have been tested on wp 3.9.1 and data as indicated in the screenshots.  If problems are experienced after editing further consulting or support costs may be incurred, depending how time consuming the support is.

Files available:

  • amr-users-plus-video-link

 

Add to Cart