The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Help adding HTML to PHP Forum
gcoder05
post Jan 27 2021, 08:49 PM
Post #1





Group: Members
Posts: 4
Joined: 27-January 21
Member No.: 27,754



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.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Jan 27 2021, 08:54 PM
Post #2


🌟Computer says no🌟
********

Group: WDG Moderators
Posts: 20,716
Joined: 9-August 06
Member No.: 6



Without seeing anything of what you have it's hard to help.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
gcoder05
post Jan 27 2021, 09:28 PM
Post #3





Group: Members
Posts: 4
Joined: 27-January 21
Member No.: 27,754



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

This post has been edited by gcoder05: Jan 27 2021, 09:30 PM
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Jan 27 2021, 09:37 PM
Post #4


🌟Computer says no🌟
********

Group: WDG Moderators
Posts: 20,716
Joined: 9-August 06
Member No.: 6



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.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
gcoder05
post Jan 27 2021, 09:55 PM
Post #5





Group: Members
Posts: 4
Joined: 27-January 21
Member No.: 27,754



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...
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
gcoder05
post Jan 31 2021, 02:21 AM
Post #6





Group: Members
Posts: 4
Joined: 27-January 21
Member No.: 27,754



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');
}
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Jan 31 2021, 02:26 AM
Post #7


🌟Computer says no🌟
********

Group: WDG Moderators
Posts: 20,716
Joined: 9-August 06
Member No.: 6



What does XF.php look like?
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Jan 31 2021, 02:35 AM
Post #8


🌟Computer says no🌟
********

Group: WDG Moderators
Posts: 20,716
Joined: 9-August 06
Member No.: 6



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?
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 19th March 2024 - 03:26 AM