vBadvanced Forums  
Go Back   vBadvanced Forums > vBadvanced Products > vBadvanced CMPS > Add-On Modules & Modifications > Module & Modification Discussion & Requests

Reply
 
Thread Tools Display Modes
  #1  
Old 01-20-2012, 12:12 AM
xertox xertox is offline
Junior Member
 
Join Date: Mar 2006
Posts: 11
Default Javascript question

I use the following Javascript snippet to autoembed images, videos and links in my forums. I wish to use this for the same purpose on my index page which uses VBA 4.1.2. The code only works in the .postbody class in the threadbit

Code:
selector: '.postbody',
no matter how I try to edit this part I always break it as I know next to nothing about coding. Also I don't know what class to use, firebug does not make it obvious. I was thinking it would be postcontent but I have no idea how to add a second selector... Looking for a little assistance.

Any help would be appreciated

Link: http://www.fatwillie.net

Code:
<script type="text/javascript">
    var _path = 'http://scripts.embed.ly/anywhere/';
    var _embedly={
      key: 'xxxxxxxxxxxxxxxxxxxx', // Change XXXXXXXXXX to be your Embedly Key, http://embed.ly/pricing
      method: 'replace',
      endpoint: 'preview',
      theme: 'dark',
      selector: '.postbody',
      excludes:/((http:\/\/(.*amazon\..*\/gp\/product\/.*|.*amazon\..*\/.*\/dp\/.*|.*amazon\..*\/dp\/.*|.*amazon\..*\/o\/ASIN\/.*|.*amazon\..*\/gp\/offer-listing\/.*|.*amazon\..*\/.*\/ASIN\/.*|.*amazon\..*\/gp\/product\/images\/.*|.*amazon\..*\/gp\/aw\/d\/.*|www\.amzn\.com\/.*|amzn\.com\/.*|www\.facebook\.com\/photo\.php.*|www\.facebook\.com\/video\/video\.php.*|www\.facebook\.com\/v\/.*))|(https:\/\/(www\.facebook\.com\/photo\.php.*|www\.facebook\.com\/video\/video\.php.*|www\.facebook\.com\/v\/.*|apps\.facebook\.com\/.*)))/i

    };
    (function(d,t){var g=d.createElement(t),s=d.getElementsByTagName(t)[0];g.async=1;
      g.src=_path+'anywhere.js';s.parentNode.insertBefore(g,s); }(document,'script'));
</script>
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
vb and javascript... Tort "How Do I..." Questions 5 01-20-2009 07:54 PM
Can I add javascript? calaf "How Do I..." Questions 3 02-13-2008 12:42 PM
Javascript in page Josechu "How Do I..." Questions 13 01-20-2008 09:29 PM
JavaScript Help!!! azntfl Troubleshooting & Problems 5 06-16-2006 09:12 AM
Javascript problems? mattster2002 Troubleshooting / "How do I..." Questions 7 01-31-2005 08:46 AM


All times are GMT -4. The time now is 07:39 PM.

Forums Powered by vBulletin, Copyright ©2000-2009, Jelsoft Enterprises Ltd.
Please note that vBadvanced is in no way affiliated with Jelsoft Enterprises Ltd, nor will Jelsoft be able to provide any support for our products.