Page 1 of 1

The Includes folder in the Simple Portal download

Posted: 07 Feb 2014, 12:03
by Garry
I downloaded the Simple Portal Mod
I read the install file

Code: Select all

Files to edit
viewonline.php,
includes/functions.php,
language/en/common.php,
styles/prosilver/template/overall_footer.html,
styles/prosilver/template/overall_header.html

Included files
root/portal.php
root/language/en/mods/simple_portal.php
root/styles/prosilver/template/simpleportal_body.html
root/includes/portal/*.*


Additional MODX files
This MOD has no additional MODX files.


I was doing fine until I got to the last copy ( root/includes/portal/*.* )

I do not seem to have a directory called ( includes ) in the downloaded mod

I can see an includes dir in my forum files where I am supposed to copy the files to but I cant copy something that is not there .

Am I missing something ???

The Includes folder in the Simple Portal download

Posted: 07 Feb 2014, 13:03
by Stoker
Use the install file from the download instead.
The one online is out of date, which will be fixed asap ;)

The Includes folder in the Simple Portal download

Posted: 07 Feb 2014, 15:35
by Garry
Forum myCorkBoard.ca/first


I have followed the instructions to a T

This is what bI got when I loaded the forum on the index page

Code: Select all

[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4753: Cannot modify header information - headers already sent by (output started at [ROOT]/language/en/common.php:1)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4755: Cannot modify header information - headers already sent by (output started at [ROOT]/language/en/common.php:1)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4756: Cannot modify header information - headers already sent by (output started at [ROOT]/language/en/common.php:1)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4757: Cannot modify header information - headers already sent by (output started at [ROOT]/language/en/common.php:1)
This is what I got when I went to the ACP to refresh the theme

A blank screen with this message

Code: Select all

[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 2623: Cannot modify header information - headers already sent by (output started at [ROOT]/language/en/common.php:1)

The Includes folder in the Simple Portal download

Posted: 07 Feb 2014, 15:42
by Stoker
So what did you do to that particular file (functions.php) ?

The Includes folder in the Simple Portal download

Posted: 07 Feb 2014, 15:58
by Garry

Code: Select all

<?php
/**
*
* @package phpBB3
* @version $Id$
* @copyright (c) 2005 phpBB Group
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
*/

/**
* @ignore
*/
if (!defined('IN_PHPBB'))
{
	exit;
}

// Common global functions

/**
* set_var
*
* Set variable, used by {@link request_var the request_var function}
*
* @access private
*/
function set_var(&$result, $var, $type, $multibyte = false)
{
	settype($var, $type);
	$result = $var;

	if ($type == 'string')
	{
		$result = trim(htmlspecialchars(str_replace(array("\r\n", "\r", "\0"), array("\n", "\n", ''), $result), ENT_COMPAT, 'UTF-8'));

		if (!empty($result))
		{
			// Make sure multibyte characters are wellformed
			if ($multibyte)
			{
				if (!preg_match('/^./u', $result))
				{
					$result = '';
				}
			}
			else
			{
				// no multibyte, allow only ASCII (0-127)
				$result = preg_replace('/[\x80-\xFF]/', '?', $result);
			}
		}

		$result = (STRIP) ? stripslashes($result) : $result;
	}
}

/**
* request_var
*
* Used to get passed variable
*/
function request_var($var_name, $default, $multibyte = false, $cookie = false)
{
	if (!$cookie && isset($_COOKIE[$var_name]))
	{
		if (!isset($_GET[$var_name]) && !isset($_POST[$var_name]))
		{
			return (is_array($default)) ? array() : $default;
		}
		$_REQUEST[$var_name] = isset($_POST[$var_name]) ? $_POST[$var_name] : $_GET[$var_name];
	}

	$super_global = ($cookie) ? '_COOKIE' : '_REQUEST';
	if (!isset($GLOBALS[$super_global][$var_name]) || is_array($GLOBALS[$super_global][$var_name]) != is_array($default))
	{
		return (is_array($default)) ? array() : $default;
	}

	$var = $GLOBALS[$super_global][$var_name];
	if (!is_array($default))
	{
		$type = gettype($default);
	}
	else
	{
		list($key_type, $type) = each($default);
		$type = gettype($type);
		$key_type = gettype($key_type);
		if ($type == 'array')
		{
			reset($default);
			$default = current($default);
			list($sub_key_type, $sub_type) = each($default);
			$sub_type = gettype($sub_type);
			$sub_type = ($sub_type == 'array') ? 'NULL' : $sub_type;
			$sub_key_type = gettype($sub_key_type);
		}
	}

	if (is_array($var))
	{
		$_var = $var;
		$var = array();

		foreach ($_var as $k => $v)
		{
			set_var($k, $k, $key_type);
			if ($type == 'array' && is_array($v))
			{
				foreach ($v as $_k => $_v)
				{
					if (is_array($_v))
					{
						$_v = null;
					}
					set_var($_k, $_k, $sub_key_type, $multibyte);
					set_var($var[$k][$_k], $_v, $sub_type, $multibyte);
				}
			}
			else
			{
				if ($type == 'array' || is_array($v))
				{
					$v = null;
				}
				set_var($var[$k], $v, $type, $multibyte);
			}
		}
	}
	else
	{
		set_var($var, $var, $type, $multibyte);
	}

	return $var;
}

/**
* Sets a configuration option's value.
*
* Please note that this funct

Only as your instructions said ( I think )

Code: Select all

		'U_FAQ'					=> append_sid("{$phpbb_root_path}faq.$phpEx"),
		'U_PORTAL'				=> append_sid("{$phpbb_root_path}portal.$phpEx"),
Added the line your instruction nsaid after the line I found

The Includes folder in the Simple Portal download

Posted: 07 Feb 2014, 17:23
by Steve
/en/common.php:1 <-- language entry to common.php was made...
use notepad++ to edit files and save as utf-8 with out BOM

The Includes folder in the Simple Portal download

Posted: 07 Feb 2014, 17:41
by Garry
Thanks Steve

But I have to admit I have no idea of what you just told me

Code: Select all

/en/common.php:1 <-- language entry to common.php was made...
use notepad++ to edit files and save as utf-8 with out BOM

The Includes folder in the Simple Portal download

Posted: 08 Feb 2014, 09:07
by Stoker

The Includes folder in the Simple Portal download

Posted: 08 Feb 2014, 15:25
by Garry
Thank you Steve and Stoker

I had already figured out that I needed to use the Notepad++ to save the file

but I didn't know why It had to be saved like that ( as utf-8 with out BOM )

Now I understand and I have a much better text editor with FTP built into it ( Bonus )

==============

I managed to get the portal installed and working

I was in the simple_portal.php file and saw where you change the message

I am assuming the other mods for it that I can download also are set up inside the same file . I will check it out today

============

I also installed the SE Pro theme with collapsable sections

I have a few questions if I may :

The menu on this forum has different menu Choices than My forum .
Is that a mod to add and change menu choices or is it just editing one of the HTML/PHP files ?

IF you would be so kind as to instruct me as to how to do that or where to read about or down load the MOD I would really appreciate it '

--------------------

When I go to your board it loads the Portal Screen first instead of the index. To get to the portal I have to change my url to ( mycorkboard.ca/first/portal.php )

Is this action ( what Page is loaded first ) controlled by the position of the Menu layout ?

==================================

at the bottom of the index screen there are board statistics

Code: Select all

STATISTICS
Total posts 1 • Total topics 1 • Total members 1 • Our newest member Garry
What file would I edit to get rid of this information on the Index screen

I see that I can turn off everything except this info from the ACP>General>server configuration>load settings but not that line

=====================================

Now this is a question for Stoker that may be way out there

Your Simple Portal is just a page that is created by the coding that you had me install in various places .

It works very well and is a nice Mod

The information that appears on the page is controlled by whatever I enter into the simple_portal.php file in the dir that it lives in .....

If I wanted to change the information that shows up on the index page all I have to do is change the information thats in that file.

Is there any reason why I couldn't have several files in the same dir that have different names such as

simple_portal.php ( the working file )
simple_portal_1.php ( a different set of information )in the file
simple_portal_2.php ( another different set of information )in the file
simple_portal_2.php ( and another different set of information )in the file
and so on

Now I know I could use and FTP and rename any file I want to the called file that would show up in the Portal Page

Here is my question

Could the same routines be used to call up the Portal page wherever I want it ( in the forum ) but Where I as the administrator ( could decide which file I choose to use at that time )

Could something like this be done using a BBCode as an example

All Id really be doing is using a bbCode to ( Insert ) the name of the file I wish to call into a Variable in a BBCode

Or is there a more simple way to call up a plain page that I can put information on

-----

Can a external WebPage be inserted into the Portal Page as a iFrame ???

Thanks

I assume a donation to your forum to help cover operating costs would also suffice as a ( Thank You ) for what you are teaching me by answering my questions and letting me play ....