phpBB Forum - Logs

Everything You Need to Know About the Website
User avatar
Fabian
Verified

Photographer
Main Sport: Kitesurfing
Location: Belgium
Homespot: Oostende
Favorite Spot: Viana do Castelo
Favorite Brand: Eleveight
Kite-Range: Can't Kite atm
Contact:
phpBB Forum - Logs

Post by Fabian »

phpBB - Flat-Forum bulletin board software solution
phpBB is a free flat-forum bulletin board software solution that can be used to stay in touch with a group of people or can power your entire website. With an extensive database of user-created extensions and styles database containing hundreds of style and image packages to customise your board, you can create a very unique forum in minutes.

No other bulletin board software offers a greater complement of features, while maintaining efficiency and ease of use. Best of all, phpBB is completely free. We welcome you to test it for yourself today. If you have any questions please visit our Community Forum where our staff and members of the community will be happy to assist you with anything from configuring the software to modifying the code for individual needs. Learn more about phpBB.

Style
I'm using the fundament of phpbb MyInvision which is a nice sleak blue style, suit\'s any forum, looks very professional and very easy to use.

Installed Plugins Date: 23.01.2025
ACP Add User
Advanced BBCode Box
Advertisement Management
Attachment Fluff Buster
Board3 Portal
Board Announcements
Calendar
Collapsible Forum Categories
Contact profile field icon
DSGVO/GDPR Private Download´s
External Links Open in New Window
External Link In New Window by Martin
Favicon
hCaptcha
Hide Bots
Inline images in attachment
Lightbox
National Flags
New Topics Need Approval
No Custom Profile for guests
phpBB Media Embed PlugIn
phpBB Topic Prefixes
phpBB WordPress
Private Message Box Status Bars
Scheduled Maintenance
Share On
Simple mentions
Thanks for posts
Topic Template
Verified Profiles
VigLink
Recent Topics
Quick-Edit
Dark Mode
Enjoying the content?
Help keep my caffeine buzz alive! Buy me a coffee!🤙
Image
User avatar
Fabian
Verified

Photographer
Main Sport: Kitesurfing
Location: Belgium
Homespot: Oostende
Favorite Spot: Viana do Castelo
Favorite Brand: Eleveight
Kite-Range: Can't Kite atm
Contact:
Re: phpBB Forum - Logs

Post by Fabian »

- Updated phpBB to Version 3.3.12
- Installed Thanks for posts
- Customised Thanks for posts language/en/thanks_mod.php? and Changed Thanks/Remove to Like/Unlike

Code: Select all

<?php
/**
 *
 * Thanks For Posts.
 * Adds the ability to thank the author and to use per posts/topics/forum rating system based on the count of thanks.
 * An extension for the phpBB Forum Software package.
 *
 * @copyright (c) 2020, rxu, https://www.phpbbguru.net
 * @license GNU General Public License, version 2 (GPL-2.0)
 *
 */

/**
* DO NOT CHANGE
* 20221102 - rudi_br: Changed the "Thanks" concept to "Like" in stead
*/
if (!defined('IN_PHPBB'))
{
	exit;
}

if (empty($lang) || !is_array($lang))
{
	$lang = [];
}

// DEVELOPERS PLEASE NOTE
//
// All language files should use UTF-8 as their encoding and the files must not contain a BOM.
//
// Placeholders can now contain order information, e.g. instead of
// 'Page %s of %s' you can (and should) write 'Page %1$s of %2$s', this allows
// translators to re-order the output of data while ensuring it remains correct
//
// You do not need this where single placeholders are used, e.g. 'Message %d' is fine
// equally where a string contains only two placeholders which are used to wrap text
// in a url you again do not need to specify an order e.g., 'Click %sHERE%s' is fine
//
// Some characters you may want to copy&paste:
// ’ » “ ” …
//

$lang = array_merge($lang, [
	'CLEAR_LIST_THANKS'			=> 'Clear Likes List',
	'CLEAR_LIST_THANKS_CONFIRM'	=> 'Do you really want to clear the user`s Likes List?',
	'CLEAR_LIST_THANKS_GIVE'	=> 'List of likes issued by the user was cleared.',
	'CLEAR_LIST_THANKS_POST'	=> 'List of likes in the message was cleared.',
	'CLEAR_LIST_THANKS_RECEIVE'	=> 'List of likes obtained by the user was cleared.',

	'DISABLE_REMOVE_THANKS'		=> 'Deleting likes has been disabled by the administrator',

	'GIVEN'						=> 'Has&nbsp;liked',
	'GLOBAL_INCORRECT_THANKS'	=> 'You cannot give likes for a Global Announcement that has no reference to a particular forum.',
	'GRATITUDES'				=> 'Likes list',

	'INCORRECT_THANKS'			=> 'Invalid like',

	'JUMP_TO_FORUM'				=> 'Jump to forum',
	'JUMP_TO_TOPIC'				=> 'Jump to topic',

	'FOR_MESSAGE'				=> ' for post',
	'FURTHER_THANKS'     	    => [
		1 => ' and one more user',
		2 => ' and %d more users',
	],

	'NO_VIEW_USERS_THANKS'		=> 'You are not authorised to view the Likes List.',

	'NOTIFICATION_THANKS_GIVE'	=> [
		1 => '%1$s <strong>liked </strong> your post:',
		2 => '%1$s <strong>liked</strong> your post:',
	],
	'NOTIFICATION_THANKS_REMOVE'=> [
		1 => '<strong>Removed like</strong> from %1$s for the post:',
		2 => '<strong>Removed like</strong> from %1$s for the post:',
	],
	'NOTIFICATION_TYPE_THANKS_GIVE'		=> 'Someone liked your post',
	'NOTIFICATION_TYPE_THANKS_REMOVE'	=> 'Someone removed a like from your post',

	'RECEIVED'					=> 'Been&nbsp;liked',
	'REMOVE_THANKS'				=> 'Remove your like from post by: ',
	'REMOVE_THANKS_CONFIRM'		=> 'Are you sure you want to remove your like?',
	'REMOVE_THANKS_SHORT'		=> 'Remove like',
	'REPUT'						=> 'Rating',
	'REPUT_TOPLIST'				=> 'Like Toplist — %d',
	'RATING_LOGIN_EXPLAIN'		=> 'You are not authorised to view the toplist.',
	'RATING_NO_VIEW_TOPLIST'	=> 'You are not authorised to view the toplist.',
	'RATING_VIEW_TOPLIST_NO'	=> 'Toplist is empty or disabled by administrator',
	'RATING_FORUM'				=> 'Forum',
	'RATING_POST'				=> 'Post',
	'RATING_TOP_FORUM'			=> 'Rating forums',
	'RATING_TOP_POST'			=> 'Rating posts',
	'RATING_TOP_TOPIC'			=> 'Rating topics',
	'RATING_TOPIC'				=> 'Topic',

	'THANK'						=> 'time',
	'THANK_FROM'				=> 'from',
	'THANK_TEXT_1'				=> 'These users liked ',
	'THANK_TEXT_2'				=> '&apos;s post: ',
	'THANK_TEXT_2PL'			=> '&apos;s post (total %d):',
	'THANK_POST'				=> 'Like the post by: ',
	'THANK_POST_SHORT'			=> 'Like',
	'THANKS'					=> [
		1	=> '%d time',
		2	=> '%d times',
	],
	'THANKS_BACK'				=> 'Return',
	'THANKS_INFO_GIVE'			=> 'You have just liked the post.',
	'THANKS_INFO_REMOVE'		=> 'You have just removed your like.',
	'THANKS_LIST'				=> 'View/Close list',
	'THANKS_PM_MES_GIVE'		=> 'has liked your post',
	'THANKS_PM_MES_REMOVE'		=> 'has removed like for the post',
	'THANKS_PM_SUBJECT_GIVE'	=> 'Like the post',
	'THANKS_PM_SUBJECT_REMOVE'	=> 'Removed like for the post',
	'THANKS_USER'				=> 'List of likes',
	'TOPLIST'					=> 'Posts toplist',
]);
- Solved the Lightbox issue where the Lightbox appears at the top by adding the following code to phpBB/Styles/YourStyle/overall_footer

Code: Select all

$(".postimage").on("click", function(event) {
	var topg = $($(this.getBoundingClientRect().top));
	 var t = parseInt(topg[Object.keys(topg)[0]]);
	$("#lightbox").animate({top: t+'px'}, 100);
});
- Customised the Verified Profiles Logo
- Customised the Verified Profiles Code which allows to show the sign at
  • Member List
  • Profile
  • Forum Team
  • Group Member List
  • Post
  • Private messages

Code: Select all

<?php

/**
 * @package Verified Profiles
 * @copyright (c) 2023 Daniel James
 * @license http://opensource.org/licenses/gpl-license.php GNU Public License
 */

namespace danieltj\verifiedprofiles\event;

use phpbb\request\request;
use phpbb\template\template;
use danieltj\verifiedprofiles\core\functions;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;

class listener implements EventSubscriberInterface {

	/**
	 * @var request
	 */
	protected $request;

	/**
	 * @var template
	 */
	protected $template;

	/**
	 * @var functions
	 */
	protected $functions;

	/**
	 * Constructor.
	 */
	public function __construct( request $request, template $template, functions $functions ) {

		$this->request = $request;
		$this->template = $template;
		$this->functions = $functions;

	}

	/**
	 * You're all invited.
	 */
	static public function getSubscribedEvents() {

		return [
			'core.user_setup'								=> 'add_languages',
			'core.page_header_after'						=> 'page_header_after',
			'core.acp_users_modify_profile'					=> 'acp_modify_profile',
			'core.acp_users_profile_modify_sql_ary'			=> 'acp_user_sql_ary',
			'core.viewtopic_modify_post_row'				=> 'viewtopic_add_template_vars',
			'core.memberlist_prepare_profile_data'			=> 'memberlist_prepare_profile_data',
			'core.memberlist_view_profile'					=> 'memberlist_profile_template_vars',
			'core.memberlist_team_modify_template_vars'		=> 'memberlist_team_template_vars',
			'core.ucp_pm_view_messsage'						=> 'ucp_message_template_vars',
			'core.viewonline_modify_user_row'				=> 'viewonline_modify_template_vars'
		];

	}

	/**
	 * Add languages.
	 */
	public function add_languages( $event ) {

		$lang_set_ext = $event[ 'lang_set_ext' ];

		$lang_set_ext[] = [
			'ext_name' => 'danieltj/verifiedprofiles',
			'lang_set' => 'verifiedprofiles',
		];

		$event[ 'lang_set_ext' ] = $lang_set_ext;

	}

	/**
	 * Add badge for logged in and verified user.
	 */
	public function page_header_after( $event ) {

		global $user;

		if ( isset( $user->data[ 'user_id' ] ) ) {

			$verified = $this->functions->is_user_verified( $user->data[ 'user_id' ] );

			$this->template->assign_vars( [
				'U_CURRENT_USER_VERIFIED' => $verified
			] );

		}

	}

	/**
	 * Modify user data.
	 */
	public function acp_modify_profile( $event ) {

		$verified = $this->request->variable( 'user_verified', (int) $event[ 'user_row' ][ 'user_verified' ] );

		$event[ 'data' ] = array_merge( $event[ 'data' ], [
			'user_verified' => $verified
		] );

		$this->template->assign_vars( [
			'USER_VERIFIED' => $verified
		] );

	}

	/**
	 * SQL stuff, apparently.
	 */
	public function acp_user_sql_ary( $event ) {

		$event[ 'sql_ary' ] = array_merge( $event[ 'sql_ary' ], [
			'user_verified' => $event[ 'data' ][ 'user_verified' ],
		] );

	}


	/**
	 * Add view topic template variable.
	 */
	public function viewtopic_add_template_vars( $event ) {

		$user_id = $event[ 'poster_id' ];

		$verified = $this->functions->is_user_verified( $user_id );

		$event[ 'post_row' ] = array_merge( $event[ 'post_row' ], [
			'USER_VERIFIED' => $verified
		] );

	}

	/**
	 * Add memberlist template variable.
	 */
	public function memberlist_prepare_profile_data( $event ) {

		$user_name = $event[ 'template_data' ][ 'USERNAME' ];

		$verified = $this->functions->is_user_verified( $user_name, false );

		$event[ 'template_data' ] = array_merge( $event[ 'template_data' ], [
			'USER_VERIFIED' => $verified
		] );

	}

	/**
	 * Add profile template variable.
	 */
	public function memberlist_profile_template_vars( $event ) {

		$user_id = $event[ 'member' ][ 'user_id' ];

		$verified = $this->functions->is_user_verified( $user_id );

		$this->template->assign_vars( [
 			'USER_VERIFIED' => $verified
 		] );

	}

	/**
	 * Add the team template variable.
	 */
	public function memberlist_team_template_vars( $event ) {

		$user_id = $event[ 'template_vars' ][ 'USER_ID' ];

		$verified = $this->functions->is_user_verified( $user_id );

		$event[ 'template_vars' ] = array_merge( $event[ 'template_vars' ], [
			'USER_VERIFIED' => $verified
		] );

	}

	/**
	 * Add UCP PM template variable.
	 */
	public function ucp_message_template_vars( $event ) {

		$user_id = $event[ 'user_info' ][ 'user_id' ];

		$verified = $this->functions->is_user_verified( $user_id );

		$event[ 'msg_data' ] = array_merge( $event[ 'msg_data' ], [
 			'USER_VERIFIED' => $verified
 		] );

	}


	/**
	 * Add view online template variable.
	 */
	public function viewonline_modify_template_vars( $event ) {

		$user_id = $this->functions->get_user_id_by_username( $event[ 'template_row' ][ 'USERNAME' ] );

		$verified = $this->functions->is_user_verified( $user_id );

		$event[ 'template_row' ] = array_merge( $event[ 'template_row' ], [
			'USER_VERIFIED' => $verified,
  		] );

	}

}
User avatar
Fabian
Verified

Photographer
Main Sport: Kitesurfing
Location: Belgium
Homespot: Oostende
Favorite Spot: Viana do Castelo
Favorite Brand: Eleveight
Kite-Range: Can't Kite atm
Contact:
Re: phpBB Forum - Logs

Post by Fabian »

Improved the code for Lightbox and Alert Popup by changing the overall_footer.php

Disabled the following code by with /* and */

Code: Select all

// Lightbox scroll fix 2:
// remove /* and */ to activate, also more below to complete ...
/*
$(".postimage").on("click", function(event) {
	var topg = $($(this.getBoundingClientRect().top));
	 var t = parseInt(topg[Object.keys(topg)[0]]);
	$("#lightbox").animate({top: t+'px'}, 100);
});
*/
searched for

Code: Select all

[code]if(window.self !== window.top){
added right behind the following code:

Code: Select all

 // Lightbox scroll fix
  $(".postimage").on("click", function(e){
	var topg = $($(this.getBoundingClientRect().top));
	 var t = parseInt(topg[Object.keys(topg)[0]]);
	$("#lightbox").animate({top: t+'px'}, 100);
  });
 // #phpbb_alert scroll fix
 $("#add_files").on("click", function(e) {
	var topg = $($(this.getBoundingClientRect().top));
	 var t = parseInt(topg[Object.keys(topg)[0]]);
	$("#phpbb_alert").animate({top: t+'px'}, 100);
 });
User avatar
Fabian
Verified

Photographer
Main Sport: Kitesurfing
Location: Belgium
Homespot: Oostende
Favorite Spot: Viana do Castelo
Favorite Brand: Eleveight
Kite-Range: Can't Kite atm
Contact:
Re: phpBB Forum - Logs

Post by Fabian »

Improved the code for Lightbox and Alert Popups by changing the overall_footer.php again

Code: Select all

// Lightbox scroll fix
  $(".postimage").on("click", function(e){
	var topg = $($(this.getBoundingClientRect().top));
	 var t = parseInt(topg[Object.keys(topg)[0]]);
	$("#lightbox").animate({top: t+'px'}, 100);
  });
 // #phpbb_alert scroll fix
 $("#add_files").on("click", function(e) {
	var topg = $($(this.getBoundingClientRect().top));
	 var t = parseInt(topg[Object.keys(topg)[0]]);
	$("#phpbb_alert").animate({top: t+'px'}, 100);
 });
 
$("#quickmod,.bookmark-link").on("click", function(event) {
var pos = window.scrollY + document.querySelector('#quickmod').getBoundingClientRect().top;
  $(parent.window).scrollTop( 200 );
$("#darkenwrapper").on("click", function() {
  $(parent.window).scrollTop( pos );
});
 $("#darken").on("click", function() {
  $(parent.window).scrollTop( pos );
});
});

Replaced by

Code: Select all

// Lightbox scroll fix, #phpbb_confirm scroll fix, #phpbb_alert scroll fix
$(".postimage,.dropdown-contents li a,#add_files").on("click", function(e) {
  var g = $($(this.getBoundingClientRect().top));
  var t = parseInt(g[Object.keys(g)[0]]);
  $("#phpbb_alert,#phpbb_confirm,#lightbox").animate({top: t+'px'}, 100);
});
User avatar
Fabian
Verified

Photographer
Main Sport: Kitesurfing
Location: Belgium
Homespot: Oostende
Favorite Spot: Viana do Castelo
Favorite Brand: Eleveight
Kite-Range: Can't Kite atm
Contact:
Re: phpBB Forum - Logs

Post by Fabian »

Added new Custom-Profile-fields
- Kite-Range
- Wing-Range
- Sail-Range

Added InlineCode and Icon to BB's
User avatar
Fabian
Verified

Photographer
Main Sport: Kitesurfing
Location: Belgium
Homespot: Oostende
Favorite Spot: Viana do Castelo
Favorite Brand: Eleveight
Kite-Range: Can't Kite atm
Contact:
Re: phpBB Forum - Logs

Post by Fabian »

Due to some script errors I had to remove External Links in New Window, which got replaces by External Link In New Window by Martin.

New plugin offers less configuration but works without Java, which causes less issues
User avatar
Fabian
Verified

Photographer
Main Sport: Kitesurfing
Location: Belgium
Homespot: Oostende
Favorite Spot: Viana do Castelo
Favorite Brand: Eleveight
Kite-Range: Can't Kite atm
Contact:
Re: phpBB Forum - Logs

Post by Fabian »

Duo to the Word Press w3All phpbb integration update to version 2.8.7 I had to change the overall_footer.html.

Code: Select all

<!-- IF not S_IS_BOT -->
<script type="text/javascript">
// START MANDATORY CHANGES
var w3allAllowDomain = 'https://surferparadise.de'; // MANDATORY! Set/Change this value to fit the absolute domain or subdomain URL where the phpBB reside (DO NOT ADD/INCLUDE final slash here. Eg https://forum.myw3host.com)
var wordpress_url_page_forum = 'https://surferparadise.de/forum'; // MANDATORY! (DO NOT ADD/INCLUDE final slash here) Url that point to the wordpress forum page
var w3all_custom_wp_w3fancyurl = 'w3'; // MANDATORY! If changed the default w3 to have 'fancy URL' query string into the related WP plugin admin option, then change this value to match the same as it is the fancy URL setting
// END MANDATORY CHANGES

var w3allappend = false;
var w3all_BoardUrl = "{BOARD_URL}";
w3all_BoardUrl = w3all_BoardUrl.slice(-1) != '/' ? w3all_BoardUrl + '/' : w3all_BoardUrl;

function w3allNormalize_phpBBUrl(href){
// try to 'normalize' passed relative links: needed all after last slash /
// exception are kind of passed urls like: /phpbb323/app.php/help/faq
// and if SEO mods that may assign some different kind of links values
// by the way, SEO absolute urls http(s) should be (all?) already considered here ...
var phpbbRUrl = href.split(/^.+?(\w+.+)$/);
if( href.indexOf('app.php') > -1 ){ // since the previous do not 'normalize' this type of passed value (and may miss something else)
   phpbburl = href.split(/^.+?(app\.php.+)$/);
   w3allappend = phpbburl[1];
 } else if ( /^https?/ig.exec(href) !== null ){ // absolute http(s) passed: try to 'normalize' a possible seo mod
   phpbburl = href.split(w3all_BoardUrl);
   w3allappend = phpbburl[1];
 } else if ( phpbbRUrl[1] && phpbbRUrl[1].length > 1 ){ // 'normalize' any other
   w3allappend = phpbbRUrl[1];
 } else if ( phpbbRUrl[0].length > 1 ){
   w3allappend = phpbbRUrl[0];
   }
// ... if still not normalized
if(/^\W/ig.exec(w3allappend) !== null){
  w3allappend = w3allappend.split(/^.+?(\w+.+)$/);
  if(w3allappend[1]){
    w3allappend = w3allappend[1];
  }
  if ( w3allappend[1] && w3allappend[1].charAt(0) == '/' ){
    w3allappend = w3allappend[1].substr(1);
  }
}
return w3allappend;
}

$(document).on("click", "a", function(e) {
  var href = $(this).attr("href");
  var w3all_onview_attach = (href.indexOf('file.php') > -1);

if( this.getAttribute('target') !== null ){
  e.preventDefault();
  window.open(href,'_blank');
 return;
}

if ( href.charAt(0) == '#' || href.indexOf('\./download\/file\.php') > -1 ){ return; }

// external link?
if ((this.href.indexOf(w3all_BoardUrl) > -1) != true){
 if(/^(f|ht)tps?:\/\//i.test(href))
 {
  e.preventDefault();
  parent.location.replace(href);
 return;
 }
}
// admin ACP?
if ( /\/adm\//ig.exec(href) !== null )
{
  e.preventDefault();
  parent.location.replace(href);
  return;
}

if ( href.indexOf('view=print') > -1 !== false || /\/adm\//ig.exec(href) !== null )
{
 e.preventDefault();
 window.open(href,'_blank');
 return;
}

if ( href.indexOf('quickmod') > -1 ) {
   w3allNOappend = true;
    return;
}

if( /posting\.php\?mode=[reply|post|bump]/ig.exec(href) !== null || /mcp\.php\?/ig.exec(href) !== null ){
  w3allNOappend = true;
}

if(w3all_onview_attach !== false){
 e.preventDefault();
 window.open(href,'_blank');
 return;
}

w3allappend = w3allNormalize_phpBBUrl(href);

if ('parentIFrame' in window){
  if( typeof w3allNOappend == 'undefined' || w3allNOappend == false ){
    window.parentIFrame.sendMessage(w3allappend);
  }
 }
});

// w3all UPDATES for phpBB events

if(window.self !== window.top){

// Lightbox scroll fix, #phpbb_confirm scroll fix, #phpbb_alert scroll fix
$(".postimage,.dropdown-contents li a,#add_files").on("click", function(e) {
  var g = $($(this.getBoundingClientRect().top));
  var t = parseInt(g[Object.keys(g)[0]]);
  $("#phpbb_alert,#phpbb_confirm,#lightbox").animate({top: t+'px'}, 100);
});

var pmn = "{PRIVATE_MESSAGE_COUNT}";
var w3all_phpbb_u_logged = "{S_USER_LOGGED_IN}";

var hash = window.location.hash.substr(1);

if( hash == 'unread' ){
 var postN = 1;
 $( "h3 > a" ).each(function (e) {
  ns = this.href.split('#p');
  if( typeof ns != 'undefined' && /viewtopic.php\?p=/ig.exec(this.href) != null ){
   if(ns[1] > postN){
     w3lh = ns[1];
    }
  }
 })

 if( typeof w3lh != 'undefined' ){
  hash = "p" + w3lh;
 }
}

$( document ).ready(function() {
 // fix vertical iframe centered in certain cases
   var bd = document.getElementsByTagName("body");
   var t = document.getElementById(bd[0].getAttribute("id"));

   if( typeof t != 'undefined' || t != false )
   {
     t.setAttribute("style", "position:fixed;top:0;left:0;width:100%");
     //document.getElementById("wrap").setAttribute("style", "position:relative;top:0%;min-height:100%;margin:10px");
   }
});

if( typeof w3allNOappend == 'undefined' || w3allNOappend == false )
{
 $( window ).on( "load", function()
 {
  location.hash = "#" + hash;
  if( location.hash.length < 2 ){
    var w3all_lochash = 0;
  } else {
    var w3all_lochash = $(window.location.hash).offset().top;
  }

  var w3appendevents = '#w3all_phpbbpmcount=' + pmn + '#w3all_phpbb_u_logged=' + w3all_phpbb_u_logged + '#w3all_lochash=' + w3all_lochash;

  window.parent.postMessage(w3appendevents, w3allAllowDomain);

 });
}
} // END if(window.self !== window.top){
</script>
<div data-iframe-size="" style="height:0;max-height:0;border:0;margin:0;padding:0;"><div>
<script type="text/javascript" src="https://forum.surferparadise.de/iframe-resizer.child.js"></script>
<!-- ENDIF -->

Post Reply