Recent Topics

1 Oct 10, 2007 17:44    

My b2evolution Version: 1.10.x

I have my own video on my website. I'd like to embed it into my blog with the "object" tag. I've read elsewhere that users have made this work. However when I try to save the post it gives me a "illegal tag" error for "object". Is there some special way I need to get this to work? Here is the code I am using.

<object type="video/x-ms-wmv" 
  data="http://family.rivardweb.com/videos/movies/oliviafallingasleep1.wmv" 
  width="320" height="260">
  <param name="autostart" value="false" />
  <param name="controller" value="true" />
</object>

Do I put the code directly into a blog post and then save it? When I go to preview the post it will give me the WMP window but saving will not work due to the illegal tag.

- Joel

2 Oct 10, 2007 18:55

I have no idea why the tag is deemed illegal by b2evolution. A lot of XHTML 1.0 Transitional (and even Strict) compliant tags are similarly marked as illegal.

Eg. I am unable to use

<span style="color:red"> </span>

as it is deemed illegal.

I am not sure how to disable this feature, but I'm sure somebody here will know how to do it.

3 Oct 10, 2007 19:53

Crack open /conf/_formatting.php, it's where God waves his magic wand ;)

¥

4 Oct 10, 2007 20:02

i think im having the same problem with adding html tables, into the post.

amm..crack open formating...and then what ¥?

5 Oct 10, 2007 20:22

¥åßßå wrote:

Crack open /conf/_formatting.php, it's where God waves his magic wand ;)

¥

I hope this becomes an admin-configurable setting in future. I this forced "verification" can become a real pain if one wants a custom formatted post (with lots of HTML codes).

6 Oct 11, 2007 06:28

harishankar wrote:

¥åßßå wrote:

Crack open /conf/_formatting.php, it's where God waves his magic wand ;)

¥

I hope this becomes an admin-configurable setting in future. I this forced "verification" can become a real pain if one wants a custom formatted post (with lots of HTML codes).

Actually ¥åßßå is working on exactly the solution you suggest.

7 Oct 11, 2007 11:01

For those confused by YaBBa's post find the following line in _formatting.php:

$use_html_checker = 1;

Change the value to "0" and the html checker will not run and the object and embed tags will work perfectly. Thanks a bunch.

-Joel

8 Oct 11, 2007 11:45

Actually, it's not advised to run with your html checker turned off ( hence the big warning in the file ).

What you need to do is go through the file and add the relevant bits to allow the object tag.

You'll also need to wander over to _misc.functions.php and add "param" as a self closing tag in the balance_tags function.

You'll be pleased to hear that from 2.0.x it's as easy as changing a setting in _formatting.php ;)

Afwas wrote:

Actually ¥åßßå is working on exactly the solution you suggest.

There's a smidge of a distance to go with that yet ;)

¥

9 Oct 11, 2007 12:21

¥åßßå wrote:

Afwas wrote:

Actually ¥åßßå is working on exactly the solution you suggest.

There's a smidge of a distance to go with that yet ;)

¥

I was looking at the bright side of it. :lol:

¥åßßå wrote:

You'll also need to wander over to _misc.functions.php and add "param" as a self closing tag in the balance_tags function.

It's in ../blogs/inc/_misc/_misc.funcs.php, but I was expecting a list to add "param" but it looks as if the function closes everything that isn't closed before ($content). Am I looking in the wrong place or do you have an older version in mind?

Tx

10 Oct 11, 2007 12:37

In 2.0.x it looks a smidge like this ( the 'param' tag has already been added )

			// Tag Cleaning

			// Push if not img or br or hr
			if($tag != 'br' && $tag != 'img' && $tag != 'hr' && $tag != 'param')
			{
				$stacksize = array_push ($tagstack, $tag);
			}

It basically tells the balance_tags function not to close the param tag with </param>

¥

11 Oct 11, 2007 12:52

¥åßßå wrote:

It basically tells the balance_tags function not to close the param tag with </param>

¥

Got it. I was looking for the complete opposite.

Tx

12 Oct 11, 2007 13:01

Thanks... this clears up the situation.

Regards.

13 Oct 11, 2007 14:50

[url=www.blog.hemminga.net/_formatting.txt]Here[/url] I proudly present a working _formatting.php that allows <object> tags. You are even able to set permission in the variable $posts_allow_objects.
(rightclick and save as.. rename to _formatting.php) You still want to do the other tweak as described a few posts above.
This version is meant for 1.8.x through 1.10.x. The new 2.0.x deals with this in another way.

Please let me know if it works the way it was intended.

Good luck

14 Oct 11, 2007 17:53

I know in my original post it says I'm using version 1.10 but in actuality I'm using 2.01. I didn't catch that it id'd me as 1.10. Could you tell me how to tweak the 2.01 version of _formatting.php and _misc.functions.php to make it work? Sorry for the confusion.

15 Oct 11, 2007 19:27

¥åßßå wrote:

You'll be pleased to hear that from 2.0.x it's as easy as changing a setting in _formatting.php ;)

crack open conf/_formatting.php and look for a setting that says summat like $allow_object_or_summat = false; ..... change it to true and either be astounded or come back and tell me it's full of bugs ;)

¥

16 Oct 11, 2007 20:01

¥åßßå wrote:

¥åßßå wrote:

You'll be pleased to hear that from 2.0.x it's as easy as changing a setting in _formatting.php ;)

crack open conf/_formatting.php and look for a setting that says summat like $allow_object_or_summat = false; ..... change it to true and either be astounded or come back and tell me it's full of bugs ;)

¥

In the distro there's only a slightly changed _formatting.php -added $posts_allow_javascript- so I added my two cents into that file and made it available [url=http://www.blog.hemminga.net/_2_0_formatting.txt]here[/url].
Rename and replace the _formatting.php file.

You find the other tweak now in ../blogs/inc/_core/_misc.funcs.php on line 1002.

Good luck

17 Oct 11, 2007 20:30

Afwas wrote:

You find the other tweak now in ../blogs/inc/_core/_misc.funcs.pfp on line 1002.

The other tweak is already in 2.0.2 .... at least, I *think* it is, I'll have to check the current files :P

... yay, it is ;)

¥

18 Oct 11, 2007 20:40

But 2.0.2 is not yet out for download (I know it's the CVS version, but the download page is only at 2.0.1) So you'll need to do the little tweak for now and ¥åßßå will take care the rocking 2007 version of _formatting.php is out soon. 8|

By the way: 1.10 users can grab my latest _formatting.php also. It allows both <object> *and* javascript.

Good luck

19 Oct 12, 2007 00:19

Did a search for "summat" & "object", neither was found in the php file.

-Joel

20 Oct 12, 2007 00:27

I've tried Afwas _formatting.php file and it is a bit closer but gives me the following errors:

Tag <object> may not have attribute TYPE
Tag <param> may not have attribute NAME
Tag <param> may not have attribute VALUE

- Joel

21 Oct 12, 2007 01:30

jjrivard,

I think turning OFF the html-checker is loads easier than adding and editing all the tags, subtags, attrributes and core attributes in _formatting.php (only to be faced with doing it over all again, after the next release). :(

When posting, the HTML-checker is useful for noobs and visitors who leave a comment, but if you're adroit at writing valid XHTML code, it's just a PITA.

I've long been a proponent of separating the HTML-checker into two back-office switches ... on|off for comments and on|off for posts.

In the meantime, I'm using a simple plugin that allows me to turn off the HTML-checker when saving a post. (I have the HTML-checker permanently disabled by default and I think you'll find our blog validates pretty well) ;)

Rots of ruck!

22 Oct 12, 2007 03:23

stk - I agree, especially since my site is family only (password protected) and random visitors will not be posting to my blog. So I have little to worry about when it comes to valid html.

Thanks everyone for the help.

-Joel

23 Oct 12, 2007 06:57

The html checker is a very useful tool for every one who wants some html in their post but is afraid to make mistakes. The html checker forces you to correct your errors. So even if your blog is private or family only, the checker has it's uses.
Unfortunately, the checker has always been misused to disallow certain tags and with that certain content types in the posts. Again, this can be useful in a less controlled multiblog situation, but it has nothing to do with the html checker.
So I still advise to leave the html checler "on".
I made some minor changes. [url=http://www.blog.hemminga.net/_2_0_formatting.txt]Download[/url] the file again and the video should play now.

Remember: I set out to make the <object> tag possible for the 1.10 community. I knew there are changes taking place in the 2.0 branche.

24 Oct 12, 2007 11:28

jjrivard wrote:

Did a search for "summat" & "object", neither was found in the php file.

-Joel

Oops, it must be a 2.0.2 thing :P

Ahh well, more than one way to skin a cat, wander over to the plugin settings for the bbcode plugin and add this to the very bottom of the post search list

~\[object(.+?)](.+?)\[/object]~s
~\[param(.+?)/]~s

And then add this to the end of the post replace list :

<object$1>$2</object>
<param$1/>

Then just make a post like this :

[object ..............]
[param ........../]
[param ........../]
[/object]

Stk wrote:

I have the HTML-checker permanently disabled by default and I think you'll find our blog validates pretty well)

*cough* most times huh? ;)

¥

25 Oct 12, 2007 17:51

:lol: that's the "pretty" part, eh? ;)

26 Oct 12, 2007 17:59

Excellent, it works great. Now one more question. How to I enable BB Code by default instead of always having to check the box at the bottom.

-Joel

27 Oct 12, 2007 18:13

actually , look further down the same settings page and change "apply rendering" to stealth ;)

¥

28 Oct 12, 2007 18:16

Tho I'd recommend changing it to "opt-out", so you still have the ability to turn it off, on a post-by-post basis. :p

29 Oct 12, 2007 18:18

You can change the stting in backoffice -> Global settings -> Plugins -> BB code (edit) -> apply rendering

30 Oct 12, 2007 18:19

Afwas wrote:

You can change the stting in backoffice -> Global settings -> Plugins -> BB code (edit) -> apply rendering

Yer playing catchup ;)

¥

31 Oct 12, 2007 18:20

I just had the urge to write.

32 Oct 12, 2007 18:21

That's why you have a blog ;)

¥

33 Oct 12, 2007 18:23

Ok, when I "opt-out" it doesn't seem to do anything. The check box is still unchecked when I go to post and when I preview BB Code isn't rendered. I can not find the "stealth" setting mentioned above .....

Ok, when I change it in the backoffice it works to opt-out. For some reason when I tried it manually it wouldn't take the opt-out change.

Thanks for the help again.

34 Oct 12, 2007 18:24

backoffice -> Posts/comments -> *select a blog* -> New post

35 Oct 12, 2007 18:26

jjrivard wrote:

Ok, when I "opt-out" it doesn't seem to do anything. The check box is still unchecked when I go to post and when I preview BB Code isn't rendered. I can not find the "stealth" setting mentioned above .....

Ok, when I change it in the backoffice it works to opt-out. For some reason when I tried it manually it wouldn't take the opt-out change.

Thanks for the help again.

If you edit the file, you need to hit 'Reload plugins'

Good luck

36 Oct 12, 2007 19:32

Afwas wrote:

If you edit the file, you need to hit 'Reload plugins

As an aside, if you edit a renderer plugin then sometimes you also need to wander over to the tools tab and delete the pre_rendered_cache .... otherwise you just end up baffled as to why stuff hasn't changed as expected ;)

¥

37 Oct 12, 2007 20:23

That pre_rendered_cache ... it'll get you EVERY time. :|

Hey ... maybe it should delete itself, everytime someone makes a change to one of the settings that's cached there? That'd be a novel idea. 8|

38 Oct 12, 2007 23:19

Technically there's no settings stored in the cache, but it would be convenient if a plugin change emptied the cache ...... it'd save me hours of

"arrrrrrrrrrrrrrrrrggggghhhhhhh how can that still look the bloody same? I've tried everthing I know :( ........ hmmmmm, I wonder, maybe I need to delete the pre-rendered cache?"

:P

¥

39 Oct 13, 2007 08:12

exactly!

It's the bloody brit wrote:

arrrrrrrrrrrrrrrrrggggghhhhhhh

that I'm trying to help avoid.

BTW ... I love the "technically there's no settings stored in the cache bit". It's so ... well ... technical. ;)

I love it when you speak geek. :p

40 Nov 03, 2007 03:39

I used your _formatting.php page and it worked like a champ.

thanks for the help


Form is loading...