Jump to content

SMF Help


Angel Air

Recommended Posts

Hi all I am trying to display latest Forum posts on my frontpage I am using SMF as my forum I have been on to the SMF forums to see how to display what I want and this is the code I have found

<?php include('http://www.angelairva.co.uk/Forum/SSI.php?ssi_function=recentTopics'); ?>

and this is the error I am getting on my frontapge

Warning: include() [function.include]: http:// wrapper is disabled in the server configuration by allow_url_fopen=0 in /home/angelair/public_html/lib/skins/pureHTML5_blue/frontpage_main.tpl on line 427
Warning: include(http://www.angelairva.co.uk/Forum/SSI.php?ssi_function=recentTopics) [function.include]: failed to open stream: no suitable wrapper could be found in /home/angelair/public_html/lib/skins/pureHTML5_blue/frontpage_main.tpl on line 427
Warning: include() [function.include]: Failed opening 'http://www.angelairva.co.uk/Forum/SSI.php?ssi_function=recentTopics' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/angelair/public_html/lib/skins/pureHTML5_blue/frontpage_main.tpl on line 427

I would really appreciate any help

Thank you in advance

Scott

Link to comment
Share on other sites

You can try this:

<?php

include ('/path/to/SSI.php');

$topics = ssi_recentTopics(5,null,'array');

?>

$topics will be an array of all the relevant data, so you can format it however you want in your own file.

Here believe that many will not give much support, it refers to something that is out

the phpvms, I believe that would not be the correct location

however, I can help you solve, let us know.

Link to comment
Share on other sites

You can try this:

<?php

include ('/path/to/SSI.php');

$topics = ssi_recentTopics(5,null,'array');

?>

$topics will be an array of all the relevant data, so you can format it however you want in your own file.

Here believe that many will not give much support, it refers to something that is out

the phpvms, I believe that would not be the correct location

however, I can help you solve, let us know.

Thankyou for your help but that does not work it just breaks my frontpage almost like it is wiping out the CSS

Scott

Link to comment
Share on other sites

include('./Forum/SSI.php'); 

Relative path means relative to the location of the file where you are including SSI.php

This would work if your forum folder is in the root of your phpVMS installation. :)

Link to comment
Share on other sites

include('./Forum/SSI.php'); 

Relative path means relative to the location of the file where you are including SSI.php

This would work if your forum folder is in the root of your phpVMS installation. :)

Have tried that Sava (thanks for the help by the way) but it does not show anything no errors no breaks in the page and no posts you can see here www.angelairva.co.uk look for Latest Forum Posts on frontpage This is the total code I am using....

<?php
include('./Forum/SSI.php');
$topics = ssi_recentTopics(5,null,'array');
?>

Link to comment
Share on other sites

The error is fixed then. Nothing being displayed leads me to believe that you are calling the function the wrong way. I've checked out the docs, seems that is the case. You are missing one argument. Try this:

include('./forum/SSI.php');
$topics = ssi_recentTopics($num_recent = 5, $exclude_boards = null, $include_boards = null, $output_method = 'array');
foreach ($topics as $topic) {
echo $topic['link'];
}

Link to comment
Share on other sites

The error is fixed then. Nothing being displayed leads me to believe that you are calling the function the wrong way. I've checked out the docs, seems that is the case. You are missing one argument. Try this:

include('./forum/SSI.php');
$topics = ssi_recentTopics($num_recent = 5, $exclude_boards = null, $include_boards = null, $output_method = 'array');
foreach ($topics as $topic) {
echo $topic['link'];
}

Thank you Sava do I need to add any php code to get it to work?

Link to comment
Share on other sites

I don't think it will work in Dreamweaver at all..you need a PHP/MySQL server for everything to work. Try it on your live site, and I believe you are missing the opening and closing PHP tags.

Just a pointer, a kind one, I always try and let you know that answers to most of the things you and others ask are available in the documentation (be it phpVMS, SMF, Dreamweaver) provided. So, instead of waiting for others to reply, try and see if you can fix it yourself in the meantime, and show a little bit of desire to solve things yourself. That way you give motivation for others to help you. Just as an example, if you tried the code on a live server, you'd see if it works. Seeing your previous posts it doesn't seem like you tried. If you did and it displayed the code in plain text, a quick Google search would most probably give a solution or atleast a hint on where to look at. Take this as friendly advice.

Link to comment
Share on other sites

I don't think it will work in Dreamweaver at all..you need a PHP/MySQL server for everything to work. Try it on your live site, and I believe you are missing the opening and closing PHP tags.

Just a pointer, a kind one, I always try and let you know that answers to most of the things you and others ask are available in the documentation (be it phpVMS, SMF, Dreamweaver) provided. So, instead of waiting for others to reply, try and see if you can fix it yourself in the meantime, and show a little bit of desire to solve things yourself. That way you give motivation for others to help you. Just as an example, if you tried the code on a live server, you'd see if it works. Seeing your previous posts it doesn't seem like you tried. If you did and it displayed the code in plain text, a quick Google search would most probably give a solution or atleast a hint on where to look at. Take this as friendly advice.

Hi Sava,

I really am grateful for the help you have provided.

I certainly have tried the code before asking for help on both dreamweaver and on my live site I have read the documentation on the SMF forum and I do try to resolve any problems I might have myself before asking for help. My biggest problem I have is that I am not the greatest with code which is why I have to ask for help.

I am sorry if you think that I have not even tried to resolve the issue myself but I can assure you that is not the case.

In future I will think twice before asking for help in these Forums

Scott

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...