adding a toplist script to the site

Need some custom code changes to the phpBB core simple enough that you feel doesn't require an extension? Then post your request here so that community members can provide some assistance.

NOTE: NO OFFICIAL SUPPORT IS PROVIDED IN THIS SUB-FORUM
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

NOTE: NO OFFICIAL SUPPORT IS PROVIDED IN THIS SUB-FORUM
User avatar
TheButcher2
Registered User
Posts: 1034
Joined: Tue May 13, 2014 11:38 pm

adding a toplist script to the site

Post by TheButcher2 »

Hi guys

Just started a top referrers for my site.

The script works it's "TradeExpert"

Anyone know how you include a code to show a script output, it's for a toplist script that has 2 options. One for php pages and the other for shtml pages.

No mater which one I add to the overall_footer.html and refresh the cache the toplist does not show up.

Here are the 2 options they have.
How to include toplist into your web page

After you have created and added a toplist, it has to be included into your web page:

PHP (.php pages)

<?php
include "toplist.html";
?>

SSI (.shtml pages)

<!--#include virtual="toplist.html" -->



Now I added the first one to a page on the site called it https://www.sponsorchat.com/referrers.php it works.
I get it that the overall_footer.html is neither a php nor shtml page, but there has to be a way I suppose to implement that output on the site (hoping)


Peace
Last edited by Mick on Sat Oct 21, 2023 8:07 am, edited 1 time in total.
Reason: Solved.
User avatar
TheButcher2
Registered User
Posts: 1034
Joined: Tue May 13, 2014 11:38 pm

Re: adding a toplist script to the site

Post by TheButcher2 »

anyone want to help?


Peace
User avatar
Lumpy Burgertushie
Registered User
Posts: 69228
Joined: Mon May 02, 2005 3:11 am

Re: adding a toplist script to the site

Post by Lumpy Burgertushie »

You have to allow PHP in templates in ACP->Security settings.

Include inline PHP code like this:

Code: Select all


<!-- PHP -->
	echo "hello!";
<!-- ENDPHP -->
If you want to include a file, use this:

Code: Select all


<!-- INCLUDEPHP somefile.php -->
(somefile.php is located in the forum root)
Premium phpBB 3.3 Styles by PlanetStyles.net

I am pleased to announce that I have completed the first item on my bucket list. I have the bucket.
User avatar
TheButcher2
Registered User
Posts: 1034
Joined: Tue May 13, 2014 11:38 pm

Re: adding a toplist script to the site

Post by TheButcher2 »

As always thanks a lot for the help boss, it worked.

Have a great evening

Peace
User avatar
TheButcher2
Registered User
Posts: 1034
Joined: Tue May 13, 2014 11:38 pm

Re: adding a toplist script to the site

Post by TheButcher2 »

A follow up question if I may:

how do i make the font larger, I am attaching a screen shot. Something like the 2nd attachment size.

Thanks
You do not have the required permissions to view the files attached to this post.
User avatar
Lumpy Burgertushie
Registered User
Posts: 69228
Joined: Mon May 02, 2005 3:11 am

Re: adding a toplist script to the site

Post by Lumpy Burgertushie »

the best way would probably be to edit the code that creates the html and change the font size there.
if the php file is creating the html then that is where you would do it.


rob ert
Premium phpBB 3.3 Styles by PlanetStyles.net

I am pleased to announce that I have completed the first item on my bucket list. I have the bucket.
User avatar
TheButcher2
Registered User
Posts: 1034
Joined: Tue May 13, 2014 11:38 pm

Re: adding a toplist script to the site

Post by TheButcher2 »

Thanks Robert I did that this morning, the first screen cap is what is on the page, the second one is the preview in the script for what it outputs.
I was wondering if it's where I put the code on my site, just talking out loud no clue with codes boss.
User avatar
Lumpy Burgertushie
Registered User
Posts: 69228
Joined: Mon May 02, 2005 3:11 am

Re: adding a toplist script to the site

Post by Lumpy Burgertushie »

if we could see the contents of your php file maybe we could help you figure it out.

robert
Premium phpBB 3.3 Styles by PlanetStyles.net

I am pleased to announce that I have completed the first item on my bucket list. I have the bucket.
User avatar
TheButcher2
Registered User
Posts: 1034
Joined: Tue May 13, 2014 11:38 pm

Re: adding a toplist script to the site

Post by TheButcher2 »

Hi Robert thanks fr your time.

The Tradeexpert toplist script is

Code: Select all

<table border="0" style="width:850px">
<center><font face="arial" color="000000" size=“5">
<br>
    <td><a href="/x/out.php?id=##domain:1##" target="_blank">1,##name:1##</a></td>
    <td><a href="/x/out.php?id=##domain:2##" target="_blank">2.##name:2##</a></td>
    <td><a href="/x/out.php?id=##domain:3##" target="_blank">3.##name:3##</a></td>
    <td><a href="/x/out.php?id=##domain:4##" target="_blank">4.##name:4##</a></td>
    <td><a href="/x/out.php?id=##domain:5##" target="_blank">5.##name:5##</a></td>
    <td><a href="/x/out.php?id=##domain:6##" target="_blank">6. ##name:6##</a></td>
    <td><a href="/x/out.php?id=##domain:7##" target="_blank">7.##name:7##</a></td> 
</tr>
</table>

The part of the overall_footer.html on my forum is

Code: Select all

is <br>
<br>
     <center><font face="arial" color="000000" size=“3">
	TOP 7 REFERRERS<br><?php
 <!-- INCLUDEPHP "/home/nfvltd/public_html/sponsorchat.com/toplist1.html"-->  </p></font></size>
</center>
<br>
<div class="copyright">
<p align="center"><font face="arial" color=“000000" size="1"> 
The following web pages and associated links and other material contain nudity and depictions of a sexual nature.<br> All materials beyond this page and linked locations are intended and authorized for access by CONSENTING ADULTS ONLY. <br>No minors are authorized, allowed or permitted to enter beyond this point.
Minors are persons under the age of 18 or 21 years <br> in places in which 18 years is not the legal age of majority.You must leave this site if you are not a consenting adult.</a>
</font>
User avatar
Lumpy Burgertushie
Registered User
Posts: 69228
Joined: Mon May 02, 2005 3:11 am

Re: adding a toplist script to the site

Post by Lumpy Burgertushie »

ok, none of that makes any sense. I can't figure what any of that is supposed to do or show on a web page other than the actual html.

as for the second box,

Code: Select all

<center><font face="arial" color="000000" size=“3">
	TOP 7 REFERRERS<br><?php
 <!-- INCLUDEPHP "/home/nfvltd/public_html/sponsorchat.com/toplist1.html"-->  </p></font></size>
</center>
none of that is the correct way to code it.

it is hard to tell but I think that should be this:

Code: Select all

<center><font face="arial" color="000000" size=“3">
	TOP 7 REFERRERS<br>
 <!-- INCLUDEPHP https://sponsorchat.com/toplist1.html --> </font>
</center>
even that is not what I think you are after to begin with.

you have some really messy html in both the toplist1.html file and in your main index.html files
go to those pages and right click and choose view source. notice all the red characters, those are all html mistakes.

the first mistake is using tables and font tags etc.
they still work ok but you have to do them correctly.

robert
Premium phpBB 3.3 Styles by PlanetStyles.net

I am pleased to announce that I have completed the first item on my bucket list. I have the bucket.
User avatar
TheButcher2
Registered User
Posts: 1034
Joined: Tue May 13, 2014 11:38 pm

Re: adding a toplist script to the site

Post by TheButcher2 »

Thanks Robert

I switched codes, cleared the cache in ACP the board went blank, I ended up deleting the "cache" folder and uploading last nights copy and it came back.

Probably not the code but something went wrong.

I am thinking the font size has to do with the block where the code is pasted.

Thanks for the time and help


Peace
User avatar
TheButcher2
Registered User
Posts: 1034
Joined: Tue May 13, 2014 11:38 pm

Re: adding a toplist script to the site

Post by TheButcher2 »

Hmm I thought I replied to this topic earlier today.

Okay I can not get the toplist to show on the forum. Here is the code I tried

Code: Select all

<center><font face="arial" color="000000" size=“3">
	TOP REFERRERS<br>
 <!-- INCLUDEPHP https://www.sponsorchat.com/toplist.php --> </font>
</center>

I turned on "allow PHP in templates in ACP->Security settings." but that turns the board into a b lank screen

Any ideas guys?



Peace
Last edited by Kailey on Mon Oct 09, 2023 6:01 pm, edited 1 time in total.
User avatar
Mannix_
Registered User
Posts: 2003
Joined: Sun Oct 25, 2015 2:56 pm
Name: Matt

Re: adding a toplist script to the site

Post by Mannix_ »

do you really need php to display a bunch of links ???
Did I helped You? Consider a donation.
New version of phpBB has been released? My styles aren't validated for it yet? Check my page for the latest downloads!
User avatar
axe70
Registered User
Posts: 751
Joined: Sun Nov 17, 2002 10:55 am
Location: Italy
Name: Alessio

Re: adding a toplist script to the site

Post by axe70 »

do you really need php to display a bunch of links ???
Probably the script go to create a dynamic content? Unique explain. But who know :D

So, or you add it via an extension, that execute the script and then inject into the template at the right point (but i understand that it is hard for you maybe) the html output, or yes you can do it the way you are doing, but so i do not understand if you included this code into your overall_footer at some point

Code: Select all

<center><font face="arial" color="000000" size=“3">
	TOP REFERRERS<br>
 <!-- INCLUDEPHP ./toplist.php --> </font>
</center>
and your toplist.php reside into your phpBB root, why it do not work. It should. No way that it not!

p.s Peace? :mrgreen: it is nice to call for peace, when there are animals hidden behind psychopathic conceptions of God, and that ignore what the (true) history is.
Do not take me too serious
Anyway i do not like Discourse
User avatar
TheButcher2
Registered User
Posts: 1034
Joined: Tue May 13, 2014 11:38 pm

Re: adding a toplist script to the site

Post by TheButcher2 »

axe70 wrote: Tue Oct 10, 2023 10:17 am
do you really need php to display a bunch of links ???
Probably the script go to create a dynamic content? Unique explain. But who know :D

So, or you add it via an extension, that execute the script and then inject into the template at the right point (but i understand that it is hard for you maybe) the html output, or yes you can do it the way you are doing, but so i do not understand if you included this code into your overall_footer at some point

Code: Select all

<center><font face="arial" color="000000" size=“3">
	TOP REFERRERS<br>
 <!-- INCLUDEPHP ./toplist.php --> </font>
</center>
and your toplist.php reside into your phpBB root, why it do not work. It should. No way that it not!

p.s Peace? :mrgreen: it is nice to call for peace, when there are animals hidden behind psychopathic conceptions of God, and that ignore what the (true) history is.
That did not work again, I had this thing working fine a few years back. Weird.

Thanks for your time

Peace

Return to “phpBB Custom Coding”