Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
S
sg_youtube
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Model registry
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
TYPO3
sg_youtube
Commits
c6b962df
Commit
c6b962df
authored
1 year ago
by
Georgi
Browse files
Options
Downloads
Patches
Plain Diff
[BUGFIX] Improve README.md
parent
ad785c95
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
README.md
+22
-15
22 additions, 15 deletions
README.md
with
22 additions
and
15 deletions
README.md
+
22
−
15
View file @
c6b962df
...
...
@@ -26,20 +26,6 @@ plugin.tx_sgyoutube {
}
```
### JavaScript integration
Note: You can still use the old implementation of the lightbox without the new lightbox by
importing
```youtubeLightbox```
instead of
```sgYoutubeLightbox```
.
Install the
**project_theme_lightbox**
extension and integrate it to your main theme. Import the
file
```sgYoutubeLight.js```
to your JavaScript and initilize it.
```
javascript
import
SgVideoLightbox
from
'
sgYoutubeLightbox
'
;
new
SgVideoLightbox
();
```
### Registration for more than the free 10.000 quotas per day
It's not 1 quota per 1 API call. Each API has its own costs, which can be seen in the link below.
...
...
@@ -71,7 +57,28 @@ If the `?disableYoutubeCache=1` parameter is added to the URL, this cache will b
You can use a different API key for specific sites. You can implement a TypoScript page uid check and just change the
key from the "TypoScript integration" topic.
### Compiling CSS/JS assets
### Making changes in the JavaScript/CSS
We are shippning the extension with source files and already minified assets. By default
we the minified assets are loaded in the Layout, so that the extension works out of the box just with plug and play.
Should you want to change this behavior you can do to the following:
-
Override the layout file in TypoScript
```
view {
layoutRootPath = EXT:project_theme/Resources/Private/Layouts/SgYouTube/
}
```
-
Remove the CSS or JavaScript loading code from the layout
```
<div class="tx-sg-youtube">
<f:asset.script identifier="sgVideoJs" src="EXT:sg_youtube/Resources/Public/JavaScript/Dist/main.bundled.min.js" />
<f:render section="main"/>
</div>
```
-
Import the CSS or JavaScript source files in your respective asset pipeline
### Compiling CSS/JS assets with SGC
-
Install the sgalinski/sgc-core library via composer
-
Add the sg-youtube extension paths in the .sgc-config.json
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment