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.
User avatar
TheButcher
Administrator
Administrator
Posts: 17530
Joined: February 2nd, 2018, 11:48 am
Title: I like weekends
Referrals: 1
Contact:

#16

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

tacnet wrote: ↑
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>


Got it, thanks

User avatar
badkitty
Verified Member
Verified Member
Posts: 1431
Joined: February 6th, 2018, 11:33 am

#17

Post by badkitty » October 20th, 2023, 3:55 pm

It works job well done boys




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

#18

Post by TheButcher » October 21st, 2023, 3:28 pm

tacnet wrote: ↑
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>

I was thinking what did I do recently that might cause the board script to act up and only thing is adding this code whic seems to be stopping phpBB letting me go to the admin page, I took it off cleared the cache and can log in to admin, with it in place it causes the admin page to immediately refresh to a blank screen. This was the only change we did before the board admin page acted up the other day.


Not sure if this logic is correct but let's see if the board admin page acts up again after a few tries.

born2bewild
Verified Member
Verified Member
Posts: 1655
Joined: May 22nd, 2018, 6:47 pm
Title: work hard play hard

#19

Post by born2bewild » October 22nd, 2023, 6:16 am

TheButcher wrote: ↑
October 21st, 2023, 3:28 pm
tacnet wrote: ↑
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>

I was thinking what did I do recently that might cause the board script to act up and only thing is adding this code whic seems to be stopping phpBB letting me go to the admin page, I took it off cleared the cache and can log in to admin, with it in place it causes the admin page to immediately refresh to a blank screen. This was the only change we did before the board admin page acted up the other day.


Not sure if this logic is correct but let's see if the board admin page acts up again after a few tries.
Why is that line of code affecting the phpbb code,I do not see anything there that would.




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

#20

Post by tacnet » October 22nd, 2023, 10:40 am

TheButcher wrote: ↑
October 21st, 2023, 3:28 pm
tacnet wrote: ↑
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>

I was thinking what did I do recently that might cause the board script to act up and only thing is adding this code whic seems to be stopping phpBB letting me go to the admin page, I took it off cleared the cache and can log in to admin, with it in place it causes the admin page to immediately refresh to a blank screen. This was the only change we did before the board admin page acted up the other day.


Not sure if this logic is correct but let's see if the board admin page acts up again after a few tries.
I would need to see your admin page before I can see whats going on

All that line of code does is load the contents of toplist.php into the element with id toplist, if it exists

It shouldn't be appearing on your admin page, only on your main index page

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

#21

Post by TheButcher » October 22nd, 2023, 11:03 am

It doesn’t appear it just messes up the admin log in I just tried it against n not sure why

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

#22

Post by tacnet » October 22nd, 2023, 3:49 pm

ok I think I know why this might be happening

That command is a JQuery command and my guess is that your forum pages are using Jquery but your admin pages are not.

So a simple fix is to test for Jquery first and then only load the toplist if it exists like this

Code: Select all

<script>
 if (window.jQuery) { 
       $('#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:

#23

Post by TheButcher » October 22nd, 2023, 4:02 pm

tacnet wrote: ↑
October 22nd, 2023, 3:49 pm
ok I think I know why this might be happening

That command is a JQuery command and my guess is that your forum pages are using Jquery but your admin pages are not.

So a simple fix is to test for Jquery first and then only load the toplist if it exists like this

Code: Select all

<script>
 if (window.jQuery) { 
       $('#toplist').load('toplist.php');
   }
</script>


I added that to the template but it is not working, not sure why.

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

#24

Post by tacnet » October 22nd, 2023, 4:48 pm

TheButcher wrote: ↑
October 22nd, 2023, 4:02 pm
tacnet wrote: ↑
October 22nd, 2023, 3:49 pm
ok I think I know why this might be happening

That command is a JQuery command and my guess is that your forum pages are using Jquery but your admin pages are not.

So a simple fix is to test for Jquery first and then only load the toplist if it exists like this

Code: Select all

<script>
 if (window.jQuery) { 
       $('#toplist').load('toplist.php');
   }
</script>


I added that to the template but it is not working, not sure why.
cant see it in your html ?

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

#25

Post by TheButcher » October 22nd, 2023, 4:54 pm

My mistake I forgot to put back

Code: Select all

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

That is a portion of the template overall_footer.html where I put the code

Code: Select all

<!-- EVENT overall_footer_after -->

<!-- IF S_PLUPLOAD --><!-- INCLUDE plupload.html --><!-- ENDIF -->
{$SCRIPTS}

<!-- EVENT overall_footer_body_after -->


<script>
 if (window.jQuery) { 
       $('#toplist').load('toplist.php');
   }
</script>
</body>
</html>


It works now, sorry about that.

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

#26

Post by TheButcher » October 22nd, 2023, 5:00 pm

The blank screen is back, going to delete the code try stop the admin page automatically refreshing.

Peace

urbanlegend
Verified Member
Verified Member
Posts: 1471
Joined: March 23rd, 2018, 10:13 am

#27

Post by urbanlegend » October 25th, 2023, 8:01 am

Is there are news from the TE folks on a new updated version ?




TradeExpert gurus can you help

Post Reply