News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

News feature

Started by landyvlad, November 14, 2021, 10:29:18 PM

Previous topic - Next topic

landyvlad

In SMF 2.1

Can the news feature be used to display images rather than text? If so what image size should be used.
Can the news text be bbc or html formatted, or can it only be plain text?
Can the word "News" be removed so it actually only shows the content of the field

What I'd like to do is replace 'News' with an inspirational quote sort of thing.
Please do not PM, IM or Email me with questions on astrophysics or theology.  You will get better and faster responses by asking homeless people in the street. Thank you.

The funniest thing about this particular signature is that by the time you realise it doesn't say anything it's too late to stop reading it

Sir Osis of Liver

Image can be displayed in img tags, you'd have to experiment with image size.  BBC formatting tags also work.  The 'News:' label is in index.template.php -


    <div class="news">
        <h2>', $txt['news'], ': </h2>
        <p>', $context['random_news_line'], '</p>
    </div>';

"The best laid schemes o' mice an' men / Gang aft a-gley." - Robert Burns

shadav

bbc works, it seems html doesn't work

in index.template.php
find and remove
<h2>', $txt['news'], ': </h2>
[edit] lol sir osis posted while i was testing

Shades.

Quote from: landyvlad on November 14, 2021, 10:29:18 PMIn SMF 2.1

Can the word "News" be removed so it actually only shows the content of the field

Not sure about the rest but here is how to remove "News:"...

In Themes>default>index.template.php

Find:
                        <h2>', $txt['news'], ': </h2>
Replace with:
                        <h2>', $txt['news'], '</h2>
In Themes>default>languages>index.english.php

Find:
$txt['news'] = 'News';
Replace with:
$txt['news'] = '';
ShadesWeb.com - Custom Logos - My Themes on SMF | My Themes on ShadesWeb
https://shadesweb.com

BikerHound.com - Sniffing out the road ahead
https://bikerhound.com

Dream as if you'll live forever; Live as if you'll die today. - James Dean

landyvlad

Hmm just noticed it says Updates not News.

I wonder if perhaps that's the feather theme...
Please do not PM, IM or Email me with questions on astrophysics or theology.  You will get better and faster responses by asking homeless people in the street. Thank you.

The funniest thing about this particular signature is that by the time you realise it doesn't say anything it's too late to stop reading it

Shades.

Must be because default is "News". ;)
ShadesWeb.com - Custom Logos - My Themes on SMF | My Themes on ShadesWeb
https://shadesweb.com

BikerHound.com - Sniffing out the road ahead
https://bikerhound.com

Dream as if you'll live forever; Live as if you'll die today. - James Dean

Mick.

Quote from: landyvlad on November 26, 2021, 07:06:27 AMHmm just noticed it says Updates not News.

I wonder if perhaps that's the feather theme...
It is. It's in the language file in feather.

shawnb61

I you have a youtube bbc going, it can even show video.

There are a couple settings that govern placement.  One makes it look like its own category, & centers it.

Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

Advertisement: