Code: Select all
Warning: Invalid argument supplied for foreach() in /home/www/p4plus2.freehostia.com/Forums/admin/admin_prune_users.php on line 762
Warning: Cannot modify header information - headers already sent by (output started at /home/www/p4plus2.freehostia.com/Forums/admin/admin_prune_users.php:762) in /home/www/p4plus2.freehostia.com/Forums/admin/page_header_admin.php on line 143
Warning: Cannot modify header information - headers already sent by (output started at /home/www/p4plus2.freehostia.com/Forums/admin/admin_prune_users.php:762) in /home/www/p4plus2.freehostia.com/Forums/admin/page_header_admin.php on line 145
Warning: Cannot modify header information - headers already sent by (output started at /home/www/p4plus2.freehostia.com/Forums/admin/admin_prune_users.php:762) in /home/www/p4plus2.freehostia.com/Forums/admin/page_header_admin.php on line 146
Code: Select all
foreach ( $default_data_array as $data_array )
{
if ( !empty ( $data_array['value'] ) )
{
switch ( $data_array['type'] )
{
case "select": $onload_javascript .= " selectValueFromSelect(document.getElementsByName(\"" . addslashes( $data_array['name'] ) . "\")[0], \"" . addslashes( $data_array['value'] ) . "\");"; break;
case "check": $onload_javascript .= " selectValueFromCheckBox(document.getElementsByName(\"" . addslashes( $data_array['name'] ) . "\"), \"" . addslashes( $data_array['value'] ) . "\");"; break;
case "button": $onload_javascript .= " selectValueFromButton(document.getElementsByName(\"" . addslashes( $data_array['name'] ) . "\"), \"" . addslashes( $data_array['value'] ) . "\");"; break;
case "text": $onload_javascript .= " selectValueFromText(document.getElementsByName(\"" . addslashes( $data_array['name'] ) . "\"), \"" . addslashes( $data_array['value'] ) . "\");"; break;
}
}
Code: Select all
if ( is_array ( $default_data_array ) )
{
Code: Select all
}
I need this fix too (having the same errors) but where do I add the changes to the aforementioned script? Should the changes be added 'before' the script? I tried adding the changes 'before' and it didn't have an effect on the following errors:kkroo wrote:Are you using version 0.5.0? I believe it is fixed in that version.
If not:
Find:
Before add:Code: Select all
foreach ( $default_data_array as $data_array ) { if ( !empty ( $data_array['value'] ) ) { switch ( $data_array['type'] ) { case "select": $onload_javascript .= " selectValueFromSelect(document.getElementsByName(\"" . addslashes( $data_array['name'] ) . "\")[0], \"" . addslashes( $data_array['value'] ) . "\");"; break; case "check": $onload_javascript .= " selectValueFromCheckBox(document.getElementsByName(\"" . addslashes( $data_array['name'] ) . "\"), \"" . addslashes( $data_array['value'] ) . "\");"; break; case "button": $onload_javascript .= " selectValueFromButton(document.getElementsByName(\"" . addslashes( $data_array['name'] ) . "\"), \"" . addslashes( $data_array['value'] ) . "\");"; break; case "text": $onload_javascript .= " selectValueFromText(document.getElementsByName(\"" . addslashes( $data_array['name'] ) . "\"), \"" . addslashes( $data_array['value'] ) . "\");"; break; } }
After add:Code: Select all
if ( is_array ( $default_data_array ) ) {
Code: Select all
}
I'm glad someone else asked about that. This was the part of the Instructions that baffled me. When I got to the part that says, "[ SQL ]" I didn't know what to do with it. This was the first MOD I've ever installed that had that sort of instruction. If you could enhance your instructions in that part to specify what to do in phpmyadmin, I'm sure it would be appreciated by users at my relative-newbie level. (I'd never even had to touch phpmyadmin until earlier this week!)kkroo wrote:Well it appears you have not executed the SQL queries that were in the install file. In phpmyadmin, execute this:
CREATE TABLE `phpbb_pruned_users` (
`id` mediumint(8) NOT NULL auto_increment,
`deleted_by` int(255) NOT NULL,
`delete_time` int(11) NOT NULL,
`data` text NOT NULL,
PRIMARY KEY (`id`)
);
ALTER TABLE `phpbb_users` ADD `user_last_notified` INT( 11 ) NOT NULL DEFAULT '0';
ALTER TABLE `phpbb_users` ADD `user_prune_flagged` INT( 11 ) NOT NULL DEFAULT '0';
INSERT INTO `phpbb_config` VALUES ( 'prune_users_default', '' );
ALTER TABLE `phpbb_config` CHANGE `config_value` `config_value` TEXT NULL DEFAULT NULL
Code: Select all
CREATE TABLE `phpbb_pruned_users` (
`id` mediumint( 8 ) NOT NULL AUTO_INCREMENT ,
`deleted_by` int( 255 ) NOT NULL ,
`delete_time` int( 11 ) NOT NULL ,
`data` text NOT NULL ,
PRIMARY KEY ( `id` )
);# MySQL returned an empty result set (i.e. zero rows).
ALTER TABLE `phpbb_users` ADD `user_last_notified` INT( 11 ) NOT NULL DEFAULT '0';# Affected rows: 4639
ALTER TABLE `phpbb_users` ADD `user_prune_flagged` INT( 11 ) NOT NULL DEFAULT '0';# Affected rows: 4639
INSERT INTO `phpbb_config`
VALUES (
'prune_users_default', ''
);# Affected rows: 1
ALTER TABLE `phpbb_config` CHANGE `config_value` `config_value` TEXT NULL DEFAULT NULL # Affected rows: 81
Template->make_filename(): Error - file admin/prune_users_list.tpl does not exist
Code: Select all
Template->make_filename(): Error - file admin/prune_users_sql.tpl does not exist
Except that that's not how it is in the zipfile. It's not templates/admin, it's templates/subsilver/adminkkroo wrote:Well according to the mod, the files don't exist, did you copy root/templates/admin/prune_users_sql.tpl to
YOUR_PHPBB_DIRECTORY/templates/admin/prune_users_sql.tp