Advertisement:

Author Topic: Yet Another YouTube BBCode Tag  (Read 75298 times)

Offline Dwev

  • Jr. Member
  • **
  • Posts: 202
Re: Yet Another YouTube BBCode Tag
« Reply #240 on: December 30, 2017, 07:17:48 PM »
@ dougiefresh: followed your instructions and it uninstalled fine.

Ironically I wanted to uninstall to try out another video-mod, but ended up reinstalling this one, because I realized I like it better.

Offline landyvlad

  • Full Member
  • ***
  • Posts: 433
    • Michael Reed on Facebook
    • GSX1400 Owners ORG
Re: Yet Another YouTube BBCode Tag
« Reply #241 on: January 17, 2018, 05:56:48 AM »
I'm trying to uninstall v 4.1 from SMF 2.0.13, in order to update the mod.

Quote
I am getting this error:
9. Execute Modification   ./Themes/default/languages/index.english-utf8.php   Test failed
   1.   Add Before   ./Themes/default/languages/index.english-utf8.php   Test failed
10.   Execute Modification   ./Themes/default/languages/ManageSettings.english-utf8.php   Test failed
   1.   Add Before   ./Themes/default/languages/ManageSettings.english-utf8.php   Test failed

I'd appreciate if you could let me know how to sort this out.  Ta.
Please do not PM, IM or Email me with questions on astrophysics or theology.  You will get better and faster responses by asking homeless people in the street. Thank you.

Offline Gryzor

  • Sr. Member
  • ****
  • Posts: 762
  • Gender: Male
  • CPCwiki.eu - The Amstrad CPC Encyclopaedia!
    • CPCWiki
Re: Yet Another YouTube BBCode Tag
« Reply #242 on: January 17, 2018, 06:00:32 AM »
Probably another mod has changed those files already, so you'll have to check manually.
However, I see those are the utf8 versions and I've had mods failing on those too, but the utf-8 files were empty in my case, so I'm not sure it's critical?

Offline landyvlad

  • Full Member
  • ***
  • Posts: 433
    • Michael Reed on Facebook
    • GSX1400 Owners ORG
Re: Yet Another YouTube BBCode Tag
« Reply #243 on: January 17, 2018, 06:43:08 AM »
I have set my forum to use UTF8, if that's relevant.
Please do not PM, IM or Email me with questions on astrophysics or theology.  You will get better and faster responses by asking homeless people in the street. Thank you.

Offline landyvlad

  • Full Member
  • ***
  • Posts: 433
    • Michael Reed on Facebook
    • GSX1400 Owners ORG
Re: Yet Another YouTube BBCode Tag
« Reply #244 on: January 20, 2018, 02:15:24 AM »
dougiefresh  - should I

1. Uninstall, ignoring the errors, or
2 Just install the new one over the top, or
3 Something else ?
Please do not PM, IM or Email me with questions on astrophysics or theology.  You will get better and faster responses by asking homeless people in the street. Thank you.

Offline Gryzor

  • Sr. Member
  • ****
  • Posts: 762
  • Gender: Male
  • CPCwiki.eu - The Amstrad CPC Encyclopaedia!
    • CPCWiki
Re: Yet Another YouTube BBCode Tag
« Reply #245 on: January 20, 2018, 02:58:32 AM »
Have you checked the files? If another mod has done any changes where this one tries to change things, you could do them manually...

Offline landyvlad

  • Full Member
  • ***
  • Posts: 433
    • Michael Reed on Facebook
    • GSX1400 Owners ORG
Re: Yet Another YouTube BBCode Tag
« Reply #246 on: January 20, 2018, 07:33:33 AM »
No and to be honest I wouldn't really be confident that I wouldn't muck up another mod in doing so.
Please do not PM, IM or Email me with questions on astrophysics or theology.  You will get better and faster responses by asking homeless people in the street. Thank you.

Offline Gryzor

  • Sr. Member
  • ****
  • Posts: 762
  • Gender: Male
  • CPCwiki.eu - The Amstrad CPC Encyclopaedia!
    • CPCWiki
Re: Yet Another YouTube BBCode Tag
« Reply #247 on: January 20, 2018, 11:12:58 AM »
It doesn't mean you'll much up another mod; most often you'll find that where a mod has inserted some text, say:

insert "abcef" before "asdfg"

Another mod will have done the same:

insert "qwerty" before "asdfg"

So you end up with a section reading

abcdef
qwerty
asdfg

So, if you've installed the first mod and then the second, the uninstaller for the first mod would look for

abcdef
asdfg

but of course it can't find it. It's just a matter of manually deleting "abcdef".

Offline landyvlad

  • Full Member
  • ***
  • Posts: 433
    • Michael Reed on Facebook
    • GSX1400 Owners ORG
Re: Yet Another YouTube BBCode Tag
« Reply #248 on: January 20, 2018, 10:01:39 PM »
Got it. Thanks.
Please do not PM, IM or Email me with questions on astrophysics or theology.  You will get better and faster responses by asking homeless people in the street. Thank you.

Offline landyvlad

  • Full Member
  • ***
  • Posts: 433
    • Michael Reed on Facebook
    • GSX1400 Owners ORG
Re: Yet Another YouTube BBCode Tag
« Reply #249 on: January 21, 2018, 05:28:40 AM »
OK super weird.

As I said I got these errors
Quote
I am getting this error:
9. Execute Modification   ./Themes/default/languages/index.english-utf8.php   Test failed
   1.   Add Before   ./Themes/default/languages/index.english-utf8.php   Test failed
10.   Execute Modification   ./Themes/default/languages/ManageSettings.english-utf8.php   Test failed
   1.   Add Before   ./Themes/default/languages/ManageSettings.english-utf8.php   Test failed

I went ahead and uninstalled (which it did successfully, albeit with those errors acknowledged)
planning then to remove those other sections manually.

Looking at the package parser, the edits to those two files (on install) are:

./Themes/default/languages/index.english-utf8.php
Quote
Find (at the end of the file):
?>

Add Before:

$txt['youtube'] = 'Youtube';
$txt['yt_search'] = 'YouTube Search';
$txt['yt_user'] = 'YouTube User';
$txt['youtube_link_invalid'] = '[ Invalid YouTube link ]';
$txt['youtube_no_embed'] = 'Show YouTube videos as a link.';

and

./Themes/default/languages/ManageSettings.english-utf8.php
Quote
Find (at the end of the file):
?>

Add Before:

$txt['youtube_default_width'] = 'Default width used for YouTube bbcode when not specified<div class="smalltext">Use <strong>0</strong> to use responsive video display</div>';
$txt['youtube_default_height'] = 'Default height used for YouTube bbcode when not specified<div class="smalltext">Use <strong>0</strong> to use responsive video display</div>';


So I went into each of those files and did a search for youtube - nothing.
Even scrolled through manually and can't see ANY such code for removal.

So.... any reason why this might be the case?

And any reason why I shouldn't now try to instal the new version?
Please do not PM, IM or Email me with questions on astrophysics or theology.  You will get better and faster responses by asking homeless people in the street. Thank you.

Offline Gryzor

  • Sr. Member
  • ****
  • Posts: 762
  • Gender: Male
  • CPCwiki.eu - The Amstrad CPC Encyclopaedia!
    • CPCWiki
Re: Yet Another YouTube BBCode Tag
« Reply #250 on: January 21, 2018, 06:05:43 AM »
Then probably when you first installed the mod, these modifications weren't made for any reason... maybe the utf8 files weren't there? I'm really not sure how and when the utf8 files work...

Offline landyvlad

  • Full Member
  • ***
  • Posts: 433
    • Michael Reed on Facebook
    • GSX1400 Owners ORG
Re: Yet Another YouTube BBCode Tag
« Reply #251 on: January 21, 2018, 06:25:23 AM »
Ah yes that makes sense they probably wouldn't have been there at the time.  Ok cool, I just install the new version. Ta.

edit: Installed new version all good !
Please do not PM, IM or Email me with questions on astrophysics or theology.  You will get better and faster responses by asking homeless people in the street. Thank you.

Offline Gryzor

  • Sr. Member
  • ****
  • Posts: 762
  • Gender: Male
  • CPCwiki.eu - The Amstrad CPC Encyclopaedia!
    • CPCWiki
Re: Yet Another YouTube BBCode Tag
« Reply #252 on: January 21, 2018, 10:52:08 AM »
Cool :)

THis methodology is always valid, used it so many times...

Offline landyvlad

  • Full Member
  • ***
  • Posts: 433
    • Michael Reed on Facebook
    • GSX1400 Owners ORG
Re: Yet Another YouTube BBCode Tag
« Reply #253 on: January 21, 2018, 07:13:32 PM »
THis methodology is always valid, used it so many times...

By 'this methodology' I assume you mean that if there are only one or two errors then just uninstall anyway and go do the remaining changes (usually code deletions) manually in the relevant file?

If that is the case then I ought to be able to sort out the remaining mod upgrades I need to do.




( Oh and yes I realise it is POSSIBLE to do ALL the edits manually rather than using an uninstaller, but I wouldn't like too...  :)   ) 
Please do not PM, IM or Email me with questions on astrophysics or theology.  You will get better and faster responses by asking homeless people in the street. Thank you.

Offline Gryzor

  • Sr. Member
  • ****
  • Posts: 762
  • Gender: Male
  • CPCwiki.eu - The Amstrad CPC Encyclopaedia!
    • CPCWiki
Re: Yet Another YouTube BBCode Tag
« Reply #254 on: January 22, 2018, 05:16:16 AM »
Theoretically, if you have many mods installed you can run into a newer mod that will have much difficulty being installed; in that case yes, you could do all the edits manually (especially if it's only got a few changes). If you're comfortable with the process (a couple of times doing it should be enough) then why not! I know I've been there...

Offline triode-master

  • Newbie
  • *
  • Posts: 3
Re: Yet Another YouTube BBCode Tag
« Reply #255 on: February 10, 2018, 05:06:35 PM »
hello my SMF 2.1 Beta 3
before install Yet Another YouTube BBCode Tag

how to remove these errors?
error in
Sources/Subs-Post.php
line: 216 2: implode(): Invalid arguments passed
line: 216 2: array_unique() expects parameter 1 to be array, null given
line: 216 8: Undefined variable: alltags
line: 212 2: Invalid argument supplied for foreach()

So it works fine, video shows

Offline dougiefresh

  • SMF Hero
  • ******
  • Posts: 2,671
  • Mod King
    • XPtsp.com Community
Re: Yet Another YouTube BBCode Tag
« Reply #256 on: February 12, 2018, 11:08:02 AM »
I'm pretty sure those errors don't have anything to do with this mod.... 

I'm guessing that the $alltags isn't declared an array by default, and nothing gets added to it for some reason...  In Subs-Post.php, find this line:
Code: (Find) [Select]
foreach (($codes = parse_bbc(false)) as $code)and add this above it:
Code: (Add Above) [Select]
$alltags = array();This may fix the issue.  If it does, then it should be reported on the SMF 2.1 Beta 3 bug reports board.
News: Missing GitHub repository...

My Free Simple Machines mods on XPtsp.com, Simple Machines Customization Site, and at GitHub!
Problem uninstalling mods?  Try Arantor's Sortable Packages (and Installed Time) mod!  It's super helpful!

Offline triode-master

  • Newbie
  • *
  • Posts: 3
Re: Yet Another YouTube BBCode Tag
« Reply #257 on: February 16, 2018, 04:14:19 PM »
Thank you dougiefresh
You helped!
But there was one mistake.
/Sources/Subs-Post.php
line: 212 2: Invalid argument supplied for foreach()
This error occurs when you insert a video into the post.
In the forum logs it is repeated twice.

Offline dougiefresh

  • SMF Hero
  • ******
  • Posts: 2,671
  • Mod King
    • XPtsp.com Community
Re: Yet Another YouTube BBCode Tag
« Reply #258 on: February 17, 2018, 11:50:36 AM »
Clearly, something is screwed up....  Changing the code like this SHOULD solve the errors.....
Code: (Find) [Select]
foreach (($codes = parse_bbc(false)) as $code)
if (!in_array($code['tag'], $allowedEmpty))
$alltags[] = $code['tag'];
Code: (Replace) [Select]
$codes = parse_bbc(false);
$codes = is_array($codes) ? $codes : array();
$alltags = array();
foreach ($codes as $code)
if (!in_array($code['tag'], $allowedEmpty))
$alltags[] = $code['tag'];
News: Missing GitHub repository...

My Free Simple Machines mods on XPtsp.com, Simple Machines Customization Site, and at GitHub!
Problem uninstalling mods?  Try Arantor's Sortable Packages (and Installed Time) mod!  It's super helpful!

Offline Finn_958

  • Semi-Newbie
  • *
  • Posts: 14
Re: Yet Another YouTube BBCode Tag
« Reply #259 on: February 17, 2018, 04:21:19 PM »
I installed as instructed but the following instruction:

// Embed YouTube URLs in the YouTube bbcode tags:
   BBCode_YouTube_Embed($message, $smileys, $cache_id, $parse_tags);

Returns the following error:
called undefined function bbccode_youtube_embed

Please however note that I did not know how to put some files:
add_remove_hooks.php
package-info.xml
install_20x.xml
install_21x.xml
language_english.xml
language_spanish_latin.xml