Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #302736

    Hello, is there a way of setting image and video url’s in the media elements of enfold, dynamically.

    I want to pull demonstration links to videos & images that have been made for prospects who identify them self with a code that is used to query a database and extract the links.

    I don’t understand where the elements are stored and rendered and how to intercept them.

    If all else is impossible can I use ‘save as’ of a page to get the source code and put the relevant part into a code block and just use search/replace… I imagine that has a few problems though.

    Thanks

    • This topic was modified 2 months, 2 weeks ago by  twdlewis.
    #302821

    Hey twdlewis!

    It depends on what element you are adding the data to and how the whole thing should/would potentially work.

    Its unfortunately the kind of question that is far to open ended for a concrete answer.

    Cheers!
    Devin

    #302971
    This reply has been marked as private.
    #303301

    It would need to be a custom built WordPress page template. I’ve done something like that for a client and its not overly difficult but it is beyond what we can do for you via support.

    If you have a bit of php experience the WordPress codex can walk you through creating the new page template and then its a few hours of time to code it together (depending on what kind of video player is needed).

    #303376
    This reply has been marked as private.
    #303384

    No it wouldn’t. The video element in the builder would need to be modified to run do_shortcode and ignore the incorrect url.

    #303609
    This reply has been marked as private.
    #303614

    A page template would be: http://codex.wordpress.org/Page_Templates

    It would be select-able from the page template dropdown and would output your element either before or after the visual editor content. So when I did that for a client I made a page template called video player and wrote some php to grab the data from the url, save it as variables and then added the variables into the video player on the page.

    I *think* that would be the easiest here but it depends on what your overall layout would be and how much other content should be edited on the page.

    To replace a ALB drag and drop element or add your own see: https://github.com/DevinVinson/enfold-child-docs

    I have a function in the functions.php file that points to the child themes shortcode folder where I’ve replaced the default magazine element with a modified version. That way it shows the last updated data instead of the published date http://www.kriesi.at/documentation/enfold/tutorials-how-to-articles/

    You could do the same thing but create a new element.

    #303627
    This reply has been marked as private.
Viewing 9 posts - 1 through 9 (of 9 total)

The topic ‘How set image and video dynamically using php’ is closed to new replies.