Page 1 of 2

page_title

Posted: Tue Feb 28, 2006 1:13 am
by Leon
In my Overall_Header file i have this code:

<title>Volunteer Forum - {PAGE_TITLE}</title>

So all pages become: Volunteer Forum - "And the title here"

But when i add a titel at a website i created, there still is no
title as it should be.


Image

Any idé why ?

Maybe fix this to the next version ?

Posted: Tue Feb 28, 2006 8:42 am
by battye
So you are putting <title>Volunteer Forum - {PAGE_TITLE}</title> in the actual HTML box?

Posted: Tue Feb 28, 2006 5:48 pm
by Leon
I have that Code in my overall_header.tpl (Same whit META Tags)

And at the root of all files i have lets say
Links.php

In that file i create
// set page title
$page_title = 'Volunteer Links';


And for the page Aboutus.php in the root
i have
// set page title
$page_title = 'About Us';

(I also have a link.tpl in my morpheus folder, but that is not affected by this)

Posted: Wed Mar 01, 2006 2:08 pm
by battye
As long as $page_title is listed before the include_once(.......overall_header.php) it will work.

If $page_title is listed after that, then it will not work :)

Posted: Fri Mar 03, 2006 12:47 am
by Leon
I cant find any "include_once" in that file :?

overall_header.tpl

Code: Select all

<!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" dir="{S_CONTENT_DIRECTION}">
<head>

<meta http-equiv="Content-Type" content="text/html; charset={S_CONTENT_ENCODING}" />
<meta http-equiv="Content-Style-Type" content="text/css" />
<meta name="description" content="Volunteer Forum, Volontär Forum, Talk Discuss or Debate Volunteer 'ing" /> 
<meta name="keywords" content="Volunteer forum, Volontär forum, Community, Organisations, Portal, Website, Photo, Volunteer" />
<meta name="Author" content="http://www.phpbbstyles.com, Volunteer Forum" />
{META}

{NAV_LINKS}
<title>Volunteer Forum - {PAGE_TITLE}</title>
<link rel="stylesheet" href="{T_TEMPLATE_PATH}/style_{TPL_COLOR}.css" type="text/css" />
<style type="text/css">
<!--
@import url("{T_TEMPLATE_PATH}/formIE.css"); 
-->
</style>
<script language="javascript" type="text/javascript">
<!--

var PreloadFlag = false;
var expDays = 90;
var exp = new Date(); 
var tmp = '';
var tmp_counter = 0;
var tmp_open = 0;

exp.setTime(exp.getTime() + (expDays*24*60*60*1000));

function SetCookie(name, value) 
{
	var argv = SetCookie.arguments;
	var argc = SetCookie.arguments.length;
	var expires = (argc > 2) ? argv[2] : null;
	var path = (argc > 3) ? argv[3] : null;
	var domain = (argc > 4) ? argv[4] : null;
	var secure = (argc > 5) ? argv[5] : false;
	document.cookie = name + "=" + escape(value) +
		((expires == null) ? "" : ("; expires=" + expires.toGMTString())) +
		((path == null) ? "" : ("; path=" + path)) +
		((domain == null) ? "" : ("; domain=" + domain)) +
		((secure == true) ? "; secure" : "");
}

function getCookieVal(offset) 
{
	var endstr = document.cookie.indexOf(";",offset);
	if (endstr == -1)
	{
		endstr = document.cookie.length;
	}
	return unescape(document.cookie.substring(offset, endstr));
}

function GetCookie(name) 
{
	var arg = name + "=";
	var alen = arg.length;
	var clen = document.cookie.length;
	var i = 0;
	while (i < clen) 
	{
		var j = i + alen;
		if (document.cookie.substring(i, j) == arg)
			return getCookieVal(j);
		i = document.cookie.indexOf(" ", i) + 1;
		if (i == 0)
			break;
	} 
	return null;
}

function ShowHide(id1, id2, id3) 
{
	var res = expMenu(id1);
	if (id2 != '') expMenu(id2);
	if (id3 != '') SetCookie(id3, res, exp);
}
	
function expMenu(id) 
{
	var itm = null;
	if (document.getElementById) 
	{
		itm = document.getElementById(id);
	}
	else if (document.all)
	{
		itm = document.all[id];
	} 
	else if (document.layers)
	{
		itm = document.layers[id];
	}
	if (!itm) 
	{
		// do nothing
	}
	else if (itm.style) 
	{
		if (itm.style.display == "none")
		{ 
			itm.style.display = ""; 
			return 1;
		}
		else
		{
			itm.style.display = "none"; 
			return 2;
		}
	}
	else 
	{
		itm.visibility = "show"; 
		return 1;
	}
}

//-->
</script>
</head>
<body bgcolor="#FFFFFF" text="#000000" link="#3B88C5" vlink="#3279B2" alink="#FF9C00">
<a name="top"></a>
<table border="0" cellspacing="0" cellpadding="0" width="100%" height="100%">
<tr>
	<td width="10" class="border_left"><img src="{T_TEMPLATE_PATH}/images/spacer.gif" width="10" height="1" alt="" /></td>
	<td width="100%" height="100%" class="content" align="center" valign="top">
	<div id="header-box">
		<div id="header-left"><a href="{U_INDEX}"><img src="{T_TEMPLATE_PATH}/images/{TPL_COLOR}/logo_left.gif" width="125" height="69" alt="{L_INDEX}" /></a></div>
 		<div id="header-right"><img src="{T_TEMPLATE_PATH}/images/{TPL_COLOR}/logo_right.gif" width="125" height="69" alt="" /></div>
		<div id="header-center">
			<b>{SITENAME}</b><br />
			{SITE_DESCRIPTION}
		</div>
	</div>
	<div id="navigation">
			<!-- BEGIN switch_user_logged_out -->
			&nbsp;<a href="{U_REGISTER}">{L_REGISTER}</a>&nbsp; | 
			<!-- END switch_user_logged_out -->
			&nbsp;<a href="{U_INDEX}">Forum</a>&nbsp; |
			&nbsp;<a href="{U_PORTAL}">Portal</a>&nbsp; | 
			&nbsp;<a href="websiteindex.php">Website</a>&nbsp; |
			&nbsp;<a href="{U_ALBUM}">{L_ALBUM}</a>&nbsp; |
			&nbsp;<a href="links.php">Links</a>&nbsp; |
			&nbsp;<a href="{U_FAQ}">{L_FAQ}</a>&nbsp; | 
			&nbsp;<a href="{U_SEARCH}">{L_SEARCH}</a>&nbsp; | 
			&nbsp;<a href="{U_MEMBERLIST}">{L_MEMBERLIST}</a>&nbsp; | 
			&nbsp;<a href="{U_GROUP_CP}">{L_USERGROUPS}</a>&nbsp; | 
			<!-- BEGIN switch_user_logged_in -->
			&nbsp;<a href="{U_PROFILE}">{L_PROFILE}</a>&nbsp; | 
			&nbsp;<a href="{U_PRIVATEMSGS}">{L_PRIVATEMSGS}{C_PM}</a>&nbsp; | 
			<!-- END switch_user_logged_in -->
			&nbsp;<a href="{U_LOGIN_LOGOUT}">{CA_L_LOGIN_LOGOUT}</a>&nbsp;
	</div>
	<div id="content">
	<!-- BEGIN switch_xs_enabled -->
	<?php if($this->vars['CA_NEW_MSGS'] && $this->vars['PRIVATE_MESSAGE_INFO'] !== $this->vars['CA_L_NO_MSG'] && !defined('CA_POPUP_SHOWED')) { ?>
	<div id="newmsgs"><a href="{U_PRIVATEMSGS}" class="newmsgs">{PRIVATE_MESSAGE_INFO}</a></div>
	<?php define('CA_POPUP_SHOWED', true); } ?>
	<!-- END switch_xs_enabled -->

	<!-- BEGIN ca_new_privmsgs -->
	{CA_XS_COMMENT_START}<div id="newmsgs"><a href="{U_PRIVATEMSGS}" class="newmsgs">{ca_new_privmsgs.TEXT}</a></div>{CA_XS_COMMENT_END}
	<!-- END ca_new_privmsgs -->

Posted: Fri Mar 03, 2006 1:37 am
by Burian
That is not a php file. That is a html file (or most likely a .tpl file if this is for phpbb). You need to find the php file that that html file corresponds to.

Posted: Fri Mar 03, 2006 11:20 am
by battye
Yeah, it's likely the file you would want to edit is Links.php

Posted: Fri Mar 03, 2006 3:28 pm
by Leon
links.php :?:
What has that file to do whit this ?
I cant even think of one reason why my links page
has something to do whit this problem. :?

As i said, i can not see the titel in a created website
by the mod.

Example:
Demo 1 - Titel: Volunteer Forum - - <--No titel
http://www.volunteerforum.org/forum/website.php?id=2

Another page: Volunteer Forum - Create a free blablabla <--Titel
http://www.volunteerforum.org/forum/portal.php?page=25

I think it has to do whit like:
website.php
Or something

Damn i'm annoying hehehe 8)

Posted: Fri Mar 03, 2006 7:21 pm
by Leon
It works when

It works when i add:
// set page title
$page_title = 'Website';

In the website.php

But then the problem is that all created websites gets the same topic.

Posted: Sat Mar 04, 2006 1:34 am
by battye
In website.php, find

Code: Select all

		'W_TITLE' => $title_website,
Replace with

Code: Select all

		'W_TITLE' => 'Website - ' . $title_website,
Does that do want you want?

:)

Posted: Sat Mar 04, 2006 1:39 am
by Leon
I cant find that:

Code: Select all

<?php
/***************************************************************************
 *                               website.php
 *                            -------------------
 *   begin                : Thursday, Jun 09, 2005
 *   copyright          : (C) 2005 Battye @ CricketMX.com
 *   email                : cricketmx@hotmail.com
 *
 *   $Id: website.php, v1.000.0.00 2005/09/06 21:18:36 battye Exp $
 *
 *
 ***************************************************************************/

/***************************************************************************
 *
 *   This program is free software; you can redistribute it and/or modify
 *   it under the terms of the GNU General Public License as published by
 *   the Free Software Foundation; either version 2 of the License, or
 *   (at your option) any later version.
 *
 ***************************************************************************/

define('IN_PHPBB', true);
$phpbb_root_path = './';
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);
include($phpbb_root_path . 'config.'.$phpEx);
include($phpbb_root_path . '/includes/constants.'.$phpEx);
include($phpbb_root_path . '/includes/functions_website.'.$phpEx);
include($phpbb_root_path . 'includes/bbcode.'.$phpEx);

//
// Start session management
//
$userdata = session_pagestart($user_ip, PAGE_INDEX);
init_userprefs($userdata);
//
// End session management
//

/* // For testing purposes
$lang['No_website'] = 'No website has been configured at this address!';
$lang['No_website_chosen'] = 'No website has been entered';
$lang['MOD_provided_website'] = 'User Website MOD &copy; <a href=http://www.cricketmx.com>battye</a> 2005';
$lang['Admin_website'] = 'Administer Website';
$lang['Admin_sitename'] = 'Select an appropriate name for your website:';
$lang['Admin_sitetext'] = 'Enter the HTML for your site here:<br /><span class="genmed">Or use site %stemplates%s!';
$lang['Admin_website_updated'] = 'Website updated successfully!<br />Click %shere%s to view your site!';
$lang['Admin_website_colour'] = 'Choose a background colour for your site:';
$lang['Admin_website_nav'] = 'Administer Website';
$lang['Admin_website_back'] = 'Click <a href="javascript: history.go(-1)">here</a> to go back and make changes, or Submit!'; 
$lang['Admin_website_view_template'] = 'View Templates';
$lang['Admin_wesbite_theme_name'] = 'Template Name';
$lang['Admin_wesbite_theme_desc'] = 'Template Description';
$lang['Admin_wesbite_theme_auth'] = 'Template Author';
$lang['Admin_wesbite_use_temp'] = 'Use Template';
$lang['Admin_wesbite_preview_theme'] = 'Preview Template';
$lang['Admin_css'] = 'Enter the CSS for your site here:';
$lang['Admin_user_banned'] = 'You have been banned from creating a website!<br />Please contact an administrator for further details!';
$lang['Admin_group_banned'] = 'This usergroup has been banned from creating a website!<br />Please contact an administrator for further details!';
$lang['Admin_user_low_post'] = 'You need to have at least %s posts to create a website!<br />Please contact an administrator for further details!';
$lang['Admin_mod_off'] = 'This feature has been disabled by an administrator.'; 
$lang['Admin_user_not_enabled'] = 'Users are not allowed to have websites!';

$lang['Admin_group_not_enabled'] = 'Usergroups are not allowed to have websites!'; */
// $lang['Admin_website_hits'] = 'This page has had %d hits!';
// Gotta remember to put this in constants.php
	/* // User Website MOD
	define('WEB_YES', '1');
	define('WEB_NO', '0');
 */
/* 
$uwm_lang = array();
$uwm_lang['TABLE_HEADING'] = 'Table Heading';
$uwm_lang['SITE_DESCRIPTION'] = 'Enter a description of your site here';
$uwm_lang['LINK_DESCRIPTION'] = 'Enter a description of your link here';
$uwm_lang['CONTENT'] = 'Enter content here';
$uwm_lang['FONT_FACE'] = 'Verdana';
$uwm_lang['FONT_SIZE'] = '2'; */


// Ok let's begin outputting the site.. not just yet though.. haha tricked you :-)
if(isset($HTTP_GET_VARS['id']) || intval($HTTP_GET_VARS['group_id']) && $HTTP_GET_VARS['mode'] != "owner")
{
uwm_enabled();
user_or_group_enabled($HTTP_GET_VARS['group_id']);

	if(intval($HTTP_GET_VARS['id']) || intval($HTTP_GET_VARS['group_id']))
	{
		$id = (intval($HTTP_GET_VARS['id'])) ? $HTTP_GET_VARS['id'] : $HTTP_GET_VARS['group_id'];
		
		if(intval($HTTP_GET_VARS['id']))
		{
		$hits = "UPDATE " . USERS_TABLE . " SET user_website_hits = user_website_hits + 1 WHERE user_id = " . $HTTP_GET_VARS['id']; 	
		
		if(!$db->sql_query($hits))
		{
		message_die(GENERAL_ERROR, 'Could not update hit counter');
		}
	
		$sql = "SELECT * FROM " . USERS_TABLE . " WHERE user_id = '" . $id . "'";
		}
		
		if(intval($HTTP_GET_VARS['group_id']))
		{
			// Are they a member?
			if(user_group_member($userdata['user_id'], $HTTP_GET_VARS['group_id']) == 2)
			{
			message_die(CRITICAL_ERROR, $lang['Admin_only_group_can_make_edit']);
			}
		
		$hits = "UPDATE " . GROUPS_TABLE . " SET user_website_hits = user_website_hits + 1 WHERE group_id = " . $HTTP_GET_VARS['group_id']; 	
		
		if(!$db->sql_query($hits))
		{
		message_die(GENERAL_ERROR, 'Could not update hit counter');
		}
		
		$sql = "SELECT * FROM " . GROUPS_TABLE . " WHERE group_id = '" . $id . "'";
		}
		
		
		if(!$result = $db->sql_query($sql))
		{
		message_die(GENERAL_ERROR, 'Could not grab information');
		}
		
		while($user_website = $db->sql_fetchrow($result))
		{
			if (!$user_website['user_website_html']) 
			{
			message_die(GENERAL_ERROR, $lang['No_website']);
			} 
			
			$user_website['user_website_title'] = str_replace($chars, $tags, $user_website['user_website_title']);
			$user_css = (isset($user_website['user_website_css'])) ? "<style type=\"text/css\"><br /><!--<br />" . $user_website['user_website_css'] . "<br />--><br /></style>" : ""; // Originally by Excursus
			
			$bad = array("<script", "<form", "<iframe", "<?php", "?>", "<html>", "<body>", "</html>", "</body>");
			$good = array("<script", "<form", "<iframe", "<?php", "?>", "<html>", "<body>", "</html>", "</body");
			// Changed to htmlspecialchars() and back again, damn error, how was *I* to know it wanted parameter 1 to be a string :rolls eyes:

			
			$title_website = (str_replace("''", "'", $user_website['user_website_title'])) ? str_replace("''", "'", $user_website['user_website_title']) : "";
			$user_html = str_replace("''", "'", str_replace($bad, $good, $user_website['user_website_html']));
			$user_html = bbencode_second_pass($user_html, '');
			$colour =  $user_website['user_website_colour'];
			
			if($board_config['website_hits'] == WEB_YES)
			{
			$hits_out = sprintf($lang['Admin_website_hits'], $user_website['user_website_hits']);
			}
			
			$db->sql_close();
		}
include($phpbb_root_path . "includes/page_header.$phpEx"); 
  // Ok, do it... 
      echo '<html>'; 
      echo $user_css; // Originally by Excursus 
      echo "<title>$title_website</title><table bgcolor=\"$colour\" width=\"100%\"><tr><td>";
      echo $user_html; 
      echo '</body></html>'; 
      echo '<br />'; 
      echo '<font face="Arial">'; 
      echo '<div align="center">User Website MOD &copy; <a href=http://www.online-scrabble.com>battye</a> 2005<br /> 
      Powered by <a href="http://www.phpbb.com/" target="_phpbb" class="copyright">phpBB</a> &copy; 2001, 2005 phpBB Group'; 
      echo '<br /><br />'; 
      echo $board_config['website_footer']; 
      echo '<br />'; 
      echo $hits_out; 
      echo '</div></td></tr></table></font>'; 
   }
	
	else
	{
	message_die(GENERAL_ERROR, $lang['No_website_chosen']);
	}
}


	if($HTTP_GET_VARS['mode'] == "owner" && $userdata['session_logged_in'])
	{
	uwm_enabled();
	user_or_group_enabled($HTTP_GET_VARS['group_id']);
		
		if(intval($HTTP_GET_VARS['group_id']))
		{
			// Are they a member?
			if(user_group_member($userdata['user_id'], $HTTP_GET_VARS['group_id']) == 2)
			{
			message_die(CRITICAL_ERROR, $lang['Admin_only_group_can_make_edit']);
			}
	
		$sql = "SELECT * FROM " . GROUPS_TABLE . " WHERE group_id = " . intval($HTTP_GET_VARS['group_id']);
		}
		
		else
		{
		$sql = "SELECT * FROM " . USERS_TABLE . " WHERE user_id = " . $userdata['user_id'];
		}
		
		if(!$result = $db->sql_query($sql))
		{
		message_die(GENERAL_ERROR, 'Could not grab information');
		}
		
		$gu_data = $db->sql_fetchrow($result);
	
			if($HTTP_GET_VARS['view'] == "templates")
			{
				// From php.net: readdir
			if(!(isset($HTTP_GET_VARS['filename'])))
			{
				if ($handle = opendir('./html_templates')) 
				{
				include($phpbb_root_path . "includes/page_header.$phpEx");
				$page_title = $lang['Admin_website_view_template'];
				$template->set_filenames(array("admin_t" => "admin_view_site_template_body.tpl"));

					/* This is the correct way to loop over the directory. */
					while (false !== ($file = readdir($handle)))
					{
						if(get_site_template_html("description", $file) != '')
						{
						$file_link = "<a href='./website.$phpEx?mode=owner&view=templates&filename=$file'>$file</a>"; // Filename
					
						$template->assign_block_vars('temp', array( 
						"U_LINK" => $file_link,
						"U_DESC" => str_replace("Description: ", "", get_site_template_html("description", $file)),
						"U_AUTHOR" => str_replace("Author: ", "", get_site_template_html("author", $file))));
						}
					}
					
					$template->assign_vars(array( 
						"L_LINK_NAME" => $lang['Admin_wesbite_theme_name'],
						"L_DESCRIPTION" => $lang['Admin_wesbite_theme_desc'],
						"L_AUTHOR_NAME" => $lang['Admin_wesbite_theme_auth']));
					$template->pparse("admin_t");
					include($phpbb_root_path . "includes/page_tail.$phpEx");
				}
			}
				
				if(isset($HTTP_GET_VARS['filename']))
				{
				include($phpbb_root_path . "includes/page_header.$phpEx");
				$page_title = $lang['Admin_website_view_template'];
				$template->set_filenames(array("admin_vt" => "admin_consider_template_body.tpl"));
				
				$template->assign_vars(array( 
				"U_NAME" => $HTTP_GET_VARS['filename'],
				"U_FULL_DESC" => str_replace("Description: ", "", get_site_template_html("description", $HTTP_GET_VARS['filename'])),
				"U_AUTH_NAME" => str_replace("Author: ", "", get_site_template_html("author", $HTTP_GET_VARS['filename'])),
				"U_CSS" => nl2br(htmlspecialchars("<style type=\"text/css\">" . get_site_template_html('css', $HTTP_GET_VARS['filename']) . "\n</style>")),
				"U_HTML" => nl2br(htmlspecialchars(get_site_template_html("html", $HTTP_GET_VARS['filename']))),
				"U_FORM" => append_sid("website.$phpEx?mode=owner"),
				"U_FORM_P" => append_sid("website.$phpEx?mode=preview"),
				"U_HIDDEN" => str_replace("<", "<", get_site_template_html("html", $HTTP_GET_VARS['filename'])),
			
				"L_PRE_TEMP" => $lang['Admin_wesbite_preview_theme'],
				"L_DESC" => $lang['Admin_wesbite_theme_desc'],
				"L_USE_TEMP" => $lang['Admin_wesbite_use_temp'],
				"L_AUTHOR" => $lang['Admin_wesbite_theme_auth']));
				
				$template->pparse("admin_vt");
				include($phpbb_root_path . "includes/page_tail.$phpEx");
				}
			}
			
			else
			{
				if(isset($HTTP_POST_VARS['pre_temp']))
				{
				echo "<style type=\"text/css\"><br /><!--<br />" . get_site_template_html("css", $HTTP_POST_VARS['html']) . "<br />--><br /></style>";
				echo get_site_template_html("html", $HTTP_POST_VARS['html']);
				die();
				}
				
				if(isset($HTTP_POST_VARS['use_temp']))
				{
				$userdata_revised_text = get_site_template_html("html", $HTTP_POST_VARS['html']);
				$userdata_revised_css = get_site_template_html("css", $HTTP_POST_VARS['html']);
				}
				
				else
				{
				$userdata_revised_text = stripslashes(str_replace("''", "'", $gu_data['user_website_html']));
				$userdata_revised_css = stripslashes(str_replace("''", "'", $gu_data['user_website_css']));
				}
			
			check_web_ban("user", "");
			
			if(isset($HTTP_GET_VARS['group_id']))
			{
			check_web_ban("group", $HTTP_GET_VARS['group_id']);
			}
			
			include($phpbb_root_path . "includes/page_header.$phpEx");
			$page_title = $lang['Admin_website'];
			$template->set_filenames(array("admin" => "admin_website_body.tpl"));
			$template->assign_vars(array( 
			"L_ADMIN_WEBSITE" => $lang['Admin_website_nav'],
			"L_SITENAME" => $lang['Admin_sitename'],
			"L_SITETEXT" => sprintf($lang['Admin_sitetext'], "<a href='./website.$phpEx?mode=owner&view=templates'>", "</a>"),
			"L_SITECOLOUR" => $lang['Admin_website_colour'],
            "L_CSS" => $lang['Admin_css'],
			"L_SUBMIT" => $lang['Submit'],
			"L_PREVIEW" => $lang['Preview'],
			
			"U_SITECOLOUR" => $gu_data['user_website_colour'],
            "U_CSS" => $userdata_revised_css,
			"U_SITENAME" => $gu_data['user_website_title'],
			"U_SITETEXT" => $userdata_revised_text,
	
			"GROUP" => (intval($HTTP_GET_VARS['group_id'])) ? $HTTP_GET_VARS['group_id'] : '',
			"FORM" => append_sid("website.$phpEx?mode=sql")));
			
		$template->pparse("admin");
		include($phpbb_root_path . "includes/page_tail.$phpEx");
			}
	}
	
	if($HTTP_GET_VARS['mode'] == "sql" && $userdata['session_logged_in'])
	{
	uwm_enabled();
	user_or_group_enabled($HTTP_POST_VARS['group']);
	
		if(!$HTTP_POST_VARS)
		{
		message_die(CRITICAL_ERROR, 'No $HTTP_POST_VARS found!');
		}
		
		if(isset($HTTP_POST_VARS['preview']))
		{
			$site_text = bbencode_first_pass(str_replace("\'", "''", $HTTP_POST_VARS['Sitetext']), '');
			$site_text = str_replace($chars, $tags, $site_text);
			$site_title = str_replace("\'", "''", $HTTP_POST_VARS['Sitename']);
			
			$user_css = (isset($HTTP_POST_VARS['Sitecss'])) ? "<style type=\"text/css\"><br /><!--<br />" . $HTTP_POST_VARS['Sitecss'] . "<br />--><br /></style>" : ""; // Originally by Excursus
			
			$bad = array("<script", "<form", "<iframe", "<?php", "?>", "<html>", "<body>", "</html>", "</body>");
			$good = array("<script", "<form", "<iframe", "<?php", "?>", "<html>", "<body>", "</html>", "</body");
			
			$title_website = (str_replace("''", "'", $site_title)) ? str_replace("''", "'", $site_title) : "";
			$user_html = stripslashes(str_replace("''", "'", str_replace($bad, $good, $site_text)));
			$user_html = bbencode_second_pass($user_html, '');
			$colour = str_replace("'", "''", $HTTP_POST_VARS['Sitecolour']); 
			$db->sql_close();
		
		
		echo '<html><body bgcolor="' . $colour . '">';
	    echo $user_css;
		echo "<title>$title_website</title>";
		echo $user_html;
		echo '</body></html>';
		echo '<br />';
		echo '<font face="Arial"><table width="100%"><tr><td align="center">';
		echo $lang['Admin_website_back'];
		echo '</td></tr></table></font>';
		}			
		
		if(isset($HTTP_POST_VARS['submit']))
		{
			$site_text = bbencode_first_pass(str_replace("\'", "''", $HTTP_POST_VARS['Sitetext']), '');
			$site_title = str_replace("\'", "''", $HTTP_POST_VARS['Sitename']);
			$site_css = str_replace("\'", "''", $HTTP_POST_VARS['Sitecss']);
			
			if(intval($HTTP_POST_VARS['group']))
			{	
			$sql = "UPDATE " . GROUPS_TABLE . " SET user_website_title = '$site_title', user_website_colour = '" . str_replace("'", "''", $HTTP_POST_VARS['Sitecolour']) . "', user_website_css = '$site_css', user_website_html = '$site_text' WHERE group_id = " . $HTTP_POST_VARS['group'];
			}
			
			else
			{
			$sql = "UPDATE " . USERS_TABLE . " SET user_website_title = '$site_title', user_website_colour = '" . str_replace("'", "''", $HTTP_POST_VARS['Sitecolour']) . "', user_website_css = '$site_css', user_website_html = '$site_text' WHERE user_id = " . $userdata['user_id'];
			}
			
			if(!$db->sql_query($sql))
			{
			message_die(GENERAL_ERROR, 'Could not update user website information');
			}
			
			else
			{
				if(intval($HTTP_POST_VARS['group']))
				{
				message_die(GENERAL_MESSAGE, sprintf($lang['Admin_website_updated'], "<a href='./website.$phpEx?group_id=" . intval($HTTP_POST_VARS['group']) . "'>", "</a>"));
				}
			
				else
				{
				message_die(GENERAL_MESSAGE, sprintf($lang['Admin_website_updated'], "<a href='./website.$phpEx?id=" . $userdata['user_id'] . "'>", "</a>"));
				}
			}
		}
	}
?> 

Posted: Sat Mar 04, 2006 1:41 am
by battye
Ok find:

Code: Select all

echo "<title>$title_website</title><table bgcolor=\"$colour\" width=\"100%\"><tr><td>"; 
Replace with

Code: Select all

echo "<title>Website - $title_website</title><table bgcolor=\"$colour\" width=\"100%\"><tr><td>"; 

Posted: Sat Mar 04, 2006 3:32 am
by Leon
Does not seems to work.

http://www.volunteerforum.org/forum/website.php?id=3

Btw, should i maybe write something else then
<titel>blabla</titel>
in the:
website.php?mode=owner
page for it to work ?
Enter the HTML for your site here:
Or use site templates!



Btw not even the page:
website.php?mode=owner
has an own titel :?

Posted: Sat Mar 04, 2006 3:33 pm
by Leon
I want that the titel should come from:
"Select an appropriate name for your website:"
from the page: website.php?mode=owner
As it is here on this websitemod on your page.
I wonder why its not woring at my site =/

So my Demo 1 page could be
Volunteer Forum - Demo 1
if i use Demo 1 as name for that page

Posted: Tue Mar 07, 2006 10:17 am
by battye
Leon wrote:Does not seems to work.

http://www.volunteerforum.se/website.php?id=3

Btw, should i maybe write something else then
<titel>blabla</titel>
in the:
website.php?mode=owner
page for it to work ?
Enter the HTML for your site here:
Or use site templates!



Btw not even the page:
website.php?mode=owner
has an own titel :?
Does using that work?

ie. Typing <title>blabla</title> in the HTML box

:)