TradeExpert gurus can you help

Discussion Of All Legal Topics Is Fine Anything Goes. Be Respectful of Others. No Personal Information or Attacks.
All Traffic, Link, Banner, Push Notification and Advertising, Offers & Requests Here,.
Domains & Websites For Sale and Requests Here.
Keep One thread per person & No More Than 1 Weekly Bump.
Post Reply
User avatar
TheButcher
Administrator
Administrator
Posts: 17530
Joined: February 2nd, 2018, 11:48 am
Title: I like weekends
Referrals: 1
Contact:

TradeExpert gurus can you help

#1

Post by TheButcher » October 18th, 2023, 3:38 pm

I can't get the TradeExpert.net toplist code to work on the forum, it's phpBB and I add it to the overall_footer.html but it won't work.

So I created a page toplist.php it works fine on there.

Here is the code

Code: Select all

<!-- INCLUDEPHP ./toplist.php -->

Any ideas, suggestions or outright code would be much appreciated.

User avatar
tacnet
Board Sponsor
Board Sponsor
Posts: 3641
Joined: February 22nd, 2019, 7:21 pm
Referrals: 9
Contact:

#2

Post by tacnet » October 18th, 2023, 3:53 pm

not sure how the phpBB templates work but normally its just

Code: Select all

<?php include './toplist.php';?>

User avatar
TheButcher
Administrator
Administrator
Posts: 17530
Joined: February 2nd, 2018, 11:48 am
Title: I like weekends
Referrals: 1
Contact:

#3

Post by TheButcher » October 18th, 2023, 5:01 pm

tacnet wrote: ↑
October 18th, 2023, 3:53 pm
not sure how the phpBB templates work but normally its just

Code: Select all

<?php include './toplist.php';?>
That won't show up, I messed around called the full path to the toplist.php and that did not work either, I am stumped.

User avatar
tacnet
Board Sponsor
Board Sponsor
Posts: 3641
Joined: February 22nd, 2019, 7:21 pm
Referrals: 9
Contact:

#4

Post by tacnet » October 18th, 2023, 5:07 pm

Thinking about it, toplist.php is already in the root foder so have you tried

Code: Select all

<?php include 'toplist.php';?>

User avatar
TheButcher
Administrator
Administrator
Posts: 17530
Joined: February 2nd, 2018, 11:48 am
Title: I like weekends
Referrals: 1
Contact:

#5

Post by TheButcher » October 18th, 2023, 5:12 pm

tacnet wrote: ↑
October 18th, 2023, 5:07 pm
Thinking about it, toplist.php is already in the root foder so have you tried

Code: Select all

<?php include 'toplist.php';?>

It still does not show up, the code is still on the page.

Peace.

User avatar
tacnet
Board Sponsor
Board Sponsor
Posts: 3641
Joined: February 22nd, 2019, 7:21 pm
Referrals: 9
Contact:

#6

Post by tacnet » October 18th, 2023, 5:47 pm

ok im a bit stumped here

I just uploaded your index.php and toplist.php to here https://www.tacamateurs.com/sponsorchat/ and its working fine ?

Will think more on it. It might be something for phpBB support

User avatar
TheButcher
Administrator
Administrator
Posts: 17530
Joined: February 2nd, 2018, 11:48 am
Title: I like weekends
Referrals: 1
Contact:

#7

Post by TheButcher » October 18th, 2023, 5:49 pm

tacnet wrote: ↑
October 18th, 2023, 5:47 pm
ok im a bit stumped here

I just uploaded your index.php and toplist.php to here https://www.tacamateurs.com/sponsorchat/ and its working fine ?

Will think more on it. It might be something for phpBB support
Yes I see it wonder why the thing does not work on the board, hmmm.

User avatar
TheButcher
Administrator
Administrator
Posts: 17530
Joined: February 2nd, 2018, 11:48 am
Title: I like weekends
Referrals: 1
Contact:

#8

Post by TheButcher » October 18th, 2023, 5:58 pm

tacnet wrote: ↑
October 18th, 2023, 5:47 pm
Will think more on it. It might be something for phpBB support
I asked back in 2019 and got it to work, when I tried the same code this time round not getting very far

I bumped my thread over there a little while ago and someone replied.

"We are pleased to announce the release of phpBB 3.3.8 “Bertie: Beer and Summer”. This version is a maintenance release of the 3.3.x branch which marks the PHP and INCLUDEPHP template functions as deprecated in order for them to be removed in a future release.

We have also decided to deprecate the use of the PHP and INCLUDEPHP as part of the phpBB template syntax. These are rarely used, have a high potential to cause issues or be used incorrectly, and also have not been recommended for a longer period of time. These functions have now been marked as deprecated and will no longer be available in the next feature release of phpBB, i.e. 3.4.0 or 4.0.0.

- The phpBB Team
"


If I turn on php include here on the phpbb script the board goes blank.

This setting in the phpBB admin panel:
"Allow php in templates:
If this option is enabled, PHP and INCLUDEPHP statements will be recognised and parsed in templates.
"

This might explain it.

User avatar
tacnet
Board Sponsor
Board Sponsor
Posts: 3641
Joined: February 22nd, 2019, 7:21 pm
Referrals: 9
Contact:

#9

Post by tacnet » October 18th, 2023, 6:07 pm

ok whatever you did just kicked me out of the forum because it wasnt forwarding the https so undo whatever that was and I'll show you a much easier way to do it

So where you want your toplist to appear, take out the include statement and just have

Code: Select all

<center id="toplist"></center>
Then at the bottom of the page, just before your </script> tag add :-

Code: Select all

$('#toplist').load('toplist.php');
And that should work fine. Ive done the same here https://www.tacamateurs.com/sponsorchat/index2.php

User avatar
TheButcher
Administrator
Administrator
Posts: 17530
Joined: February 2nd, 2018, 11:48 am
Title: I like weekends
Referrals: 1
Contact:

#10

Post by TheButcher » October 18th, 2023, 6:18 pm

tacnet wrote: ↑
October 18th, 2023, 6:07 pm
ok whatever you did just kicked me out of the forum because it wasnt forwarding the https so undo whatever that was and I'll show you a much easier way to do it

So where you want your toplist to appear, take out the include statement and just have

Code: Select all

<center id="toplist"></center>
Then at the bottom of the page, just before your </script> tag add :-

Code: Select all

$('#toplist').load('toplist.php');
And that should work fine. Ive done the same here https://www.tacamateurs.com/sponsorchat/index2.php


I tried changing the code and everytime you make changes to phpBB you have to clear the cache, sorry it kicked you out.

Okay I added this

Code: Select all

<center id="toplist"></center>

Not sure which

</script> tag you mean, there are 27 of them on the page.

Peace

User avatar
tacnet
Board Sponsor
Board Sponsor
Posts: 3641
Joined: February 22nd, 2019, 7:21 pm
Referrals: 9
Contact:

#11

Post by tacnet » October 18th, 2023, 6:25 pm

Just insert it at the bottom of the javascript your already have at the bottom of the page ie

Code: Select all

<script>

(function($) { // Avoid conflicts with other libraries

'use strict';

$(function() {
	var settings = {
			min: 200,
			scrollSpeed: 400
		},
		toTop = $('.scroll-btn'),
		toTopHidden = true;

	$(window).scroll(function() {
		var pos = $(this).scrollTop();
		if (pos > settings.min && toTopHidden) {
			toTop.stop(true, true).fadeIn();
			toTopHidden = false;
		} else if(pos <= settings.min && !toTopHidden) {
			toTop.stop(true, true).fadeOut();
			toTopHidden = true;
		}
	});

	toTop.bind('click touchstart', function() {
		$('html, body').animate({
			scrollTop: 0
		}, settings.scrollSpeed);
	});
});

})(jQuery);

	
	$('#toplist').load('toplist.php');
	
	
</script>

If you view source of this page https://www.tacamateurs.com/sponsorchat/index2.php, you'll see it

User avatar
TheButcher
Administrator
Administrator
Posts: 17530
Joined: February 2nd, 2018, 11:48 am
Title: I like weekends
Referrals: 1
Contact:

#12

Post by TheButcher » October 18th, 2023, 6:32 pm

I added it

Code: Select all

<!-- INCLUDEJS ajax.js -->
<!-- IF S_ALLOW_CDN -->
	<script type="text/javascript">
		(function($){
			var $fa_cdn = $('head').find('link[rel="stylesheet"]').first(),
				$span = $('<span class="fa" style="display:none"></span>').appendTo('body');
			if ($span.css('fontFamily') !== 'FontAwesome' ) {
				$fa_cdn.after('<link href="{T_ASSETS_PATH}/css/font-awesome.min.css" rel="stylesheet">');
				$fa_cdn.remove();
			}
			$span.remove();
		})(jQuery);
$('#toplist').load('toplist.php');
	</script>
<!-- ENDIF -->

<!-- IF S_COOKIE_NOTICE -->

User avatar
tacnet
Board Sponsor
Board Sponsor
Posts: 3641
Joined: February 22nd, 2019, 7:21 pm
Referrals: 9
Contact:

#13

Post by tacnet » October 18th, 2023, 6:38 pm

I cant see it on your index page ??? ok lets make it even easier, just before your </body> tag add this :-

Code: Select all

<script>
$('#toplist').load('toplist.php');
</script>

User avatar
TheButcher
Administrator
Administrator
Posts: 17530
Joined: February 2nd, 2018, 11:48 am
Title: I like weekends
Referrals: 1
Contact:

#14

Post by TheButcher » October 18th, 2023, 6:48 pm

You is a genius boss, it worked, thanks a million

peace

User avatar
tacnet
Board Sponsor
Board Sponsor
Posts: 3641
Joined: February 22nd, 2019, 7:21 pm
Referrals: 9
Contact:

#15

Post by tacnet » October 18th, 2023, 6:51 pm

No problem. Remember, you can use those two bits of code to include your toplist anywhere on the site

Just give any element an id of 'toplist'

Code: Select all

<center id="toplist"></center>
Then just before your </body> tag, add

Code: Select all

<script>
$('#toplist').load('toplist.php');
</script>

TradeExpert gurus can you help

Post Reply