vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   VB3 MicroStats (https://vborg.vbsupport.ru/showthread.php?t=62173)

TECK 05-08-2004 12:25 PM

Hi Bob,
"Deprecated" is a term, used most of the time in programming, that is considered obsolete and in the process of being phased out in favor of a specified/better replacement.
The best example is this: certain PHP functions were replaced by better ones, in newer versions. Their names changed. However, some programmers still like to use the old ones, taking the chance to have their program fail.

Boofo 05-08-2004 12:47 PM

Ahhh, I see now. Thanks for explaining that. ;)

You said not to use align="center". What would you use instead then? ;)

TECK 05-08-2004 01:05 PM

The best way is to use a class. Here it is an example:
Code:

.txtcenter {
  text-align: center;
}

Then you could simply use:
Code:

<table>
<tr>
<td class="txtcenter">Centered text will be here</td>
</tr>
</table>

You could also use:
Code:

<div class="txtcenter">Centered text will be here</div>
or:
Code:

<span class="txtcenter">Centered text will be here</span>
to obtain the same results.

Boofo 05-08-2004 02:30 PM

Ok, thanks. I guess I never knew that was the new way to do the align="center". But wouldn't you use this for td instead of class?


HTML Code:

<td style="txtcenter">Centered text will be here</td>
Because you might want to add something like class="thead", too. ;)

TECK 05-08-2004 06:37 PM

You can apply the class="txtcenter" anywhere in a TD, TR or TABLE.
If you apply it in a TABLE line, it will make the hole table centered.
In a TR (column), all child rows will be centered.
In a TD, that specific row will have the text centered.

If you currently have a class present, you cannot use style="txtcenter".
Instead, use:
style="text-align: center", beside class="thead"...
Although, I don't like this way to write code for the reason mentioned few lines above... In certain versions of XHTML (for example Strict 1.1) the "style" is deprecated also... it's getting hard to code huh? ;)

The best way is this:
Edit the actual class and add the text-align: center; line into it.

Boofo 05-08-2004 06:52 PM

Quote:

Originally Posted by TECK
You can aply the class="txtcenter" anywhere in a TD, TR or TABLE.
If you aply it in a TABLE line, it will make the hole table centered.
In a TR (column), all child rows will be centered.
In a TD, that specific row will have the text centered.

If you curently have a class present, you cannot use style="txtcenter".
Instead, use:
style="text-align: center", beside class="thead"...
Although, I don't like this way to write code for the reason mentioned few lines above... In certain versions of XHTML (for example Strict 1.1) the "style" is deprecated also... it's getting hard to code huh? ;)

The best way is this:
Edit the actual class and add the text-align: center; line into it.

That's very interesting. I didn't know this before. ;)

The only thing about editing the current class is that in some areas you might not want it to center something. Right now I have it as:

HTML Code:

<td colspan="4" style="text-align: center;" class="thead">
and it seems to be working fine. But this isn't XHTML compliant, then, right?

You're definately right about it being hard to keep up with the coding changes. ;)

TECK 05-08-2004 07:06 PM

Do this:
Create a new class called "theadcenter"
Code:

.theadcenter {
        text-align: center;
        ... the rest of thead class contents ...
}

Then stick the new class only where you need it, in your html code... in this way you remain code compliant... :p

lifesourcerec 05-09-2004 10:55 AM

I have a problem. This:
Page generated in 2.72278 seconds with 14 queries [Server Loads: 6.36 4.98 : 3.55]

is at the top and bottom of the forum. even when I remove the {ms}, it's still there. And server load is high

ChrisLM2001 05-10-2004 04:06 AM

Quote:

Originally Posted by TECK
Do this:
Create a new class called "theadcenter"
Code:

.theadcenter {
        text-align: center;
        ... the rest of thead class contents ...
}

Then stick the new class only where you need it, in your html code... in this way you remain code compliant... :p

Thanks, Teck and Boofo about this issue. ;) Spent months learning XHTML, and this is a reminder to hit the books again (nevermind remembering how whitespace is handled in XHTML....thunk, thunk, thunk....me bad!).

Love this mod, Teck. First one I installed and rightly so!

Chris

TECK 05-10-2004 02:15 PM

Quote:

Originally Posted by lifesourcerec
I have a problem...

Please check the way you mod the files, make sure you use a good php/text editor, for example TextPad.
Quote:

Originally Posted by ChrisLM2001
Thanks, Teck and Boofo about this issue. ;) Spent months learning XHTML, and this is a reminder to hit the books again (nevermind remembering how whitespace is handled in XHTML....thunk, thunk, thunk....me bad!).

I'm glad this tip was useful for you. :)

Regards,
Floren.


All times are GMT. The time now is 08:10 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01383 seconds
  • Memory Usage 1,751KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (6)bbcode_code_printable
  • (2)bbcode_html_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (2)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete