Advanced search  

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Pages: [1]   Go Down

Author Topic: How/What to change to a theme to be 100% operational?  (Read 36026 times)

0 Members and 1 Guest are viewing this topic.

Davide Renda

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1427
  • aka "Lontano"
    • www.daviderenda.eu
How/What to change to a theme to be 100% operational?
« on: August 13, 2006, 03:05:01 pm »

wow... 1st one to use this sub-board... what a honour!

Joke apart, as per topic's subject, which changes are necessary/compulsory to a standard CPG 14x theme to be working and fully operational with the modded gallery?
For instance, some theme does not permit to have a login form, wereas other ones do not exploit all extra funtionalities, others loose their aspect if using bigger icons, etc etc.
Which steps are requiered to fully have profit of the modded version?

Thanks all  ;)
« Last Edit: March 23, 2007, 10:39:52 am by GauGau »
Logged

Stramm

  • Moderator
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 6006
    • Bettis Wollwelt
Re: How/What to change to a theme to be 100% operational?
« Reply #1 on: August 14, 2006, 08:19:21 am »

to make custom themes work together with the modpack following modifications have to be done:

1. the loginform:
open yor theme's template.html and where you want the loginform to appeare add {LOGIN_FORM}
Usually I use html span to place it. Eg. as used in the classic theme
Code: [Select]
<span style="float:right">{LOGIN_FORM}</span>
2. cosmetics - the css
you'll have to update the stylsheet. Open your theme's style.css add following to the top of it and adapt the colors to your needs
Code: [Select]
.alt1, .alt1Active
{
background-color: #F8FAFC;
font-family: verdana, arial, helvetica, sans-serif;
}

.alt2, .alt2Active
{
background-color: #cacaca;
font-family: verdana, arial, helvetica, sans-serif;
}

.alt3
{
background-color: #ececec;
color: #000000;
}

.pms_send_a {
background: #EFEFEF ;
padding-top: 3px;
padding-right: 10px;
padding-bottom: 3px;
padding-left: 10px;
border: 1px inset;
}

.pms_send_b {
background: #cacaca;
padding-top: 10px;
padding-right: 10px;
padding-bottom: 10px;
padding-left: 10px;
border: 1px inset;
}

.pms_legend
{
        margin: 10px;
}

.panel
{
background: #F8FAFC;
color: #000000;
padding: 10px;
border: 2px outset;
}

.panelsurround
{
background: #cacaca;
color: #000000;
}

.pms_linecolor1
{
background-color: #0E72A4;
font-size: 10px;
}
.pms_linecolor2
{
background-color: #71ACCA;
font-size: 10px;
}
.pms_linecolor3
{
background-color: #DEDEDE;
font-size: 10px;
}
.pms_linecolor4
{
background-color: white;
font-size: 10px;
}
.pms_linecolor5
{
background-color: #A6DAF5;
font-size: 10px;
}

.smallfont
{
font-size: 10px;
}

3. images - copy all images from the classic theme's images directory to the images directory of the theme you want to make modpack compatible without overwriting existing files. Eventually you want to open these images in your gfx program and make them fit your themes colors.

Code: [Select]
New images are:
[i]grayscale, usually no color adjusting necessary - copying OK [/i]
buddy_blocked.gif (red - shows blocked - also used in PM list)
buddy_ok.gif (green for OK - also used in PM list)
pm_icon1.gif
pm_old.gif (read PM)
pm_post_old.gif
thumb_mini_movie.gif (used for subscribtion list etc. - where mini thumbs are used - should be resized to the config settings)
useroff.gif (little bulb that shows if a user is online or not - offline all gray)
useron.gif (yellow)

[i]Icons that may need some color adaptions[/i]
pm.gif (PM next to the thumbs etc. - I usually make it the link color)
pm_new.gif (unread PM in the PM list - usually link color)
pm_replied.gif (icon for PMs you replied - also link color)
make_buddy.gif (become friends gfx in the profile - may contain theme colors)
pm_send_small.gif (send PM gfx in the profile - may contain theme colors)
pm_reply_small.gif (Reply gfx when you read a PM - may contain theme colors)


4. If your theme's using a modified menu then read on further
There's a new link added to coppermines menu ( 'My friends' - for the buddy list). Cause there are several ways how one can modify the menu I just can give the direction on what to do.

Open the theme.php of the theme you want to modify and find the var $template_sys_menu_button. If the theme is using the new layout of the sys menu (you can see that if there are already lines existing like the codeline below) then just add the code below where you want it to appeare (maybe after the home link)

Code: [Select]
addbutton($s000000000ys_menu_buttons,'{MY_BUDDY_LNK}','','{MY_BUDDY_TGT}','my_friends',$template_sys_menu_spacer);

If the theme's using the old style then add something similar to the following and adapt the html to fit your layout
Code: [Select]
<!-- BEGIN my_friends -->
                                                <li class="sidebar_menu"><a href="{MY_BUDDY_TGT}" title="{MY_BUDDY_LNK}" class="navmenu">{MY_BUDDY_LNK}</a></li>
<!-- END my_friends -->
« Last Edit: July 07, 2007, 05:29:21 pm by Stramm »
Logged

Davide Renda

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1427
  • aka "Lontano"
    • www.daviderenda.eu
Re: How/What to change to a theme to be 100% operational?
« Reply #2 on: August 14, 2006, 09:26:52 pm »

Thank you Stramm, that was much appreciated, now I can use the theme "Connection" and it works perfectly!

If anybody is interested, the "modded" theme is attached to this post.

To avoid the login button appears outside the page, in /include/themes.inc.php find
Code: [Select]
if (!function_exists('loginForm')) {

function loginForm($logged=1) {



global $CONFIG, $lang_loginform, $REFERER;



//if (!$CONFIG['enable_loginform']) return $loginFormHtml = "";



if (!USER_ID && $CONFIG['enable_loginform']) {

  $loginFormHtml = <<<EOT

<ins>

    <form action="login.php?referer=$REFERER" method="post" name="loginbox" style="margin:0; padding:0;">

        <table cellpadding="0" cellspacing="3" border="0">

        <tr>

            <td><input type="text" class="textinput" name="username" size="10" /></td>

            <td><input type="password" class="textinput" name="password" size="10" /></td>
        <tr>

        <td class="smallfont">$lang_loginform[user]</td>

        <td class="smallfont">$lang_loginform[pass]</td>
        <td><input name="submitted" type="submit" value="Login" />

        <td></td>

</tr>
        <tr>
<input name="remember_me" type="hidden" class="checkbox" value="1" checked="checked" /></td>

        </tr>
        </tr> 



        </table>

        </form>

</ins>

and change into
Code: [Select]
if (!function_exists('loginForm')) {

function loginForm($logged=1) {



global $CONFIG, $lang_loginform, $REFERER;



//if (!$CONFIG['enable_loginform']) return $loginFormHtml = "";



if (!USER_ID && $CONFIG['enable_loginform']) {

  $loginFormHtml = <<<EOT

<ins>

    <form action="login.php?referer=$REFERER" method="post" name="loginbox" style="margin:0; padding:0;">

        <table cellpadding="0" cellspacing="3" border="0">

        <tr>

            <td><input type="text" class="textinput" name="username" size="10" /></td>

            <td><input type="password" class="textinput" name="password" size="10" /></td>
        <tr>

        <td class="smallfont">$lang_loginform[user]</td>

        <td class="smallfont">$lang_loginform[pass]</td>

        <td></td>

</tr>
        <tr>
    <td><input name="submitted" type="submit" value="Login" />
            <input name="remember_me" type="hidden" class="checkbox" value="1" checked="checked" /></td>

        </tr>
        </tr> 



        </table>

        </form>

</ins>

tommy22

  • Coppermine newbie
  • Offline Offline
  • Posts: 9
yea but...
« Reply #3 on: September 21, 2006, 01:06:02 am »

this realy helped me out alot, however i ran into a small problem.

i dont remeber which theme i selected, now i have that error again. and i dont know which theme to edit!!

is there any way to find out what theme i am using? so i know which one to edit?

i have alot of themes on there, so it would take forever to go througfh them all.
Logged

Stramm

  • Moderator
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 6006
    • Bettis Wollwelt
Re: How/What to change to a theme to be 100% operational?
« Reply #4 on: September 21, 2006, 05:30:03 pm »

Code: [Select]
<?php
define
('IN_COPPERMINE'true);
require(
'include/init.inc.php');

user_get_profile();
echo 
$USER['theme'];
?>

save as eg. show_theme.php in coppermine root and run it. It reads the CPG cookie and displays the theme name

edit: I've just ssen that you've started another thread with that question... This will not work if you have cleared your cookie or no cookie is present
« Last Edit: September 21, 2006, 05:35:10 pm by Stramm »
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: How/What to change to a theme to be 100% operational?
« Reply #5 on: March 23, 2007, 10:40:35 am »

Made this topic a sticky. Locking it to avoid it getting cluttered.
Logged
Pages: [1]   Go Up
 

Page created in 0.024 seconds with 19 queries.