Advertisement:

Author Topic: YouTube BBC Tag (XHTML Compliant)  (Read 210470 times)

Offline Daniel Marquard

  • Jr. Member
  • **
  • Posts: 356
  • Gender: Male
    • Tristition
Re: YouTube BBC Tag (XHTML Compliant)
« Reply #100 on: January 25, 2007, 12:07:05 PM »
I uploaded the package from the SMF Mods page. I deleted the file from my computer the first time and uploaded it again just in case the original one had gotten corrupted.

I also tried to figure out how to do it manually but I'm not sure I did it right. If you could give me a list of files to FTP and what files/folders to send them to, that might solve my problem.

I also tried installing it in a third forum I have, also 1.1.1 default (core) theme, with the exact same results. In all three cases I can't even uninstall the mod, it gives this error:

I honestly can't explain why this is happening to you (and maybe one or two others).  Extract the files to your computer and make changes based on the contents of the imstallation XML file.

Offline catfished

  • Sr. Member
  • ****
  • Posts: 877
  • Gender: Male
  • pǝsnɟuoɔ ןןıʇs puɐ ʇɹıp uɐɥʇ ɹǝpןo
    • CatfishED.com
Re: YouTube BBC Tag (XHTML Compliant)
« Reply #101 on: January 25, 2007, 12:40:19 PM »
I honestly can't explain why this is happening to you (and maybe one or two others).  Extract the files to your computer and make changes based on the contents of the imstallation XML file.
Edit: I don't think I understand how to do that. It makes no sense to me. I open the XML file and it's a bunch of code. What am I supposed to do with that?
« Last Edit: January 25, 2007, 12:44:47 PM by catfished »
You use and like this forum software? Then show your appreciation and support by becoming a Charter Member.



CatfishEd.com

Offline Daniel Marquard

  • Jr. Member
  • **
  • Posts: 356
  • Gender: Male
    • Tristition
Re: YouTube BBC Tag (XHTML Compliant)
« Reply #102 on: January 25, 2007, 12:43:44 PM »
I tried that but it still doesn't work.  :'(

It would have no reason not to work if you're modifying the code manually, unless the code you're searching for does not exist.

Offline catfished

  • Sr. Member
  • ****
  • Posts: 877
  • Gender: Male
  • pǝsnɟuoɔ ןןıʇs puɐ ʇɹıp uɐɥʇ ɹǝpןo
    • CatfishED.com
Re: YouTube BBC Tag (XHTML Compliant)
« Reply #103 on: January 25, 2007, 12:48:22 PM »
Thanks for taking the time to try and help but this is wayyyyyyyyyyyyyyy above my head. I can upload files via FTP and even change a line or two of code but I have no idea as to what I have to do to make this work. I'll just have to live without it.
You use and like this forum software? Then show your appreciation and support by becoming a Charter Member.



CatfishEd.com

Offline twisterking

  • Newbie
  • *
  • Posts: 4
Re: YouTube BBC Tag (XHTML Compliant)
« Reply #104 on: January 26, 2007, 08:05:45 AM »
Also had problems installing the mod and getting it to work. Uninstall gave the error mentioned above.

Went ahead and changed the two files (subs.php and post.template.php) by hand, uploaded them and the mod was working like a charm.

There are some issues with installing, maybe it has something to do with languages/themes (my guess), but manual install should be no problem.

Offline rsmini

  • Jr. Member
  • **
  • Posts: 150
  • Gender: Male
  • SMF v1.1.111
    • British Mini Club
Re: YouTube BBC Tag (XHTML Compliant)
« Reply #105 on: January 26, 2007, 08:31:24 AM »
Code: [Select]
[youtube=425,350]gRWIyvBSjtk[/youtube]
http://www.youtube.com/watch?v=gRWIyvBSjtk

The end of address  ;)

I was struggling to get this to work until I saw this post, I'm used to embedding the whole code that You Tube provide for websites etc. Might I suggest that this quote be placed within the download page so we do not need to search through this entire thread before we find this.

I'm not complaining as this is a fantastic mod and I am really pleased to find it and know that once my members get used to it they will love it.

I installed though pac-man and it worked 1st time no problems whatsoever. Now just going to try it with the new theme (Millenium) we are hoping to use for the forum
« Last Edit: January 26, 2007, 08:36:23 AM by rsmini »
Remember to check the website for the latest info & news on the Mini. -
British Mini Club

Offline catfished

  • Sr. Member
  • ****
  • Posts: 877
  • Gender: Male
  • pǝsnɟuoɔ ןןıʇs puɐ ʇɹıp uɐɥʇ ɹǝpןo
    • CatfishED.com
Re: YouTube BBC Tag (XHTML Compliant)
« Reply #106 on: January 26, 2007, 11:50:31 AM »
Also had problems installing the mod and getting it to work. Uninstall gave the error mentioned above.

Went ahead and changed the two files (subs.php and post.template.php) by hand, uploaded them and the mod was working like a charm.

There are some issues with installing, maybe it has something to do with languages/themes (my guess), but manual install should be no problem.

Thanks for trying to help but unlike you folks, I'm not a coding pro, in fact I have zero knowledge of XHTML. I unzip the package and all I get are these three files:

youtube.gif

package-info XhtML file

yt bbc xhtml 1.0


I uploaded the youtube.gif to the images folder of my default theme but what in the heck am I supposed to do with the other two files? I opened them to find a bunch of code and some explanations that meant nothing to me. What am I supposed to change in subs.php and post.template.php??

I have never had so much trouble trying to install a mod. I wish I just had a list of the modified files that I could upload and write over the present ones. That would be soooo much easier than me trying to decipher XHTML codes.

Thanks again to those who have tried to help this old fart.

You use and like this forum software? Then show your appreciation and support by becoming a Charter Member.



CatfishEd.com

Offline 4fit?

  • Jr. Member
  • **
  • Posts: 162
Re: YouTube BBC Tag (XHTML Compliant)
« Reply #107 on: January 26, 2007, 12:49:54 PM »
catfished, I'm gonna try to help you out.  If you still can't get this to work, you can send me the necessary files and I will mod them for you and send them back.  PLEASE, remember to make a backup of these files before yo modify them in anyway.

In yourforum/sources/Subs.php

Find This
Code: [Select]
array(
'tag' => 'hr',
'type' => 'closed',
'content' => '<hr />',
'block_level' => true,
),

And add this after it
Code: [Select]
array(
'tag' => 'youtube',
'type' => 'unparsed_commas_content',
'test' => '\d+,\d+\]',
'content' => '<object type="application/x-shockwave-flash" width="$2" height="$3" data="http://www.youtube.com/v/$1"><param name="movie" value="http://www.youtube.com/v/$1"></param><param name="wmode" value="transparent"></param></object>',
'validate' => create_function('&$tag, &$data, $disabled', '
if (isset($disabled[\'url\']))
$tag[\'content\'] = \'$1\';'),
'disabled_content' => '<a href="$1" target="_blank">$1</a>',
),

in yourforum/themes/yourtheme/Post.template.php

Find This
Code: [Select]
'flash' => array('code' => 'flash', 'before' => '[flash=200,200]', 'after' => '[/flash]', 'description' => $txt[433]),

And add this after it
Code: [Select]
'youtube' => array('code' => 'youtube', 'before' => '[youtube=425,350]', 'after' => '[/youtube]', 'description' => $txt['youtube']),

In yourforum/themes/languages/Modifications.english.php

Find this (which will be at the very bottom of the document)
Code: [Select]
?>

And add this before it
Code: [Select]
$txt['youtube'] = 'YouTube';


That's it.  Now upload the modified files into their respective locations and you should be good to go.  I will say one more time, MAKE A BACKUP OF THE CURRENT FILES BEFORE TOUCHING THEM.  For instance, make a copy of Subs.php and name it something like Subs1.php.  That way, if something should happen during the modification process, you can rename the Subs1.php to Subs.php and be right back where you were before you tried modifying the files. ;)
« Last Edit: January 26, 2007, 12:53:04 PM by 4fit? »

Offline rsmini

  • Jr. Member
  • **
  • Posts: 150
  • Gender: Male
  • SMF v1.1.111
    • British Mini Club
Re: YouTube BBC Tag (XHTML Compliant)
« Reply #108 on: January 27, 2007, 12:19:42 AM »
This mod is sooooo Cool. I am so pleased with it. thank you for all your efforts its well worth it. Please check the example on my forum :

www.britishminiclub.co.uk/mambo/index.php?option=com_smf&Itemid=144&topic=12128.0
Remember to check the website for the latest info & news on the Mini. -
British Mini Club

Offline Nettie

  • Newbie
  • *
  • Posts: 6
Re: YouTube BBC Tag (XHTML Compliant)
« Reply #109 on: February 01, 2007, 08:28:08 AM »
I still can't get this to work, despite all these replies...

It's really driving me nuts. :(

I have 3 messageboards and it's not working on any of them. :(

Any chance that you could link the full changed pages for download 4fit?
 ;D
Cheers!!!

Offline 4fit?

  • Jr. Member
  • **
  • Posts: 162
Re: YouTube BBC Tag (XHTML Compliant)
« Reply #110 on: February 01, 2007, 10:54:20 AM »
I still can't get this to work, despite all these replies...

It's really driving me nuts. :(

I have 3 messageboards and it's not working on any of them. :(

Any chance that you could link the full changed pages for download 4fit?
 ;D
Cheers!!!
I could, but if you have other mods installed that I don't or if I have mods installed that you don't, it could mess things up pretty good.  Can you give us a test account on one of your boards to see exactly what it is doing?  Are any of the files failing when you try to install it through the package manager?  Is it saying installed successfully, but you are unable to see any changes in your forums?

Offline catfished

  • Sr. Member
  • ****
  • Posts: 877
  • Gender: Male
  • pǝsnɟuoɔ ןןıʇs puɐ ʇɹıp uɐɥʇ ɹǝpןo
    • CatfishED.com
Re: YouTube BBC Tag (XHTML Compliant)
« Reply #111 on: February 01, 2007, 12:11:21 PM »
catfished, I'm gonna try to help you out.  If you still can't get this to work, you can send me the necessary files and I will mod them for you and send them back.  PLEASE, remember to make a backup of these files before yo modify them in anyway.

That's it.  Now upload the modified files into their respective locations and you should be good to go.  I will say one more time, MAKE A BACKUP OF THE CURRENT FILES BEFORE TOUCHING THEM.  For instance, make a copy of Subs.php and name it something like Subs1.php.  That way, if something should happen during the modification process, you can rename the Subs1.php to Subs.php and be right back where you were before you tried modifying the files. ;)

4fit?,

Thank you very much for taking the time to try and help. Unfortunately, I'm having nothing but trouble with this mod. I have spent many hours trying to solve it but to no avail.  :'(

For starters, there is definitely no such code as this in my Subs1.php:
Code: [Select]
array(
'tag' => 'hr',
'type' => 'closed',
'content' => '<hr />',
'block_level' => true,
),

I spent quite awhile searching for it, line by line and it's definitely not there, yet my forums work just fine without it. ???
You use and like this forum software? Then show your appreciation and support by becoming a Charter Member.



CatfishEd.com

Offline 4fit?

  • Jr. Member
  • **
  • Posts: 162
Re: YouTube BBC Tag (XHTML Compliant)
« Reply #112 on: February 01, 2007, 01:25:15 PM »
catfished, that is the code to insert a horizontal rule in your post.  Seems like it should be there.  Strange.  You are on 1.1.1, right?  If so, could you post up the code from or attach your Subs.php?  I'd like to take a look at that.

Offline Daniel Marquard

  • Jr. Member
  • **
  • Posts: 356
  • Gender: Male
    • Tristition
Re: YouTube BBC Tag (XHTML Compliant)
« Reply #113 on: February 01, 2007, 02:15:56 PM »
4fit?,

Thank you very much for taking the time to try and help. Unfortunately, I'm having nothing but trouble with this mod. I have spent many hours trying to solve it but to no avail.  :'(

For starters, there is definitely no such code as this in my Subs1.php:
Code: [Select]
array(
'tag' => 'hr',
'type' => 'closed',
'content' => '<hr />',
'block_level' => true,
),

I spent quite awhile searching for it, line by line and it's definitely not there, yet my forums work just fine without it. ???

If your filename is Subs1.php, then that's why the mod wouldn't install.  Not sure how it managed to become that either.

Search for 'tag' => 'hr', in Subs.php and then add my code below the array.

Offline 4fit?

  • Jr. Member
  • **
  • Posts: 162
Re: YouTube BBC Tag (XHTML Compliant)
« Reply #114 on: February 01, 2007, 02:41:18 PM »
If your filename is Subs1.php, then that's why the mod wouldn't install.  Not sure how it managed to become that either.

Search for 'tag' => 'hr', in Subs.php and then add my code below the array.
Marlon, I told him to make a backup copy of Subs and name it Subs1 before he started messing with the original. ;)

Offline catfished

  • Sr. Member
  • ****
  • Posts: 877
  • Gender: Male
  • pǝsnɟuoɔ ןןıʇs puɐ ʇɹıp uɐɥʇ ɹǝpןo
    • CatfishED.com
Re: YouTube BBC Tag (XHTML Compliant)
« Reply #115 on: February 01, 2007, 08:16:55 PM »
catfished, that is the code to insert a horizontal rule in your post.  Seems like it should be there.  Strange.  You are on 1.1.1, right?  If so, could you post up the code from or attach your Subs.php?  I'd like to take a look at that.

Ok,

I attached a copy of one of my forum's Subs.php
You use and like this forum software? Then show your appreciation and support by becoming a Charter Member.



CatfishEd.com

Offline 4fit?

  • Jr. Member
  • **
  • Posts: 162
Re: YouTube BBC Tag (XHTML Compliant)
« Reply #116 on: February 01, 2007, 08:53:13 PM »
catfished, that is the code to insert a horizontal rule in your post.  Seems like it should be there.  Strange.  You are on 1.1.1, right?  If so, could you post up the code from or attach your Subs.php?  I'd like to take a look at that.


Ok,

I attached a copy of one of my forum's Subs.php
From what I know and can tell, it doesn't really matter where the code is placed in that file, as long as it falls with all the other arrays.  So...

Find this (on row 1201):
Code: [Select]
array(
'tag' => 'center',
'before' => '<div align="center">',
'after' => '</div>',
'block_level' => true,
),

and add this after it:
Code: [Select]
array(
'tag' => 'youtube',
'type' => 'unparsed_commas_content',
'test' => '\d+,\d+\]',
'content' => '<object type="application/x-shockwave-flash" width="$2" height="$3" data="http://www.youtube.com/v/$1"><param name="movie" value="http://www.youtube.com/v/$1"></param><param name="wmode" value="transparent"></param></object>',
'validate' => create_function('&$tag, &$data, $disabled', '
if (isset($disabled[\'url\']))
$tag[\'content\'] = \'$1\';'),
'disabled_content' => '<a href="$1" target="_blank">$1</a>',
),

Of course, the other modifications that I posted will have to be applied to their respective files.

Offline catfished

  • Sr. Member
  • ****
  • Posts: 877
  • Gender: Male
  • pǝsnɟuoɔ ןןıʇs puɐ ʇɹıp uɐɥʇ ɹǝpןo
    • CatfishED.com
Re: YouTube BBC Tag (XHTML Compliant)
« Reply #117 on: February 01, 2007, 11:47:17 PM »
catfished, that is the code to insert a horizontal rule in your post.  Seems like it should be there.  Strange.  You are on 1.1.1, right?  If so, could you post up the code from or attach your Subs.php?  I'd like to take a look at that.


Ok,

I attached a copy of one of my forum's Subs.php
From what I know and can tell, it doesn't really matter where the code is placed in that file, as long as it falls with all the other arrays.  So...

Find this (on row 1201):
Code: [Select]
array(
'tag' => 'center',
'before' => '<div align="center">',
'after' => '</div>',
'block_level' => true,
),

and add this after it:
Code: [Select]
array(
'tag' => 'youtube',
'type' => 'unparsed_commas_content',
'test' => '\d+,\d+\]',
'content' => '<object type="application/x-shockwave-flash" width="$2" height="$3" data="http://www.youtube.com/v/$1"><param name="movie" value="http://www.youtube.com/v/$1"></param><param name="wmode" value="transparent"></param></object>',
'validate' => create_function('&$tag, &$data, $disabled', '
if (isset($disabled[\'url\']))
$tag[\'content\'] = \'$1\';'),
'disabled_content' => '<a href="$1" target="_blank">$1</a>',
),

Of course, the other modifications that I posted will have to be applied to their respective files.

Well thanks but as soon as I added that code, it crashed the forum with an error:

Parse error: syntax error, unexpected ',' in /home/norcal/public_html/forum/Sources/Subs.php on line 1215

I simply replaced the edited file with the original to get the forum back but I'm about at the end of my rope here. I'm convinced that this mod is not going to work on any of my forums!!
You use and like this forum software? Then show your appreciation and support by becoming a Charter Member.



CatfishEd.com

Offline catfished

  • Sr. Member
  • ****
  • Posts: 877
  • Gender: Male
  • pǝsnɟuoɔ ןןıʇs puɐ ʇɹıp uɐɥʇ ɹǝpןo
    • CatfishED.com
Re: YouTube BBC Tag (XHTML Compliant)
« Reply #118 on: February 02, 2007, 12:40:59 AM »
 Well this is the final straw! :'( I really thought I'd discovered the problem when I realized there were Subs.php and Subs.php~ files as well as Post.template.php and Post.template.php~ etc. The ones with the ~ were dated the day I originally installed the mod via the Package Manager. I checked all three files and found that they did not have the changes so I made them just as you instructed and renamed them without the ~. I then checked to see if my forum still worked and it was working fine. I anxiously tried the youtube mod and guess what: It still does nothing!!!! That's it!! The end!!! There is no way that this mod can ever be installed on any of my SMF forums.
You use and like this forum software? Then show your appreciation and support by becoming a Charter Member.



CatfishEd.com

Offline Daniel Marquard

  • Jr. Member
  • **
  • Posts: 356
  • Gender: Male
    • Tristition
Re: YouTube BBC Tag (XHTML Compliant)
« Reply #119 on: February 02, 2007, 12:53:21 PM »
Well this is the final straw! :'( I really thought I'd discovered the problem when I realized there were Subs.php and Subs.php~ files as well as Post.template.php and Post.template.php~ etc. The ones with the ~ were dated the day I originally installed the mod via the Package Manager. I checked all three files and found that they did not have the changes so I made them just as you instructed and renamed them without the ~. I then checked to see if my forum still worked and it was working fine. I anxiously tried the youtube mod and guess what: It still does nothing!!!! That's it!! The end!!! There is no way that this mod can ever be installed on any of my SMF forums.

LOL, I'm sorry to hear that; it's quite unfortunate that my mod doesn't work on your website.  It's one thing if your forum is having trouble installing a mod through the package manager.  It certainly is a very different problem if the additions my mod needs to make to files fail, simply because the search code (apparently) does not exist.

I wish I could help you further, but no one seems to have the problem you're having.  Everyone that has had difficulty installing my mod through their package manager experienced no problems at all with installing it manually.