Page 2 of 40

Re: [BETA] ACP Announcement Centre 0.0.1

Posted: Wed Jul 18, 2007 10:08 pm
by Gleasonator
lefty74 wrote:
Gleasonator wrote:Cool!

This is almost exactly what I need. ;) Think you can add an option to turn it into a news fader? :P

Thanks. :D
Could you let me know what exactly you were thinking of.

I will keep it in mind and once I get more familiar with everything I will have a look.
It's the only thing Proboards is good for. See here: http://newsfaderexmple.proboards57.com/index.cgi

Look at the top part over the forums -- that's the news fader. As simple as it looks, you'd probably have to use PHP that connects to the database along with AJAX. If you think you can do it, I can give you the admin username and password via PM to the boards for inspiration. :)

It's really a big request though... feel free to just say "you crazy" and ignore my request. :roll: Either way I appreciate the mod, and I will use it for my forums. 8-)

Re: [BETA] ACP Announcement Centre 0.0.1

Posted: Wed Jul 18, 2007 11:32 pm
by lefty74
Gleasonator wrote:
It's the only thing Proboards is good for. See here: http://newsfaderexmple.proboards57.com/index.cgi

Look at the top part over the forums -- that's the news fader. As simple as it looks, you'd probably have to use PHP that connects to the database along with AJAX. If you think you can do it, I can give you the admin username and password via PM to the boards for inspiration. :)

It's really a big request though... feel free to just say "you crazy" and ignore my request. :roll: Either way I appreciate the mod, and I will use it for my forums. 8-)
looks pretty neat, i will bear that in mind, right now i dont have the knowledge to do that but maybe at some stage i will...

Re: [BETA] ACP Announcement Centre 0.0.1

Posted: Thu Jul 19, 2007 4:43 am
by mitthoo
or u can raise a request in the forum may be someone good at it migth help u create this mod.

but its a nice mod. if i were to be good at AJAX i would have made wonders :D

Re: [BETA] ACP Announcement Centre 0.0.1

Posted: Thu Jul 19, 2007 10:22 am
by lefty74
mitthoo wrote:or u can raise a request in the forum may be someone good at it migth help u create this mod.

but its a nice mod. if i were to be good at AJAX i would have made wonders :D
true, could do that but then i like to try things myself first, not because i dont want anyone helping me but it is a learning process for me....
mitthoo wrote: 2. how do i get it on all the pages. i mean i added it on overall_header but it didn't work. it was only coming on index page.
Before I went to bed I quickly tried something and it appeared to work... I will doublecheck again tonight and will post the code changes for you then...

Re: [BETA] ACP Announcement Centre 0.0.1

Posted: Thu Jul 19, 2007 4:36 pm
by zhing
Keep getting this error on the index site of our forum, when i choose the setting, Show Site Announcement to:
"members"

[phpBB Debug] PHP Notice: in file /index.php on line 138: Undefined variable: announcement_show_everyone_guests
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4246: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3685)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4248: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3685)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4249: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3685)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4250: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3685)

Any help?

Re: [BETA] ACP Announcement Centre 0.0.1

Posted: Thu Jul 19, 2007 5:12 pm
by lefty74
zhing wrote:Keep getting this error on the index site of our forum, when i choose the setting, Show Site Announcement to:
"members"

[phpBB Debug] PHP Notice: in file /index.php on line 138: Undefined variable: announcement_show_everyone_guests
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4246: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3685)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4248: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3685)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4249: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3685)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4250: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3685)

Any help?
:( I dont get any of those messages, try this, maybe that does the trick

Code: Select all

#
#----OPEN------- 
#
index.php
#
#------FIND-------
#
if ( $user->data['user_id'] == 1 && $config['announcement_show'] == 2 ) // Guests only
{
$announcement_show = 1;
$announcement_show_everyone_guests = 1;
}
elseif ( $user->data['user_id'] != 1 && $config['announcement_show'] == 0 ) // Members only
{
$announcement_show = 1;
}
elseif ( $config['announcement_show'] == 1 ) // Everyone
{
$announcement_show = 1;
$announcement_show_everyone_guests = 1;
}
else 
{
$announcement_show = 0;
}
#
#-----REPLACE WITH----
#
if ( $user->data['user_id'] == 1 && $config['announcement_show'] == 2 ) // Guests only
{
$announcement_show = 1;
$announcement_show_everyone_guests = 1;
}
elseif ( $user->data['user_id'] != 1 && $config['announcement_show'] == 0 ) // Members only
{
$announcement_show = 1;
$announcement_show_everyone_guests = 0;
}
elseif ( $config['announcement_show'] == 1 ) // Everyone
{
$announcement_show = 1;
$announcement_show_everyone_guests = 1;
}
else 
{
$announcement_show = 0;
$announcement_show_everyone_guests = 0;
}
Dont know whether that will do the trick but grateful if you would try it.

Re: [BETA] ACP Announcement Centre 0.0.1

Posted: Thu Jul 19, 2007 7:28 pm
by zhing
Working, thanks for quick response :D

Re: [BETA] ACP Announcement Centre 0.0.1

Posted: Thu Jul 19, 2007 8:04 pm
by lefty74
great, glad this sorted it out, don't know why I had not put that in the code in the first place :roll:

must have been lack of sleep...

will update the the download file in a minute with this to avoid other people getting these issues :)

Re: [BETA] ACP Announcement Centre 0.0.1a

Posted: Thu Jul 19, 2007 8:09 pm
by lefty74
updated mod to 0.0.1a

change from 0.0.1 is here

Code: Select all

#
#----OPEN------- 
#
index.php
#
#------FIND-------
#
if ( $user->data['user_id'] == 1 && $config['announcement_show'] == 2 ) // Guests only
{
$announcement_show = 1;
$announcement_show_everyone_guests = 1;
}
elseif ( $user->data['user_id'] != 1 && $config['announcement_show'] == 0 ) // Members only
{
$announcement_show = 1;
}
elseif ( $config['announcement_show'] == 1 ) // Everyone
{
$announcement_show = 1;
$announcement_show_everyone_guests = 1;
}
else 
{
$announcement_show = 0;
}
#
#-----REPLACE WITH----
#
if ( $user->data['user_id'] == 1 && $config['announcement_show'] == 2 ) // Guests only
{
$announcement_show = 1;
$announcement_show_everyone_guests = 1;
}
elseif ( $user->data['user_id'] != 1 && $config['announcement_show'] == 0 ) // Members only
{
$announcement_show = 1;
$announcement_show_everyone_guests = 0;
}
elseif ( $config['announcement_show'] == 1 ) // Everyone
{
$announcement_show = 1;
$announcement_show_everyone_guests = 1;
}
else 
{
$announcement_show = 0;
$announcement_show_everyone_guests = 0;
}

Re: [BETA] ACP Announcement Centre 0.0.1

Posted: Thu Jul 19, 2007 8:17 pm
by lefty74
mitthoo wrote: 2. how do i get it on all the pages. i mean i added it on overall_header but it didn't work. it was only coming on index page.
Would you mind testing this?

Re: [BETA] ACP Announcement Centre 0.0.1a

Posted: Thu Jul 19, 2007 10:07 pm
by MattJG77
installed, and reinstalled and all i get when entering an announcement is this error when trying to save it. :(
General Error
SQL ERROR [ mysql4 ]

Duplicate entry 'announcement_enable' for key 1 [1062]

SQL

INSERT INTO phpbb3_config (config_name, config_value, is_dynamic) VALUES ('announcement_enable', 1, 0)

BACKTRACE

FILE: includes/db/mysql.php
LINE: 133
CALL: dbal_mysql->sql_error()

FILE: includes/functions.php
LINE: 147
CALL: dbal_mysql->sql_query()

FILE: includes/acp/acp_board.php
LINE: 423
CALL: set_config()

FILE: includes/functions_module.php
LINE: 476
CALL: acp_board->main()

FILE: adm/index.php
LINE: 80
CALL: p_master->load_active()

Re: [BETA] ACP Announcement Centre 0.0.1a

Posted: Thu Jul 19, 2007 10:19 pm
by lefty74
i dont really know enough to know what is causing this.
having said that, wheelguy had the same problem and he realised that the field type in his database for the config_value was different.

Can you try to run this SQL Statement via phpMyAdmin and see whether this does the trick?

Code: Select all

    ALTER TABLE `phpbb_config` CHANGE `config_value` `config_value` TEXT NOT NULL; 
thanks

Re: [BETA] ACP Announcement Centre 0.0.1a

Posted: Fri Jul 20, 2007 2:51 am
by WheelGuy
lefty74 wrote:i dont really know enough to know what is causing this.
having said that, wheelguy had the same problem and he realised that the field type in his database for the config_value was different.
thanks
What I done was manually edited the datbase. for that value 'announcement_enable' , i just deleted the intial value so there would not be one and everything worked fine.

Re: [BETA] ACP Announcement Centre 0.0.1a

Posted: Fri Jul 20, 2007 5:13 am
by Gleasonator
Wait a second... you can use GIFs in the announcement section! That means I can manually create a fader! :D Woohoo! :lol:

Re: [BETA] ACP Announcement Centre 0.0.1a

Posted: Fri Jul 20, 2007 7:24 am
by mitthoo
oh yeah !!.. thats cool... i'll try that. and ya lefty i am checking it wait for some time. when done i'll let u know.