Icy Phoenix

     
 


Post new topic  Reply to topic 
Page 1 of 1
 
 
Reply with quote Download Post 
Post [Mod]Forum Logo Selector 
 
Hey!
Navigating the Internet I found a mod for changing the logo of phpBB2, and I have adapted to Icy Phoenix.
Would you think.

First upload to the server folder images.

SQL:
Code: [Download] [Hide] [Select]
INSERT INTO `ip_config` VALUES ('logo_image_path', 'images/logo');
INSERT INTO `ip_config` VALUES ('logo_image', 'subSilver.gif');
INSERT INTO `ip_config` VALUES ('logo_image_w', '200');
INSERT INTO `ip_config` VALUES ('logo_image_h', '91');


OPEN:
language/lang_english/lang_admin.php

Search:
Code: [Download] [Hide] [Select]
?>


Before Add:
Code: [Download] [Hide] [Select]
$lang['Logo_settings'] = 'Logo Setting';
$lang['Logo_explain'] = 'Here you can set the folder path to your forum logos, the logo to be used and it's display height and width.';
$lang['Logo_path'] = 'Logo Storage Path';
$lang['Logo_path_explain'] = 'Path under your phpBB root dir, e.g. images/logo';
$lang['Logo'] = 'Choose a Logo';
$lang['Logo_dimensions'] = 'Logo Dimensions';
$lang['Logo_dimensions_explain'] = '(Height x Width in pixels). Setting these values to 0 means to display the image in its original height and width.';


Open:
adm/admin_board.php

Search:
Code: [Download] [Hide] [Select]
$style_select


Before add:
Code: [Download] [Hide] [Select]
$dir = @opendir($phpbb_root_path . $new['logo_image_path']);
$count = 0;
while( $file = @readdir($dir) )
{
    if( !@is_dir(phpbb_realpath($phpbb_root_path . $new['logo_image_path'] . '/' . $file)) )
    {
        if( preg_match('/(.gif$|.png$|.jpg|.jpeg)$/is', $file) )
        {
            $logo[$count] = $file;
            $count++;
        }
    }
}
@closedir($dir);
// Logo ListBox
$logo_list = "";
for( $i = 0; $i < count($logo); $i++ )
{
    if ($logo[$i] == $new['logo_image'])
        $logo_list .= '<option value="' . $logo[$i] . '" selected="selected">' . $logo[$i] . '</option>';
    else
        $logo_list .= '<option value="' . $logo[$i] . '">' . $logo[$i] . '</option>';
}

$logo_image = $new['logo_image'];
$logo_width = $new['logo_image_w'];
$logo_height = $new['logo_image_h'];


Search:
Code: [Download] [Hide] [Select]
'L_ADMIN' => $lang['Acc_Admin'],


After add:
Code: [Download] [Hide] [Select]
    'L_LOGO_SETTINGS' => $lang['Logo_settings'],
    'L_LOGO_EXPLAIN' => $lang['Logo_explain'],
    'L_LOGO_PATH' => $lang['Logo_path'],
    'L_LOGO_PATH_EXPLAIN' => $lang['Logo_path_explain'],
    'L_LOGO' => $lang['Logo'],
    'L_LOGO_DIMENSIONS' => $lang['Logo_dimensions'],
    'L_LOGO_DIMENSIONS_EXPLAIN' => $lang['Logo_dimensions_explain'],


Search:
Code: [Download] [Hide] [Select]
    'TIMEZONE_SELECT' => $timezone_select,


After add:
Code: [Download] [Hide] [Select]
    'LOGO_PATH' => $new['logo_image_path'],
    'LOGO_IMAGE_DIR' => $phpbb_root_path . $new['logo_image_path'],
    'LOGO_LIST' => $logo_list,
    'LOGO_IMAGE' => ($logo_image) ? $phpbb_root_path . $board_config['logo_image_path'] .'/' . $logo_image : '',
    'LOGO_WIDTH' => $new['logo_image_w'],
    'LOGO_HEIGHT' => $new['logo_image_h'],


Open:
includes/page_header.php

Search:
Code: [Download] [Hide] [Select]
    'SITE_DESCRIPTION' => $board_config['site_desc'],


After add:
Code: [Download] [Hide] [Select]
    'LOGO' => ($board_config['logo_image']) ? $phpbb_root_path . $board_config['logo_image_path'] .'/' . $board_config['logo_image'] : '',
    'LOGO_WIDTH' => ($board_config['logo_image_w'] == 0) ? "" : 'width="' . $board_config['logo_image_w'] . '" ',
    'LOGO_HEIGHT' => ($board_config['logo_image_h'] == 0) ? "" : 'height="' . $board_config['logo_image_h'] . '" ',


Open:
templates/common/ACP/board_config_body.tpl

Search:
Code: [Download] [Hide] [Select]
<p>{L_CONFIGURATION_EXPLAIN}</p>


After add:
Code: [Download] [Hide] [Select]
<script language="javascript" type="text/javascript">
<!--
function update_logo(newlogo)
{
    document.logo_image.src = "{LOGO_IMAGE_DIR}/" + newlogo;
}
//-->
</script>


Search:
Code: [Download] [Hide] [Select]
    <tr>
        <td class="row1">{L_ENABLE_PRUNE}</td>
        <td class="row2"><input type="radio" name="prune_enable" value="1" {PRUNE_YES} /> {L_YES}&nbsp;&nbsp;<input type="radio" name="prune_enable" value="0" {PRUNE_NO} /> {L_NO}</td>
    </tr>


After Add:
Code: [Download] [Hide] [Select]
    <tr>
        <th class="thHead" colspan="2">{L_LOGO_SETTINGS}</th>
    </tr>
    <tr>
        <td class="row2" colspan="2"><span class="gensmall">{L_LOGO_EXPLAIN}</span></td>
    </tr>
    <tr>
      <td class="row1">{L_LOGO_PATH}<br /><span class="gensmall">{L_LOGO_PATH_EXPLAIN}</span></td>
      <td class="row2"><input class="post" type="text" size="20" maxlength="255" name="logo_image_path" value="{LOGO_PATH}" /></td>
    </tr>
    <tr>
        <td class="row1">{L_LOGO_DIMENSIONS}<br /><span class="gensmall">{L_LOGO_DIMENSIONS_EXPLAIN}</span></td>
        <td class="row2"><input class="post" type="text" size="3" maxlength="4" name="logo_image_h" value="{LOGO_HEIGHT}" /> x <input class="post" type="text" size="3" maxlength="4" name="logo_image_w" value="{LOGO_WIDTH}"></td>
    </tr>
    <tr>
      <td class="row1">{L_LOGO}</td>
      <td class="row2"><select name="logo_image" onchange="update_logo(this.options[selectedIndex].value);">{LOGO_LIST}</select> &nbsp; <img name="logo_image" src="{LOGO_IMAGE}" border="0" width="{LOGO_WIDTH}" height="{LOGO_HEIGHT}"/> &nbsp;</td>
    </tr>


Open:
templates/mg_themes/overall_header.tpl

Search:
Code: [Download] [Hide] [Select]
                <td><a href="{U_INDEX}"><img src="{FULL_SITE_PATH}{SITELOGO}" border="0" alt="{L_INDEX}" vspace="1" /></a></td>


In-Line Search:
Code: [Download] [Hide] [Select]
{SITELOGO}"


Replace With:
Code: [Download] [Hide] [Select]
{LOGO}" {LOGO_WIDTH}{LOGO_HEIGHT}


    
And now, I attached the images folder.

images.rar
Description:  
Download
Filename: images.rar
Filesize: 20.45 KB
Downloaded: 192 Time(s)

 



 
salcedakaSend private messageVisit poster's website  
Back to topPage bottom
Icy Phoenix is an open source project, you can show your appreciation and support future development by donating to the project.

Support us
 
Reply with quote Download Post 
Post Re: [Mod]Forum Logo Selector 
 
Do you have a demo board up and running so that we can see this MOD in action?

Moving to Icy Phoenix Customizations...  
 




____________
| Icy Phoenix ColorizeIt! |
Bipolar Disorder - Not good for you and definitely not good for everyone else.
 
ChaoticSend private messageVisit poster's website  
Back to topPage bottom
Reply with quote Download Post 
Post Re: [Mod]Forum Logo Selector 
 
question.


does this mod replace only the sitelogo_small or does it replace the the small logos insite boxes aswell
 




____________
Out of Order
 
spydieSend private messageVisit poster's website  
Back to topPage bottom
Reply with quote Download Post 
Post Re: [Mod]Forum Logo Selector 
 
I have used this an intergramod forum basically it saves you having to edit the template file to change your logo... but you can store different logos in a folder and change them when you like..

Personally I never change my logo but if people like to this mod is ideal... yes it will only change sitelogo_small as fasr as I can remember..

   
 




____________
Mods and themes for Icy Phoenix 1.3

IcyPhoenix UK is off-line permanently due to lack of time to update mods.
if anyone is interested in my templates I will upgrade them to Icy 2.0.
 
DWhoSend private messageVisit poster's website  
Back to topPage bottom
Reply with quote Download Post 
Post Re: [Mod]Forum Logo Selector 
 
No offence to the conversion for Icy Phoenix, but I think the mod is a bit of a dinosaur for several reasons.

The main one being that IP uses many logos that vary for each style of template, and most would have to be adjusted in the .css anyway. And while the mod may be fine for a single "Default" style, it will only create problems when / if users switch styles and the header layout is managed differently in the .css.

And of course there are scripts available that will change the header, logo or both automatically, and apply the correct .css to handle them at the same time.


 
 
 
Back to topPage bottom
Reply with quote Download Post 
Post Re: [Mod]Forum Logo Selector 
 
Apart of that... remember that you can add your own logo using a CMS block as well... no need to install extra stuffs.
 




____________
Luca
SEARCH is the quickest way to get support.
Icy Phoenix ColorizeIt - CustomIcy - HON
 
Mighty GorgonSend private messageSend e-mail to userVisit poster's website  
Back to topPage bottom
Post new topic  Reply to topic  Page 1 of 1
 


Display posts from previous:    

HideWas this topic useful?

Link this topic
URL
BBCode
HTML




 
Permissions List
You cannot post new topics
You cannot reply to topics
You cannot edit your posts
You cannot delete your posts
You cannot vote in polls
You cannot attach files
You can download files
You cannot post calendar events


  

 

  cron