-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #184 from iMattPro/updates
Twig macro for ad template
- Loading branch information
Showing
23 changed files
with
57 additions
and
61 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 2 additions & 3 deletions
5
styles/all/template/event/memberlist_view_content_append.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
{# begin ad location #} | ||
{% set PHPBB_ADS_STYLE = 'margin: 10px 0;' %} | ||
{% set PHPBB_ADS_CODE, PHPBB_ADS_ID, S_PHPBB_ADS_CENTER = AD_AFTER_PROFILE, AD_AFTER_PROFILE_ID, AD_AFTER_PROFILE_CENTER %} | ||
{% include '@phpbb_ads/phpbb_ads_default.html' %} | ||
{% import '@phpbb_ads/phpbb_ads_macro.html' as ad %} | ||
{{ ad.renderAds(AD_AFTER_PROFILE, AD_AFTER_PROFILE_ID, AD_AFTER_PROFILE_CENTER) }} | ||
{# end ad location #} |
5 changes: 2 additions & 3 deletions
5
styles/all/template/event/memberlist_view_content_prepend.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
{# begin ad location #} | ||
{% set PHPBB_ADS_STYLE = 'margin: 10px 0;' %} | ||
{% set PHPBB_ADS_CODE, PHPBB_ADS_ID, S_PHPBB_ADS_CENTER = AD_BEFORE_PROFILE, AD_BEFORE_PROFILE_ID,AD_BEFORE_PROFILE_CENTER %} | ||
{% include '@phpbb_ads/phpbb_ads_default.html' %} | ||
{% import '@phpbb_ads/phpbb_ads_macro.html' as ad %} | ||
{{ ad.renderAds(AD_BEFORE_PROFILE, AD_BEFORE_PROFILE_ID,AD_BEFORE_PROFILE_CENTER) }} | ||
{# end ad location #} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 4 additions & 3 deletions
7
styles/all/template/event/overall_footer_copyright_prepend.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
{% set PHPBB_ADS_STYLE = 'margin: 10px 0;' %} | ||
{% set PHPBB_ADS_CODE, PHPBB_ADS_ID, S_PHPBB_ADS_CENTER = AD_AFTER_FOOTER_NAVBAR, AD_AFTER_FOOTER_NAVBAR_ID, AD_AFTER_FOOTER_NAVBAR_CENTER %} | ||
{% include '@phpbb_ads/phpbb_ads_default.html' %} | ||
{# begin ad location #} | ||
{% import '@phpbb_ads/phpbb_ads_macro.html' as ad %} | ||
{{ ad.renderAds(AD_AFTER_FOOTER_NAVBAR, AD_AFTER_FOOTER_NAVBAR_ID, AD_AFTER_FOOTER_NAVBAR_CENTER) }} | ||
{# end ad location #} |
5 changes: 2 additions & 3 deletions
5
styles/all/template/event/overall_footer_page_body_after.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
{# begin ad location #} | ||
{# clear: both; is introduced because of jumpbox in user profile which is floating right #} | ||
{% set PHPBB_ADS_STYLE = 'margin: 10px 0; clear: both;' %} | ||
{% set PHPBB_ADS_CODE, PHPBB_ADS_ID, S_PHPBB_ADS_CENTER = AD_ABOVE_FOOTER, AD_ABOVE_FOOTER_ID, AD_ABOVE_FOOTER_CENTER %} | ||
{% include '@phpbb_ads/phpbb_ads_default.html' %} | ||
{% import '@phpbb_ads/phpbb_ads_macro.html' as ad %} | ||
{{ ad.renderAds(AD_ABOVE_FOOTER, AD_ABOVE_FOOTER_ID, AD_ABOVE_FOOTER_CENTER, 'clear: both;') }} | ||
{# end ad location #} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
{# begin ad location #} | ||
{% set PHPBB_ADS_STYLE = 'margin-bottom: 10px;' %} | ||
{% set PHPBB_ADS_CODE, PHPBB_ADS_ID, S_PHPBB_ADS_CENTER = AD_ABOVE_HEADER, AD_ABOVE_HEADER_ID, AD_ABOVE_HEADER_CENTER %} | ||
{% include '@phpbb_ads/phpbb_ads_default.html' %} | ||
{% import '@phpbb_ads/phpbb_ads_macro.html' as ad %} | ||
{{ ad.renderAds(AD_ABOVE_HEADER, AD_ABOVE_HEADER_ID, AD_ABOVE_HEADER_CENTER, 'margin: 0 0 10px 0;') }} | ||
{# end ad location #} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
{# begin ad location #} | ||
{% set PHPBB_ADS_STYLE = 'margin: 10px 0;' %} | ||
{% set PHPBB_ADS_CODE, PHPBB_ADS_ID, S_PHPBB_ADS_CENTER = AD_BELOW_HEADER, AD_BELOW_HEADER_ID, AD_BELOW_HEADER_CENTER %} | ||
{% include '@phpbb_ads/phpbb_ads_default.html' %} | ||
{% import '@phpbb_ads/phpbb_ads_macro.html' as ad %} | ||
{{ ad.renderAds(AD_BELOW_HEADER, AD_BELOW_HEADER_ID, AD_BELOW_HEADER_CENTER) }} | ||
{# end ad location #} |
7 changes: 4 additions & 3 deletions
7
styles/all/template/event/overall_header_page_body_before.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
{% set PHPBB_ADS_STYLE = 'margin: 10px 0;' %} | ||
{% set PHPBB_ADS_CODE, PHPBB_ADS_ID, S_PHPBB_ADS_CENTER = AD_AFTER_HEADER_NAVBAR, AD_AFTER_HEADER_NAVBAR_ID, AD_AFTER_HEADER_NAVBAR_CENTER %} | ||
{% include '@phpbb_ads/phpbb_ads_default.html' %} | ||
{# begin ad location #} | ||
{% import '@phpbb_ads/phpbb_ads_macro.html' as ad %} | ||
{{ ad.renderAds(AD_AFTER_HEADER_NAVBAR, AD_AFTER_HEADER_NAVBAR_ID, AD_AFTER_HEADER_NAVBAR_CENTER) }} | ||
{# end ad location #} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
{# begin ad location #} | ||
{% set PHPBB_ADS_STYLE = 'margin: 10px 0;' %} | ||
{% set PHPBB_ADS_CODE, PHPBB_ADS_ID, S_PHPBB_ADS_CENTER = AD_AFTER_QUICKREPLY, AD_AFTER_QUICKREPLY_ID, AD_AFTER_QUICKREPLY_CENTER %} | ||
{% include '@phpbb_ads/phpbb_ads_default.html' %} | ||
{% import '@phpbb_ads/phpbb_ads_macro.html' as ad %} | ||
{{ ad.renderAds(AD_AFTER_QUICKREPLY, AD_AFTER_QUICKREPLY_ID, AD_AFTER_QUICKREPLY_CENTER) }} | ||
{# end ad location #} |
5 changes: 2 additions & 3 deletions
5
styles/all/template/event/quickreply_editor_panel_before.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
{# begin ad location #} | ||
{% set PHPBB_ADS_STYLE = 'margin: 10px 0;' %} | ||
{% set PHPBB_ADS_CODE, PHPBB_ADS_ID, S_PHPBB_ADS_CENTER = AD_BEFORE_QUICKREPLY, AD_BEFORE_QUICKREPLY_ID, AD_BEFORE_QUICKREPLY_CENTER %} | ||
{% include '@phpbb_ads/phpbb_ads_default.html' %} | ||
{% import '@phpbb_ads/phpbb_ads_macro.html' as ad %} | ||
{{ ad.renderAds(AD_BEFORE_QUICKREPLY, AD_BEFORE_QUICKREPLY_ID, AD_BEFORE_QUICKREPLY_CENTER) }} | ||
{# end ad location #} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
{# begin ad location #} | ||
{% set PHPBB_ADS_STYLE = 'margin: 10px 0;' %} | ||
{% set PHPBB_ADS_CODE, PHPBB_ADS_ID, S_PHPBB_ADS_CENTER = AD_BEFORE_POSTS, AD_BEFORE_POSTS_ID, AD_BEFORE_POSTS_CENTER %} | ||
{% include '@phpbb_ads/phpbb_ads_default.html' %} | ||
{% import '@phpbb_ads/phpbb_ads_macro.html' as ad %} | ||
{{ ad.renderAds(AD_BEFORE_POSTS, AD_BEFORE_POSTS_ID, AD_BEFORE_POSTS_CENTER) }} | ||
{# end ad location #} |
12 changes: 6 additions & 6 deletions
12
styles/all/template/event/viewtopic_body_postrow_post_after.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
{# begin ad location #} | ||
{% if loops.postrow|length > 1 and postrow.S_FIRST_ROW %} | ||
{% set PHPBB_ADS_STYLE = 'margin: 10px 0;' %} | ||
{% set PHPBB_ADS_CODE, PHPBB_ADS_ID, S_PHPBB_ADS_CENTER = AD_AFTER_FIRST_POST, AD_AFTER_FIRST_POST_ID, AD_AFTER_FIRST_POST_CENTER %} | ||
{% include '@phpbb_ads/phpbb_ads_default.html' %} | ||
{% import '@phpbb_ads/phpbb_ads_macro.html' as ad %} | ||
{{ ad.renderAds(AD_AFTER_FIRST_POST, AD_AFTER_FIRST_POST_ID, AD_AFTER_FIRST_POST_CENTER) }} | ||
{% endif %} | ||
{# end ad location #} | ||
|
||
{# begin ad location #} | ||
{% if not postrow.S_FIRST_ROW %} | ||
{% set PHPBB_ADS_STYLE = 'margin: 10px 0;' %} | ||
{% set PHPBB_ADS_CODE, PHPBB_ADS_ID, S_PHPBB_ADS_CENTER = AD_AFTER_NOT_FIRST_POST, AD_AFTER_NOT_FIRST_POST_ID, AD_AFTER_NOT_FIRST_POST_CENTER %} | ||
{% include '@phpbb_ads/phpbb_ads_default.html' %} | ||
{% import '@phpbb_ads/phpbb_ads_macro.html' as ad %} | ||
{{ ad.renderAds(AD_AFTER_NOT_FIRST_POST, AD_AFTER_NOT_FIRST_POST_ID, AD_AFTER_NOT_FIRST_POST_CENTER) }} | ||
{% endif %} | ||
{# end ad location #} |
5 changes: 2 additions & 3 deletions
5
styles/all/template/event/viewtopic_body_topic_actions_before.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
{# begin ad location #} | ||
{% set PHPBB_ADS_STYLE = 'margin: 10px 0;' %} | ||
{% set PHPBB_ADS_CODE, PHPBB_ADS_ID, S_PHPBB_ADS_CENTER = AD_AFTER_POSTS, AD_AFTER_POSTS_ID, AD_AFTER_POSTS_CENTER %} | ||
{% include '@phpbb_ads/phpbb_ads_default.html' %} | ||
{% import '@phpbb_ads/phpbb_ads_macro.html' as ad %} | ||
{{ ad.renderAds(AD_AFTER_POSTS, AD_AFTER_POSTS_ID, AD_AFTER_POSTS_CENTER) }} | ||
{# end ad location #} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,11 @@ | ||
{% import '@phpbb_ads/phpbb_ads_macro.html' as ad %} | ||
<script> | ||
(function($, window, document, phpbb) { | ||
'use strict'; | ||
|
||
$(window).on('load', function() { | ||
document.cookie = '{{ POP_UP_COOKIE_NAME }}=true; expires={{ POP_UP_COOKIE_EXPIRES }}; path={{ POP_UP_COOKIE_PATH }}'; | ||
phpbb.alert('{{ lang('ADVERTISEMENT')|upper|e('js') }}', `{% include '@phpbb_ads/phpbb_ads_default.html' %}`); | ||
phpbb.alert('{{ lang('ADVERTISEMENT')|upper|e('js') }}', `{{ ad.renderAds(AD_POP_UP, AD_POP_UP_ID, AD_POP_UP_CENTER, 'margin: 0;') }}`); | ||
}); | ||
})(jQuery, window, document, phpbb); | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{% macro renderAds(PHPBB_ADS_CODE, PHPBB_ADS_ID, S_PHPBB_ADS_CENTER = false, PHPBB_ADS_STYLE = '') %} | ||
{% if PHPBB_ADS_CODE %} | ||
<div class="phpbb-ads{% if S_PHPBB_ADS_CENTER %} phpbb-ads-center{% endif %}" style="{{ PHPBB_ADS_STYLE }}" data-phpbb-ads-id="{{ PHPBB_ADS_ID|e('html_attr') }}"> | ||
{{ PHPBB_ADS_CODE }} | ||
</div> | ||
{% endif %} | ||
{% endmacro %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,7 @@ | ||
.phpbb-ads { | ||
margin: 10px 0; | ||
} | ||
|
||
.phpbb-ads-center { | ||
text-align: center; | ||
} | ||
|