NON YouTube videos

Discussion in 'Technical Support' started by dwalley, Jun 28, 2011.

  1. dwalley Customer

    What version of 68 Classifieds are you running?
    v4.2.3 Developer

    What template are you using?
    Default

    Please describe in detail the issue you are having:

    I've seen several posts about adding YouTube videos to buyers ads. But, I have a slghtly different issue; one i haven't seen addressed. I searched on videos, youtube, etc and have found nothing about this, yet.

    I need to add a video to one of my top level pages for buyers to watch; for example,the home page. I prefer NOT to create a redirect link to a separate page in a different URL but I can if necessary.

    I use Camtasia 6 to build vids and upload them to their popular, proprietary site, Screencast for hosting (lilke YouTube). Once processed Screencast automatically provides the code that can simply be pasted into a page. While I haven't recorded the actual video for this site yet I have tested this with a different video i recorded for another site. All vids recorded this way have always worked in other sites.

    However, when I paste their code into any page all I get is a literal string of the code when saved and viewed rather than a working video.

    I've tried <embed>, <object>, even <video> for 5.0 and nothing works. Is there a simple, or not so simple solution I'm overlooking?

    Any suggestions would be appreciated.

    Thanx,

    Dwalley
    ________________
    Punjab Proverb "All things are simple if you know how to do it."
  2. Lhotch curmudgeon

    If you are adding this embed via the page editor it wont work. Content placed in the page editor is stored in the database and in turn is not parsed by the web server. Your best bet is to manually create the extra page you want to have host your video and embed directly in the pages template.
  3. Mike-N-Tosh Developer & Moderator

    There are at least two ways to get around this:

    1. If you want this on your home page, you can simply paste your code directly in the home.tpl template file.

    2. If you want this on a page that you created in the admin page editor, take note of the page id. In the content.tpl template page, use smarty code logic to display your embed code only when the page you want it to show is called.

    You create a page called, "My Video" and it has the id of 6.

    In the content.tpl page use this smart code to display the code when the page is "My Video"
    Code:
    {if $smarty.request.page == 6}
       ... Your video embed code ...
    {/if}
    You could also create another template file, called my_video.tpl and save it in your template folder. Use the same code as above except instead of your video code you simply include the my_video.tpl file like this:
    Code:
    {if $smarty.request.page == 6}
       {include file=my_video.tpl}
    {/if}

Share This Page