Code: Select all
<button type="button" onclick="CCPEVE.showContract(30003410, 14)">Show Contract</button>
what does this do and why would you want everyone to be able to do it all the time?xCausxn wrote:Hi What would i need to do to use this code in postsCode: Select all
<button type="button" onclick="CCPEVE.showContract(30003410, 14)">Show Contract</button>
Are those numbers ever going to change? If not, do the following:xCausxn wrote:What would i need to do to use this code in postsCode: Select all
<button type="button" onclick="CCPEVE.showContract(30003410, 14)">Show Contract</button>
Code: Select all
[contract][/contract]
Code: Select all
<button type="button" onclick="CCPEVE.showContract(30003410, 14)">Show Contract</button>
Code: Select all
[contract]{NUMBER1},{NUMBER2}[/contract]
Code: Select all
<button type="button" onclick="CCPEVE.showContract({NUMBER1}, {NUMBER2})">Show Contract</button>
Code: Select all
[insta]{URL}[/insta]
Code: Select all
<img src="{URL}media/?size=l">
Code: Select all
Instagram Photo: [insta]Instagram URL[/insta]
I wonder what happens if someone does not copy and paste the slash at the end of the URL.TiredChildren wrote:Here's a BBCode for inserting Instagram photos in posts:
HTML Replacement:Code: Select all
<img src="{URL}media/?size=l">
if that is what the instagram url looks like then what is all of this for:TiredChildren wrote:Instagram seems to add the slash to the url. Here's a link:
http://instagram.com/p/NcnZdUn1-Y/
I could change the BBCode to be {simpletext} and have the user input the code after the p/, if need be.
media/?size=l
{INDENTIFIER}
http://instagram.com/p/{INDENTIFIER}
media/
to the end, you'll get the photo file. The default size for the API is the smaller size though, and putting ?size=l
on the end gives you the large version of the photo. So that's the reason for all the extra media/?size=l
http://instagram.com/p/{identifier}/
, so I could have the BBCode be [insta]{identifier}[/insta]
and have the replacement be http://instagram.com/p/{identifier}/media/?size=l
looks good to me. however be sure you make it {INDENTIFIER} in all caps.TiredChildren wrote:Oh, I see what you're asking. I created a code for Instagram because they put their photos into the background via CSS, so you can't right-click on an image and get its URL. They have an API though, that if you take the URL of the photo's page and addmedia/
to the end, you'll get the photo file. The default size for the API is the smaller size though, and putting?size=l
on the end gives you the large version of the photo. So that's the reason for all the extramedia/?size=l
All Instagram photo pages have a url ofhttp://instagram.com/p/{identifier}/
, so I could have the BBCode be[insta]{identifier}[/insta]
and have the replacement behttp://instagram.com/p/{identifier}/media/?size=l
Code: Select all
[insta]{IDENTIFIER}[/insta]
Code: Select all
<img src="http://instagram.com/p/{IDENTIFIER}/media/?size=l">
Code: Select all
Instagram Photo: [insta]xxxxxxx[/insta] (For example: http://instagram.com/p/xxxxxxx/)
Code: Select all
<?php
//Simple code for returning an "embed" link, for youtube.
//works mostly with the iframe method.
if(isset($_GET['url'])) {
$url = $_GET['url'];
//Strip out the url itself,
//
$url = str_replace("https://", "", $url);
$url = str_replace("http://", "", $url);
$url = str_replace("www.", "", $url);
//
$url = str_replace("youtube.com/watch?v=", "", $url);
$url = str_replace("youtube.com/v/", "", $url);
$url = str_replace("youtu.be/", "", $url);
//probably in effecient, but i'm too lazy to look up a better way.. so...
$params = split("&", $url);
$embed = $params[0];
//Basically, it'll split the remnants by the "&"s found in the string. We only need the first instance, as the rest
//are just arguements for the video, that aren't compatible in this form.
header("Location: http://www.youtube.com/embed/".$embed );
//and viola!
}; ?>
Code: Select all
[youtube]{SIMPLETEXT}[/youtube]
Code: Select all
<iframe width="960" height="720" src="phpfile.php?url={SIMPLETEXT}" frameborder="0" allowfullscreen></iframe>
Code: Select all
<iframe width="960" height="720" src="http://theatrebox.net/Youtube?url={SIMPLETEXT}" frameborder="0" allowfullscreen></iframe>