Want to add recent topics from my forum to my homepage which is a html web page

Started by mack420, March 21, 2018, 01:58:44 PM

Previous topic - Next topic

mack420

and i was searching through google last night and found an article where someone had provided code to make this possible, however, I am not that good with coding and unsure how to make it work, or if its even possible. I have provided the url to the page I found this at, so if someone could take a look and let me know if its even possible

https://www.therandombits.com/370/show-posts-from-your-smf-forum-in-your-home-index-page/

I am using a html editor to make my web pages, pagebreeze to be exact, not sure if your familiar with it, and I tried to add the code, but I am unsure about the tags and just, like I say, I am not good at coding, I am a noob, so any help would be appreciated. Hopefully I posted this on the right board as I was unsure about that as well, lol

Again, I am good at coding, so don't be a dick to me over not knowing about this stuff

Kindred

Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

mack420

can i do this with pagebreeze?

EDIT:

i guess the real question is, how do i remake my homepage in php? can i do it with pagebreeze and if not, how do i remake it in php?

like i said, noob here, so what may seem like a easy fix to you may not be so easy to me

I am willing to learn which is why I am here asking for help, but I need help from someone who knows what they are doing, someone who has taken the time to learn their craft as I have with my own craft

Kindred

never even heard of pagebreeze... so, I don't know.


The file needs to be saved to your website as *.php (e.g. index.php)

then any php code within the file would have to be indicated as I did in the code example above, with <?php ... ?> tags
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

mack420

well as i previously stated, i do not know how to write code, which is why I use pagebreeze

I have the Pro edition from pagebreeze.com

i did make a page in pagebreeze using .php for the extension and inserted the tag into that through the html editor, but could not get it display in preview mode

i don't know enough about php which again, is why I asked for help

Illori

it would not display on your local computer, it would have to be put on the server first.

mack420

still not working

EDIT

how do I find the correct path to my ssi.php?

i have forum directory open in text editor, but should i be looking at it from a web page, idk, that's why i asked for help, so any would be appreciated

Kindred

the path would be something like home/public_html/www/forum

(this is not the URL... it's the file/directory path)
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

mack420

still not working

still cannot find the path in the forum directory

EDIT

i found the correct path, but still not sure how to incorporate this when i do not know how to remake a html web page in php, so a little help would be greatly appreciated on that task

Doug Heffernan

Quote from: norm on March 21, 2018, 05:02:48 PM
still not working

still cannot find the path in the forum directory

EDIT

i found the correct path, but still not sure how to incorporate this when i do not know how to remake a html web page in php, so a little help would be greatly appreciated on that task

Kindred explained it in his post above. Follow his instructions and you are good to go.

mack420

which post are you referring to?

EDIT

still do not know how to remake my homepage in php, so anyone care to help me as I have followed the instructions, what little have had offered to me, but as I stated before anyone replied...

I DO NOT KNOW HOW TO CODE

pepa

Hi norm

As Doug and Kindred both explained:

1.  your page has to end with the extension .php not html or htm or whatever.
2.  any php code you want to insert into the page has to be INSIDE php declaration brackets which begin with <?php
you then insert the php tags
and close the php tags with
?>

Also as Kindred explained the page has to be uploaded to your server where your forum and site is hosted, it won't (without specific configuration) display locally on your computer.

The rest of your html just remains on the page but it is OUTSIDE the php declaration brackets ... so e.g.

html code goes here
.....
....
....
then php is needed so
<?php
php code goes here
....
....
....
then more html code is needed so first
?> (to close off php)
then insert html code
....
....
....

etc etc.

mack420

i tried all that and it didn't work. my web page would not load

however, i put the php code with the tags before the html and it works, but to edit the page requires a extra step i would rather not have to do

i wish the way you guys said to do it would work, but i need more help with it because as i said, i do not know how to code. is anyone here even familiar with the program i am using? maybe that would help you help me

Kindred

Most of us edit html directly as code, not as any sort of wysiwyg.

I haven't used a wysiwyg since DreamWeaver in the 90s...

Try attaching your index.php in this thread. We will take a look at what you  are doing
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

mack420

i got it to work finally, but the font for the recent topics is way too big

example

anyway to reduce to something like the size in these messages?

EDIT

i just copied the code from my page to below and you can see the php tags are in blue, I have the recent topics tag several lines down, so hopefully you can help me with it

like i said, it shows up on my web page finally, but the font is insanely huge

<?php require("/home1/seffouli/public_html/forum/SSI.php"); ?>
<?php ssi_welcome(); ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Sports Entertainment Federation Homepage</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<style type="text/css">
<!--
body p {
font-family: Verdana, Geneva, sans-serif;
}
body p {
font-size: 9px;
}
body p {
font-size: 9pt;
}
body p {
color: #FFF;
}
body {
background-color: #000;
}
body,td,th {
font-family: Verdana, Geneva, sans-serif;
font-size: 9pt;
color: #FFF;
text-align: left;
}
a:link {
color: #F00;
font-size: 18px;
}
-->
</style>
</head>

<body bgcolor="#000000">
<div align="center">
  <table border="0" cellspacing="0" cellpadding="0" width="100%" align="center">
    <tr>
      <td height="47"><p align="center">
        <script src="//platform.twitter.com/widgets.js" type="text/javascript"></script>
        <a class="twitter-share-button" href="https://twitter.com/share">Tweet</a></p></td>
      <td bgcolor="#000000" ><p align="center">
        <iframe style="BORDER-TOP: medium none; HEIGHT: 23px; BORDER-RIGHT: medium none; WIDTH: 420px; BORDER-BOTTOM: medium none; BORDER-LEFT: medium none"
src="https://www.facebook.com/plugins/like.php?href=http://sef4life.com/home.php"
frameborder="0" scrolling="no"></iframe>
      </p>
      <p></p></td>
      <td><p align="center"><!-- Place this tag where you want the +1 button to render -->
        <g:plusone annotation="inline"></g:plusone><!-- Place this render call where appropriate -->
        <script type="text/javascript">
  (function() {var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;po.src = 'https://apis.google.com/js/plusone.js';var s = document.getElementsByTagName('script')[0];s.parentNode.insertBefore(po, s);})();</script>
      </p></td>
    </tr>
  </table>
  <p><font
size=3 color=#ff0000><strong><em><a
href="index.html">sef4life.com</a></em></strong></font></p>
  <div align="center">
<table bordercolor="#800000" cellspacing="6" cellpadding="6" width="100%" align="center"
border=3>
 
  <tr>
    <td valign="top"><font face="Verdana"
     ><p align="left" ><strong
      >
      <font size="2" face="Verdana"
      ><iframe height="62" src="http://free.timeanddate.com/clock/i65mqx3g/n4357/fn17/fs16/fcf00/tc000/ftb/bls3/blc0ff/brs3/brc0ff/bts3/btc0ff/bbs3/bbc0ff/pa9/tt0/th2/ta1/tb4"
      frameBorder=0 width=322></iframe></font></strong></p></div></font>
      <p align="left"><font face="Verdana"
     ><strong><a
      href="http://normbd.wordpress.com/2014/03/31/better-late-than-never/"
      ><font color="#8000ff" size="2"
      >Better Late Than Never</font></a></strong></font></p></div>
</body></html>
<?php ssi_recentPosts(); ?>
<html><body bgcolor="#000000">
<div align="center"><p align="left"><font face="Verdana"
      ><font color="#ffffff" size="2"
      ><strong> 
      Homepage</strong></font></font><font face="Verdana"
      ><font ><br
      ></font><font >
      <font
      size=2 color=#00ffff
     >&nbsp;-</font><a href="rules.html"><font color="#00ffff"
      size=2>F.A.Q.</font></a><br><font
      ><font color="#00ffff" size="2">&nbsp;-Match
      Types<br>&nbsp;-</font><a href="schedule.html"><font
      color=#00ffff
      size=2>   Event Schedule</font></a></font> </font></font><font
      face=Verdana><font color="#00ffff"
      > <br><font
      >
      <font color="#00ffff" size="2">&nbsp;-</font><a
      href="http://sef4life.com/forum/index.php?board=39.0"><font color="#00ffff"
      size=2>Sponsor SEF</font></a>
      </font></font></font><font
      face=Verdana><font color="#00ffff"
      ><font
      ><br><strong><font color="#ffffff" size="2">Social
      Lounge</font></strong><br><font
      color=#00ffff><font
      ><font size="2">&nbsp;-</font><a
      href="http://sef4life.com/chat.php" ><font color="#00ffff" size="2">The SEF Forum</font></a> </font>   <br></font><font
      ><font
      color=#00ffff><font
      ><font size="2"><font color="#ffffff"><strong>The
      Roster<br></strong></font>&nbsp;-</font></font></font></font><a
      href="roster.html"><font color="#00ffff"
      size=2>Staff/Teams/Wrestlers</font></a>
      <br><font
      color=#00ffff size=2>&nbsp;-</font><a href="records.html"><font
      color=#00ffff size=2>Power Rankings</font></a><font size="2"> <br
      ></font><font color="#00ffff" size="2">&nbsp;-Salaries<br
      >&nbsp;-</font><a href="http://"><font color="#00ffff"
      size=2>SEFZONE</font></a>
      </font></font></font><font
      color=#00ffff></p>
      <p align="left"><font color="#ff0000" size="2"
      face=Verdana><strong>SEF World Champion<br></strong><em><font
      color=#ffffff>   
       Title History<br></font></em><strong>Ruemash</strong></font></p>
      <p align="left"><font color="#ff0000" size="2"
      face=Verdana><strong>   
      The Network&nbsp;World Champion<br></strong><font
      color=#ffffff><em>Title History<br></em><strong><font
      color=#ff0000>Rick Reynolds</font></strong></font></font></p>
      <p align="left"><font color="#ff0000" size="2"
      face=Verdana><strong>SEF&nbsp;Icon-Iron Champion<br></strong><em><font
      color=#ffffff>Title History</font></em>   
      <br><strong>Jake Voss</strong></font></p>
      <p align="left"><font color="#ff0000" size="2"
      face=Verdana>  <font
      color=#00ffff><strong>SEF
      Tag Team Champions<br></strong><em><font color="#ffffff">Title
      History</font></em>   </font><br><strong>Priceless
      Paine</strong></font></p>
      <p align="left"><font color="#ff0000" size="2"
      face=Verdana>  <font
      color=#00ffff><strong>SEF&nbsp;Revolution
      Champion<br></strong><em><font color="#ffffff">Title
      History</font></em> </font><br><strong>Cliff O
      Clink</strong></font></p>
      <p align="left"><font color="#ff0000" size="2"><strong><font
      color=#00ffff>SEF Femmes Fatale Franchise
      Champion</font><br></strong><em><font color="#ffffff">Title
      History</font></em><br><strong>Jenom</strong></font></p>
      <p align="left"><strong><font color="#8000ff" size="2">SEF
      Rumble Winners</font></strong></p>
      <p align="left"><strong><font color="#8000ff" size="2">King
      of SEF Winners</font></strong></p>
      <p align="left"><strong><font color="#8000ff"
      size=2>SEF-Your Vote Awards</font></strong></p></font></td>
        <td style="COLOR: " bordercolordark =#de0002
       WIDTH=600 VALIGN=top v><p align="center" ><strong><font color="#00ffff"
      size=5><u>Top News</u></font></strong></p><p align="center" ><font color="#ff0000"
      size=2><u><strong><font color="#ffffff">SEF Relaunches
      Website</font><br></strong></u>-</font></p><p align="center" ><font color="#8000ff" size="2"><em>For
      Older News <strong>click
here</strong></em></font></p></td>  </tr>   
         
</table></div>
</div>
</body>
</html>

Shambles

a:link {
color: #F00;
font-size: 18px;
}


That 18px isn't going to help with the sizing ;)  Try 10px

Kindred

actually, in general, you should be staying away from defining size by px any more. Using em is the best way to make things responsive and properly display on all devices. :)

but yes, that 18px will indeed make things large.

Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

mack420

that was an easy fix

i didn't know html coding would affect php tags. but then again, i don't know ****** about coding like i said, lol

thanks for the help guys

Kindred

Well, php gets processed on the server and then parsed our as html...

However, that code was css, not html. :P
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

landyvlad

Glad you got it running.

As a tangent - if you don't know html. php etc why are you building a site that way (using a page builder or not) ?

I've never heard of pagebreeze, but I used dreamweaver back in the day and frontpage before that.
Page builders tend to put all sorts of 'extra' code all over the place.  The resultant html and php files are very messy.
(You can see an example of this in the code you posted

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">



Is this your website?

http://sef4life.com/forum/index.php

"Put as much effort into your question as you'd expect someone to give in an answer"

Please do not PM, IM or Email me with questions on astrophysics or theology.  You will get better and faster responses by asking homeless people in the street. Thank you.

Be the person your dog thinks you are.

Advertisement: