FAQFAQ  -Suchen-Suchen         -Registrieren-Registrieren 
  -Profil -Profil        -login -login

[MOD] phpBB2 :: Forum_Images ::

 
    -> .
::  
AlexanderOffline



.: 09.09.2003
: 221
  : Deutschland
: 41
?
: , 22 2008, 8:54     : [MOD] phpBB2 :: Forum_Images ::

:

########################################################
## MOD Title: Advanced forum icon management with ACP Control
## MOD Author: Alexander Nowikow hostmaster@derus.net http://www.derus.net/
## MOD Description: This mod allow admin to give each forum a icon. Icons will show on index with defined forens.
## MOD Version: 1.0.0
##
## Installation Level: Easy
## Installation Time: 5 Minut
##
## Files To Edit:
##   index.php
##   admin/admin_forums.php
##   language/lang_english/lang_admin.php
##   templates/subSilver/admin/forum_admin_body.tpl
##   templates/subSilver/admin/forum_edit_body.tpl
##   templates/subSilver/index_body.tpl
##
## Included Files: n/a
##
## License: http://opensource.org/licenses/gpl-license.php GNU General Public License v2
#################################################################
## For security purposes, please check: http://www.phpbb.com/mods/
## for the latest version of this MOD. Although MODs are checked
## before being allowed in the MODs Database there is no guarantee
## that there are no security problems within the MOD. No support
## will be given for MODs not found within the MODs Database which
## can be found at http://www.phpbb.com/mods/
##############################################################
## Author Notes:
##    Tested on 2.0.18.
##
##
##############################################################
## MOD History:
##
##   2006-02-26 - Version 1.0.0 Release
##
##
##############################################################
## Before adding this MOD to your forum, you should back up all files related to this MOD
##############################################################
#
#-----[ SQL ]-------------------------------------------
#
# Remember to change the table prefix used on your database
ALTER TABLE `phpbb_forums` ADD `forum_image` VARCHAR( 255 ) NOT NULL ;

#
#---[ OPEN ]---------------------------------------------
#
index.php

#
#---[ FIND ]---------------------------------------------
#
                        $folder_image = ( $unread_topics ) ? $images['forum_new'] : $images['forum'];
                        $folder_alt = ( $unread_topics ) ? $lang['New_posts'] : $lang['No_new_posts'];
#
#---[ REPLACE WITH ]-------------------------------------
#
                                                                $folder_image = $forum_data[$j]['forum_image'];
                                                                $image_width=40; //Our default width is 40 px
                        if (empty($forum_data[$j]['forum_image']))
                                                                {
                                                                       $image_width = 46; //Default width from phpbb is 46px
                               $folder_image = ( $unread_topics ) ? $images['forum_new'] : $images['forum'];
                        } else {
                        }
                                                                $folder_alt = ( $unread_topics ) ? $lang['New_posts'] : $lang['No_new_posts'];

#
#----[ FIND ]--------------------------------------------
#
                     $template->assign_block_vars('catrow.forumrow',   array(

#----[ BEFORE, ADD]---------------------------------------
                                                        $forum_desc = $forum_data[$j]['forum_desc'];
                                                        if ($forum_data[$j]['forum_image'] && $unread_topics) {
                                                              $forum_desc = $forum_data[$j]['forum_desc'].'<br><font color="red"><b>'.$lang['New_posts'].'</b></font>'."\n";
                                                        }

#
#----[ FIND ]---------------------------------------------
#
                        'FORUM_DESC' => $forum_data[$j]['forum_desc'],

#
#----[ REPLACE WITH ]--------------------------------------
#
                        'FORUM_DESC' => $forum_desc,
                        'FORUM_IMG_WIDTH' => $image_width,

#
#----[ OPEN ]-----------
#
templates/subSilver/admin/forum_edit_body.tpl

#
#-----[ FIND ]------------------------------------------
#
     <td class="row2"><input type="text" size="25" name="forumname" value="{FORUM_NAME}" class="post" /></td>
   </tr>
#
#-----[ AFTER, ADD ]------------------------------------
#
   <tr>
     <td class="row1">{L_FORUM_IMAGE}</td>
     <td class="row2"><input type="text" size="35" name="forum_image" value="{FORUM_IMAGE}" class="post" /> {FORUM_IMAGE_SRC}</td>
   </tr>
#
#----[ OPEN ]--------------------------------------------
#
admin/admin_forums.php

#
#----[ FIND ]-----------
#
$template->assign_vars(array(

#
#----[ AFTER, ADD ]------
#
                                'L_FORUM_IMAGE' => $lang['Forum_image_settings'],
                                'FORUM_IMAGE' => $row['forum_image'],
                                'FORUM_IMAGE_SRC' => ($row['forum_image']) ? '<img src="../'.$row['forum_image'].'" border=0>' : '',
#
#----[ FIND ]-----------
#
         // There is no problem having duplicate forum names so we won't check for it.
         $sql = "INSERT INTO " . FORUMS_TABLE . " (forum_id, forum_name, cat_id, forum_desc, forum_order, forum_status, prune_enable" . $field_sql . ")
            VALUES ('" . $next_id . "', '" . str_replace("\'", "''", $HTTP_POST_VARS['forumname']) . "', " . intval($HTTP_POST_VARS[POST_CAT_URL]) . ", '" . str_replace("\'", "''", $HTTP_POST_VARS['forumdesc']) . "', $next_order, " . intval($HTTP_POST_VARS['forumstatus']) . ", " . intval($HTTP_POST_VARS['prune_enable']) . $value_sql . ")";
#
#----[ BEFORE ADD ]-----
#
$forum_image = $HTTP_POST_VARS['forum_image'];


#
#----[ IN-LINE FIND ]---
#
forum_name,

#
#----[ IN-LINE AFTER, ADD ]------------------------------
#
forum_image,

#
#----[ IN-LINE FIND ]-----------------------------------
#
$HTTP_POST_VARS['forumname']) . "',

#
#----[ IN-LINE AFTER, ADD ]-----------------------------
#
'$forum_image',

#
#----[ FIND ]-------------------------------------------
#
                case 'modforum':
                        // Modify a forum in the DB
                        if( isset($HTTP_POST_VARS['prune_enable']))
                        {
                                if( $HTTP_POST_VARS['prune_enable'] != 1 )
                                {
                                        $HTTP_POST_VARS['prune_enable'] = 0;
                                }
                        }
                        $forum_image = $HTTP_POST_VARS['forum_image'];
#
#----[ AFTER, ADD ]------------------------------------
#
            $forum_image = $HTTP_POST_VARS['forum_image'];

#
#----[ FIND ]-------------------------------------------
#
            SET forum_name = '" . str_replace("\'", "''", $HTTP_POST_VARS['forumname']) . "', cat_id = " . intval($HTTP_POST_VARS[POST_CAT_URL]) . ", forum_desc = '" . str_replace("\'", "''", $HTTP_POST_VARS['forumdesc']) . "', forum_status = " . intval($HTTP_POST_VARS['forumstatus']) . ", prune_enable = " . intval($HTTP_POST_VARS['prune_enable']) . "
#
#----[ REPLACE WITH ]-----------------------------------
#
            SET forum_image = '$forum_image', forum_name = '" . str_replace("\'", "''", $HTTP_POST_VARS['forumname']) . "', cat_id = " . intval($HTTP_POST_VARS[POST_CAT_URL]) . ", forum_desc = '" . str_replace("\'", "''", $HTTP_POST_VARS['forumdesc']) . "', forum_status = " . intval($HTTP_POST_VARS['forumstatus']) . ", prune_enable = " . intval($HTTP_POST_VARS['prune_enable']) . "

#
#----[ FIND ]--------------------------------------------
#
            $template->assign_block_vars("catrow.forumrow",   array(

#
#----[ AFTER ADD ]----------------------------------------
#
               'FORUM_IMG' => ($forum_rows[$j]['forum_image']) ? $forum_rows[$j]['forum_image'] : 'templates/subSilver/images/folder_big.gif',

#
#----[ OPEN ]---------------------------------------------
#
templates/subSilver/admin/forum_admin_body.tpl

#
#----[ FIND ]----------------------------------------------
#
      <td class="catLeft" colspan="3"><span class="cattitle"><b><a href="{catrow.U_VIEWCAT}">{catrow.CAT_DESC}</a></b></span></td>

#
#----[ REPLACE WITH ]--------------------------------------
#
      <td class="catLeft" colspan="4"><span class="cattitle"><b><a href="{catrow.U_VIEWCAT}">{catrow.CAT_DESC}</a></b></span></td>

#
#----[ FIND ]-----------------------------------------------
#
   </tr>
   <!-- BEGIN forumrow -->
   <tr>

#
#----[ AFTER ADD ]-------------------------------------------
#
      <td class="row2"><img src="../{catrow.forumrow.FORUM_IMG}" border=0></td>


#
#----[ OPEN ]--------------------------------------------
#
templates/subSilver/index_body.tpl

#
#----[ FIND ]--------------------------------------------
#
        <td class="row1" align="center" valign="middle" height="50"><img src="{catrow.forumrow.FORUM_FOLDER_IMG}" width="46" height="25" alt="{catrow.forumrow.L_FORUM_FOLDER_ALT}" title="{catrow.forumrow.L_FORUM_FOLDER_ALT}" /></td>

#
#----[ REPLACE WITH ]-------------------------------------
#
   <td class="row1" align="center" valign="middle" height="50"><img src="{catrow.forumrow.FORUM_FOLDER_IMG}" width="{catrow.forumrow.FORUM_IMG_WIDTH}" alt="{catrow.forumrow.L_FORUM_FOLDER_ALT}" title="{catrow.forumrow.L_FORUM_FOLDER_ALT}" /></td>

#----[ OPEN ]-------------------------------------------
#
#language/[Your lang]/lang_admin.php
language/lang_english/lang_admin.php

#
#----[ FIND ]-------------------------------------------
#
$lang['Forum_admin'] = ' ';

#
#----[ BEFORE, ADD ]------------------------------------
#
$lang['Forum_image_settings'] = ' ';



.

, .
, . , , "". : " " - .

, . , :
1. .
2. frmimg
3. ( 4040 WEB).
4. : frmimg/icon1.gif icon1.gif


, .

.



mod_forum_images.zip
 :
.

  :  mod_forum_images.zip
  :  130.39 KB
 :  848


_________________
, ... , !
     
valaskinOffline
Derus guru
Derus guru

.: 15.04.2018
: 257
? !
: , 14 2018, 19:50     :

инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
  
:   
           -> . : GMT + 1
1 1

 
 









Powered by phpBB © 2001, 2005 phpBB Group


Rambler's Top100