Page 7 of 8

Re: ACP Site Announcement Centre v1.2.3

PostPosted: Sat Mar 29, 2008 11:48 am
by lefty
line 860 is the line you need to edit, needs to read

Code: Select all
   if ($mode == 'window' || $mode == 'window_announcement_text')

Re: ACP Site Announcement Centre v1.2.3

PostPosted: Sat Mar 29, 2008 1:25 pm
by barcano1
Oh, I found it. :cheer:
Thanks you for helping me.
9 weekend.

Re: ACP Site Announcement Centre v1.2.3

PostPosted: Sat Mar 29, 2008 1:55 pm
by lefty
great, have a nice weekend :)

Re: ACP Site Announcement Centre v1.2.3

PostPosted: Sat Apr 19, 2008 9:15 am
by kalgri
Problem such. Has established fashions. I come in admin panel to the General adjustments - Announcements. I get in section the Configuration of announcements of a site I Do a breadboard model of the announcement. I copy it in a floor of Constants Announcements. I resolve display of Announcements. I press Submit. I come on the main village - but the text of announcements is not present, only the dark blue panel. Prompt that it is necessary to make that announcements showed? Thanks

Re: ACP Site Announcement Centre v1.2.3

PostPosted: Sat Apr 19, 2008 2:08 pm
by lefty
sorry, this is not very clear for me.

when you change things in the acp, do they save ok?

did you doublecheck all your edits?

Re: ACP Site Announcement Centre v1.2.3

PostPosted: Sat Apr 19, 2008 2:58 pm
by kalgri
I Russian. And unfortunately badly I know English language. I communicate with you through the translator. I have established the MOD, but announcements do not show on the main page. I have checked up all code

Re: ACP Site Announcement Centre v1.2.3

PostPosted: Sat Apr 19, 2008 11:28 pm
by lefty
if you can give me a temp ftp account, i can have a look at the files

Re: ACP Site Announcement Centre v1.2.3

PostPosted: Sun Apr 20, 2008 6:12 am
by kalgri
You suggest to give you access to the administrative panel of a forum? Or wish to look all files of a forum? Here a forum http: // sescha.info/forum Can look.

Re: ACP Site Announcement Centre v1.2.3

PostPosted: Sun Apr 20, 2008 11:02 am
by lefty
ok, if you could create a temp ftp account for me and pm me the details, i can have a look at the files on the server to see whether the edits were made at the right places.

I would also need a temporary user accoutn on your board that has admin rights to check if the announcements work there too.

thanks

Re: ACP Site Announcement Centre v1.2.3

PostPosted: Sun Apr 20, 2008 1:50 pm
by kalgri
To give access in admin section to the unknown man very risk. Give all over again I all I shall check up, and then if it will not turn out I shall address to you.

Re: ACP Site Announcement Centre v1.2.3

PostPosted: Sun Apr 20, 2008 4:51 pm
by lefty
kalgri wrote:To give access in admin section to the unknown man very risk. Give all over again I all I shall check up, and then if it will not turn out I shall address to you.

thats ok, i understand that you do not want to give access to someone you dont know. however, i dont think we are getting far otherwise because of the language barrier. checking your edits is always a good thing. you could maybe set up a testboard and see if the same happens there.

Re: ACP Site Announcement Centre v1.2.3

PostPosted: Sun Apr 20, 2008 9:16 pm
by kalgri
Has checked up files. Has found out a mistake in index.php
Mistake has admitted here
-------------------------------------------------------------------------------------------------------------------
//
// Handle marking posts
//
if( $mark_read == 'forums' )
{
if( $userdata['session_logged_in'] )
{
setcookie($board_config['cookie_name'] . '_f_all', time(), 0, $board_config['cookie_path'], $board_config['cookie_domain'], $board_config['cookie_secure']);
}

$template->assign_vars(array(

//BEGIN ACP Site Announcement Centre by lefty74
'L_ANNOUNCEMENT_TITLE' => $announcement_title,
'SITE_ANNOUNCEMENTS_LEFTY74' => $announcement_text,
'L_ANNOUNCEMENT_GUEST_TITLE' => $announcement_guest_title,
'GUEST_ANNOUNCEMENTS_LEFTY74' => $announcement_guest_text,
//END ACP Site Announcement Centre by lefty74

--------------------------------------------------------------------
Record "$template->assign_vars(array"( meets two times. It also has caused a mistake

Re: ACP Site Announcement Centre v1.2.3

PostPosted: Sun May 18, 2008 10:13 pm
by Timotei
Hi I installed your mod but I got this error
Code: Select all
ERROR common.php


phpBB : Critical Error

Could not query site announcement information

DEBUG MODE

SQL Error : 1146 Table 'fmf_forum.announcements_lefty74_table' doesn't exist

SELECT * FROM ANNOUNCEMENTS_LEFTY74_TABLE

Line : 218
File : common.php


Can you help me, thanks?

Re: ACP Site Announcement Centre v1.2.3

PostPosted: Sun May 18, 2008 10:20 pm
by lefty
did you run the SQL statement that was in the installation instructions?

if you did, please make sure that you do not use a different prefix for your tables.

phpbb_ is the standard, in your config.php file you can see what your prefix is if you do not know it.

Re: ACP Site Announcement Centre v1.2.3

PostPosted: Mon May 19, 2008 11:03 am
by Timotei
yes I ran the sql as stated in the installation instruction
this is the prefix "$table_prefix = 'phpbb_';" the default one
Euhm What could be an other problem? Should I change anything that is listed in the installation instruction, because this table doesn't exist 'fmf_forum.announcements_lefty74_table'

Thanks for the fast reply

Re: ACP Site Announcement Centre v1.2.3

PostPosted: Mon May 19, 2008 11:42 am
by lefty
hi, ok, are you sure you have done all the edits, including the one for includes/constants.php ?

Re: ACP Site Announcement Centre v1.2.3

PostPosted: Mon May 19, 2008 12:06 pm
by Timotei
I haven't done all the edits but when I edit the "common.php" file I get that error and I know that the mod won't work if it's not fully installed. When it gives an mysql error in the beginning then there has to be something I did wrong, but I did all what you said, ran the sql script and then I was editing the "common.php" file but when I saved that file I got that error. So there has to be something that I foregot to do or something that I needed to change, but I don't know what. I did everything that you said in the installation instruction.

Re: ACP Site Announcement Centre v1.2.3

PostPosted: Mon May 19, 2008 5:23 pm
by lefty
i am afraid you will need to make all the edits to see if a mod is working or not, including error messages...

Re: ACP Site Announcement Centre v1.2.3

PostPosted: Mon May 19, 2008 8:12 pm
by Timotei
Ok it works fine now, thanks. I installed the rest of the mod and I waited till the end to edit the "common.php" file everything works fine now sorry to bother you. But normally I disable the forum when I'm editing the files and now some of the admins where online so I didn't disabled the forum. Maybe that was my mistake

Thanks for the nice mod and greetzz Timotei

Re: ACP Site Announcement Centre v1.2.3

PostPosted: Tue May 20, 2008 11:18 am
by lefty
glad you got it working in the end :)

Re: ACP Site Announcement Centre v1.2.3

PostPosted: Tue May 20, 2008 11:35 am
by Timotei
Could you change the mod so that only people in a certain group can see the news?
It's just a thought

Re: ACP Site Announcement Centre v1.2.3

PostPosted: Tue May 20, 2008 6:20 pm
by lefty
I did this once for someone...

Code: Select all
    #
    #-----[ SQL ]------------------------------------------
    #
    INSERT INTO phpbb_announcement_centre (announcement_desc, announcement_value) VALUES('announcements_group_id', '');
    #
    #-----[ OPEN ]------------------------------------------
    #
    index.php
    #
    #-----[ FIND ]------------------------------------------
    #
    if( $announcement_centre_config['announcement_access'] == ANNOUNCEMENTS_LEFTY74_SHOW_ADM && $userdata['user_level'] == ADMIN )
    #
    #-----[ REPLACE WITH ]------------------------------------------
    #
    if( $announcement_centre_config['announcement_access'] == ANNOUNCEMENTS_LEFTY74_SHOW_GRP)
    {
          $sql = "SELECT *
       FROM " . USER_GROUP_TABLE . "
       WHERE group_id = " . $announcement_centre_config['announcements_group_id'] . "
       AND user_id = " . $userdata['user_id'] . "
       ";

       if( !($result = $db->sql_query($sql)) )
       {
          message_die(GENERAL_ERROR, 'Could not query group information', '', __LINE__, __FILE__, $sql);
       }

       if ( $row = $db->sql_fetchrow($result) || $userdata['user_level'] == ADMIN  )
       {
       $template->assign_block_vars('announcement_displayed', array());
       }
       else if (  $announcement_centre_config['announcement_guest_status'] == ANNOUNCEMENTS_LEFTY74_GUEST_YES && !$userdata['session_logged_in'] && !$announcement_centre_config['announcement_access'] == ANNOUNCEMENTS_LEFTY74_SHOW_ALL )
       {
          $template->assign_block_vars('guest_announcement_displayed', array());
       }
       
    }
    else if( $announcement_centre_config['announcement_access'] == ANNOUNCEMENTS_LEFTY74_SHOW_ADM && $userdata['user_level'] == ADMIN )
    #
    #-----[ OPEN ]------------------------------------------
    #
    language/lang_english/lang_admin.php
    #
    #-----[ FIND ]------------------------------------------
    #
    $lang['Announcement_default_title_explain'] = 'Default language variable for Block Title is: ';

    #
    #-----[ AFTER, ADD ]------------------------------------------
    #
    $lang['Show_announcement_grp'] = 'Group';
    $lang['No_groups'] = 'Note: No groups created yet!';
    #
    #-----[ OPEN ]------------------------------------------
    #
    includes/constants.php
    #
    #-----[ FIND ]------------------------------------------
    #
    define('ANNOUNCEMENTS_LEFTY74_SHOW_ADM', 3);
    #
    #-----[ AFTER, ADD ]------------------------------------------
    #
    define('ANNOUNCEMENTS_LEFTY74_SHOW_GRP', 4);
    #
    #-----[ COPY ]------------------------------------------
    #
    copy root/admin/admin_announcement_centre.php to admin/admin_announcement_centre.php
    copy root/templates/subSilver/admin/announcement_centre_config_body.tpl to templates/subSilver/admin/announcement_centre_config_body.tpl
    #
    #-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
    #
    # EoM


Download admin_announcement_centre.php and announcement_centre_config_body.tpl files here

make sure to backup your files before making these changes though.

Re: ACP Site Announcement Centre v1.2.3

PostPosted: Fri May 23, 2008 6:42 pm
by Timotei
Sorry for the late reply. If I do this "update" can I still set it to registered and unregistered too? Or is it then only for groups?
I don't have soo much free time anymore due to exames, So I don't know when I can test it.

Greetzz and Thanks Timotei

Re: ACP Site Announcement Centre v1.2.3

PostPosted: Fri May 23, 2008 9:28 pm
by lefty
i dont have this installed myself and it has been a long time since i have looked at phpbb2 but if i remember correctly, it adds another possibility which is groups. the rest is still the same

Re: ACP Site Announcement Centre v1.2.3

PostPosted: Fri May 23, 2008 9:42 pm
by Timotei
ok, thanks.
I'll let you know if I have installed it and I will provide you with a screenshot too.

Thanks Timotei