Advertisement:

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

Offline dougiefresh

  • SMF Hero
  • ******
  • Posts: 2,351
    • XPtsp.com Community
Re: Yet Another YouTube BBCode Tag
« Reply #180 on: October 25, 2016, 06:48:29 AM »
Uploaded v4.1 - October 24th, 2016
o Added code to SimplePortal code to skip embedding links for shoutboxes.


It seems to have worked. Thank you so much!
You're welcome!  It's now the new official version....
NOTICE:  My website is back up!

My Free Simple Machines mods on XPtsp.com and Simple Machines Customization Site!
My mods are being uploaded and are available at GitHub as well!

Offline Gryzor

  • Sr. Member
  • ****
  • Posts: 714
  • Gender: Male
  • CPCwiki.eu - The Amstrad CPC Encyclopaedia!
    • CPCWiki
Re: Yet Another YouTube BBCode Tag
« Reply #181 on: October 25, 2016, 08:20:18 AM »
Thanks for the update!

Now, I know that this may well be outside the scope of the mod, but how easy/possible would it be to auto-parse links and embed vids? If at all...

Offline dougiefresh

  • SMF Hero
  • ******
  • Posts: 2,351
    • XPtsp.com Community
Re: Yet Another YouTube BBCode Tag
« Reply #182 on: October 25, 2016, 01:42:29 PM »
Now, I know that this may well be outside the scope of the mod, but how easy/possible would it be to auto-parse links and embed vids? If at all...
Already done.
NOTICE:  My website is back up!

My Free Simple Machines mods on XPtsp.com and Simple Machines Customization Site!
My mods are being uploaded and are available at GitHub as well!

Offline petb

  • Semi-Newbie
  • *
  • Posts: 60
Re: Yet Another YouTube BBCode Tag
« Reply #183 on: October 25, 2016, 03:21:42 PM »
I tried to investigate a bit more about my problem:

In the Post there is a Link:  http://www.youtube.com/watch?v=WHgcs5vEzVI

If the Mod was active it builds this html code:
Code: [Select]
<iframe class="youtube-player" type="text/html" src="[youtube]http://www.youtube.com/embed/WHgcs5vEzVI[/youtube]" allowfullscreen frameborder="0"></iframe>
But this Code wont work, because of the [youtube] Tags placed in the soure param.
It produce a file not found error.

If i eliminate the tags manually, the iframe embed source works.

If i turn off the bbc [youtube] tag, the mod produce this code:
Code: [Select]
<a href=http://www.youtube.com/embed/WHgcs5vEzVI>[youtube]http://www.youtube.com/embed/WHgcs5vEzVI[/youtube]</a>Link works, but logical no iframe video embed code.

If i uninstall the Mod the Forum produce this code:
Code: [Select]
<a href="http://www.youtube.com/watch?v=WHgcs5vEzVI" class="bbc_link" target="_blank"><a href="http://www.youtube.com/watch?v=WHgcs5vEzVI" class="bbc_link" target="_blank">http://www.youtube.com/watch?v=WHgcs5vEzVI</a></a>Don't know why it produce a link within a link?
But if i deactivate the Option "Automatically link posted URLs" the Forum itself only shows the basic text:     http://www.youtube.com/watch?v=WHgcs5vEzVI  without a href html tag.

But this has no effect on the mod, after install the mod again it still produce this html code:
Code: [Select]
<iframe class="youtube-player" type="text/html" src="[youtube]http://www.youtube.com/embed/WHgcs5vEzVI[/youtube]" allowfullscreen frameborder="0"></iframe>
I am using smf 2.0.12 with 4.1 of the mod.
In Hope that you might get an idea about that... :)
Petb

Offline Gryzor

  • Sr. Member
  • ****
  • Posts: 714
  • Gender: Male
  • CPCwiki.eu - The Amstrad CPC Encyclopaedia!
    • CPCWiki
Re: Yet Another YouTube BBCode Tag
« Reply #184 on: October 26, 2016, 02:51:49 AM »
Now, I know that this may well be outside the scope of the mod, but how easy/possible would it be to auto-parse links and embed vids? If at all...
Already done.

Really? Which version? (page with changelog returns a 404 for me). I'm running 4.0 and I contantly have to edit user posts because it doesn't, on my installation...

Offline richardwbb

  • Jr. Member
  • **
  • Posts: 254
  • currently reading; '$smcFunc'
Re: Yet Another YouTube BBCode Tag
« Reply #185 on: November 14, 2016, 10:18:10 PM »
I've searched this topic for 'database' and 'MySQL' and saw no results.

I just installed this, I find, must-have mod.

It did this quite well for all themes, even a very old and heavily modified, which is a plus to me.

But, I noticed some akward things with the installing of modifications, themes. This isn't this plugin related, so I will post that somewhere else when I get to this.

To keep it short;

This plugin modifies the database, and I wasn't made aware of this.

This I find strange. I don't know other people's opinion on this for modifications in general, but after five year Site Admin, this is the first time I run in to this.

It would be most helpful if somehow this is notified, because ->

I test the modifications. I decided to prepare a 2.0.12 fresh install. This is modification #8 for me. Every modification I copy the hole SMF directory [this mainly has to do with what I just wrote; '
But, I noticed some akward things with the installing of modifications, themes. This isn't this plugin related, so I will post that somewhere else when I get to this.
'.
Can someone explain why this is necessary, and please, make Site Admin's aware of this, because;

It is not possible for me to do a fresh install without a testing environment. In the past the running forum borked here and there and I felt back then my luck with restoring ends somewhere.

Also, I don't like this as a surprise, I view modifications as files only, in such a way that I rename the running forum directory and change the name of the testing directory to the running name.

Coincidentally I replaced the database to a version pre modification #1, this because I had white screen of death somehow [I was able to fix that]

But how can I revert on running forum, with new posts in it.

If I notice at modification #8, that modification #1 [hypothetically, this modification], borked something. How can I replace that on a database.

If I know this, [please let me know if I should be able to see this somehow beforehand, willing to learn here], I would install this plugin as a last one, switching from test forum to running forum, then wait a couple of days, back everything up, and install it and see how that works out.

I see no other way then starting this in this topic, five years is a long time. This is the first one that did this;

Quote
PHP Fatal error:  Call to undefined function BBCode_YouTube_Embed() in /var/www/html/smf/Sources/Subs.php on line 1714

I use PrettyURL's for example, I knew it has to use the database beforehand. It borked two times. The help at code.google.com solved this.

If people find that I am whining, then, #1 say so, and #2 explain to me; how to proceed with any modification for always?
If my post in this topic looks ambiguous to you, then I'm with Murphy's law and General Stupidity. In other words, trial and error.

Offline petb

  • Semi-Newbie
  • *
  • Posts: 60
Re: Yet Another YouTube BBCode Tag
« Reply #186 on: November 15, 2016, 03:20:24 AM »
...This plugin modifies the database, and I wasn't made aware of this. ...
To see more clearly about this..., what was changed?
Did the change made any Problem?
Any Problem after deinstall the mod?

Offline richardwbb

  • Jr. Member
  • **
  • Posts: 254
  • currently reading; '$smcFunc'
Re: Yet Another YouTube BBCode Tag
« Reply #187 on: November 15, 2016, 02:36:26 PM »
Well, I posted the error and I am not aware how I can track changes to the database and I am a little puzzled on why this specific plugin requires something of the database and it would be great if it escaped once it's code to re-call it's database requirement, however, I recently learned that 'install.php means SQL and I was used to reading only the middle column of the modification installer [type - action -description] and I viewed type as uninteresting or to be opened for the code difference if the right column said failed and the middle column I regarded as the column that is the interesting part]

On the other hand this plugin has no install.php

Where or how can I tell what [might be] changed to the database, that would be helpful already.

I hope I have cleared things up. Also if someone can tell me how to search for this in a plugin that is relatively compact or how to see beforehand it's the database.

This I would like to learn, I don't see where to go else besides reading a manual I feel that is this forum and it's pretty quick with helpful answers by it's people.
If my post in this topic looks ambiguous to you, then I'm with Murphy's law and General Stupidity. In other words, trial and error.

Offline dougiefresh

  • SMF Hero
  • ******
  • Posts: 2,351
    • XPtsp.com Community
Re: Yet Another YouTube BBCode Tag
« Reply #188 on: November 15, 2016, 08:51:05 PM »
@richardwbb: Okay, let me respond to both posts that you have made:

First, the only modification this mod does to the database is to add hooks to it.  The hooks add the functionality of the mod to the forum in such a way that minimal edits are required.  All changes take place in the {db_prefix}settings table.

Second, if you are looking for the changes this mod makes, look in the {db_prefix}settings table, specifically at these entries:
o integrate_pre_include => tells the forum what file to load
o integrate_load_theme => adds a CSS file to the forum.
o integrate_bbc_codes => adds bbcodes to the forum.
o integrate_bbc_buttons => adds bbcode buttons to the forum.
o integrate_general_mod_settings => admin settings

Third, this mod doesn't contain any install.php files, which makes me wonder if you are in the right topic.  And no, install.php doesn't necessarily mean that it does SQL commands, but it is most commonly used to do so....

Fourth, modifications aren't intended to viewed as a "file only" situation.  It's intended as a package deal.  If you manually make the changes to the files, then you are responsible for executing the PHP portion of the mod, because 99.9% of the time, the mod won't work without those changes.  If you don't want database changes on your forum, this mod isn't for you PERIOD!.

Lastly, what exactly is your complaint?  Both messages are vague about the problem (if any) you are encountering.  You say a operation (or more) has failed, yet you don't provide any details as to what happened.  All I see are complaints without substance, and without substance (something to go on), I can't fix whatever problem you are having.

I will try to help you if you are attempting to install the mod through the Package Manager and it won't complete without errors, and most of the time, minor manual changes are required in order to make everything co-exist.  However, I'm not going to support situations where completely manual installations aren't completed as directed by the package-info.xml file, which sounds like what has happened....
NOTICE:  My website is back up!

My Free Simple Machines mods on XPtsp.com and Simple Machines Customization Site!
My mods are being uploaded and are available at GitHub as well!

Offline richardwbb

  • Jr. Member
  • **
  • Posts: 254
  • currently reading; '$smcFunc'
Re: Yet Another YouTube BBCode Tag
« Reply #189 on: November 15, 2016, 10:06:45 PM »
Hey Dougiefresh, thanks for clearin that up already. I mean with already, I don't feel like I am able to respond right now, I am not PHP-savvy and that is because I'm no programmer. I always am able to learn a few commands and an hour later, I don't remember any longer and it is hard to explain, but; I'm no β.

Now I will respond mainly to what petb wrote and possibly this is overdone by me, but it isn't clear to me what is expected from me, and, I am after the true facts or relevant information about something.

I will do my best on understanding what you wrote, and I already view your response, as a valuable one.

What I am doing is to find may way in not two, but, three factors;

1. files
2. database
3. a live forum that is posted on

I'm able to manange 1. and 2. With 3., I need my time for 1. and 2., meaning that when I finished something, I'll notice that there are new posts on the live forum. I believe I shouldn't close a live forum for too long and when I started being Site Admin, I did modifications and all sorts of my bads formed, but now it got harder. I don't feel that reading a manual is my best option, this is because I'm not good at memorizing things by reading about it, but doing.

Now, I can grep the forum, notice string values, so I go to the translation, find the related string and then search the code for it. I can't read PHP. You gave me several handholds, You even used [strong] with that, haha.

I did follow the installation procedure, my constraint is that I'm not able to find on my own, what is going on. I understand that a testing server is for testing purposes, but I see difficulty with the roll-out of my changes, and am wondering how other people do this.

Would you be so kind to answer for all the people, how they implement their roll-out to the production server. I would be most grateful.

And I'll take in account that this can happen, and that it is so [you made me see that]. What just wrote I can see from your words[at this moment in time]. Lesson learned. I see that I did answer to your post, but I'll look in to this, again. And probably, you guessed, again.
If my post in this topic looks ambiguous to you, then I'm with Murphy's law and General Stupidity. In other words, trial and error.

Offline landyvlad

  • Jr. Member
  • **
  • Posts: 271
    • Michael Reed on Facebook
    • GSX1400 Owners ORG
Re: Yet Another YouTube BBCode Tag
« Reply #190 on: January 21, 2017, 12:14:38 AM »
HI I'm VERY new at all this so please forgive stupid questions...

How do I actually install this mod?
Do I have to make the manual file edits mentioned here as well as do the install?  What about the file operations also mentioned on that page?

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 dougiefresh

  • SMF Hero
  • ******
  • Posts: 2,351
    • XPtsp.com Community
Re: Yet Another YouTube BBCode Tag
« Reply #191 on: January 21, 2017, 09:15:28 AM »
How do I actually install this mod?
Do I have to make the manual file edits mentioned here as well as do the install?  What about the file operations also mentioned on that page?
This mod is intended to be installed through Package Manager.  If you choose to manually install the mod, you must make all file edits and file copies as dictated by package-info.xml.
NOTICE:  My website is back up!

My Free Simple Machines mods on XPtsp.com and Simple Machines Customization Site!
My mods are being uploaded and are available at GitHub as well!

Offline landyvlad

  • Jr. Member
  • **
  • Posts: 271
    • Michael Reed on Facebook
    • GSX1400 Owners ORG
Re: Yet Another YouTube BBCode Tag
« Reply #192 on: January 22, 2017, 07:51:12 PM »
Thank you.
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 GL700Wing

  • Jr. Member
  • **
  • Posts: 244
  • Gender: Female
Re: Yet Another YouTube BBCode Tag
« Reply #193 on: March 13, 2017, 07:13:54 PM »
Thought I'd let you know the options for setting the width and height are not being added to the Modification settings menu in version 4.1.

In the file ./Sources/ManageSettings.php
Find:
Code: [Select]
// Mod authors, add any settings UNDER this line. Include a comma at the end of the line and don't remove this statement!!
Replace with:
Code: [Select]
// Mod authors, add any settings UNDER this line. Include a comma at the end of the line and don't remove this statement!!
array('int', 'youtube_default_width'),
array('int', 'youtube_default_height'),
'',




Offline dougiefresh

  • SMF Hero
  • ******
  • Posts: 2,351
    • XPtsp.com Community
Re: Yet Another YouTube BBCode Tag
« Reply #194 on: March 13, 2017, 08:58:09 PM »
Thought I'd let you know the options for setting the width and height are not being added to the Modification settings menu in version 4.1.
The settings are provided via a hook, which is added during installation of the mod in add_remove_hooks.php.  I've installed the mod on a clean SMF 2.0 localhost forum and can see the settings.
NOTICE:  My website is back up!

My Free Simple Machines mods on XPtsp.com and Simple Machines Customization Site!
My mods are being uploaded and are available at GitHub as well!

Offline GL700Wing

  • Jr. Member
  • **
  • Posts: 244
  • Gender: Female
Re: Yet Another YouTube BBCode Tag
« Reply #195 on: March 14, 2017, 12:41:09 AM »
Thought I'd let you know the options for setting the width and height are not being added to the Modification settings menu in version 4.1.
The settings are provided via a hook, which is added during installation of the mod in add_remove_hooks.php.  I've installed the mod on a clean SMF 2.0 localhost forum and can see the settings.
Ah - ok - must be a conflict with another mod I have installed.

Offline MULITRI

  • Semi-Newbie
  • *
  • Posts: 74
Re: Yet Another YouTube BBCode Tag
« Reply #196 on: March 25, 2017, 05:53:54 PM »
Thanks again for another fine Mod dougiefresh, i had tried another Mod and it was giving me viewing problems, yours works perfectly for now at least with the three videos i've just embedded.

Great Job one more time.... Regards

Offline jsx

  • Jr. Member
  • **
  • Posts: 260
  • Gender: Male
Re: Yet Another YouTube BBCode Tag
« Reply #197 on: May 16, 2017, 05:41:21 AM »
I’m lacking in settings on/off this modification. Such a function has a Ohara YouTube Embed modification.

Also I’m lacking the possibility of set position of the film in this modification, automatically the film is shown on the left side, would be great if it was possible to set the film in the middle. Should be choice.

Automatically long links from yt are exchanging on built films, but short links youtu.be stay as links, so here is some bug I think.

I’m lacking in function on or off automatic changing links into built films. Such a option is in Ohara YouTube Embed modification.

I think that taking the example from the other modification isn't bad.

Is there a chance of adding these suggestions to the modification?

Offline Steve

  • Support Specialist
  • SMF Hero
  • *
  • Posts: 3,783
  • Gender: Male
  • I have not yet begun to procrastinate.
Re: Yet Another YouTube BBCode Tag
« Reply #198 on: May 16, 2017, 09:02:00 AM »
Why not just use the Ohara mod?
Please do not PM me for support.

Offline jsx

  • Jr. Member
  • **
  • Posts: 260
  • Gender: Male
Re: Yet Another YouTube BBCode Tag
« Reply #199 on: May 17, 2017, 04:36:38 PM »
Why not just use the Ohara mod?

Because is lacking these functions which about I wrote.

@Steve

Automatically long links from yt are exchanging on built films, but short links youtu.be stay as links, so here is some bug I think.