Help - Search - Members - Calendar
Full Version: What's generating CSS ?
forums.eqdkp.com > EQdkp Support > Template & Style Support
Ptit JJ
Hi, i m french, so excuse me for mistakes.

I would like to have the same style for EDKP and the rest of my guild's site.
I saw that the style creator of EDKP doesn't allow to include picture in background of the different par of tables.
So I would want to make my own CSS sheet in "hard coding".

My question is : "In which php file are recovered the values of the database ?"

Thus I could make this part as comment and impose my sheet.

Thank you in advance, and I say in french : "Bravo pour votre superbe travail !"
Have a nice day.
Dyfrin
bon jour
there is no css file.
templates/default/page_header.html has the css for the site. The css styles are pulled from the database table eqdkp_styles.

To explain this:
You see a page, viewmember.php. How does it form?
First look at the .php:
CODE
include_once($eqdkp_root_path . 'common.php');
.. etc...
$eqdkp->set_vars(array(
        'page_title'    => sprintf($user->lang['title_prefix'], $eqdkp->config['guildtag'], $eqdkp->config['dkp_name']).': '.sprintf($user->lang['viewmember_title'], $member['member_name']),
        'template_file' => 'viewmember.html',
        'display'       => true)
    );

it says to include a file called common.php and it also calls a template file to be loaded, viewmember.html

The templates/default/viewmember.html has no styles. Odd, maybe, but it says to:
CODE
<!-- INCLUDE page_header.html -->


hmm, templates/default/page_header.html shows styles like:
CODE
<style type="text/css">
form { display: inline; }
img { vertical-align: middle; border: 0px; }

BODY { font-family: {T_FONTFACE1}; font-size: {T_FONTSIZE2}px; color: #{T_FONTCOLOR1}; margin-left: 1%; margin-right: 1%; margin-top: 1%; background-color: #{T_BODY_BACKGROUND}; }
TABLE { border-top: {T_TABLE_BORDER_WIDTH}px; border-right: {T_TABLE_BORDER_WIDTH}px; border-bottom: {T_TABLE_BORDER_WIDTH}px; border-left: {T_TABLE_BORDER_WIDTH}px; border-color: #{T_TABLE_BORDER_COLOR}; border-style: {T_TABLE_BORDER_STYLE}; }
TABLE.borderless { border-style: none; }

th { font-weight: bold; color: #{T_HEADER_LINK}; background-color: #{T_TH_COLOR1}; white-space: nowrap; }
tr, td { font-family: {T_FONTFACE1}; font-size: {T_FONTSIZE2}px; color: #{T_FONTCOLOR1}; }

a:link, a:visited, a:active { text-decoration: {T_BODY_LINK_STYLE}; color: #{T_BODY_LINK}; }
a:hover { text-decoration: {T_BODY_HLINK_STYLE}; color: #{T_BODY_HLINK}; }


You see how {T_FONTSIZE2} is declared instead of an actual fontsize specified? That draws the data from the .php which is calling that template, viewmembers.php. Viewmembers.php doesn't have that info though, but where is it? Remember viewmembers.php had this line?
CODE
include_once($eqdkp_root_path . 'common.php');

That makes it also include the code in common.php. What does common.php have for styles?
Well.. nothing! But look at what common.php calls:
CODE
include_once($eqdkp_root_path . 'includes/functions.php');
include_once($eqdkp_root_path . 'includes/dbal.php');
include_once($eqdkp_root_path . 'includes/eqdkp.php');
include_once($eqdkp_root_path . 'includes/session.php');
include_once($eqdkp_root_path . 'includes/class_template.php');
include_once($eqdkp_root_path . 'includes/eqdkp_plugins.php');


It calls eqdkp.php! Whats in that?

includes/eqdkp.php
CODE
// Theme Settings
            'T_FONTFACE1'          => $user->style['fontface1'],
            'T_FONTFACE2'          => $user->style['fontface2'],
            'T_FONTFACE3'          => $user->style['fontface3'],
            'T_FONTSIZE1'          => $user->style['fontsize1'],
            'T_FONTSIZE2'          => $user->style['fontsize2'],
            'T_FONTSIZE3'          => $user->style['fontsize3'],
            'T_FONTCOLOR1'         => $user->style['fontcolor1'],
            'T_FONTCOLOR2'         => $user->style['fontcolor2'],
            'T_FONTCOLOR3'         => $user->style['fontcolor3'],
            'T_FONTCOLOR_NEG'      => $user->style['fontcolor_neg'],
            'T_FONTCOLOR_POS'      => $user->style['fontcolor_pos'],
            'T_BODY_BACKGROUND'    => $user->style['body_background'],


So there it is! but where is this info coming from? $user->style['fontsize2'],???
It comes from the eqdkp_styles table!

So under administration you can add a style and define the fontface/fontsize/etc and then under config, you can force users to use it, or under settings you can just use it yourself.

Now, you can also add html to the templates/default/ files, to do whatever you want more specifically, just do not combine html with the .php and vice versa.

Hope that answers it all.
Ptit JJ
Thanks to take time to do that answer Dyfrin (and to have written in "academic" English ^^)

I had understood that css values came from eqdkp table (X_styles to be exact).

This night I have found were they was recover in variables (eqdkp.php) by going up the pages included from index.php, but I have not found were they was used.

You answer to me : templates/default/page_header.html !

With that I can do what I want !

Thanks a lot.

Solved topic.

PS : We say "Bonjour" wink.gif
Dyfrin
QUOTE(Ptit JJ @ Feb 24 2006, 01:49 AM) [snapback]18051[/snapback]
PS : We say "Bonjour" wink.gif


And to think I took 3 semesters of french..
J'ne sais pas...
imagex
What about overall page width, I use eqdkp inside of a phpnuke site and would like to get rid of the scroll bar. I have changed all my html pages with no problem and the content is smaller but I still have a page with large boarders thats to big to view all at once. BTW I've been digging in this forum for a few days trying to find this and found others that have ask but they had no reply.
Dyfrin
Got a link?

Don't know about nuke, but you can use scrolling = no; that will remove the scroll bars themselves.

What you can try is z index all the surrounding frames, check aoe for example, the iframe of a new news section is indexed at 1, whereas the "floating" menu (not using float, you have to use position: relative or position: absolute for z-index to work..) will sit on top of it.

Also, change the table paddings, and font sizes to make everything smaller so it takes less room.

Or get a 20" flatpanel and hit f11 hehe.
imagex
Heres a link to my site Raidingguild.com


I've edited all the html I can find in eqdkp/templates/default/ but still get the same large page with the background.

Thxs for any help
Dyfrin
A few things I noticed, don't know if it will fix it or not though without doing it myself hehe.

first the iframe width is set at 1024, make it 100%, that may fill up the yellowish parchment to the margin, making it centered better, or make it smaller so just the size of eqdkp is there and you can shrink the page if you dont have 1280x1024 resolution.

second, the page_header table width shows
<table width="810"

that seems wide imo for something that looks 500ish that is where you are getting the extra space on the right side of the eqdkp. Make sure the table widths are smaller and consistent.
elstinko
So I would like to mod the default theme to include a background image class.

QUOTE
'T_TH_COLOR1' => $user->style['th_color1'],


In the page header file one cannot simply add background-image css class with successful results. Are yo usaying you have to add the class in eqdkp.php file first? Then define it in the page header HTML after?

For example add this to eqdkp.php

QUOTE
'T_TH_BGIMG1' => $user->style['th_bgimg1'],


Then add this to page_header.html?
background-image: {T_TH_BGIMG1};


Of course the URL path to my image I want to tile as the bg will not be defined. head scratch.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.