Results 1 to 6 of 6

Thread: How to create a sidebar video stream uploaded by advertiser as part of ad

  1. #1
    Thread Starter
    lausha's Avatar
    Join Date
    Dec 2010
    Location
    United Kingdom
    Posts
    422
    Thanks
    62
    Thanked 11 Times in 11 Posts

    How to create a sidebar video stream uploaded by advertiser as part of ad

    This almost works perfectly... it's just the last step I need help with.

    What you need:

    1. Download the plug-ins embedly and php code widget. Go to your plug-ins page in the main admin area and click on activate for both of them.

    2. Create a field in your form layout so that your advertiser can paste in the embed code from a site like youtube, for their video. Call it something like video clip. Once it's been created, click on it and see what meta-name WP has given it - it'll be something like cp_video_clip. Make a note of this.

    3. Go to your widgets page (in Appearances). Find the widget called PHP Code and drag it into the box under the right hand heading called Ad Sidebar. Click on it to open it. You can give it a title like "Watch A Demonstration" or whatever is appropriate.

    4. In the main body paste this code: <?php
    global $wp_query;
    $postid = $wp_query->post->ID;
    echo get_post_meta($postid, 'FIELDNAME', true);
    ?>

    but remember to change FIELDNAME to the meta-name. Save it.

    5. The advertiser goes to youtube, finds the video they want, clicks on the embed button, and then copies and pastes that code into the custom field of the classipress ad form. Get them to - or do it yourself afterwards - change the numbers that appear at the beginning of the code. These are the height and width of the video display. Change the first figure of 640 (or whatever) to 300, and the next figure of 385 (approx) to 220. Now it will fit the sidebar.

    6. Publish their ad.

    NOTE - Anytime that ad is edited, the video embed code has to be re-entered and the sizes corrected again. Not sure why, but every time you go to the edit page of the ad, most of the embed code has disappeared. It's a pain, but nothing serious.

    HOWEVER ONE PROBLEM - and can someone PLEASE HELP...

    Is there any way to make that field now invisible in the main ad? If you delete it then it won't show up in the sidebar either, but the problem remains that you now have 2 copies of the video - one in the sidebar, and one in the main body. Does anybody know how to make a command that says something along the lines of "if this field appears in the ad listing, make it invisible"?

    Thanks

  2. The Following User Says Thank You to lausha For This Useful Post:

    mtgmantx (December 15th, 2010)

  3. #2
    Veteran bluecafe's Avatar
    Join Date
    Apr 2010
    Location
    Berlin
    Posts
    1,563
    Thanks
    58
    Thanked 359 Times in 273 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!

  4. The Following User Says Thank You to bluecafe For This Useful Post:

    lausha (December 15th, 2010)

  5. #3
    Member mtgmantx's Avatar
    Join Date
    Jul 2010
    Location
    United States
    Posts
    73
    Thanks
    45
    Thanked 1 Time in 1 Post
    You must be an AppThemes customer and logged in to view this response. Join today!

  6. #4
    Thread Starter
    lausha's Avatar
    Join Date
    Dec 2010
    Location
    United Kingdom
    Posts
    422
    Thanks
    62
    Thanked 11 Times in 11 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!

  7. The Following User Says Thank You to lausha For This Useful Post:

    mtgmantx (December 15th, 2010)

  8. #5
    Member mtgmantx's Avatar
    Join Date
    Jul 2010
    Location
    United States
    Posts
    73
    Thanks
    45
    Thanked 1 Time in 1 Post
    You must be an AppThemes customer and logged in to view this response. Join today!

  9. #6
    Marketplace Seller mr_green's Avatar
    Join Date
    Aug 2010
    Posts
    952
    Thanks
    113
    Thanked 192 Times in 147 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!
    Best

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. create widget to view video stream from custom field
    By lausha in forum ClassiPress General Discussion
    Replies: 2
    Last Post: December 15th, 2010, 11:25 AM
  2. create widget to view video stream from custom field
    By lausha in forum Report ClassiPress Bugs
    Replies: 1
    Last Post: December 15th, 2010, 07:50 AM
  3. Create pages that are not part of header menu - HELP
    By tonyperez in forum Help Using ClassiPress
    Replies: 3
    Last Post: November 26th, 2010, 11:51 PM
  4. I must be logged in to ask questions to the advertiser
    By piplo in forum Report ClassiPress Bugs
    Replies: 4
    Last Post: November 14th, 2010, 07:46 AM