https://www.icyphoenix.com/viewtopic.php?f=35&t=6407
-----------------------------------
Phess
Mon 31 Aug, 2009 03:00

Adding BBCodes In Icy Phoenix 1.3.0.53
-----------------------------------
Hello. I've read some topics that I found with "Search" but I don't find that I search. I want to add a button for MegaVideo. I've used the same codes that I used in 1.2, modifying that's necessary. The marks "[megavideo]ID[/megavideo]" work fine, and I can see the video, but the buttons don't work (when I press the button, may appear a window asking me for the ID of the video, but the window doesn't appear... Nothing happen). What should I do? What line in what file should I check?

Thank you and sorry for my poor English.


-----------------------------------
DWho
Mon 31 Aug, 2009 11:45

Re: Adding BBCodes In Icy Phoenix 1.3.0.53
-----------------------------------
best way to do this is to look for the way the youtube button is added to the bbcode and replicate it to fit with megavideo..

i have never added a button to bbcode but if I did that would be the way i would do it...

hope that helps

 :mrgreen:  :mrgreen:


-----------------------------------
Phess
Mon 31 Aug, 2009 12:14

Re: Adding BBCodes In Icy Phoenix 1.3.0.53
-----------------------------------
Hello and thanks! Youtube button have a "special code", I explain: All the BBcodes have a similar code, but Youtube have a very different code... I don't understand youtube's code XD, so I can't fit it to megavideo...  :cry: .

Youtube's code is the same that megavideo's code in all files except includes/bbcode.php. Is in that file in what youtube's code is very different that others.

I need help with that...

Excuse my english  :oops: .

Thanks!


-----------------------------------
Phess
Tue 01 Sep, 2009 16:23

Re: Adding BBCodes In Icy Phoenix 1.3.0.53
-----------------------------------
I still need help  :cry: .


-----------------------------------
Lopalong
Thu 03 Sep, 2009 16:00

Re: Adding BBCodes In Icy Phoenix 1.3.0.53
-----------------------------------
Did you add the url functions to /templates/common/js/bbcb_mg.js ?


-----------------------------------
Phess
Fri 04 Sep, 2009 13:31

Re: Adding BBCodes In Icy Phoenix 1.3.0.53
-----------------------------------
Yes... I check those lines again, but are OK... I think that I should add anything in other file (I don't know what) to do it work...


-----------------------------------
Lopalong
Fri 04 Sep, 2009 14:54

Re: Adding BBCodes In Icy Phoenix 1.3.0.53
-----------------------------------
It appears that you have script error somewhere. :(

Please post the Megavideo ID full HTML script that requests the video you are trying to add - And IF I get time - I'll try to do a walk through. ;)


-----------------------------------
Phess
Fri 04 Sep, 2009 15:52

Re: Adding BBCodes In Icy Phoenix 1.3.0.53
-----------------------------------
Here is the "function" in templates/common/bbcb_mg.js:

[code linenumbers=false]function BBCmegavideo()
{
	var FoundErrors = '';
	var enterURL = prompt(s_megavideo_insert, s_id_insert_tip);
	if (!enterURL)
	{
		FoundErrors += s_id_insert_error;
	}
	if (FoundErrors)
	{
		alert(s_gen_error + FoundErrors);
		return;
	}
	var ToAdd = "[megavideo]"+enterURL+"[/megavideo]";
	PostWrite(ToAdd);
}[/code]

And here is the code that add the video in the post (includes/bbcode.php), but I see the video, I need the button  :cry: :

[code linenumbers=false]				elseif ($tag === 'megavideo')
				{
					$html = '<object width="640" height="480"><param name="movie" value="http://www.megavideo.com/v/' . $content . '.800360084.3" /><embed src="http://www.megavideo.com/v/' . $content . '.800360084.3" type="application/x-shockwave-flash" width="640" height="480"></embed></object><br /><a href="http://megavideo.com/?v=' . $content . '" target="_blank">Link</a><br />';
				}[/code]

I think you want these codes, if I'm wrong and you want other codes, just tell me.

Thanks.


-----------------------------------
Lopalong
Sat 05 Sep, 2009 00:39

Re: Adding BBCodes In Icy Phoenix 1.3.0.53
-----------------------------------
Moved to:[b][DOC] Add Video BBCode And Buttons To The Editor. (Walkthrough)[/b]

Maybe a staff member will add a link to it when they move it from General to the Docs forum.?


-----------------------------------
Phess
Sat 05 Sep, 2009 13:32

Re: Adding BBCodes In Icy Phoenix 1.3.0.53
-----------------------------------
I don't understand you. The forum is legal, when it is open you can see it. Some users tell me if I can add MegaVideo BBCode because they have premium accounts and they prefer upload their videotutorials there (it's a webpage for "repair" informatic problems). I don't know if other users of other forums use MegaVideo for other things, but the users I refer use MegaVideo for legal purposes, so please, don't think bad about me.

I will try to repair the code. Thank you very much.


-----------------------------------
Lopalong
Sat 05 Sep, 2009 13:50

Re: Adding BBCodes In Icy Phoenix 1.3.0.53
-----------------------------------
[b]Phess[/b],

I said for this type of access.

No matter what video code I put in the post, it always took me back to the same video with adverts etc, etc. So in reality I couldn't fully test what I did.

That's why I said "I wouldn't have bothered".


-----------------------------------
Phess
Sat 05 Sep, 2009 14:27

Re: Adding BBCodes In Icy Phoenix 1.3.0.53
-----------------------------------
Thank you very much and excuse the double post. Finally, it works! I forgot add the line "[i]$js_lang['s_megavideo_insert'] = 'Please write Megavideo file ID'; [/i]". When you post the code, I check (another time XD) my code and I saw that I forgot add this line. Thank you very much, Lopalong. And thank you DWho, too.

[ot]I would like to clarify that in my forum MegaVideo only used for legal purposes, so I do not understand why you had this reaction and why you said "[i]and if I had known beforehand where it was going to take me to, I wouldn't have bothered[/i]". I apologize if there was some misunderstanding and again I thank you for the help.[/ot]

P.D.: Sorry, you answer while I'm writting :P.


-----------------------------------
Lopalong
Sat 05 Sep, 2009 14:45

Re: [SOLVED]   Adding BBCodes In Icy Phoenix 1.3.0.53
-----------------------------------
You're welcome - It's always easier this way than trying to work things out one post at a time. ;)


