PDA

View Full Version : bbcodes within other bbcodes


CrazyLady
02-28-2005, 03:54 AM
Is this possible? I have added media player bbcode, but I want to add additional text to the code using another bbcode, but the board doesn't seem to recognize the bbcode inside? I have the mod on my new board, and what I want to accomplish is when people use the media player bbcode, the media player will display in their post and text within the noguest code will display below the media player... does this make sense? but I can't seem to get the two to work together.....


<object classid="clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95" id="MediaPlayer1">
<param name="AudioStream" value="-1">
<param name="AutoSize" value="-1">
<param name="AutoStart" value="0">
<param name="AnimationAtStart" value="-1">
<param name="AllowScan" value="-1">
<param name="AllowChangeDisplaySize" value="-1">
<param name="AutoRewind" value="0">
<param name="Balance" value="0">
<param name="BaseURL" value>
<param name="BufferingTime" value="5">
<param name="CaptioningID" value>
<param name="ClickToPlay" value="-1">
<param name="CursorType" value="0">
<param name="CurrentPosition" value="-1">
<param name="CurrentMarker" value="0">
<param name="DefaultFrame" value>
<param name="DisplayBackColor" value="0">
<param name="DisplayForeColor" value="16777215">
<param name="DisplayMode" value="0">
<param name="DisplaySize" value="0">
<param name="Enabled" value="-1">
<param name="EnableContextMenu" value="-1">
<param name="EnablePositionControls" value="-1">
<param name="EnableFullScreenControls" value="0">
<param name="EnableTracker" value="-1">
<param name="Filename" value="{param}">
<param name="InvokeURLs" value="-1">
<param name="Language" value="-1">
<param name="Mute" value="0">
<param name="PlayCount" value="1">
<param name="PreviewMode" value="0">
<param name="Rate" value="1">
<param name="SAMILang" value>
<param name="SAMIStyle" value>
<param name="SAMIFileName" value>
<param name="SelectionStart" value="-1">
<param name="SelectionEnd" value="-1">
<param name="SendOpenStateChangeEvents" value="-1">
<param name="SendWarningEvents" value="-1">
<param name="SendErrorEvents" value="-1">
<param name="SendKeyboardEvents" value="0">
<param name="SendMouseClickEvents" value="0">
<param name="SendMouseMoveEvents" value="0">
<param name="SendPlayStateChangeEvents" value="-1">
<param name="ShowCaptioning" value="0">
<param name="ShowControls" value="-1">
<param name="ShowAudioControls" value="-1">
<param name="ShowDisplay" value="0">
<param name="ShowGotoBar" value="0">
<param name="ShowPositionControls" value="-1">
<param name="ShowStatusBar" value="0">
<param name="ShowTracker" value="-1">
<param name="TransparentAtStart" value="0">
<param name="VideoBorderWidth" value="0">
<param name="VideoBorderColor" value="0">
<param name="VideoBorder3D" value="0">
<param name="Volume" value="-600">
<param name="WindowlessVideo" value="0">
</object>
[noguest]hidden text here


This is actually VERY important to my board as I will be importing my current database to vbulletin shortly. My current ikonboard does use the above codes, ... and it's critical I continue to use this feature.

I would really appreciate your assistance...

thank you

Marco van Herwaarden
02-28-2005, 06:20 AM
I haven't really looked into this, but i think you will have to run the bbcode parsing twice if you ever want this to work, or you would have to embed the code parsing for the noguest within the code parsing of the media player.

Reason that you would have to run it twice is that when ran for the first time, the noguest code is not there yet, but gets added when the media player code is run. At least this is how i understand your question.

CrazyLady
02-28-2005, 01:26 PM
I appreciate your reply! I am very new to php, and just a couple days new with VB. I am not sure how to do either of what you suggested... can you perhaps show me where I need to go and/or what I need to do to try to get this to work? I have added both php and cgi hacks to my boards in the past and have also modified hacks, but that is done from mostly seeing examples. I don't yet understand the language itself. It's really the only thing I need before I import my board. My current board and all it's threads are configured like this.... if I can't get this to work, I am really up the creek.

much thanks!
CL

Marco van Herwaarden
02-28-2005, 06:47 PM
I will try to have a look at this tomorrow, please send me a reminder pm if i forget (which is very likely ;))

CrazyLady
03-01-2005, 01:28 PM
Thank you SO much.. you're a life saver! :)

Marco van Herwaarden
03-01-2005, 01:49 PM
Question,

How does a user input this? He only give the bbcode for the media, and the "hidden text" is automatically added, or does the user enter 2 bbcodes? If 2, in what format, if no, is that text fixed, or variable?

CrazyLady
03-01-2005, 02:07 PM
:) The user only gives the bbcode for the media player. The hidden text is automatically added. The text is html. fixed or variable? not sure LOL
thank you again :)

Marco van Herwaarden
03-01-2005, 02:52 PM
Hmm not sure if it will work, but please give this a try first.

In your newattachmentbit template, find:
<b>http://www.yoursite.com/vb/attachment.php?attachmentid=$attach[attachmentid].mp3</b>
Replace that by:
<b>http://www.yoursite.com/vb/attachment.php?attachmentid=$attach[attachmentid].mp3This text is only for registered memberp</b>

That might do the trick, if you have installed the example that is.
To make it work your vBulletin setting for "BB Code Parser Function" should be on "bbcodeparse2_recurse()" or "bbcodeparse2_regexrecurse()" (default)

Alternative 2:

just add the [noguest]text to the end of the custom bbcode MP3, just after the line "</object> "

Both not tested by me.

If it won't work, i will dig a bit more.

CrazyLady
03-01-2005, 03:44 PM
To make it work your vBulletin setting for "BB Code Parser Function" should be on "bbcodeparse2_recurse()" or "bbcodeparse2_regexrecurse()" (default)

Alternative 2:

just add the text to the end of the custom bbcode MP3, just after the line "</object> "
I am not too sure where to make the change for the "BB Code Parser Function"?

As for the above suggestion, I tried to add the noguest code after the custome MP3 bbcode, but it didn't work.... but that is exatly what I want to do. Might that work with your suggested change? I take it there is a file I must edit? A bit more help....

I appreciate your help.. thanks for bearing with me. :)

Marco van Herwaarden
03-01-2005, 03:54 PM
Hmm forget about that "BB Code Parser Function". It is a non-editable variable, already set correct by default i asume.

The first alternative you also tried?

CrazyLady
03-01-2005, 04:22 PM
Hmm not sure if it will work, but please give this a try first.

In your newattachmentbit template, find:
<b>http://www.yoursite.com/vb/attachment.php?attachmentid=$attach[attachmentid].mp3</b>
Replace that by:
<b>http://www.yoursite.com/vb/attachment.php?attachmentid=$attach[attachmentid].mp3This text is only for registered memberp</b>

If you mean this, than no. I am not working with attachments so I don't need to alter that code.

I would like to have the noguest code within the new custom media player code I added... as in my first post.

I hope I am not confusing you... lol :nervous:

I appreciate your attempt MarcoH64 :) Sorry if I was unclear in anyway as to my need here.

On my old board, a user will click on the bbcode media button, paste in the url to the file, and it will display something like this in their text box.

"http://www.mysite.com/mediafile.mpeg"

Once they click submit, the post will show the Media player screen and buttons, but below it the additional text will display, viewable to members but hidden to guests. They didn't enter it, it was set in advance and automatically included in the media bbcode.

So, I want to do the same thing with my new VB, problem is, it's not working. And if I import my old board and threads, all the hidden text will be viewable... huge problem :(

I went to the custom bbcode, added the media player object code and after that the noguest code and text. But when I go to make a post, the media player shows, but I then also see the ENTIRE text code displays, like the board didn't read the bbcode. So, my problem is, how do I get VB to read the noguest code within the media code I added?

This is the only thing stopping me from importing my current board and start using my new VB. If I can't get this to work, I can't use VB... so much for the money I just spent. Just a little worried here. If you have any other suggestions... or perhaps someone else is reading this and may have some input, I would be forever grateful.

thanks
CL

Marco van Herwaarden
03-02-2005, 03:32 PM
Well i am sure this can be solved. Unfortuantly i have been busy wih other things (non vB) all day, and i didn't look more into your problem. I will try to find a solution for your problem tomorrow or the day after, if you don't hear from me till friday, please PM me again ;)

CrazyLady
03-03-2005, 01:53 PM
Thank you for your help MarcoH64!

... does anyone know if this fix is even possible or might be able to help us out?

CL

ericgtr
03-03-2005, 02:23 PM
It looks like you are trying to use this with my embedded media player mod, is that right? I have been trying to work this out forever, even with some help from Marcoh64. His mod that secures BB Codes works great but i've never been able to get it to work with the embedded media player codes. It could be because the preg_replace doesn't like what's in between the tags but I would love a solution for this.

CrazyLady
03-06-2005, 02:36 AM
nope, no media mod, I just added a custom mod with the html of an embedded media player, and it worked.. I would like to add additional bbcode inside my custom bbcodes, but it doesn't work.

any luck with that MarcoH64?

thanks

CrazyLady
03-23-2005, 02:39 AM
any thoughts or suggestions on this? :confused: