1 daethian2 Sep 14, 2007 02:44
3 afwas Sep 14, 2007 13:27
Try the thing in a <div> like <div> [...] Your code [...] </div>
What you did if you followed the link is allowing <param> within <div> or <p> and in your code the <param> is within <object> rather than within <div>.
For testing purposes, you can disable the htmlchecker, that way you are sure your original code will work in B2evo. Then you make the changes to the _formatting.php.
Good luck
4 daethian2 Sep 14, 2007 16:08
I was able to get it posted without the parameters so I am going to leave it for now.
5 daethian2 Apr 24, 2008 04:49
I'm back to fighting with this. Trying to post a lyrics scroll and it is giving me:
Tag <embed> may not have attribute src
I'm using the div wrap and I have src added to the formatting.php file.
// Array showing allowed attributes for tags
if( $use_strict )
{
$allowed_attributes = array
(
'div' => A_attrs, // Strict
'p' => A_attrs, // Strict
'h1' => A_attrs, // Strict
'h2' => A_attrs, // Strict
'h3' => A_attrs, // Strict
'h4' => A_attrs, // Strict
'h5' => A_attrs, // Strict
'h6' => A_attrs, // Strict
'ul' => A_attrs, // Strict
'ol' => A_attrs, // Strict
'li' => A_attrs, // Strict
'dl' => A_attrs, // Strict
'hr' => A_attrs, // Strict
'pre' => A_attrs.' xml:space', // Strict
'a' => A_attrs.' charset type href hreflang rel rev shape coords onmouseover onmouseout id', // Strict
'br' => A_coreattrs, // Strict
'img' => A_attrs.' src alt longdesc height width usemap ismap onmouseover onmouseout id', // Strict
'legend' => A_attrs, // Strict
'table' => A_attrs.' summary width border frame rules cellspacing cellpadding', // Strict
'caption' => A_attrs, // Strict
'tr' => A_attrs.' '.A_cellhalign.' '.A_cellvalign, // Strict
'th' => A_attrs.' abbr axis headers scope rowspan colspan'.A_cellhalign.' '.A_cellvalign, // Strict
'td' => A_attrs.' abbr axis headers scope rowspan colspan'.A_cellhalign.' '.A_cellvalign, // Strict
'embed' => A_attrs. 'src width height autostart type wmode showcontrols loop quality bgcolor name align allowScriptAccess pluginspage p',
'object' => A_attrs. ' callid codebase width height id quality data pluginspage type wmode param',
'param' => A_attrs. 'name value',
);
}
else
{
$allowed_attributes = array
(
'div' => A_attrs.' '.A_TextAlign, // Transitional
'p' => A_attrs.' '.A_TextAlign, // Transitional
'h1' => A_attrs.' '.A_TextAlign, // Transitional
'h2' => A_attrs.' '.A_TextAlign, // Transitional
'h3' => A_attrs.' '.A_TextAlign, // Transitional
'h4' => A_attrs.' '.A_TextAlign, // Transitional
'h5' => A_attrs.' '.A_TextAlign, // Transitional
'h6' => A_attrs.' '.A_TextAlign, // Transitional
'ul' => A_attrs.' type compact', // Transitional
'ol' => A_attrs.' type compact start', // Transitional
'menu' => A_attrs.' compact', // Transitional only
'dir' => A_attrs.' compact', // Transitional only
'li' => A_attrs.' type value', // Transitional
'dl' => A_attrs.' compact', // Transitional
'hr' => A_attrs.' align noshade size width', // Transitional
'pre' => A_attrs.' width xml:space', // Transitional
'center' => A_attrs, // Transitional only
'a' => A_attrs.' charset type href hreflang rel rev shape coords target onmouseover id onmouseout', // Transitional
'a' => A_attrs.' charset type href hreflang rel rev shape coords target id onmouseover onmouseout', // Transitional
'a' => A_attrs.' charset type href hreflang rel rev shape coords target id', // Transitional
'br' => A_coreattrs.' clear', // Transitional
'u' => A_attrs, // Transitional only
's' => A_attrs, // Transitional only
'strike' => A_attrs, // Transitional only
'font' => A_coreattrs.' '.A_i18n.' size color face', // Transitional only
'img' => A_attrs.' src alt name longdesc height width usemap ismap align border hspace vspace onmouseover onmouseout id', // Transitional
'legend' => A_attrs.' align', // Transitional
'table' => A_attrs.' summary width border frame rules cellspacing cellpadding align bgcolor', // Transitional
'caption' => A_attrs.' align', // Transitional
'tr' => A_attrs.' '.A_cellhalign.' '.A_cellvalign.' bgcolor', // Transitional
'th' => A_attrs.' abbr axis headers scope rowspan colspan'.A_cellhalign.' '.A_cellvalign.' nowrap bgcolor width height', // Transitional
'td' => A_attrs.' abbr axis headers scope rowspan colspan'.A_cellhalign.' '.A_cellvalign.' nowrap bgcolor width height', // Transitional
'embed' => A_attrs. 'src width height autostart type wmode showcontrols loop quality bgcolor name align allowScriptAccess pluginspage',
'object' => A_attrs. ' callid codebase width height id quality data pluginspage type wmode param',
'param' => A_attrs. 'name value',
);
6 daethian2 May 16, 2008 05:12
Here is what I want to post:
<embed src="http://www.lyricsdomain.com/scroller.swf?id=75155&af=25&cf=0x644A9B&speed=2&font=&size=10&color=0x34176E&tc=0x34176E&tha=100&btc=0x34176E&bga=72&bgc=0x1D0A55&ima=85&url=" quality="high" bgcolor="#808080" width="180" height="240" name="lyrics_scroller" wmode="transparent" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"><p style="width:180px;text-align:center;"> <a href="http://www.lyricsdomain.com/" title="Song Lyrics">Song Lyrics</a></p></embed>
Here are the errors.
Cannot post, please correct these errors:
* Tag <embed> must occur inside another tag
* Tag <embed> may not have attribute src
* Tag <p> is not allowed within tag <embed>
* Tag <p> may not have attribute style
* Tag <embed> must occur inside another tag
* Tag <embed> may not have attribute src
* Tag <p> is not allowed within tag <embed>
* Tag <p> may not have attribute style
Here is my _formatting.php:
<?php
/**
* This is b2evolution's formatting config file.
*
* This file sets how b2evolution will parse and format texts (posts, comments, etc.)
* Last significant changes to this file: version 1.6
*
* @todo Move as much as possible to $Settings / $UserSettings
* @package conf
*/
if( !defined('EVO_CONFIG_LOADED') ) die( 'Please, do not access this page directly.' );
// ** Formatting **
/**
* Automatically balance unmatched tags in posts and comments.
*
* Choose the formatting options for your posts:
* 0 to disable
* 1 to ensable
* @global integer 0|1
*/
$use_balanceTags = 1;
# Choose formatting options for comments
# 'never' : option will never be used
# 'opt-in' : option will be used only if user explicitely asks for it
# 'opt-out' : option will be used by default, but user can refuse
# 'always' : option will always be used
$comments_use_autobr = 'opt-out'; // automatically change line breaks to <br />
/*
* Validity & Security Checking
*
* Posts and comments should be checked to see if they contain valid XHTML code
* and no invalid code (javascript, styles, CSS, etc...)
*/
# Html checking will validate posts and comments to a subset of valid XHTML.
# This will also do much cleaner security checking than the next option.
# Note: This option requires the PHP XML module. If your PHP installation doesn't have it
# disable html_checker and use security_checker.
$use_html_checker = 1;
# Security checking will check for illegal javascript hacks in posts/comments
# and for CSS in comments. However, this may be a bit harsh on your posts :]
$use_security_checker = 0;
# WARNING: disabling both $use_html_checker and $use_security_checker is suicidal !
// Set this to true if you want to enforce XHTML strict
$use_strict = false;
# Set this to true to allow id && style as core attributes for posts
$posts_allow_css_tweaks = false;
# set this to true to allow id && style as core attributes for comments
# WARNING : This would allow spammers to post hidden content in comments
# enable it at your own risk !
$comments_allow_css_tweaks = false;
/*
* HTML Checker params:
*
* The params are defined twice: once for the posts and once for the comments.
* Typically you'll be more restrictive on comments.
*
* Adapted from XHTML-1.0-Transitional/Strict by fplanque
* http://www.w3.org/TR/2002/REC-xhtml1-20020801/dtds.html#a_dtd_XHTML-1.0-Strict
*/
// DEFINITION of allowed XHTML code for POSTS (posted in the backoffice)
/**
* Allowed Entity classes
*/
if( $use_strict )
{
define('E_special_pre', 'br span bdo'); // Strict
define('E_special', E_special_pre.' img'); // Strict
}
else
{
define('E_special_extra', 'img' ); // Transitional
define('E_special_basic', 'br span bdo' ); // Transitional
define('E_special', E_special_basic.' '.E_special_extra ); // Transitional
}
if( $use_strict )
{
define('E_fontstyle', 'tt i b big small'); // Strict
}
else
{
define('E_fontstyle_extra', 'big small font' ); // Transitional
define('E_fontstyle_basic', 'tt i b u s strike' ); // Transitional
define('E_fontstyle', E_fontstyle_basic.' '.E_fontstyle_extra ); // Transitional
}
if( $use_strict )
{
define('E_phrase', 'em strong dfn code q samp kbd var cite abbr acronym sub sup'); // Strict
}
else
{
define('E_phrase_extra', 'sub sup'); // Transitional
define('E_phrase_basic', 'em strong dfn code q samp kbd var cite abbr acronym'); // Transitional
define('E_phrase', E_phrase_basic.' '.E_phrase_extra ); // Transitional
}
define('E_misc_inline', 'ins del');
define('E_misc', E_misc_inline);
define('E_inline', 'a '.E_special.' '.E_fontstyle.' '.E_phrase );
define('E_Iinline', '#PCDATA '.E_inline.' '.E_misc_inline );
define('E_heading', 'h1 h2 h3 h4 h5 h6');
if( $use_strict )
{
define('E_list', 'ul ol dl'); // Strict
}
else
{
define('E_list', 'ul ol dl menu dir'); // Transitional
}
if( $use_strict )
{
define('E_blocktext', 'pre hr blockquote address'); // Strict
}
else
{
define('E_blocktext', 'pre hr blockquote address center'); // Transitional
}
define('E_block', 'p '.E_heading.' div '.E_list.' '.E_blocktext.' fieldset table');
if( $use_strict ) define('E_Bblock', E_block.' '.E_misc ); // Strict only
define('E_Flow', '#PCDATA '.E_block.' '.E_inline.' '.E_misc );
define('E_a_content', '#PCDATA '.E_special.' '.E_fontstyle.' '.E_phrase.' '.E_misc_inline );
if( $use_strict )
{
define('E_pre_content', '#PCDATA a '.E_fontstyle.' '.E_phrase.' '.E_special_pre.' '.E_misc_inline ); // Strict
}
else
{
define('E_pre_content', '#PCDATA a '.E_special_basic.' '.E_fontstyle_basic.' '.E_phrase_basic.' '.E_misc_inline ); // Transitional
}
// Allowed Attribute classes
define('A_coreattrs', 'class title'.( $posts_allow_css_tweaks ? ' id style' : '' ) );
define('A_i18n', 'lang xml:lang dir');
define('A_attrs', A_coreattrs.' '.A_i18n);
if( !$use_strict ) define('A_TextAlign', 'align'); // Transitional only
define('A_cellhalign', 'align char charoff');
define('A_cellvalign', 'valign');
// Array showing what tags are allowed and what their allowed subtags are.
$allowed_tags = array
(
'body' => E_Flow, // Remember this is not a true body, just a post body
'div' => E_Flow.'iframe object param embed',
'p' => E_Iinline.'iframe object param embed',
'h1' => E_Iinline,
'h2' => E_Iinline,
'h3' => E_Iinline,
'h4' => E_Iinline,
'h5' => E_Iinline,
'h6' => E_Iinline,
'ul' => 'li',
'ol' => 'li',
'object' => E_Flow.'param embed',
'param' =>E_Flow.'embed',
);
if( !$use_strict )
{
$allowed_tags += array
(
'menu' => 'li', // Transitional only
'dir' => 'li', // Transitional only
);
}
$allowed_tags += array
(
'li' => E_Flow,
'dl' => 'dt dd',
'dt' => E_Iinline,
'dd' => E_Flow,
);
if( $use_strict )
{
$allowed_tags += array
(
'address' => E_Iinline, // Strict
);
}
else
{
$allowed_tags += array
(
'address' => '#PCDATA '.E_inline.' '.E_misc_inline, // Transitional
);
}
$allowed_tags += array
(
'hr' => '',
'pre' => E_pre_content,
);
if( $use_strict )
{
$allowed_tags += array
(
'blockquote' => E_Bblock, // Strict
);
}
else
{
$allowed_tags += array
(
'blockquote' => E_Flow, // Transitional
'center' => E_Flow, // Transitional only
);
}
$allowed_tags += array
(
'ins' => E_Flow,
'del' => E_Flow,
'a' => E_a_content,
'span' => E_Iinline,
'bdo' => E_Iinline,
'br' => '',
'em' => E_Iinline,
'strong' => E_Iinline,
'dfn' => E_Iinline,
'code' => E_Iinline,
'samp' => E_Iinline,
'kbd' => E_Iinline,
'var' => E_Iinline,
'cite' => E_Iinline,
'abbr' => E_Iinline,
'acronym' => E_Iinline,
'q' => E_Iinline,
'sub' => E_Iinline,
'sup' => E_Iinline,
'tt' => E_Iinline,
'i' => E_Iinline,
'b' => E_Iinline,
'big' => E_Iinline,
'small' => E_Iinline,
);
if( !$use_strict )
{
$allowed_tags += array
(
'u' => E_Iinline, // Transitional only
's' => E_Iinline, // Transitional only
'strike' => E_Iinline, // Transitional only
'font' => E_Iinline, // Transitional only
);
}
$allowed_tags += array
(
'img' => 'id onmouseover onmouseout',
'fieldset' => '#PCDATA legend '.E_block.' '.E_inline.' '.E_misc,
'legend' => E_Iinline,
'table' => 'caption col colgroup thead tfoot tbody tr',
'caption' => E_Iinline,
'thead' => 'tr',
'tfoot' => 'tr',
'tbody' => 'tr',
'colgroup' => 'col',
'tr' => 'th td',
'th' => E_Flow,
'td' => E_Flow,
'embed' =>E_Iinline, E_Flow,
'object' =>E_Iinline, E_Flow,
);
// Array showing allowed attributes for tags
if( $use_strict )
{
$allowed_attributes = array
(
'div' => A_attrs, // Strict
'p' => A_attrs.'style', // Strict
'h1' => A_attrs, // Strict
'h2' => A_attrs, // Strict
'h3' => A_attrs, // Strict
'h4' => A_attrs, // Strict
'h5' => A_attrs, // Strict
'h6' => A_attrs, // Strict
'ul' => A_attrs, // Strict
'ol' => A_attrs, // Strict
'li' => A_attrs, // Strict
'dl' => A_attrs, // Strict
'hr' => A_attrs, // Strict
'pre' => A_attrs.' xml:space', // Strict
'a' => A_attrs.' charset type href hreflang rel rev shape coords onmouseover onmouseout id', // Strict
'br' => A_coreattrs, // Strict
'img' => A_attrs.' src alt longdesc height width usemap ismap onmouseover onmouseout id', // Strict
'legend' => A_attrs, // Strict
'table' => A_attrs.' summary width border frame rules cellspacing cellpadding', // Strict
'caption' => A_attrs, // Strict
'tr' => A_attrs.' '.A_cellhalign.' '.A_cellvalign, // Strict
'th' => A_attrs.' abbr axis headers scope rowspan colspan'.A_cellhalign.' '.A_cellvalign, // Strict
'td' => A_attrs.' abbr axis headers scope rowspan colspan'.A_cellhalign.' '.A_cellvalign, // Strict
'embed' => A_attrs. 'src width height autostart type wmode showcontrols loop quality bgcolor name align allowScriptAccess pluginspage p',
'object' => A_attrs. 'callid codebase width height id quality data pluginspage type wmode param',
'param' => A_attrs. 'name value',
);
}
else
{
$allowed_attributes = array
(
'div' => A_attrs.' '.A_TextAlign, // Transitional
'p' => A_attrs.' '.A_TextAlign, // Transitional
'h1' => A_attrs.' '.A_TextAlign, // Transitional
'h2' => A_attrs.' '.A_TextAlign, // Transitional
'h3' => A_attrs.' '.A_TextAlign, // Transitional
'h4' => A_attrs.' '.A_TextAlign, // Transitional
'h5' => A_attrs.' '.A_TextAlign, // Transitional
'h6' => A_attrs.' '.A_TextAlign, // Transitional
'ul' => A_attrs.' type compact', // Transitional
'ol' => A_attrs.' type compact start', // Transitional
'menu' => A_attrs.' compact', // Transitional only
'dir' => A_attrs.' compact', // Transitional only
'li' => A_attrs.' type value', // Transitional
'dl' => A_attrs.' compact', // Transitional
'hr' => A_attrs.' align noshade size width', // Transitional
'pre' => A_attrs.' width xml:space', // Transitional
'center' => A_attrs, // Transitional only
'a' => A_attrs.' charset type href hreflang rel rev shape coords target onmouseover id onmouseout', // Transitional
'a' => A_attrs.' charset type href hreflang rel rev shape coords target id onmouseover onmouseout', // Transitional
'a' => A_attrs.' charset type href hreflang rel rev shape coords target id', // Transitional
'br' => A_coreattrs.' clear', // Transitional
'u' => A_attrs, // Transitional only
's' => A_attrs, // Transitional only
'strike' => A_attrs, // Transitional only
'font' => A_coreattrs.' '.A_i18n.' size color face', // Transitional only
'img' => A_attrs.' src alt name longdesc height width usemap ismap align border hspace vspace onmouseover onmouseout id', // Transitional
'legend' => A_attrs.' align', // Transitional
'table' => A_attrs.' summary width border frame rules cellspacing cellpadding align bgcolor', // Transitional
'caption' => A_attrs.' align', // Transitional
'tr' => A_attrs.' '.A_cellhalign.' '.A_cellvalign.' bgcolor', // Transitional
'th' => A_attrs.' abbr axis headers scope rowspan colspan'.A_cellhalign.' '.A_cellvalign.' nowrap bgcolor width height', // Transitional
'td' => A_attrs.' abbr axis headers scope rowspan colspan'.A_cellhalign.' '.A_cellvalign.' nowrap bgcolor width height', // Transitional
'embed' => A_attrs. 'src p width height autostart type wmode showcontrols loop quality bgcolor name align allowScriptAccess pluginspage',
'object' => A_attrs. ' callid codebase width height id quality data pluginspage type wmode param',
'param' => A_attrs. 'name value',
);
}
$allowed_attributes += array
(
'fieldset' => A_attrs,
'ins' => A_attrs.' cite datetime',
'del' => A_attrs.' cite datetime',
'blockquote' => A_attrs.' cite',
'span' => A_attrs,
'bdo' => A_coreattrs.' lang xml:lang dir',
'dt' => A_attrs,
'dd' => A_attrs,
'address' => A_attrs,
'em' => A_attrs,
'strong' => A_attrs,
'dfn' => A_attrs,
'code' => A_attrs,
'samp' => A_attrs,
'kbd' => A_attrs,
'var' => A_attrs,
'cite' => A_attrs,
'abbr' => A_attrs,
'acronym' => A_attrs,
'q' => A_attrs.' cite',
'sub' => A_attrs,
'sup' => A_attrs,
'tt' => A_attrs,
'i' => A_attrs,
'b' => A_attrs,
'big' => A_attrs,
'small' => A_attrs,
'colgroup' => A_attrs.' span width cellhalign cellvalign',
'col' => A_attrs.' span width cellhalign cellvalign',
'thead' => A_attrs.' '.A_cellhalign.' '.A_cellvalign,
'tfoot' => A_attrs.' '.A_cellhalign.' '.A_cellvalign,
'tbody' => A_attrs.' '.A_cellhalign.' '.A_cellvalign,
);
$allowed_uri_scheme = array
(
'http',
'https',
'ftp',
'gopher',
'nntp',
'news',
'mailto',
'irc',
'aim',
'icq'
);
// DEFINITION of allowed XHTML code for COMMENTS (posted from the public blog pages)
# here is a list of the tags that are allowed in the comments.
# all tags not in this list will be filtered out anyway before we do any checking
$comment_allowed_tags = '<p><ul><ol><li><dl><dt><dd><address><blockquote><ins><del><span><bdo><br><em><strong><dfn><code><samp><kdb><var><cite><abbr><acronym><q><sub><sup><tt><i><b><big><small>';
// Allowed Entity classes
define('C_E_special_pre', 'br span bdo');
define('C_E_special', C_E_special_pre);
define('C_E_fontstyle', 'tt i b big small');
define('C_E_phrase', 'em strong dfn code q samp kbd var cite abbr acronym sub sup');
define('C_E_misc_inline', 'ins del');
define('C_E_misc', C_E_misc_inline);
define('C_E_inline', 'a '.C_E_special.' '.C_E_fontstyle.' '.C_E_phrase );
define('C_E_Iinline', '#PCDATA '.C_E_inline.' '.C_E_misc_inline );
define('C_E_heading', '');
define('C_E_list', 'ul ol dl');
define('C_E_blocktext', 'hr blockquote address');
define('C_E_block', 'p '.C_E_heading.' div '.C_E_list.' '.C_E_blocktext.' table');
define('C_E_Bblock', C_E_block.' '.C_E_misc );
define('C_E_Flow', '#PCDATA '.C_E_block.' '.C_E_inline.' '.C_E_misc );
define('C_E_a_content', '#PCDATA '.C_E_special.' '.C_E_fontstyle.' '.C_E_phrase.' '.C_E_misc_inline );
define('C_E_pre_content', '#PCDATA a '.C_E_fontstyle.' '.C_E_phrase.' '.C_E_special_pre.' '.C_E_misc_inline );
// Allowed Attribute classes
define('C_A_coreattrs', 'class title'.( $comments_allow_css_tweaks ? ' id style' : '' ));
define('C_A_i18n', 'lang xml:lang dir');
define('C_A_attrs', C_A_coreattrs.' '.C_A_i18n);
define('C_A_cellhalign', 'align char charoff');
define('C_A_cellvalign', 'valign');
/**
* Array showing what tags are allowed and what their allowed subtags are.
* @global array
*/
$comments_allowed_tags = array
(
'body' => E_Flow, // Remember this is not a true body, just a comment body
'p' => C_E_Iinline,
'ul' => 'li',
'ol' => 'li',
'li' => C_E_Flow,
'dl' => 'dt dd',
'dt' => C_E_Iinline,
'dd' => C_E_Flow,
'address' => C_E_Iinline,
'hr' => '',
);
if( $use_strict )
{
$comments_allowed_tags += array
(
'blockquote' => C_E_Bblock, // XHTML-1.0-Strict
);
}
else
{
$comments_allowed_tags += array
(
'blockquote' => C_E_Flow, // XHTML-1.0-Transitional
);
}
$comments_allowed_tags += array
(
'ins' => C_E_Flow,
'del' => C_E_Flow,
// 'a' => C_E_a_content, // Allowing this will call for a whole lot of comment spam!!!
'span' => C_E_Iinline,
'bdo' => C_E_Iinline,
'br' => '',
'em' => C_E_Iinline,
'strong' => C_E_Iinline,
'dfn' => C_E_Iinline,
'code' => C_E_Iinline,
'samp' => C_E_Iinline,
'kbd' => C_E_Iinline,
'var' => C_E_Iinline,
'cite' => C_E_Iinline,
'abbr' => C_E_Iinline,
'acronym' => C_E_Iinline,
'q' => C_E_Iinline,
'sub' => C_E_Iinline,
'sup' => C_E_Iinline,
'tt' => C_E_Iinline,
'i' => C_E_Iinline,
'b' => C_E_Iinline,
'big' => C_E_Iinline,
'small' => C_E_Iinline,
);
/**
* Array showing allowed attributes for tags.
* @global array
*/
$comments_allowed_attributes = array
(
'p' => C_A_attrs,
'ul' => C_A_attrs,
'ol' => C_A_attrs,
'li' => C_A_attrs,
'dl' => C_A_attrs,
'dt' => C_A_attrs,
'dd' => C_A_attrs,
'address' => C_A_attrs,
'blockquote' => C_A_attrs.' cite',
'ins' => C_A_attrs.' cite datetime',
'del' => C_A_attrs.' cite datetime',
'a' => C_A_attrs.' charset type href hreflang rel rev shape coords',
'span' => C_A_attrs,
'bdo' => C_A_coreattrs.' lang xml:lang dir',
'br' => C_A_coreattrs,
'em' => C_A_attrs,
'strong' => C_A_attrs,
'dfn' => C_A_attrs,
'code' => C_A_attrs,
'samp' => C_A_attrs,
'kbd' => C_A_attrs,
'var' => C_A_attrs,
'cite' => C_A_attrs,
'abbr' => C_A_attrs,
'acronym' => C_A_attrs,
'q' => C_A_attrs.' cite',
'sub' => C_A_attrs,
'sup' => C_A_attrs,
'tt' => C_A_attrs,
'i' => C_A_attrs,
'b' => C_A_attrs,
'big' => C_A_attrs,
'small' => C_A_attrs,
);
/**
* URI schemes allowed for URLs in comments and user profiles:
* @global array
*/
$comments_allowed_uri_scheme = array
(
'http',
'https',
'ftp',
'gopher',
'nntp',
'news',
'mailto',
'irc',
'aim',
'icq'
);
// Array showing URI attributes
$uri_attrs = array
(
'xmlns',
'profile',
'href',
'src',
'cite',
'classid',
'codebase',
'data',
'archive',
'usemap',
'longdesc',
'action'
);
/**
* Translation of HTML entities and special characters.
* @global array
*/
$b2_htmltrans = array(
// '–' => ' ', '—' => ' ', '‘' => ' ', '’' => ' ',
// '“' => ' ', '”' => ' ', '•' => ' ', '€' => ' ',
'<' => '<', '>' => '>',
'&sp;' => ' ', '!' => '!', '"' => '"', '#' => '#',
'$' => '$', '%' => '%', '&' => '&', ''' => ''',
'(' => '(', ')' => ')',
'*' => '*', '+' => '+', ',' => ',', '‐' => '-',
'−' => '-', '.' => '.', '/' => '/', ':' => ':',
';' => ';', '<' => '<',
'=' => '=', '>' => '>', '?' => '?', '@' => '@',
'[' => '[', '\' => '\', ']' => ']', 'ˆ' => '^',
'_' => '_', '―' => '_',
'`' => '`', '{' => '{', '|' => '|', '}' => '}',
'˜' => '~', '‚' => '‚', '„' => '„',
'&ldots;' => '…', 'Š' => 'Š', '‹' => '‹', 'Œ' => 'Œ',
'‘' => '‘', '’' => '‘', '’' => '’',
'“' => '“', '”' => '“', '”' => '”', '•' => '•',
'–' => '–', '&endash;' => '–', '—' => '—', '&emdash;' => '—',
'˜' => '˜', '™' => '™',
'š' => 'š', '›' => '›', 'œ' => 'œ', 'Ÿ' => 'Ÿ',
' ' => ' ', '¡' => '¡', '¢' => '¢', '£' => '£',
'¤' => '¤', '¥' => '¥',
'¦' => '¦', '&brkbar;' => '¦', '§' => '§', '¨' => '¨',
'¨' => '¨', '©' => '©', 'ª' => 'ª', '«' => '«',
'¬' => '¬', '­' => '',
'®' => '®', '¯' => '¯', '&hibar;' => '¯', '°' => '°',
'±' => '±', '²' => '²', '³' => '³', '´' => '´',
'µ' => 'µ', '¶' => '¶',
'·' => '·', '¸' => '¸', '¹' => '¹', 'º' => 'º',
'»' => '»', '¼' => '¼', '½' => '½', '½' => '½',
'¾' => '¾', '¿' => '¿',
'À' => 'À', 'Á' => 'Á', 'Â' => 'Â', 'Ã' => 'Ã',
'Ä' => 'Ä', 'Å' => 'Å', 'Æ' => 'Æ', 'Ç' => 'Ç',
'È' => 'È', 'É' => 'É',
'Ê' => 'Ê', 'Ë' => 'Ë', 'Ì' => 'Ì', 'Í' => 'Í',
'Î' => 'Î', 'Ï' => 'Ï', 'Ð' => 'Ð', 'Ñ' => 'Ñ',
'Ò' => 'Ò', 'Ó' => 'Ó',
'Ô' => 'Ô', 'Õ' => 'Õ', 'Ö' => 'Ö', '×' => '×',
'Ø' => 'Ø', 'Ù' => 'Ù', 'Ú' => 'Ú', 'Û' => 'Û',
'Ü' => 'Ü', 'Ý' => 'Ý',
'Þ' => 'Þ', 'ß' => 'ß', 'à' => 'à', 'á' => 'á',
'â' => 'â', 'ã' => 'ã', 'ä' => 'ä', 'å' => 'å',
'æ' => 'æ', 'ç' => 'ç',
'è' => 'è', 'é' => 'é', 'ê' => 'ê', 'ë' => 'ë',
'ì' => 'ì', 'í' => 'í', 'î' => 'î', 'ï' => 'ï',
'ð' => 'ð', 'ñ' => 'ñ',
'ò' => 'ò', 'ó' => 'ó', 'ô' => 'ô', 'õ' => 'õ',
'ö' => 'ö', '÷' => '÷', 'ø' => 'ø', 'ù' => 'ù',
'ú' => 'ú', 'û' => 'û',
'ü' => 'ü', 'ý' => 'ý', 'þ' => 'þ', 'ÿ' => 'ÿ',
'Œ' => 'Œ', 'œ' => 'œ', 'Š' => 'Š', 'š' => 'š',
'Ÿ' => 'Ÿ', 'ƒ' => 'ƒ',
'ˆ' => 'ˆ', '˜' => '˜', 'Α' => 'Α', 'Β' => 'Β',
'Γ' => 'Γ', 'Δ' => 'Δ', 'Ε' => 'Ε', 'Ζ' => 'Ζ',
'Η' => 'Η', 'Θ' => 'Θ',
'Ι' => 'Ι', 'Κ' => 'Κ', 'Λ' => 'Λ',
'Μ' => 'Μ', 'Ν' => 'Ν', 'Ξ' => 'Ξ',
'Ο' => 'Ο', 'Π' => 'Π', 'Ρ' => 'Ρ', 'Σ' => 'Σ',
'Τ' => 'Τ', 'Υ' => 'Υ', 'Φ' => 'Φ',
'Χ' => 'Χ', 'Ψ' => 'Ψ', 'Ω' => 'Ω',
'α' => 'α', 'β' => 'β', 'γ' => 'γ', 'δ' => 'δ',
'ε' => 'ε', 'ζ' => 'ζ', 'η' => 'η',
'θ' => 'θ', 'ι' => 'ι', 'κ' => 'κ', 'λ' => 'λ',
'μ' => 'μ', 'ν' => 'ν', 'ξ' => 'ξ',
'ο' => 'ο', 'π' => 'π', 'ρ' => 'ρ', 'ς' => 'ς',
'σ' => 'σ', 'τ' => 'τ', 'υ' => 'υ', 'φ' => 'φ',
'χ' => 'χ', 'ψ' => 'ψ',
'ω' => 'ω', 'ϑ' => 'ϑ', 'ϒ' => 'ϒ', 'ϖ' => 'ϖ',
' ' => ' ', ' ' => ' ', ' ' => ' ', '‌' => '',
'‍' => '', '‎' => '',
'‏' => '', '–' => '–', '—' => '—', '‘' => '‘',
'’' => '’', '‚' => '‚', '“' => '“', '”' => '”',
'„' => '„', '†' => '†',
'‡' => '‡', '•' => '•', '…' => '…', '‰' => '‰',
'′' => '′', '″' => '″', '‹' => '‹', '›' => '›',
'‾' => '‾', '⁄' => '⁄',
'€' => '€', 'ℑ' => 'ℑ', '℘' => '℘', 'ℜ' => 'ℜ',
'™' => '™', 'ℵ' => 'ℵ', '←' => '←', '↑' => '↑',
'→' => '→', '↓' => '↓',
'↔' => '↔', '↵' => '↵', '⇐' => '⇐', '⇑' => '⇑',
'⇒' => '⇒', '⇓' => '⇓', '⇔' => '⇔', '∀' => '∀',
'∂' => '∂', '∃' => '∃',
'∅' => '∅', '∇' => '∇', '∈' => '∈', '∉' => '∉',
'∋' => '∋', '∏' => '∏', '∑' => '∑', '−' => '−',
'∗' => '∗', '√' => '√',
'∝' => '∝', '∞' => '∞', '∠' => '∠', '∧' => '∧',
'∨' => '∨', '∩' => '∩', '∪' => '∪', '∫' => '∫',
'∴' => '∴', '∼' => '∼',
'≅' => '≅', '≈' => '≈', '≠' => '≠', '≡' => '≡',
'≤' => '≤', '≥' => '≥', '⊂' => '⊂', '⊃' => '⊃',
'⊄' => '⊄', '⊆' => '⊆',
'⊇' => '⊇', '⊕' => '⊕', '⊗' => '⊗', '⊥' => '⊥',
'⋅' => '⋅', '⌈' => '⌈', '⌉' => '⌉', '⌊' => '⌊',
'⌋' => '⌋', '⟨' => '〈',
'⟩' => '〉', '◊' => '◊', '♠' => '♠', '♣' => '♣',
'♥' => '♥', '♦' => '♦'
);
/**
* Translation of invalid Unicode references range to valid range.
* These are Windows CP1252 specific characters.
* They would look weird on non-Windows browsers.
* If you've ever pasted text from MSWord, you'll understand.
* @global array
*/
$b2_htmltranswinuni = array(
'€' => '€', // the Euro sign
'‚' => '‚',
'ƒ' => 'ƒ',
'„' => '„',
'…' => '…',
'†' => '†',
'‡' => '‡',
'ˆ' => 'ˆ',
'‰' => '‰',
'Š' => 'Š',
'‹' => '‹',
'Œ' => 'Œ',
'ž' => 'ž',
'‘' => '‘',
'’' => '’',
'“' => '“',
'”' => '”',
'•' => '•',
'–' => '–',
'—' => '—',
'˜' => '˜',
'™' => '™',
'š' => 'š',
'›' => '›',
'œ' => 'œ',
'ž' => 'ž',
'Ÿ' => 'Ÿ'
);
# ** RSS syndication options **
# these options are used by rdf.php (1.0), rss.php (0.92), and rss2.php (2.0)
# length (in words) of excerpts in the RSS feed? 0=unlimited
# Note: this will not apply to html content!
$rss_excerpt_length = 0;
?>
7 edb May 16, 2008 05:41
I think this can be a plugin. Like, either add it to the video plugin or create a new plugin for lyrics.
Sorry: I can't help at all with editing the _formatting.php file.
8 daethian2 May 16, 2008 15:43
Ed a plugin would be great :)
I have only edited based on help from others here, I don't really understand what all is taking place in the file. So that's why I can't figure out why it's not allowing some of the tags after I added them in the same manner as previous tags.
Using DIV reduces the number of errors to what I posted above.
Beside lyrics I do paid blogging and at times the advertisers wants an object embedded in the post and it doesn't work.
I can't fully get the onmouse over items to work either. I had them working with just a basic tag but now they are using more complex mouseover tags and they won't post either.
9 edb May 16, 2008 16:07
I took a look at what they give you to embed stuff. Seems like they do a bunch of bits to make their background color and fade happen which I could probably ignore or at least leave at one fixed value and say "good enough". I didn't play with actually embedding anything though.
Gotta get some sleep. I will see what I can do later. Maybe add it to a turbo-charged video plugin I've been playing with on and off? Maybe make it a stand-alone, but to me one toolbar for "embedders" seems cool.
10 edb May 16, 2008 21:23
It works! I started tinkering with it because 180 wide leaves a lot of white space flanking the scroller but couldn't make it wider. So I started googling stuff and came across someone else who embeds lyrics: http://www.metrolyrics.com/scroller.html?lyricid=161934 Anyway I think it should be a widget for the sidebar, or maybe somehow figure out how to make it either be wider or let text go next to it. Assuming I can't do either, which is probable, I guess it's just gonna make a bunch of white space.
So anyway whatdaya think? Be happy with one silly button on a toolbar, or go for broke and add another? Oh wait I know! I'll release it as a plugin for the lyricsdomain source then one day rev it up to include metrolyrics stuff.
Aw crap now for the hard part: gotta write a creative and entertaining readme :(
11 daethian2 May 17, 2008 04:10
I actually played with that site too but didn't try to embed their scroller! I know it's trivial but I love my lyrics LOL plus I need it for my paid posts :)
I'll take whatever you come up with and be thrilled!
12 edb May 17, 2008 11:09
http://wonderwinds.com/hackblog.php/2008/05/17/embed-lyrics
You get paid to post stuff? Thrilling!
I found a partial solution here:
http://forums.b2evolution.net/viewtopic.php?t=11272&highlight=object+embed
And I am able to put my video in but no matter what I tried it won't allow the param tag with 'name' so I deleted it all out.
This is a non youtube video so the youtube plugin won't help me, but I have it installed.