ACP Site Announcement Centre

All new MODs released in our MOD Database will be announced in here. All support for released MODs needs to take place in here. No new MODs will be accepted into the MOD Database for phpBB2
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

On February 1, 2009 this forum will be set to read only as part of retiring of phpBB2.
User avatar
bart0507
Registered User
Posts: 141
Joined: Sun Jun 29, 2008 11:37 pm

Re: ACP Site Announcement Centre

Post by bart0507 »

yes i have done that, the box is there but no text on my index page
User avatar
lefty74
Registered User
Posts: 3649
Joined: Wed Sep 14, 2005 8:26 pm
Location: NL
Contact:

Re: ACP Site Announcement Centre

Post by lefty74 »

could you pse post your index_body.html?
lefty74
zoocrew.eu - help us save our wildlife
My MODS | Due to lack of time I unfortunately am unable to work on my mods anymore, anyone who has ideas to improve them and would like to take any of them over, please PM me.
User avatar
bart0507
Registered User
Posts: 141
Joined: Sun Jun 29, 2008 11:37 pm

Re: ACP Site Announcement Centre

Post by bart0507 »

What is that file where do i find it,which folder,sorry i'm a noob. :)
User avatar
lefty74
Registered User
Posts: 3649
Joined: Wed Sep 14, 2005 8:26 pm
Location: NL
Contact:

Re: ACP Site Announcement Centre

Post by lefty74 »

bart0507 wrote:What is that file where do i find it,which folder,sorry i'm a noob. :)
ooops, its phpbb2 so it should be index_body.tpl
the subsilver style file can be found here:
templates\subSilver\index_body.tpl

you should should have something similar with the style you are using
templates\your styles here\index_body.tpl
lefty74
zoocrew.eu - help us save our wildlife
My MODS | Due to lack of time I unfortunately am unable to work on my mods anymore, anyone who has ideas to improve them and would like to take any of them over, please PM me.
User avatar
bart0507
Registered User
Posts: 141
Joined: Sun Jun 29, 2008 11:37 pm

Re: ACP Site Announcement Centre

Post by bart0507 »

Deleted my long ass post
Last edited by bart0507 on Tue Jul 08, 2008 2:36 am, edited 2 times in total.
User avatar
lefty74
Registered User
Posts: 3649
Joined: Wed Sep 14, 2005 8:26 pm
Location: NL
Contact:

Re: ACP Site Announcement Centre

Post by lefty74 »

that looks fine, did you upload the changes you made to your index.php file?

p.s. please use the code bbcode when posting lines of code, they are easier to read ;)
lefty74
zoocrew.eu - help us save our wildlife
My MODS | Due to lack of time I unfortunately am unable to work on my mods anymore, anyone who has ideas to improve them and would like to take any of them over, please PM me.
User avatar
bart0507
Registered User
Posts: 141
Joined: Sun Jun 29, 2008 11:37 pm

Re: ACP Site Announcement Centre

Post by bart0507 »

It all looks good the site annoucement added a nice touch to my forum, i did discover one problem, when i want to post reply, it goes to a blank screen, luckily i have the Site Announcement Centre , i can inform my members that I have a small problem :o , any way any suggestions what i did wrong??

Thanks for the help Lefty............ :D
User avatar
lefty74
Registered User
Posts: 3649
Joined: Wed Sep 14, 2005 8:26 pm
Location: NL
Contact:

Re: ACP Site Announcement Centre

Post by lefty74 »

hi bart, if it worked before you installed the announcement centre, the only thing i can think of is that one of the edits was not 100% right(maybe you added code before instead of after for example).

i would recommend to double check your edits one more time, if that fails, i can have a look at your edited files but i don't think i will be able to do that today.
lefty74
zoocrew.eu - help us save our wildlife
My MODS | Due to lack of time I unfortunately am unable to work on my mods anymore, anyone who has ideas to improve them and would like to take any of them over, please PM me.
User avatar
bart0507
Registered User
Posts: 141
Joined: Sun Jun 29, 2008 11:37 pm

Re: ACP Site Announcement Centre

Post by bart0507 »

Not sure what I did but its all good now, love the mods added some pics enhanced the look of my forum

Thanks again......... :D
User avatar
lefty74
Registered User
Posts: 3649
Joined: Wed Sep 14, 2005 8:26 pm
Location: NL
Contact:

Re: ACP Site Announcement Centre

Post by lefty74 »

:D you are welcome
lefty74
zoocrew.eu - help us save our wildlife
My MODS | Due to lack of time I unfortunately am unable to work on my mods anymore, anyone who has ideas to improve them and would like to take any of them over, please PM me.
o0zappy0o
Registered User
Posts: 7
Joined: Fri Jul 18, 2008 3:56 pm

Re: ACP Site Announcement Centre

Post by o0zappy0o »

where am I supposed to put this code below?

Code: Select all

#
#-----[ SQL ]------------------------------------------
#
CREATE TABLE `phpbb_announcement_centre` (
  `announcement_desc` varchar(255) NOT NULL default '',
  `announcement_value` text NOT NULL,
  PRIMARY KEY  (`announcement_desc`));
  
INSERT INTO phpbb_announcement_centre (announcement_desc, announcement_value) VALUES('announcement_text', '[size=18][color=red][b]Change your announcements via your admin panel.   :) [/b][/color][/size]'); 
INSERT INTO phpbb_announcement_centre (announcement_desc, announcement_value) VALUES('announcement_status', '1');
INSERT INTO phpbb_announcement_centre (announcement_desc, announcement_value) VALUES('announcement_access', '1');
INSERT INTO phpbb_announcement_centre (announcement_desc, announcement_value) VALUES('announcement_guest_text', '[size=18][color=blue][b]Change your guest announcements via your admin panel.   :) [/b][/color][/size]'); 
INSERT INTO phpbb_announcement_centre (announcement_desc, announcement_value) VALUES('announcement_guest_status', '1');
INSERT INTO phpbb_announcement_centre (announcement_desc, announcement_value) VALUES('announcement_text_draft', '[size=18][color=red][b]Preview in the ACP   :) [/b][/color][/size]'); 
INSERT INTO phpbb_announcement_centre (announcement_desc, announcement_value) VALUES('announcement_mod_version', 'v1.2.3');
INSERT INTO phpbb_announcement_centre (announcement_desc, announcement_value) VALUES('announcement_forum_id', '');
INSERT INTO phpbb_announcement_centre (announcement_desc, announcement_value) VALUES('announcement_topic_id', '');
INSERT INTO phpbb_announcement_centre (announcement_desc, announcement_value) VALUES('announcement_forum_topic_first_latest', '1');
INSERT INTO phpbb_announcement_centre (announcement_desc, announcement_value) VALUES('announcement_title', 'Site Announcements');
INSERT INTO phpbb_announcement_centre (announcement_desc, announcement_value) VALUES('announcement_guest_title', 'Site Announcements');

#
thanks
User avatar
lefty74
Registered User
Posts: 3649
Joined: Wed Sep 14, 2005 8:26 pm
Location: NL
Contact:

Re: ACP Site Announcement Centre

Post by lefty74 »

if you have phpmyadmin, you need to go to your database, and execute it there.

you can read below article for further info on how that should be done.
http://www.phpbb.com/community/viewtopi ... 0&t=588697
lefty74
zoocrew.eu - help us save our wildlife
My MODS | Due to lack of time I unfortunately am unable to work on my mods anymore, anyone who has ideas to improve them and would like to take any of them over, please PM me.
o0zappy0o
Registered User
Posts: 7
Joined: Fri Jul 18, 2008 3:56 pm

Re: ACP Site Announcement Centre

Post by o0zappy0o »

I don't have phpmyadmin, my hosting company autoinstalled the phpbb2 for me on my server, do I still need phpmyadmin?
thanks
User avatar
lefty74
Registered User
Posts: 3649
Joined: Wed Sep 14, 2005 8:26 pm
Location: NL
Contact:

Re: ACP Site Announcement Centre

Post by lefty74 »

you could try this link http://www.phpbbsmith.com/generate-db.html . It is supposed to generate an install file for you that you then can upload to your server and run.
lefty74
zoocrew.eu - help us save our wildlife
My MODS | Due to lack of time I unfortunately am unable to work on my mods anymore, anyone who has ideas to improve them and would like to take any of them over, please PM me.
User avatar
Jim_UK
Former Team Member
Posts: 18480
Joined: Tue Oct 12, 2004 5:36 pm
Location: Darwen N.West UK

Re: ACP Site Announcement Centre

Post by Jim_UK »

There are several PHP file creators about. Take care that you follow instructions carefully.
Some require that you upload the file inside an "install" directory. That is so you do not leave it in situe later. Others you just install into the root of your site and run with your browser.
http://www.phpbbhacks.com/forums/db_generator.php
http://sql.phpmix.com/

Here is the file.
Upload inside an install directory

Code: Select all

<?php
/**
 *
 * @package SQL Parser
 * @script install/db_update.php
 * @copyright (c) 2005 phpBB Group
 * @license http://opensource.org/licenses/gpl-license.php GNU General Public License
 *
 *
 * - WARNINGS:
 *   *** This script contains SQL/DLL statements that will modify your database!!!
 *   *** The SQL/DDL statements contained in this script are optimized for MySQL only!
 *
 * - Installation:
 *   1) Make backups of your database before proceeding!
 *   2) Create a subdirectory named "install" (without quotes) in your phpBB installation.
 *   3) Save this file as "db_update.php" and upload to your newly created install directory.
 *   4) Now, open the script using your browser of choice as in the following example:
 *      http://www.example.com/forums/install/db_update.php
 *      ...and follow instructions.
 *   5) Once, your DB has been updated, remove the install directory and this file.
 *
 * - Notes:
 *   - This script can only be run by board administrators.
 *   - First, a confirmation panel will show all SQL statements.
 *   - Your database will only be updated once the confirmation panel has been confirmed.
 *
 */

define('IN_PHPBB', true);
$phpbb_root_path = '../';
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);
$gen_simple_header = true;

//
// Language entries used in this script.
//
$lang += array(
	'Update_confirm'			=> 'This panel will update your database with the SQL statements detailed below.<br /><br />Remember to make backups of your database before proceeding!<hr /><table><tr><td><pre>%s</pre></td></tr></table><hr />Click <i>Yes</i> to proceed or <i>No</i> to return to your board index.',
	'Updating_database'			=> 'Updating the Database',
	'Installation_complete'		=> 'Installation Complete',
	'Delete_this_file'			=> 'Please, be sure to delete your install directory and this file from your phpBB installation now.',
	'Successful'				=> 'Successful'
);

//
// Session Management.
//
$userdata = session_pagestart($user_ip, PAGE_INDEX);
init_userprefs($userdata);

//
// Only administrators here, please
//
if( !$userdata['session_logged_in'] )
{
	redirect(append_sid("login.$phpEx?redirect=".basename(__FILE__), true));
}
if( $userdata['user_level'] != ADMIN )
{
	if ( @file_exists($phpbb_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_admin.' . $phpEx) )
	{
		include($phpbb_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_admin.' . $phpEx);
	}
	else
	{
		include($phpbb_root_path . 'language/lang_english/lang_admin.' . $phpEx);
	}
	message_die(GENERAL_MESSAGE, $lang['Not_admin']);
}

//
// Build Array of SQL Statements.
//
$sql = array();
$sql[] = 'CREATE TABLE ' . $table_prefix . 'announcement_centre (
    announcement_desc VARCHAR(255) NOT NULL DEFAULT \'\',
    announcement_value TEXT NOT NULL,
    PRIMARY KEY (announcement_desc)
)';
$sql[] = 'INSERT INTO ' . $table_prefix . 'announcement_centre(announcement_desc,announcement_value) VALUES(\'announcement_text\',\'[size=18][color=red][b]Change your announcements via your admin panel.   :) [/b][/color][/size]\')';
$sql[] = 'INSERT INTO ' . $table_prefix . 'announcement_centre(announcement_desc,announcement_value) VALUES(\'announcement_status\',\'1\')';
$sql[] = 'INSERT INTO ' . $table_prefix . 'announcement_centre(announcement_desc,announcement_value) VALUES(\'announcement_access\',\'1\')';
$sql[] = 'INSERT INTO ' . $table_prefix . 'announcement_centre(announcement_desc,announcement_value) VALUES(\'announcement_guest_text\',\'[size=18][color=blue][b]Change your guest announcements via your admin panel.   :) [/b][/color][/size]\')';
$sql[] = 'INSERT INTO ' . $table_prefix . 'announcement_centre(announcement_desc,announcement_value) VALUES(\'announcement_guest_status\',\'1\')';
$sql[] = 'INSERT INTO ' . $table_prefix . 'announcement_centre(announcement_desc,announcement_value) VALUES(\'announcement_text_draft\',\'[size=18][color=red][b]Preview in the ACP   :) [/b][/color][/size]\')';
$sql[] = 'INSERT INTO ' . $table_prefix . 'announcement_centre(announcement_desc,announcement_value) VALUES(\'announcement_mod_version\',\'v1.2.3\')';
$sql[] = 'INSERT INTO ' . $table_prefix . 'announcement_centre(announcement_desc,announcement_value) VALUES(\'announcement_forum_id\',\'\')';
$sql[] = 'INSERT INTO ' . $table_prefix . 'announcement_centre(announcement_desc,announcement_value) VALUES(\'announcement_topic_id\',\'\')';
$sql[] = 'INSERT INTO ' . $table_prefix . 'announcement_centre(announcement_desc,announcement_value) VALUES(\'announcement_forum_topic_first_latest\',\'1\')';
$sql[] = 'INSERT INTO ' . $table_prefix . 'announcement_centre(announcement_desc,announcement_value) VALUES(\'announcement_title\',\'Site Announcements\')';
$sql[] = 'INSERT INTO ' . $table_prefix . 'announcement_centre(announcement_desc,announcement_value) VALUES(\'announcement_guest_title\',\'Site Announcements\')';
$sql_count = count($sql);

//
// Output confirmation page?
//
$cancel = isset($HTTP_POST_VARS['cancel']) ? true : false;
$confirm = isset($HTTP_POST_VARS['confirm']) ? true : false;
$mode = isset($HTTP_POST_VARS['mode']) ? trim(htmlspecialchars($HTTP_POST_VARS['mode'])) : '';

if( $cancel )
{
	redirect(append_sid("index.$phpEx", true));
}

if( !$confirm || $mode != 'db_update' )
{
	include($phpbb_root_path . 'includes/page_header.'.$phpEx);

	$template->set_filenames(array(
		'confirm_body' => 'confirm_body.tpl')
	);

	$message = sprintf($lang['Update_confirm'], implode(";\n\n", $sql));

	$s_hidden_fields = '<input type="hidden" name="mode" value="db_update" />';

	$template->assign_vars(array(
		'L_INDEX'			=> '',
		'MESSAGE_TITLE'		=> $lang['Information'],
		'MESSAGE_TEXT'		=> $message,
		'L_YES'				=> $lang['Yes'],
		'L_NO'				=> $lang['No'],
		'S_CONFIRM_ACTION'	=> append_sid(basename(__FILE__)),
		'S_HIDDEN_FIELDS'	=> $s_hidden_fields)
	);

	$template->pparse('confirm_body');

	include($phpbb_root_path . 'includes/page_tail.'.$phpEx);
}

//
// Send Page Header.
//
$page_title = $lang['Updating_database'];
include($phpbb_root_path . 'includes/page_header.'.$phpEx);

//
// Execute SQL and get Results.
//
$sql_rows = '';
for( $i = 0; $i < $sql_count; $i++ )
{
	if( !($result = $db->sql_query($sql[$i])) )
	{
		$error = $db->sql_error();
		$color = '#FF0000';
		$success = $lang['Error'] . ':';
		$errmsg = ' ' . $error['message'];
	}
	else
	{
		$color = '#00AA00';
		$success = $lang['Successful'];
		$errmsg = '';
	}
	$class = ($i%2) == 0 ? 'row1' : 'row2';
	$sql_rows .= '<tr><td class="'.$class.'"><div class="genmed">' . $sql[$i] . ';<br /><br /><b style="color:' . $color . ';">' . $success . '</b>' . $errmsg . '</div></td></tr>';
}

//
// Build the Report.
//
$click_return_index = sprintf($lang['Click_return_index'], '<a class="genmed" href="' . append_sid($phpbb_root_path . "index.$phpEx") . '">', '</a>');

$html = <<<EOT
<table width="100%" cellpadding="0" cellspacing="0" border="0" class="forumline">
	<tr>
		<th>{$page_title}</th>
	</tr>
	<tr>
		<td>
			<table cellpadding="8" cellspacing="1" border="0" align="center">
				{$sql_rows}
			</table>
		</td>
	</tr>
	<tr>
		<td class="row3"><img src="{$phpbb_root_path}images/spacer.gif" border="0" height="4" alt="" /></td>
	</tr>
	<tr>
		<th>{$lang['Installation_complete']}</th>
	</tr>
	<tr>
		<td align="center">
			<table cellpadding="8" cellspacing="0" border="0" align="center">
				<tr>
					<td>
						<b class="gen" style="color:#EE0000;">{$lang['Delete_this_file']}</b>
					</td>
				</tr>
			</table>
		</td>
	</tr>
	<tr>
		<td class="catBottom" align="center">
			<span class="genmed">{$click_return_index}</span>
		</td>
	</tr>
</table>
EOT;
echo $html;

//
// Send Page Footer.
//
include($phpbb_root_path . 'includes/page_tail.'.$phpEx);

?>

Jim
The truth is out there.
Unfortunately they will not let you anywhere near it!
Post Reply

Return to “[2.0.x] MOD Database Releases”