Previous Page
by
Captain Ron
at 10:24 PM EDT on August 1, 2011
Excellent; I've done it (albeit with a minor bug):
http://camoyoshi.x10.mx/~techemporium/forum/index.php
I've managed to test the YouTube tag I've created properly &, after a little bit of tinkering, I've fixed it & added a code tag.
Here's the working code for a YouTube tag:
$tags_search=array(
...
"/\[yt\=(.*?)\]/i",
...
);
$tags_replace=array(
...
"<object height=\"390\" width=\"640\"><param name=\"movie\" value=\"http://www.youtube.com/v/\\1?version=3\"><param name=\"allowFullScreen\" value=\"true\"><param name=\"allowScriptAccess\" value=\"always\"><embed src=\"http://www.youtube.com/v/\\1?version=3\" type=\"application/x-shockwave-flash\" allowfullscreen=\"true\" allowScriptAccess=\"always\" width=\"640\" height=\"390\"></embed></object>",
...
);
$tags_decode_search=array(
...
"/<object height\=\"390\" width\=\"640\"><param name\=\"movie\" value\=\"http:\/\/www.youtube.com\/v\/(.*?)\?version\=3\"><param name\=\"allowFullScreen\" value\=\"true\"><param name\=\"allowScriptAccess\" value\=\"always\"><embed src\=\"http:\/\/www.youtube.com\/v\/(.*?)?version\=3\" type\=\"application\/x\-shockwave\-flash\" allowfullscreen\=\"true\" allowScriptAccess\=\"always\" width\=\"640\" height\=\"390\"><\/embed><\/object>/",
...
);
$tags_decode_replace=array(
...
"[yt=\\1]",
...
);
Unfortunately, I have a problem with trailing backslashes after every apostrophe & quotation mark I type in a message. Can you recommend any way to rectify this?
by
hcs
at 10:27 PM EDT on August 1, 2011
You probably have Magic Quotes enabled.
by
Captain Ron
at 11:08 PM EDT on August 1, 2011
Indeed; so I do... Nothing that a little extra PHP at the head of the page can't rectify...
<?php
$script_start_time = microtime(true);
if ( in_array( strtolower( ini_get( 'magic_quotes_gpc' ) ), array( '1', 'on' ) ) )
{
$_POST = array_map( 'stripslashes', $_POST );
$_GET = array_map( 'stripslashes', $_GET );
$_COOKIE = array_map( 'stripslashes', $_COOKIE );
}
...
That fixed my problem. Once again, hcs, thank you so much for everything.
edited 6:37 PM EDT August 2, 2011
Previous Page
Go to Page
0
1
2
Search this thread
Show all threads
Reply to this thread:
User Name
Tags:
bold
: [b]bold[/b]
italics
: [i]italics[/i]
emphasis
: [em]emphasis[/em]
underline
: [u]underline[/u]
small
: [small]small[/small]
Link
: [url=http://www.google.com]Link[/url]
[img=https://www.hcs64.com/images/mm1.png]
Password
Subject
Message
HCS Forum Index
Halley's Comet Software
forum source