Coppermine and SMF themes...

Started by duckduckgoose, April 22, 2004, 10:58:54 AM

Previous topic - Next topic

duckduckgoose

After looking through the forums, I've not seen mention of anyone doing a combined theme for both SMF and Coppermine. I'm a new user of SMF and would like to have something that looks consistent between the two packages.

Tomer

The forum is new and not many people have mastered the themeing system, everything in its time.

Martje

coppermine isnot realy difficult to edit

I have made buttons in clasic style for coppermine and  transformed the coppermine to  my own theme. If some one is interested in the buttons I can post them.


and hey I saw that the coppermine forum is now SMF ;D

duckduckgoose

Quote from: maime on April 23, 2004, 05:49:38 AM
I have made buttons in clasic style for coppermine and  transformed the coppermine to  my own theme. If some one is interested in the buttons I can post them.
Of course we're interested. Anything is progress at this point. Speaking for myself, anytime I don't have to reinvent the wheel is appreciated.

Martje

ok since every one will having his own modified template the thing i can do is to show how you can modify it yourselve.
coppermine uses mainly 3 files that makes up a theme
theme.php, template.html and style.css

1. after installing coppermine look for the theme folder
2. copy the content of that folder to a new folder
3. let say we call that folder smftheme

so now we can start
4. open smftheme/template.html in my favorite html editor  ;)

you will see something like this


theme.html only deals with the layout so you can easaly change it to for instance the classic theme of yabbse



you need at least a basic knowledge of html to do this

allright this was part 1 next post is about
changing the textlinks into buttons
and the last one is about
getting your colors right ;D


Martje

#5
allright step 1

open smftheme/theme.php and find
Quote// HTML template for main menu
$template_main_menu = <<<EOT
                <span class="topmenu">
<!-- BEGIN album_list -->
                        <a href="{ALB_LIST_TGT}" title="{ALB_LIST_TITLE}">{ALB_LIST_LNK}</a> ::
<!-- END album_list -->
<!-- BEGIN my_gallery -->
                        <a href="{MY_GAL_TGT}" title="{MY_GAL_TITLE}">{MY_GAL_LNK}</a> ::
<!-- END my_gallery -->
<!-- BEGIN my_profile -->
                        <a href="{MY_PROF_TGT}">{MY_PROF_LNK}</a> ::
<!-- END my_profile -->
<!-- BEGIN enter_admin_mode -->
                        <a href="{ADM_MODE_TGT}" title="{ADM_MODE_TITLE}">{ADM_MODE_LNK}</a> ::
<!-- END enter_admin_mode -->
<!-- BEGIN leave_admin_mode -->
                        <a href="{USR_MODE_TGT}" title="{USR_MODE_TITLE}">{USR_MODE_LNK}</a> ::
<!-- END leave_admin_mode -->
<!-- BEGIN upload_pic -->
                        <a href="{UPL_PIC_TGT}" title="{UPL_PIC_TITLE}">{UPL_PIC_LNK}</a> ::
<!-- END upload_pic -->
<!-- BEGIN register -->
                        <a href="{REGISTER_TGT}" title="{REGISTER_TITLE}">{REGISTER_LNK}</a> ::
<!-- END register -->
<!-- BEGIN login -->
                        <a href="{LOGIN_TGT}">{LOGIN_LNK}</a>
<!-- END login -->
<!-- BEGIN logout -->
                        <a href="{LOGOUT_TGT}">{LOGOUT_LNK}</a>
<!-- END logout -->
                        <br />
                        <a href="{LASTUP_TGT}">{LASTUP_LNK}</a> ::
                        <a href="{LASTCOM_TGT}">{LASTCOM_LNK}</a> ::
                        <a href="{TOPN_TGT}">{TOPN_LNK}</a> ::
                        <a href="{TOPRATED_TGT}">{TOPRATED_LNK}</a> ::
                        <a href="{FAV_TGT}">{FAV_LNK}</a> ::
                        <a href="{SEARCH_TGT}">{SEARCH_LNK}</a>
                </span>

and change it into

Quote// HTML template for main menu
$template_main_menu = <<<EOT
                <span class="topmenu">
<!-- BEGIN album_list -->
                        <a href="{ALB_LIST_TGT}" title="{ALB_LIST_TITLE}"><img src="images/menu/album_list.gif"  border="0"></a>
<!-- END album_list -->
<!-- BEGIN my_gallery -->
                        <a href="{MY_GAL_TGT}" title="{MY_GAL_TITLE}"><img src="images/menu/my_gallery.gif" border="0"></a>
<!-- END my_gallery -->
<!-- BEGIN my_profile -->
                        <a href="{MY_PROF_TGT}"><img src="images/menu/profile.gif" border="0"></a>
<!-- END my_profile -->
<!-- BEGIN enter_admin_mode -->
                        <a href="{ADM_MODE_TGT}" title="{ADM_MODE_TITLE}"><img src="images/menu/admin.gif" border="0"></a>
<!-- END enter_admin_mode -->
<!-- BEGIN leave_admin_mode -->
                        <a href="{USR_MODE_TGT}" title="{USR_MODE_TITLE}"><img src="images/menu/user_mode.gif" border="0"></a>
<!-- END leave_admin_mode -->
<!-- BEGIN upload_pic -->
                        <a href="{UPL_PIC_TGT}" title="{UPL_PIC_TITLE}"><img src="images/menu/upload_picture.gif" border="0"></a>
<!-- END upload_pic -->
<!-- BEGIN register -->
                        <a href="{REGISTER_TGT}" title="{REGISTER_TITLE}"><img src="images/menu/register.gif" border="0"></a>
<!-- END register -->
<!-- BEGIN login -->
                        <a href="{LOGIN_TGT}"><img src="images/menu/login.gif" border="0"></a>
<!-- END login -->
<!-- BEGIN back to forum -->
                  <a href="http://yoursite.com/yoursmflocationindex.php"><img src="images/menu/forum.gif" border="0"></a>
<!-- END back to forum -->

<!-- BEGIN logout -->
                        <a href="{LOGOUT_TGT}"><img src="images/menu/logout.gif" border="0"></a>
<!-- END logout -->
                        <br />
                        <a href="{LASTUP_TGT}"><img src="images/menu/last_uploads.gif" border="0"></a>
                        <a href="{LASTCOM_TGT}"><img src="images/menu/last_comments.gif" border="0"></a>
                        <a href="{TOPN_TGT}"><img src="images/menu/most_viewed.gif" border="0"></a>
                        <a href="{TOPRATED_TGT}"><img src="images/menu/top_rated.gif" border="0"></a>
                        <a href="{FAV_TGT}"><img src="images/menu/my_favorites.gif" border="0"></a>
                        <a href="{SEARCH_TGT}"><img src="images/menu/photo_search.gif" border="0"></a><br>
                </span>

the images folder reffered in
Quoteimg src="images/menu/top_rated.gif 
is located in your root directory of coppermine.

so for instance
../coppermine/images

I made a map menu in that folder where i have put the buttons
../coppermine/images/menu


the
<!-- BEGIN back to forum -->
                  <a href="http://yoursite.com/yoursmflocationindex.php"><img src="images/menu/forum.gif" border="0"></a>
<!-- END back to forum -->

you can put in to make a link back to your forum

hmmm I think that covers the link part, next part will be about the colors :) :P

I have attached the buttons so u can try this config out

Martje

in this part we look in to the style.css in the folder

open smftheme/style.css

for the colors of the coppermine photo album I only will deal with the relevant colors of the backgrounds and the tables, I leave the changing of the fonts and other stuff up to you.


the background color and the main table
Quote

/* this is your background color you can use a color or a backgrouyd picture or a combi*/
body {
        font-family : Verdana, Arial, Helvetica, sans-serif;
        font-size: 12px;
        background : #FFFFFF url(images/replacewithyourbackground.gif) no-repeat;
        color : Black;
        margin: 0px;
}

------------------------------------------

/* change this in your own color */
  .maintable {
  border: 1px solid #FFFFFF;
  margin-top: 1px;
  margin-bottom: 1px;
  }
----------------------------------------
/


the different tables

Quote   .tableh1 {
        background : #F8D1B0 ;
        background-image:  url(images/catbg.jpg);
      color : #000000;
        padding-top: 3px;
        padding-right: 10px;
        padding-bottom: 3px;
        padding-left: 10px;
}   






Quote.tableh1_compact {
        background : #FCDCCC ;
        color : #0000000;
        padding-top: 2px;
        padding-right: 5px;
        padding-bottom: 2px;
        padding-left: 5px;
}






Quote.tableh2 {
        background: #FCDCCC ;
        color : #000000;
        padding-top: 3px;
        padding-right: 10px;
        padding-bottom: 3px;
        padding-left: 10px;
}






Quote.tableh2_compact {
        background: #FCDCCC ;
        color : #000000;
        padding-top: 2px;
        padding-right: 5px;
        padding-bottom: 2px;
        padding-left: 5px;
}






Quote.tableb {
        background: #FFDFA0 ;
        padding-top: 3px;
        padding-right: 10px;
        padding-bottom: 3px;
        padding-left: 10px;
}






Quote.tableb_compact {
        background: #FFDFA0 ;
        padding-top: 2px;
        padding-right: 5px;
        padding-bottom: 2px;
        padding-left: 5px;
}






Quote.tablef {
        background: #FFDFA0;
      background-image:  url(catbg.jpg);
        padding-top: 10px;
        padding-right: 10px;
        padding-bottom: 10px;
        padding-left: 10px;






so with this info you must be able to make your own theme

:P

Martje

#7
in the images folder there is also a ' link to photo album'  button, again you can use this and replace it with one you made yourself

you have to read this topic how to build a bridge between SMF and coppermine
http://www.simplemachines.org/community/index.php?topic=6699.msg66106#msg66106
and
if you want to put a gallery button in your SMF you have to read the following topic
http://www.simplemachines.org/community/index.php?topic=5720.0

thats about it to add coppermine photoalbum to your site and SMF :)

65stang

Quote from: maime on April 24, 2004, 11:33:20 AM
in the images folder there is also a ' link to photo album'  button, again you can use this and replace it with one you made yourself

i am interested in that button and how it works. Im also wanting a coppermine button that says "Forum" just like we have the "gallery" button in smf

Martje

Quote from: 65stang on May 06, 2004, 11:29:07 AM
Quote from: maime on April 24, 2004, 11:33:20 AM
in the images folder there is also a ' link to photo album'  button, again you can use this and replace it with one you made yourself

i am interested in that button and how it works. Im also wanting a coppermine button that says "Forum" just like we have the "gallery" button in smf

it works like it says in the previous posts :P

if you want to put a gallery button in your SMF  which direct to coppermine you have to read the following topic
http://www.simplemachines.org/community/index.php?topic=5720.0
if you follow the steps in there its a piece of cake.

and you have to read this topic how to build a bridge between SMF and coppermine
http://www.simplemachines.org/community/index.php?topic=6699.msg66106#msg66106

and the coppermine button that says forum i described in step 1 in this thread
Posted on: April 24, 2004, 12:13:03 PM

if you just follow the steps above and read the links its easy, you can download the buttons for reference and change them when your prototype is working or keep them , whatever you like.

casper_shadowrider

#10
Hi,

Nice tutorial maime.

The coppermine / smf bridge(included in the coppermine 1.3 download) has been updated, and to work with correct permissions, it needs a couple of other (coppermine) files to be changed, due to permissions changes happening in coppermine.  Note, this is designed to work with coppermine version 1.3, which is still in beta stage, although pretty stable.
Read this thread, http://coppermine.sourceforge.net/board/index.php?topic=5942.msg25880#msg25880, then Download the bridge and other files needed HERE.

For further help in changing coppermine to match your smf look, there is also a styleguide, which shows which bit of the css file controls what.  If you have coppermine v1.3, it is included in the themes, or you can see it at the coppermine demo, by selecting theme 'styleguide', from the dropdown list.  See the demo HERE

Hope this helps.

One point on the tutorial.  The themes images, such as buttons etc, are usually placed in the themes/your_theme/images folder, to keep the root/images folder neat and stop different themes overwriting each other.  The image src then has to be 'themes/your_theme/images/....'
If you are only going to modify the one theme, and stick to that, doing it the way maime described will work fine.

Make god laugh, tell him your plans

Protoss

Yea the theming system takes some tweaking, it took me a while, but I've got to say, its a lot better than IPB, where there are 20 different templates, and 50 different CSS entries  >:(

DaMysterious

Quote from: duckduckgoose on April 23, 2004, 03:37:24 PM
Quote from: maime on April 23, 2004, 05:49:38 AM
I have made buttons in clasic style for coppermine and  transformed the coppermine to  my own theme. If some one is interested in the buttons I can post them.
Of course we're interested. Anything is progress at this point. Speaking for myself, anytime I don't have to reinvent the wheel is appreciated.

A SMF like theme for Coppermine [nofollow] is almost ready. We are in touch with Lewis Media doe to the awayting permission to distribute the package.
Salve,
DaMysterious.

RGSMDNR

#13
i just installed this theme, the top bar does not have any user info or anything,  (just says login/register)

how would i change this so it would match my forums top bar etc...


perplexed

I have a question about the coppermine SMF theme that you can download from coppermine.  Is this the right place?

Anyway, I downloaded it today following the instructions on the coppermine forum ( make new theme called smf, add css, template and theme files to it and make image file and add the images to it)

All well and good except that after I changed my theme from a coppermine standard (eyeball) to the smf theme, I got fatal errors.  I managed to change the theme back to coppermine standard (restore factory settings) but I am still getting the errors and every time I try to go into config to change my theme back to the eyeball, I get more errors.

examples below:

Fatal error: Call to undefined function: pageheader() in /home/xxxxx/public_html/gallery/config.php on line 475


So I cant access the config section to make any changes.

So I guess there are two problems 1. how to get back into config to do anything!  and 2. how to install the smf theme so it doesn't cause these errors?

I thought if you downloaded a theme then that's all you had to do, if you need to change stuff in the files then I am clueless where to start.


Any help appreciated.

casper_shadowrider

@ elliel

This is not the place to ask questions about coppermine errors and problems, that should be done at the coppermine support forums, and for the themes specifically, on The Themes Board

The smf theme for coppermine was a user contribution, done by DAMysterious, and there have been 2 versions done, for coppermine versions 1.3.0 and 1.4.x.  They are not compatable with other versions, and you should only install the one for the version of CPG you use.

Installing themes is very easy, just unzip, and place the theme folder in the themes directory on your server.    There should be no need to 'restore factory settings' to change theme.  If you get an error caused by an incompatable theme, simply add the following to the url of your gallery;

?theme=classic

This will return the gallery (on your browser only) to classic, and enable you to go into config and return the settings to what you want.  When done, use this in the url, once only;

?theme=default

If you forget the last bit, your browser will continue to see the site in classic.

If you still have critical errors after that, please ask on the coppermine support boards, here

Please include details of version, and any mods installed.
Make god laugh, tell him your plans




Advertisement: