[MODDB] ACP Announcement Centre 1.0.1

A place for MOD Authors to post and receive feedback on MODs still in development. No MODs within this forum should be used within a live environment!
Suggested Hosts
User avatar
Gleasonator
Registered User
Posts: 652
Joined: Tue Jun 05, 2007 2:19 pm
Location: Texas
Contact:

Re: [BETA] ACP Announcement Centre 0.0.1

Post 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-)
Sorry for my bad Engrish !
gleason|design

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

Re: [BETA] ACP Announcement Centre 0.0.1

Post 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...
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
mitthoo
Registered User
Posts: 253
Joined: Tue Oct 03, 2006 12:34 pm

Re: [BETA] ACP Announcement Centre 0.0.1

Post 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
User avatar
lefty74
Registered User
Posts: 3649
Joined: Wed Sep 14, 2005 8:26 pm
Location: NL
Contact:

Re: [BETA] ACP Announcement Centre 0.0.1

Post 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...
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.
zhing
Registered User
Posts: 10
Joined: Thu Jul 19, 2007 4:32 pm

Re: [BETA] ACP Announcement Centre 0.0.1

Post 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?
User avatar
lefty74
Registered User
Posts: 3649
Joined: Wed Sep 14, 2005 8:26 pm
Location: NL
Contact:

Re: [BETA] ACP Announcement Centre 0.0.1

Post 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.
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.
zhing
Registered User
Posts: 10
Joined: Thu Jul 19, 2007 4:32 pm

Re: [BETA] ACP Announcement Centre 0.0.1

Post by zhing »

Working, thanks for quick response :D
User avatar
lefty74
Registered User
Posts: 3649
Joined: Wed Sep 14, 2005 8:26 pm
Location: NL
Contact:

Re: [BETA] ACP Announcement Centre 0.0.1

Post 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 :)
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
lefty74
Registered User
Posts: 3649
Joined: Wed Sep 14, 2005 8:26 pm
Location: NL
Contact:

Re: [BETA] ACP Announcement Centre 0.0.1a

Post 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;
}
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
lefty74
Registered User
Posts: 3649
Joined: Wed Sep 14, 2005 8:26 pm
Location: NL
Contact:

Re: [BETA] ACP Announcement Centre 0.0.1

Post 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?
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
MattJG77
Registered User
Posts: 98
Joined: Wed Feb 08, 2006 10:04 pm

Re: [BETA] ACP Announcement Centre 0.0.1a

Post 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()
User avatar
lefty74
Registered User
Posts: 3649
Joined: Wed Sep 14, 2005 8:26 pm
Location: NL
Contact:

Re: [BETA] ACP Announcement Centre 0.0.1a

Post 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
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.
WheelGuy
Registered User
Posts: 201
Joined: Tue Jan 30, 2007 4:07 pm
Contact:

Re: [BETA] ACP Announcement Centre 0.0.1a

Post 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.
User avatar
Gleasonator
Registered User
Posts: 652
Joined: Tue Jun 05, 2007 2:19 pm
Location: Texas
Contact:

Re: [BETA] ACP Announcement Centre 0.0.1a

Post by Gleasonator »

Wait a second... you can use GIFs in the announcement section! That means I can manually create a fader! :D Woohoo! :lol:
Sorry for my bad Engrish !
gleason|design

Image
User avatar
mitthoo
Registered User
Posts: 253
Joined: Tue Oct 03, 2006 12:34 pm

Re: [BETA] ACP Announcement Centre 0.0.1a

Post 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.
Locked

Return to “[3.0.x] MODs in Development”