ACP Site Announcement Centre v1.2.3

my MODS validated or going for validation at phpbb.com. Please note that support has ended for phpbb2 mods
MODs die schon überprüft wurden oder eingereichte MODs zur Überprüfung auf phpbb.com. Support für phpbb2 mods wurde eingestellt.

Postby holass » Wed Jun 20, 2007 8:56 am

Ok. Thank you very much.
holass
Newbie/Neuling
 
Posts: 4
Joined: Wed Jun 13, 2007 12:03 am

Postby sK*sl!ce » Wed Jul 04, 2007 6:22 pm

hey lefty, this mod is exactly what we're looking for on our site! not sure if it's compatible with "smilies invasion" mod tho.  everything when well in the instructions except for when i got to includes/functions_post.php

it seemed as that was the only file that required additional coding for your mod that was right in the middle of smilies invasion. specificly this part:

Code: Select all
#
#-----[ FIND ]------------------------------------------
#
      $template->set_filenames(array(
        'smiliesbody' => 'posting_smilies.tpl')
     );

  }
#
#-----[ AFTER, ADD ]------------------------------------------???????????????
#
   elseif ($mode == 'window_announcement_text')
  {

     $userdata = session_pagestart($user_ip, $page_id);
     init_userprefs($userdata);

     $gen_simple_header = TRUE;

     $page_title = $lang['Site_Announcement'];
     include($phpbb_root_path . 'includes/page_header.'.$phpEx);

     $template->set_filenames(array(
        'smiliesbody' => 'posting_smilies_announcement_centre_text.tpl')
     );
  }
 


here is what my includes/functions_post.php had for this entry:

Code: Select all
      $template->set_filenames(array(
         'smiliesbody' => 'posting_smilies.tpl')
      );

   //Get smilies
   $sql = "SELECT *
     FROM " . SMILIES_TABLE . "
      WHERE code <> '' AND smile_url <> '' AND page = $page_id
     ORDER BY number";        
 }


as you can see, it's not quite the same. i tried putting it under the closing bracket and then under the ");" and all i got was a blank home page each time.

that may not even be the issue at all, who knows. but it's the only place that varied in the instructions. i believe that all the entries in includes/functions_post.php were inside of the smilies mod so i would think that the issue is in there.

here is a link to the smilies mod files: http://www.s-killz.com/temp/Smilies_Invasion_1_2_1.zip

any help would be greatly appreciated :D i'd like to throw in WheelGuy's scrolling addition too if we can get it working.

thanks in advance for any help  :thanx:
Image
sK*sl!ce
Forum Member
 
Posts: 34
Joined: Wed Jul 04, 2007 7:45 am

Postby lefty » Wed Jul 04, 2007 6:37 pm

hi, i dont think ur smilies invasion mod is the issue as the install instructions from the smilies mod modify the function  prepare_post.



Code: Select all
  //Get smilies
   $sql = "SELECT *
     FROM " . SMILIES_TABLE . "
      WHERE code <> '' AND smile_url <> '' AND page = $page_id
     ORDER BY number";        
 }

This must be from a different mod as I do not have that in my includes/functions_post.php file.

Could you post the whole code of your function
Code: Select all
function generate_smilies($mode, $page_id)
?
lefty aka The Heikze! :eyebrowe:

Heiko Carstens
http://www.lefty74.com

Would you like me to install one of my mods for you? Read here for details
lefty
Abschlussklasse R10c
 
Posts: 1357
Joined: Mon Feb 06, 2006 1:20 am
Location: Den Haag - NL

Postby sK*sl!ce » Wed Jul 04, 2007 6:43 pm

Code: Select all
//START MOD Smiley_management
//
// Fill smiley templates for window or inline
//
function generate_smilies($mode, $page_id, $page_id = 0) //Called from posting.php and privmsg.php
{
   global $db, $board_config, $template, $lang, $images, $theme, $phpEx, $phpbb_root_path;
   global $user_ip, $session_length, $starttime;
   global $userdata;

   $inline_columns = 4;
   $inline_rows = 5;

   //******* Get data *******//
 if ($mode == 'window')
 {
   //Initialise separate form
      $userdata = session_pagestart($user_ip, $page_id);
      init_userprefs($userdata);
      $gen_simple_header = TRUE;      
 }
 
//Get page list for both window and inline
   $style = ($userdata['user_style']) ? $userdata['user_style'] : $board_config['default_style'];  
 $access = ' access = ' . USER ;
 switch ($userdata['user_level'])
 {
 case MOD: $access = ' access IN (' . USER . ',' .  MOD . ')'; break;
 case ADMIN: $access = ' access IN (' . USER . ',' .  MOD . ',' . ADMIN . ')'; break;
 }  
 $sql = "SELECT *
   FROM " . SMILIES_PAGES_TABLE . "
   WHERE $access
   AND (theme = 0 OR theme = $style)
   ORDER BY `default_page` DESC,title";        
 $result = $db->sql_query($sql);
 if( !$result )
 {
    message_die(GENERAL_ERROR, "Couldn't obtain smileys page list", "", __LINE__, __FILE__, $sql);
 }
 $row = $db->sql_fetchrowset($result);

 if ($mode == 'window')
 {  
   $verified = 0;
   for ($i=0;$i<count($row);$i++) //Check page_id
   {      
     //echo $row[$i]['title'] . "||" . $row[$i]['default_page'] , '<br />';
     if ($page_id == 0)
     {
       if ($row[$i]['default_page'] )  $page_id = $row[$i]['id'];
     }
     if ($row[$i]['id'] == $page_id) $verified = 1;
   }
   // echo   $page_id.'<br />';
   if (($page_id == 0 || $verified == 0) && count($row) > 0) $page_id = $row[0]['id'];    
   $url = "posting.$phpEx?mode=smilies&page=";
   for ($i=0;$i<count($row);$i++) //Build list
   {
     $page_list .= ($page_list ? ' :: ' : '');
     $page_list .= '<a href="' . $url . $row[$i]['id'] . '" >' . $row[$i]['title'] . '</a>';
     if ($row[$i]['id']==$page_id) $page_data = $row[$i];
   }    
      $page_title = $lang['Emoticons'] . ($page_data['title'] ? ' * ' . $page_data['title'] : '');
      $page_width = $page_data['width'];
     $page_height = $page_data['height'];
   
      include($phpbb_root_path . 'includes/page_header.'.$phpEx);
      $template->set_filenames(array(
         'smiliesbody' => 'posting_smilies.tpl')
      );

   //Get smilies
   $sql = "SELECT *
     FROM " . SMILIES_TABLE . "
      WHERE code <> '' AND smile_url <> '' AND page = $page_id
     ORDER BY number";        
 }
 else //$mode == 'inline'
 {
    //First record is first default page
   $page_width = $row[0]['width'];
    $page_height = $row[0]['height'];    
      $style = ($userdata['user_style']) ? $userdata['user_style'] : $board_config['default_style'];
   $sql = "SELECT s.*
     FROM " . SMILIES_TABLE . " s, " . SMILIES_PAGES_TABLE . " p
     WHERE p.id = s.page      
      AND code <> '' AND smile_url <> '' AND inline = 1
     AND $access
     AND (theme = 0 OR theme = $style)
     ORDER BY number
     LIMIT " . ($inline_columns * $inline_rows);
 }
 
 $result = $db->sql_query($sql);
 if( !$result )
 {
    message_die(GENERAL_ERROR, "Couldn't obtain smileys list", "", __LINE__, __FILE__, $sql);
 }
 $smilies = $db->sql_fetchrowset($result);
 
 //****** Fill template *******//
 $smilies_colspan = ($mode == 'inline') ? $inline_columns : $page_data['column_count'];
 $smilies_path = $board_config['smilies_path'];
   $row = 0; $col = 0;
 for ($i=0;$i<count($smilies);$i++)
 {
   $all_code = explode(' ', $smilies[$i]['code']); //Select first code only from multiple to insert
   $code = str_replace("'", "\\'", str_replace('\\', '\\\\', $all_code[0]));
   $colspan = ($smilies[$i]['colspan'] ? $smilies[$i]['colspan'] : 1);    
   if ($col==0) $template->assign_block_vars('smilies_row', array());     
    $template->assign_block_vars('smilies_row.smilies_col', array(
         'SMILEY_CODE' => $code,
         'SMILEY_IMG' => $smilies_path . '/' . $smilies[$i]['smile_url'],
         'SMILEY_DESC' => $smilies[$i]['emoticon'],
       'SMILEY_COLSPAN' => $colspan)
      );
   $col += $colspan;
   if ( $col >= $smilies_colspan) {$col = 0;   $row++;   }  
 } //Next smiley
 
   //More smilies button * Can't check if there are more smilies than just inline, assume there are:
 if ($mode == 'inline')
   {
      $template->assign_block_vars('switch_smilies_extra', array());
      $template->assign_vars(array(
     'L_MORE_SMILIES' => $lang['More_emoticons'],
         'U_MORE_SMILIES' => append_sid("posting.$phpEx?mode=smilies"))
      );
   }
   $template->assign_vars(array(
     'S_PAGE_WIDTH' => $page_width,
     'S_PAGE_HEIGHT' => $page_height,
   'S_PAGE_LIST' => $page_list,
   'S_SMILIES_COLSPAN' => $smilies_colspan,
      'L_EMOTICONS' => $lang['Emoticons'],
      'L_CLOSE_WINDOW' => $lang['Close_window'])
   );
 //Parse separate template
   if ($mode == 'window')
   {
      $template->pparse('smiliesbody');
      include($phpbb_root_path . 'includes/page_tail.'.$phpEx);
   }
}   
//END MOD Smiley_management


here is the whole functions_post.php: http://www.s-killz.com/temp/functions_post.txt
Image
sK*sl!ce
Forum Member
 
Posts: 34
Joined: Wed Jul 04, 2007 7:45 am

Postby sK*sl!ce » Wed Jul 04, 2007 6:46 pm

i just realized it's smiley_management not smilies invasion... sorry :P
Image
sK*sl!ce
Forum Member
 
Posts: 34
Joined: Wed Jul 04, 2007 7:45 am

Postby lefty » Wed Jul 04, 2007 7:12 pm

lol i noticed, the function is quite different to the original one so ....

this may or may not work

try this

find
Code: Select all
if ($mode == 'window')
 {
   //Initialise separate form
      $userdata = session_pagestart($user_ip, $page_id);
      init_userprefs($userdata);
      $gen_simple_header = TRUE;      
 }

after add
Code: Select all
// BEGIN add smiley and BBcode support for NewsMod lefty74
   elseif ($mode == 'window_announcement_text')
  {

     $userdata = session_pagestart($user_ip, $page_id);
     init_userprefs($userdata);

     $gen_simple_header = TRUE;

     $page_title = $lang['Site_Announcement'];
     include($phpbb_root_path . 'includes/page_header.'.$phpEx);

     $template->set_filenames(array(
        'smiliesbody' => 'posting_smilies_announcement_centre_text.tpl')
     );
  }

// END add smiley and BBcode support for NewsMod lefty74


there is one more code edit in that function, dont forget that one

Code: Select all
   if ($mode == 'window')
   {
      $template->pparse('smiliesbody');
      include($phpbb_root_path . 'includes/page_tail.'.$phpEx);
   }


becomes
Code: Select all
   if ($mode == 'window' || $mode == 'window_announcement_text')
   {
      $template->pparse('smiliesbody');
      include($phpbb_root_path . 'includes/page_tail.'.$phpEx);
   }
lefty aka The Heikze! :eyebrowe:

Heiko Carstens
http://www.lefty74.com

Would you like me to install one of my mods for you? Read here for details
lefty
Abschlussklasse R10c
 
Posts: 1357
Joined: Mon Feb 06, 2006 1:20 am
Location: Den Haag - NL

Postby sK*sl!ce » Wed Jul 04, 2007 7:31 pm

still blank. i think i read somewhere that my host may not have turned the debug information level up so as to read the errors... should i contact them to adjust this?
Image
sK*sl!ce
Forum Member
 
Posts: 34
Joined: Wed Jul 04, 2007 7:45 am

Postby lefty » Wed Jul 04, 2007 7:41 pm

i think its always useful to know what error is causing this.

would you have a testboard where u could give me temp ftp access or a local zip version u could send me?

if not, no worries but i dont have time at the moment to install the smilie mod on a testboard myself and test it with mine.  i am currently not even sure whether both are compatible... at the moment.
lefty aka The Heikze! :eyebrowe:

Heiko Carstens
http://www.lefty74.com

Would you like me to install one of my mods for you? Read here for details
lefty
Abschlussklasse R10c
 
Posts: 1357
Joined: Mon Feb 06, 2006 1:20 am
Location: Den Haag - NL

Postby sK*sl!ce » Wed Jul 04, 2007 7:52 pm

i just set up a blank one and emailed you password. are you going to install the mods, or do you want me to? either way, just let me know which one first :P

also, don't know if this makes any difference but i'm on 2.0.21. the test forums are 2.0.22
Image
sK*sl!ce
Forum Member
 
Posts: 34
Joined: Wed Jul 04, 2007 7:45 am

Postby lefty » Wed Jul 04, 2007 7:58 pm

would be great if you could install the mods, the smilie management first as your board was working fine before u tried to install the announcement centre.

thanks  :happysmerk:
lefty aka The Heikze! :eyebrowe:

Heiko Carstens
http://www.lefty74.com

Would you like me to install one of my mods for you? Read here for details
lefty
Abschlussklasse R10c
 
Posts: 1357
Joined: Mon Feb 06, 2006 1:20 am
Location: Den Haag - NL

Postby sK*sl!ce » Wed Jul 04, 2007 8:30 pm

i just installed smiles order mod... i think when i clicked the forgot password link to get you the pass, it may have reset the main one. can you check in the admin panel to see if it's there? should be...

acp sql entries added and files uploaded also... :D
Image
sK*sl!ce
Forum Member
 
Posts: 34
Joined: Wed Jul 04, 2007 7:45 am

Postby lefty » Wed Jul 04, 2007 8:47 pm

thanks :)

got this in the acp
Parse error: syntax error, unexpected ',' in /home/blabla/admin/admin_smilies.php on line 203

also, to edit any files i would need ftp access.
lefty aka The Heikze! :eyebrowe:

Heiko Carstens
http://www.lefty74.com

Would you like me to install one of my mods for you? Read here for details
lefty
Abschlussklasse R10c
 
Posts: 1357
Joined: Mon Feb 06, 2006 1:20 am
Location: Den Haag - NL

Postby sK*sl!ce » Wed Jul 04, 2007 8:50 pm

crap, i put the wrong one up... starting over lol :jawcropyel:
Image
sK*sl!ce
Forum Member
 
Posts: 34
Joined: Wed Jul 04, 2007 7:45 am

Postby lefty » Wed Jul 04, 2007 9:01 pm

k, i had a local copy, installed easymod and installed both mods, looks ok from where i look at it but i dont have many smilies on the test board.
lefty aka The Heikze! :eyebrowe:

Heiko Carstens
http://www.lefty74.com

Would you like me to install one of my mods for you? Read here for details
lefty
Abschlussklasse R10c
 
Posts: 1357
Joined: Mon Feb 06, 2006 1:20 am
Location: Den Haag - NL

Postby lefty » Wed Jul 04, 2007 9:03 pm

sorry for the xtra work, can i ask u to send me the files that are modified by the announcement centre?

i can have a look at them if u want.
lefty aka The Heikze! :eyebrowe:

Heiko Carstens
http://www.lefty74.com

Would you like me to install one of my mods for you? Read here for details
lefty
Abschlussklasse R10c
 
Posts: 1357
Joined: Mon Feb 06, 2006 1:20 am
Location: Den Haag - NL

Postby sK*sl!ce » Wed Jul 04, 2007 9:19 pm

ok new board up, right mod :P i found another place that the install code is different due to smiley management mod:

install instructions:
Code: Select all
posting.php
#
#-----[ FIND ]------------------------------------------
#
else if ( $mode == 'smilies' )
{
   generate_smilies('window', PAGE_POSTING);
   exit;
}
#
#-----[ AFTER, ADD ]------------------------------------------
#
else if ( $mode == 'smilies_announcement_text' )
{
  generate_smilies('window_announcement_text', PAGE_POSTING);
  exit;
}


after smiley management mod:
Code: Select all
else if ( $mode == 'smilies' )
{
   //START MOD Smiley_management
   $page_id = ( !empty($HTTP_GET_VARS['page']) ) ? intval($HTTP_GET_VARS['page']) : 0;
   generate_smilies('window', PAGE_POSTING, $page_id);
    //END MOD Smiley_management
   exit;
}


i'll skip this file for now and continue to edit the rest with acpa
Image
sK*sl!ce
Forum Member
 
Posts: 34
Joined: Wed Jul 04, 2007 7:45 am

Postby sK*sl!ce » Wed Jul 04, 2007 9:29 pm

i ended up putting that after the closing bracket and it looks like it works with your above change... hmm, must be another mod conflicting it :(
Image
sK*sl!ce
Forum Member
 
Posts: 34
Joined: Wed Jul 04, 2007 7:45 am

Postby sK*sl!ce » Wed Jul 04, 2007 9:36 pm

here are the pre and post modified files if it helps:

http://www.s-killz.com/temp/ACPNewsPanel.zip

thanks again for your help
Image
sK*sl!ce
Forum Member
 
Posts: 34
Joined: Wed Jul 04, 2007 7:45 am

Postby lefty » Wed Jul 04, 2007 9:47 pm

Thanks, are these the ones from the board where it does not work?
edit : never mind, figured out that they must be  :whistle2:
lefty aka The Heikze! :eyebrowe:

Heiko Carstens
http://www.lefty74.com

Would you like me to install one of my mods for you? Read here for details
lefty
Abschlussklasse R10c
 
Posts: 1357
Joined: Mon Feb 06, 2006 1:20 am
Location: Den Haag - NL

Postby lefty » Wed Jul 04, 2007 9:58 pm

there was an edit twice in the includes/functions.php

try this one, maybe this does the trick already.

because of the smiley management mod i am not sure what effect that has on the smilie popup though...
Attachments
functions_post.zip
(8.32 KiB) Downloaded 330 times
lefty aka The Heikze! :eyebrowe:

Heiko Carstens
http://www.lefty74.com

Would you like me to install one of my mods for you? Read here for details
lefty
Abschlussklasse R10c
 
Posts: 1357
Joined: Mon Feb 06, 2006 1:20 am
Location: Den Haag - NL

Postby sK*sl!ce » Wed Jul 04, 2007 10:09 pm

still blank... i talked to my host about error reporting, they said i would need to modify your configuration.php or similar settings page if it is a script level setting. not sure about that, but they did say installs of apache and php already report all errors...
Image
sK*sl!ce
Forum Member
 
Posts: 34
Joined: Wed Jul 04, 2007 7:45 am

Postby sK*sl!ce » Wed Jul 04, 2007 10:17 pm

update!!! index.php is the place where the error occurs, and gives a blank index page. i have ftp'd all other acp files over and the board is running. at leased we know where to look now :D
Image
sK*sl!ce
Forum Member
 
Posts: 34
Joined: Wed Jul 04, 2007 7:45 am

Postby lefty » Wed Jul 04, 2007 10:24 pm

nice find :)
I will have a look right away
lefty aka The Heikze! :eyebrowe:

Heiko Carstens
http://www.lefty74.com

Would you like me to install one of my mods for you? Read here for details
lefty
Abschlussklasse R10c
 
Posts: 1357
Joined: Mon Feb 06, 2006 1:20 am
Location: Den Haag - NL

Postby lefty » Wed Jul 04, 2007 10:26 pm

Code: Select all
include($phpbb_root_path . 'includes/bbcode.'.$phpEx);

// Start Smilies Invasion Mod
include($phpbb_root_path . 'includes/bbcode.'.$phpEx);
// End Smilies Invasion Mod

k, one of the two lines can go away for starters
lefty aka The Heikze! :eyebrowe:

Heiko Carstens
http://www.lefty74.com

Would you like me to install one of my mods for you? Read here for details
lefty
Abschlussklasse R10c
 
Posts: 1357
Joined: Mon Feb 06, 2006 1:20 am
Location: Den Haag - NL

Postby sK*sl!ce » Wed Jul 04, 2007 10:38 pm

that's what it was!!! thanks!!!!!!!!!!!!!!!!  :yatta:

my eyes start to cross after reading code for too long lol

installing Wheel's scroller now :P
Image
sK*sl!ce
Forum Member
 
Posts: 34
Joined: Wed Jul 04, 2007 7:45 am

PreviousNext

Return to my MODS & support

Who is online

Users browsing this forum: No registered users and 1 guest

cron