Main Menu
collapse

Simple Portal Archived Forum

This is an Archive Forum.

The content in this forum may be out-of-date or have been superseded by newer information, and links in forum pages to other sites may not work.
This forum contains archives for future reference.

Visit our thread at Simple Machines Forum for current support.

SMF 2.1 users: EhPortal is a ported version of Simple Portal specifically designed for the SMF 2.1 branch.
Please visit web-develop.ca to download EhPortal and for its support.

User Info

Welcome Guest.
Please log in.

Who's Online

  • Dot Guests: 1046
  • Dot Hidden: 0
  • Dot Users: 0

There aren't any users online.

Recent Posts

Adding Forums Button to Nav bar by jirapon
[August 01, 2019, 09:07:12 AM]


Re: Board Icons by ♦ Ninja ZX-10RR ♦
[July 30, 2019, 04:03:41 PM]


MOVED: Czech translation???? by ♦ Ninja ZX-10RR ♦
[July 30, 2019, 03:04:51 PM]


Board Icons by jirapon
[July 30, 2019, 07:28:44 AM]


Re: Thankyou Simpleportal, by ♦ Ninja ZX-10RR ♦
[July 29, 2019, 09:41:29 AM]


NEED HELP? If you're looking for support with Simple Portal, look no further than the Support Board!

Simpleportal Front Page Incomplete Load

Started by movedgoalposts, April 15, 2012, 08:40:00 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

movedgoalposts

Hi,  I'm using Simpleportal 2.3.5 with SMF 2.0.2.   Simple portal is run in FrontPage portal mode.

If the website is loaded from the domain alone i.e. www.nthwgaming.co.uk, some of the page is incomplete, for example the copyright statements are missing at the botttom of the page, and at least one of the blocks (visible to registered users) is also missing data.

If the page is loaded from the direct simpleportal link i.e. http://www.nthwgaming.co.uk/forum/index.php then the page loads correctly.  As you can see from that link my forum is in it's subfolder of forum, which is how I understood SMF is ideally installed and the portal is installed as part of that forum.

Any thought's please on what is wrong?

movedgoalposts

Sorry to give this a bump but the post is still awaiting approval from a moderator?

Kryzen


AngelinaBelle

What is the relationship between http://www.nthwgaming.co.uk/index.php and http://www.nthwgaming.co.uk/forum/index.php

Are they two different php files? Do you have two different installations of your forum?

At either URL, you have 71 XHTML errors and 66 warnings on the page. Some of these are as simple as use <br> instead of <br />.
My first instinct would be to eliminate HTML errors, then move on to more complicated and subtle possibilities.
I don't know what the problem is, and I don't know what block is missing for members.

Are you getting any errors on your SMF error log?
Please to keep this website running, if you like SimplePortal, make a
one-time subscription. Thank you for your support.

Have you tried the SimplePortal documentation?

movedgoalposts

#4
Thanks for taking a look.

That's a lot of errors :o  It just goes to show what damage you can do when you don't know much  :-[

I don't believe I have two forum installations.  SMF has been updated a few times since whatever series 2 version first existed in March 2011.  Similarly I've had Simple Portal and updated that.  The page load error has always been there, it's only now that I've started to look for a cause.

http://www.nthwgaming.co.uk/index.php is the Simpleportal index.php file that is headed "portalstandalone.php" for version 2.3.2. i.e /**********************************************************************************
* PortalStandalone.php                                                            *
***********************************************************************************
* SimplePortal                                                                    *
* SMF Modification Project Founded by [SiNaN] (sinan@simplemachines.org)          *
* =============================================================================== *
* Software Version:           SimplePortal 2.3.5                                  *
* Software by:                SimplePortal Team (http://www.simpleportal.net)     *
* Copyright 2008-2009 by:     SimplePortal Team (http://www.simpleportal.net)     *
* Support, News, Updates at:  http://www.simpleportal.net                         *




http://www.nthwgaming.co.uk/forum/index.php is the SimpleMachinesForum created index.php file for the forum package that commences:
/**
* Simple Machines Forum (SMF)
*
* @package SMF
* @author Simple Machines http://www.simplemachines.org
* @copyright 2011 Simple Machines
* @license http://www.simplemachines.org/about/smf/license.php BSD
*
* @version 2.0.2


Perhaps I'm using these index.php files incorrectly?  If I shouldn't be using the SimplePortal index.php in the website root, what should I have there to get anyone arriving just by the domain name to see the portal front page?



Oh and the Members Block is just a custom php block with code that checks for members of a specific forum membergroup.
<?phprequire_once('SSI.php');$group_id = 9;$users = ssi_fetchGroupMembers($group_id,  'array');echo '<table border="0" class="ssi_table">';foreach($users as $user){	echo '	<tr>		<td>			', $user['link'], '		</td>	</tr>';}echo '</table>';?>


It displays OK if loaded from the ../orum/index.php. but not the webroot.  I suspect though that it's the same reason as the basic portal page not loading the copyright stuff from the webroot.

movedgoalposts

Having hunted around, the majority of the html validation standards errors are being generated from code within two modules:

One is a custom html simpleportal block with iframe links to the gametracker website server tracking links, and it seems to throw a wobbly at the iframe code that has come from gametracker.  I assume that using an iframe within a simpleportal custom html block is allowed?

The second is from a custom php block which has code that scans a teamspeak server.  Seems that the php code doesn't have any "alt" links in it for images.  I might have to learn some programming skills to adapt that one.

Turn off those two modules, and the page validates almost correctly, but I still get the problem of no copyright links loading if you visit just the site domain name without a specified index.html.  It's as though a path isn't quite right somewhere?

AngelinaBelle

You are using the files correctly.

Please say
1) The path to SMF forum given in your standalone portal file
2) The path to portal standalone file given in SMF
3) The portal mode (front page or standalone)

It looks like your forum is set up for front page mode, judging from the contents of the Home button.
Please to keep this website running, if you like SimplePortal, make a
one-time subscription. Thank you for your support.

Have you tried the SimplePortal documentation?

movedgoalposts

#7
1) Portal Standalone.php file, renamed as index.php at www.nthwgaming.co.uk root has : global $sp_standalone;

// Should be the full path!
$forum_dir = '/var/www/vhosts/nthwgaming.co.uk/httpdocs/forum';


2) Portal standalone path in SMF admin> Config> General Settings: http://www.nthwgaming.co.uk

3) Portal Mode :  Front Page

Note that the SMF configuration admin>server settings> database and paths are also set to:
Forum url: http://www.nthwgaming.co.uk/forum
SMF directory: /var/www/vhosts/nthwgaming.co.uk/httpdocs/forum

AngelinaBelle

Please to keep this website running, if you like SimplePortal, make a
one-time subscription. Thank you for your support.

Have you tried the SimplePortal documentation?

movedgoalposts

Thanks but unfortunately that standalone option doesn't seem to have made any difference.  If anything it makes it worse as the "home" menu linked simpleportal index page loads incomplete without the copyright footers in standalone mode, but in front page mode the page loads correctly from that home link.

AngelinaBelle

#10
Thanks for trying that.  I can see that your forum is now pointing "home" to the standalone page, which is the "normal" way of doing a standalone portal. If you want to change it back to front page mode (I am still curious about the difference between the two portal pages), go ahead now.

On the standalone portal page, it looks like there is a php error in block 22.
this is on the right-hand side and has the heading [HTHW] Members.
Right after this block begins, there seems to be some kind of php error, and nothing else is output.

Are you getting SMF errors? or console errors?
Please to keep this website running, if you like SimplePortal, make a
one-time subscription. Thank you for your support.

Have you tried the SimplePortal documentation?

movedgoalposts

Ah looks like the SP page load is being messed up by the "members" block.  If I turn that off, the rest of the page loads correctly whether in standalone or front page mode.

So in many respects the original problem reported here is "solved".  Thanks.  The next challenge is to work out why the members php code doesn't work.  I suspect that need me to start a different thread.

AngelinaBelle

It's the same problem.  We've just narrowed it down a bit.
If you want to keep working in this thread, that's fine by me.
Are you getting any SMF errors when you turn that block back on?

Do you use IE or firefox? If so, I recommend IE's "F12' tools, or the firebug plug-in for firefox.
They make it easier to look at HTML.

But actually, if you just look at the HTML, you can see that it is suddenly cut off after the title for the members block.

Also -- Could yu consider fixing the HTML in your custom HTML blocks, to bring it up to XHTML 1.0 transitional standards. Stuff like replacing "&" with "&amp;" in src= and href=, putting alt="" in <img /> tags, and using "/>" to close tags when there is no closing tag (<img />, <br />, <input />)

That will make the validator a lot more useful to you in the future when you use it. 

For example, in this case, at the bottom of the list, you see a bunch of unclosed <divs>, which would have been a dead giveaway, if there hadn't been so many other little errors.
Please to keep this website running, if you like SimplePortal, make a
one-time subscription. Thank you for your support.

Have you tried the SimplePortal documentation?

movedgoalposts

No errors are showing related to the simpleportal stuff.

I'm trying to get rid of the html block errors.  Unfortunately most of them are generated by use of third party code for things like iframe links and server activity tracking tools which seem to display correctly, but don't validate properly.  Going to take some effort to get to the bottom of them.

AngelinaBelle

#14
What are you using for the block 22, with the title [NTHW] Members?
Are you getting any SMF errors at all?
Something is breaking the php, and actually causing a 500 error to be sent on the standalone portal page, which the browser seems to ignore, but which the validator complains about.

I see you've switched back to front-page portal mode.  Your big problem remains the members block, which is only a problem within the standalone portal file (http://www.nthwgaming.co.uk/index.php) but not on the front-page portal page.
(http://www.nthwgaming.co.uk/forum/index.php)


----
I can see you've made a lot of progress against the HTML validation errors.
The files you've got in the iframes validate just fine as xhtml 1.0 transitional.

You can make most of your remaining HTML errors go away very simply.
In your iframe tags, replace every & with &amp;
Then, you can get rid of the rest by fixing the image tags in the "no cheat gaming" block -- just put alt="" in those 3 image tags.


Please to keep this website running, if you like SimplePortal, make a
one-time subscription. Thank you for your support.

Have you tried the SimplePortal documentation?

movedgoalposts

Thanks it's slow progress and I'll keep chipping away.  ;)

the &amp; bit in the iframe links has made a big difference.  :)

The no cheat block shouldn't be a validation issue now for the alt tags as I rewrote it, and a couple of other blocks as  BBC SP blocks.  The square bracketed "IMG" tags  of BBC code doen't allow an option for alt tags?

The "Members" block is simply a php Simple Portal block which uses the SSI of SMF and contains:
require_once('SSI.php');

$group_id = 9;

$users = ssi_fetchGroupMembers($group_id,  'array');

echo '
<table border="0" class="ssi_table">';

foreach($users as $user)
{
echo '
<tr>
<td>
', $user['link'], '
</td>
</tr>';
}

echo '
</table>';
  That was in fact suggested to me over on the SMF forums http://www.simplemachines.org/community/index.php?topic=443128.msg3113744#msg3113744.  But the block is clearly the problem as if I disable it the 500 error goes away.

I have no errors in the SMF forum logs.  Indeed the last error was yesterday evening when I hadn't logged into the admin area correctly.  Looking at the server's web stats around 26% of HTTP status code errors are for 500, Internal Server Error, but there are no logs accessible to me from the webserver which uses a fairly well locked down Plesk panel.

movedgoalposts

 I think I've got it working, wohoo ;D

The clue has come from your reference to the php being broken, and also your enquiries about the various paths of things.

Simply put the require_once 'SSI.php'); line wasn't finding that file in some cases.  Once changed to include the full path of the SMF directory, it all falls into place.  Thus my php block code has become
require_once('/var/www/vhosts/nthwgaming.co.uk/httpdocs/forum/SSI.php');

$group_id = 9;

$users = ssi_fetchGroupMembers($group_id,  'array');

echo '
<table border="0" class="ssi_table">';

foreach($users as $user)
{
echo '
<tr>
<td>
', $user['link'], '
</td>
</tr>';
}

echo '
</table>';


Thanks again for the pointers, I've now got a fully functional Front Page  :thumbsup:

The only danger now is what I might break as I gradually try and develop my own theme for the site, rather than SMF's default curve.  These errors are "affectionately" known amongst the NTHW members as "MGP moments"  :-[

AngelinaBelle

That was easy! Once you figured it out, of course :)
And your explanation makes perfect sense -- the SSI file is in the same directory as the forum, but not in the same directory as the standalone, and so could not be loaded by the standalone portal page without the correct directory path.

Here's a fun fact, though: SimplePortal already loads SSI.php.  So that require_once line should not be necessary at all.

So the page looks good now! And passes HTML validation!
But I noticed one link is dead: http://www.pbbans.com/sig-allbans-ab5078.html
Please to keep this website running, if you like SimplePortal, make a
one-time subscription. Thank you for your support.

Have you tried the SimplePortal documentation?

movedgoalposts

You're correct the require once isn't needed in the SimplePortal Block.  Removed it and it all runs and validates OK :)

The dead link is a temporary issue, I hope, with the pbbans site.  They provide anticheat services for gaming communities, and are pretty good at it.  So the cheaters get upset and try to DDOS them, which appears to be taking place at the moment :(