How is the flash bbcode suppose to work?
Forum rules
Discussion of general topics related to the new release and its place in the world. Don't discuss new features, report bugs, ask for support, et cetera. Don't use this to spam for other boards or attack those boards!
Discussion of general topics related to the new release and its place in the world. Don't discuss new features, report bugs, ask for support, et cetera. Don't use this to spam for other boards or attack those boards!
-
- Registered User
- Posts: 9
- Joined: Fri Oct 07, 2005 2:25 pm
- Location: Bellwood, IL. Favorite Band: Fear Factory
- Contact:
Re: How is the flash bbcode suppose to work?
I have the latest CVS and I still can't figure out how to form the flash tags.
Re: How is the flash bbcode suppose to work?
I tested it this way:
1. write link
2. set flash-tag
3. write dimensions after the "="
Then I got a Link in the Post, shown as "[ flash ]" and linked to the URL
If I turn on to see flash in postings (via UCP - preferences - viewing posts) nothing at all will be displayed.
Maybe there are more parameter missing?
Code: Select all
[flash=300,400]http://www.domain.com/test.swf[/flash]
2. set flash-tag
3. write dimensions after the "="
Then I got a Link in the Post, shown as "[ flash ]" and linked to the URL
If I turn on to see flash in postings (via UCP - preferences - viewing posts) nothing at all will be displayed.
Maybe there are more parameter missing?
Re: How is the flash bbcode suppose to work?
I don't thinks so, here's the regex:
Code: Select all
'#\[flash=([0-9]+),([0-9]+):$uid\](.*?)\[/flash:$uid\]#'
Re: How is the flash bbcode suppose to work?
This look odd to anyone else?spambot wrote:Code: Select all
(.*?)
Unfortunatly there are a number of differant Regex formats, but in my understanding:
. = any charcter
* = any number of the previous item
? = 0 or 1 of the previous set
so .* means any number of any characters (including 0)
so what would be the point of optionally having that? nothing would match that rule anyway wouldn't it?
Anyone know why its done like that? Or is there something about PHP's regex that behaves differantly to how I think regex behaves?
Re: How is the flash bbcode suppose to work?
The ? in .*? makes the .* ungreedy else it would eat the [/flash] part and the pattern wouldn't match anything.
http://de.php.net/manual/en/reference.pcre.pattern.syntax.php wrote: By default, the quantifiers are "greedy", that is, they match as much as possible (up to the maximum number of permitted times), without causing the rest of the pattern to fail. The classic example of where this gives problems is in trying to match comments in C programs. These appear between the sequences /* and */ and within the sequence, individual * and / characters may appear. An attempt to match C comments by applying the pattern /\*.*\*/ to the string /* first comment */ not comment /* second comment */ fails, because it matches the entire string due to the greediness of the .* item.
However, if a quantifier is followed by a question mark, then it ceases to be greedy, and instead matches the minimum number of times possible, so the pattern /\*.*?\*/ does the right thing with the C comments. The meaning of the various quantifiers is not otherwise changed, just the preferred number of matches. Do not confuse this use of question mark with its use as a quantifier in its own right. Because it has two uses, it can sometimes appear doubled, as in \d??\d which matches one digit by preference, but can match two if that is the only way the rest of the pattern matches.
If the PCRE_UNGREEDY option is set (an option which is not available in Perl) then the quantifiers are not greedy by default, but individual ones can be made greedy by following them with a question mark. In other words, it inverts the default behaviour.
Re: How is the flash bbcode suppose to work?
With ?:
[flash=x,x]url[/flash]
[flash=x,x]url[/flash]
Without ?:
[flash=x,x]url[/flash]
[flash=x,x]url[/flash]
Bold text is the match..
[flash=x,x]url[/flash]
[flash=x,x]url[/flash]
Without ?:
[flash=x,x]url[/flash]
[flash=x,x]url[/flash]
Bold text is the match..
Re: How is the flash bbcode suppose to work?
mmmh, so how i can display a flash file http://www.domain.com/file.swf" target="_blank direct into a posting?
Re: How is the flash bbcode suppose to work?
It doesn't work.
Test:
---
---
The code seems to be parsed, but the result is just empty space. This bug has been reported a while ago.
Code: Select all
[flash=200,300]http://adventonegraphics.com/flash/BigRedButton.swf[/flash]
---
---
The code seems to be parsed, but the result is just empty space. This bug has been reported a while ago.
Re: How is the flash bbcode suppose to work?
ok, many thanks for your info!
- Highway of Life
- Registered User
- Posts: 1399
- Joined: Tue Feb 08, 2005 10:18 pm
- Location: I'd love to change the World, but they won't give me the Source Code
- Contact:
Re: How is the flash bbcode suppose to work?
This is interesting, as a Registered Member, where you post the flash, it shows nothing... zilch!
But as a guest, you get to see this:
But as a guest, you get to see this:
- Attachments
-
- Flash
- flash.gif (6.55 KiB) Viewed 9121 times