Simple Machines Community Forum

Customizing SMF => Modifications and Packages => Topic started by: Alan S on August 19, 2006, 01:33:26 PM

Title: YouTube Profile Field
Post by: Alan S on August 19, 2006, 01:33:26 PM
Link to Mod (http://mods.simplemachines.org/index.php?mod=424)
Rate this Mod (http://mods.simplemachines.org/index.php?action=review;sa=add;mod=424)

Lets you either embed a video from youtube.com into your profile or adds a direct link to the youtube video in your profile ( depending on the package you get ,youtube_embed will embed the video into your profile , youtube_link will show a direct link to the video.)             

You should only add the video id in the profile field not the whole link . eg.

your video link is http://www.youtube.com/watch?v=x7J1M1PL1-w

you should only enter the
x7J1M1PL1-w

part into the field.

Tested With 1.1RC2,1.0.7,1.1RC3,1.1,1.1.1,1.1.2 ( It probably works with 1.0.8 but i havnt tested it so backup if you try it with 1.0.8). Bugs should be reported to

[email protected]

Demo

http://www.theteenzone.net/testforum/index.php?action=profile;u=1
Title: Re: YouTube Profile Field
Post by: kezayah on August 20, 2006, 07:58:57 AM
Génial !!!  8)
Title: Re: YouTube Profile Field
Post by: Alan S on August 21, 2006, 05:24:49 PM
Espérer vos utilisateurs comme lui /Hope your users like it   ;) ;)
Title: Re: YouTube Profile Field
Post by: sipko on August 21, 2006, 05:26:35 PM
It's awesome. I installed it yesterday. Thanks for creating such a cool mod. 
Title: Re: YouTube Profile Field
Post by: Alan S on August 21, 2006, 05:30:10 PM
Glad you like it  ;) ;) ;)


Title: Re: YouTube Profile Field
Post by: ArkServer on August 21, 2006, 08:51:33 PM
Installed it a few days ago, nice mod!
Title: Re: YouTube Profile Field
Post by: Alan S on August 22, 2006, 09:56:09 AM
Glad you like it Ark.


Works With 1.1RC3 Aswell
Title: Re: YouTube Profile Field
Post by: NeFReT on August 22, 2006, 10:31:58 PM
1.1 RC3 amenable  YouTube Profile Field Modu what date advantage
Title: Re: YouTube Profile Field
Post by: laughing potato on January 23, 2007, 03:43:26 PM
Will this mod work on other themes?

I use Helios Multi and it installed fine, the video appears when I enter my profile. Cannot get it to show on my in post profile view as you have done :(

Any help much welcomed

my site is www.rckingdom.co.uk/smf if you want a look
Title: Re: YouTube Profile Field
Post by: Alan S on January 23, 2007, 03:58:18 PM
Hey , I really have to update this to 1.1.1 , I'll do it tonight.

What you do to make it work in Helios ( Or any other theme for that matter ) is

Open up that themes Display.Template.php

Find

// Show their personal text?
if (!empty($settings['show_blurb']) && $message['member']['blurb'] != '')
echo '
', $message['member']['blurb'], '<br />
<br />';


Add After


if (!empty($message['member']['options']['youtube'])) echo '<a href="http://www.youtube.com/v/', $message['member']['options']['youtube'], '" target="_blank"><img border="0" src="' . $settings['images_url'] . '/youtube.gif"></a>';


Let me know if it works.
Title: Re: YouTube Profile Field
Post by: laughing potato on January 23, 2007, 04:57:51 PM
I entered the code like this
                        // Show their personal text?
                        (!empty($message['member']['options']['youtube'])) echo '<a href="http://www.youtube.com/v/', $message['member']['options']['youtube'], '" target="_blank"><img border="0" src="' . $settings['images_url'] . '/youtube.gif"></a>';




and got this back
The file you tried to save generated the following error:
Parse error: parse error, unexpected T_ECHO in Display.template.php on line 383



I'm pretty unskilled with this code stuff, so please excuse me if I've missed/done something silly ;D
Title: Re: YouTube Profile Field
Post by: laughing potato on January 23, 2007, 04:59:26 PM
Opps, for got to add, i really want the embedded version to work more than the linked version although I have installed both.
Title: Re: YouTube Profile Field
Post by: laughing potato on January 23, 2007, 06:11:50 PM
So sorry, the above linked worked a treat, my bad :(

The youtube.gif needed to be moved into the correct folder. All working now, and I've learned a lot from just playing about.

Many thanks for your help and very quick reply, GREAT MOD and very useful ;D
Title: Re: YouTube Profile Field
Post by: perplexed on February 13, 2007, 06:08:40 AM
does this slow the forum down any having a youtube video loading on your profile?  I have performance issues :)
Title: Re: YouTube Profile Field
Post by: laughing potato on February 13, 2007, 04:50:13 PM
No, performance is the same. If the video takes time to load everything else would be fine, the video box just remains blank.

Its a great mod, and is proving pretty popular and saves my bandwidth as members can now upload a like via YouTube ;D
Title: Re: YouTube Profile Field
Post by: djpaddystudio7 on March 29, 2007, 12:31:37 PM
would this work for 1.1.2 ???
Title: Re: YouTube Profile Field
Post by: Alan S on March 29, 2007, 02:38:21 PM
It does indeed.

Working demo on 1.1.2

http://beboskinzone.com/forum/index.php?action=profile;u=1
Title: Re: YouTube Profile Field
Post by: spottedhog on April 17, 2007, 01:36:38 PM
Hi,

I am getting this error in the Forum Error Logs:

?action=profile;u=2;sa=forumProfile', '8: Undefined index:  youtube<br />File: Forums/Themes/default/Profile.template.php (forumProfile sub template - eval?)<br />Line: 1556


It only happens when a Profile is opened to modify, even when no changes were made.  Any ideas?

Edit:  On the third time of manually modifying the Profile.template.php file, I got it to work without any Forums errors.  Not sure what I had out of place, but it is OK now.

thanks
Title: Re: YouTube Profile Field
Post by: pariofdreamz on April 24, 2007, 09:17:15 AM
Thanks For The Fantastic Mod ...... Its working fine for me ..... www.forums.parilok.org :)
Title: Re: YouTube Profile Field
Post by: st1905 on June 24, 2007, 12:28:08 PM
Alan thank you so much , works great with tp+smf.
Title: Re: YouTube Profile Field
Post by: JOSHSKORN on July 16, 2007, 06:14:05 AM
I just installed it in my TP0.9.8.3 /smf 1.1.3 forums.  I'm having a problem.  Basically, the video isn't appearing.  Also, I now have my Homepage url box on the same line as the YouTube box.  I might have the two boxes mixed up, I'm not sure.  Basically, my screen is too wide now w/ two boxes side-by-side.

Please help, let me know what ever files I need to post and I will.  I'll get a screen shot if necessary.
Title: Re: YouTube Profile Field
Post by: TrueSatan on July 16, 2007, 08:17:49 AM
@ JOSHSKORN

Please see my reply to your query regarding the Country Flags mod...it seems that you have a problem that may well be affecting a number of the mods you use.
Title: Re: YouTube Profile Field
Post by: Jairito on July 24, 2007, 06:45:21 AM
Is there als an option to use a mod for Photo slideshows from Slide.com or something like that? By doing some code change in the youtube mod?