1
ManXP
H1
  • 2004/9/22 21:14

  • ManXP

  • Quite a regular

  • Posts: 231

  • Since: 2003/8/14


Hello, i have a question about XOOPS News module. I want a story to be displayed in this format: <h1>story text...</h1>, that's all. Is it needed to change theme or hack some php files from XOOPS News module? Every News story just should be between these H1 tags, no more changes needed at the moment. Thanks for any ideas.

2
wcrwcr
Re: H1
  • 2004/9/22 22:44

  • wcrwcr

  • Home away from home

  • Posts: 1114

  • Since: 2003/12/12


Hi

Not completelly shure but, this particularity isn?t tweakble on your theme css or in any of the news templates?

Luck

3
JasonMR
Re: H1
  • 2004/9/22 23:03

  • JasonMR

  • Just can't stay away

  • Posts: 655

  • Since: 2004/6/21


Goto /ROOT/modules/news/templates/ and open the file news_item.html

Quote:

<td><div class="itemBody">
<{$story.imglink}>
<h1 class="itemText"><{$story.text}></h1>
</div>
</td>


I HAVE made the changes you asked for. So what you are looking for is:

<td><div class="itemBody">
<{$story.imglink}>
<p class="itemText"><{$story.text}></p>
</div>
</td>


After changes you will need to goto Sys Admin -> Modules, and update the News module, as your template files have changed.

Hope this does the trick for ya

4
ManXP
Re: H1
  • 2004/9/23 8:04

  • ManXP

  • Quite a regular

  • Posts: 231

  • Since: 2003/8/14


Thanks, i'll try ;)

5
ManXP
Re: H1
  • 2004/9/23 21:17

  • ManXP

  • Quite a regular

  • Posts: 231

  • Since: 2003/8/14


Yep, it works very well, but i came back to p instead of h1, because using h1 news text was sooooo big

6
JasonMR
Re: H1
  • 2004/9/24 0:12

  • JasonMR

  • Just can't stay away

  • Posts: 655

  • Since: 2004/6/21


I guess you wanted to have it as h1 for search engines.

Just edit the css file of the theme you are using. If you are using multiple themes, this will mean changes to EACH css file, as otherwise, on of your themes will continue to display it in the old way.

You will need to open /ROOT/themes/THEMESELECTEDINPREF/style.css, look for the following part (let your editor search for itemText
Quote:

.itemText {
padding: 4px;
border-left: 2px solid #D9CBB3;
margin-top: 0px;
margin-bottom: 0px;
line-height: 1.5em;
}


Insert the following line inbetween the curly bracket:
Quote:

font-size:12px;


This should do the trick, and let you continue using h1 to mark up your news.

TIP
Quote:

.itemText:first-letter {}

This can be set to have the first letter of your news article appear larger (or smaller - if some wants it that way). Try it out, e.g.:
Quote:

.itemText:firt-lett {24px;}


Happy CSS'ing

7
wcrwcr
Re: H1
  • 2004/9/24 4:04

  • wcrwcr

  • Home away from home

  • Posts: 1114

  • Since: 2003/12/12


Hey Jason

Usefull tip

8
ManXP
Re: H1
  • 2004/9/24 7:28

  • ManXP

  • Quite a regular

  • Posts: 231

  • Since: 2003/8/14


Thanks, Jason, must try this.

9
ManXP
Re: H1
  • 2004/9/25 19:29

  • ManXP

  • Quite a regular

  • Posts: 231

  • Since: 2003/8/14


Ok, it's done.

Text is smaller, but it's still too bold and too big for website. Now my style.css looks like this, but i want "normal size" text as it was (but i want h1 too):

.itemText {
color: #555555;
font-size: 11px;
font-style: normal;
text-decoration: none;
margin-top: 5px;
margin-bottom: 5px;
line-height: 1.5em;

any ideas?

10
tjnemez
Re: H1
  • 2004/9/25 19:46

  • tjnemez

  • Home away from home

  • Posts: 1594

  • Since: 2003/9/21


usually you would set your fonts in body:

body {
font-size: 11px;
}

headings which can be set in precetages (in this case of 11px) or you can set to px, em or pt:

h1 {font-size: 200%}
h2 {font-size: 190%}
h3 {font-size: 180%}
h4 {font-size: 150%}
h5 {font-size: 120%}

the above would be default and then you can override by how you style a element as in your example.

Login

Who's Online

127 user(s) are online (92 user(s) are browsing Support Forums)


Members: 0


Guests: 127


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Apr 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits