Printable Version of Topic

Click here to view this topic in its original format

HTMLHelp Forums _ General Web Design _ Help adding HTML to PHP Forum

Posted by: gcoder05 Jan 27 2021, 08:49 PM

Im sure this is a nube question but Im used to general wordpress site building. I am building a crypto forum using Xenforo and have hit a brick wall on where to put a few lines of HTML.

It is a mining script and need it to launch when the site is opened. Ive tried adding it to the index file and get no results. Any help would be great.

Posted by: pandy Jan 27 2021, 08:54 PM

Without seeing anything of what you have it's hard to help.

Posted by: gcoder05 Jan 27 2021, 09:28 PM

QUOTE(pandy @ Jan 27 2021, 08:54 PM) *

Without seeing anything of what you have it's hard to help.


QUOTE(pandy @ Jan 27 2021, 08:54 PM) *

Without seeing anything of what you have it's hard to help.



Sorry, Here isa shot of my web file structure and a shot of the code I need the site to run.

IPB Image

IPB Image

Posted by: pandy Jan 27 2021, 09:37 PM

Well, that you should put the two script tags somewhere in index.php is a good guess, I think. Not the HTML tags.

I still don't know how index.php looks. Try to find for example the TITLE tag and place the script tags directly after that. You must take care so you place them in a HTML section. If you place them in the PHP code the site will stop to work. Backup index.php first. You can for example rename a copy 'index.php.bak'. If you screw up you can just delete the copy you edited and rename the backup back to index.php.

Posted by: gcoder05 Jan 27 2021, 09:55 PM

QUOTE(pandy @ Jan 27 2021, 09:37 PM) *

Well, that you should put the two script tags somehwere in index.php is a good guess, I think. Not the HTML tags.

I still don't know how index.php looks. Try to find for example the TITLE tag and place the script tags directly after that. You must take care so you place them in a HTML section. If you place them in the PHP code the site will stop to work. Backup index.php first. You can for example rename a copy 'index.php.bak'. If you screw up you can just delete the copy you edited and rename the backup back to index.php.



Thanks for your help, Will reply with results...

Posted by: gcoder05 Jan 31 2021, 02:21 AM

QUOTE(pandy @ Jan 27 2021, 09:37 PM) *

Well, that you should put the two script tags somehwere in index.php is a good guess, I think. Not the HTML tags.

I still don't know how index.php looks. Try to find for example the TITLE tag and place the script tags directly after that. You must take care so you place them in a HTML section. If you place them in the PHP code the site will stop to work. Backup index.php first. You can for example rename a copy 'index.php.bak'. If you screw up you can just delete the copy you edited and rename the backup back to index.php.



Still no luck. Could I be using the wrong index.php? When I open for edit this is all thats in it.
<?php

$phpVersion = phpversion();
if (version_compare($phpVersion, '5.6.0', '<'))
{
die("PHP 5.6.0 or newer is required. $phpVersion does not meet this requirement. Please ask your host to upgrade PHP.");
}

$dir = __DIR__;
require($dir . '/src/XF.php');

XF::start($dir);

if (\XF::requestUrlMatchesApi())
{
\XF::runApp('XF\Api\App');
}
else
{
\XF::runApp('XF\Pub\App');
}

Posted by: pandy Jan 31 2021, 02:26 AM

What does XF.php look like?

Posted by: pandy Jan 31 2021, 02:35 AM

I looked a little at the online documentation and their forum. This forum seems more complex than I expected. wacko.gif
If there isn't anything recognizable in XF.php I don't think I can help. I found a thread in their forum that looked promising, but it linked to a part of the documentation that required login.

Have you tried their support forum? I suspect you may get better help there. All forum software I've worked with have used single templates for different things. One for the index page, one for the page where you create a post (like where I'm typing now). I guess I assumed your forum would work the same way, but this thing obviously works differently.

Another option, have you checked if it's possible to edit the look of the forum through the forum's CP and insert HTML snips that way?

Powered by Invision Power Board (http://www.invisionboard.com)
© Invision Power Services (http://www.invisionpower.com)