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:
- if a video url exists, display wordpress default video icon and link to video (default)
- 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)
- link to a custom third party details page (that hopefully has the video) (Uncomment the code to do this)
- user meta fields called ‘video_url’ must exist
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.
- Link to a amr-user list page called ‘memberdetails’. Edit to suit. Demo here.
- 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.
- 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
- for 2) a suitably named php file must exist that will accept a userid parameter
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.