News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Help with theme

Started by skb, July 13, 2016, 04:04:33 AM

Previous topic - Next topic

skb

I'm using a theme called Blue Piece by Crip, who I learnt is no more.
If someone else can help me, I'll be thankful.

The theme stylesheet has a #top_bar which is fine. It contains the Search & the forum stats. The stats are further defined as #board_stats. I want to remove the stats from the top_bar & place some website URLs in there.

How should I go about doing this ? 

SMF 2.1.4 / TP 2.2.2

Antechinus

You need to edit index.template.php. If you can attach a copy of it, someone can take a look and give you tips.

skb

#2
Sure. Attached both the index.template & the index. And a screenshot.

SMF 2.1.4 / TP 2.2.2

Sir Osis of Liver

index.template.php -



<div id="board_stats">
<span>', $context['common_stats']['total_posts'], '</span> ', $txt['posts_made'], ' - <span>', $context['common_stats']['total_topics'], ' </span>', $txt['topics'], ' - <span>', $context['common_stats']['total_members'], '</span> ', $txt['members'], '
</div>



Replace the content of the <span> tags.

Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

skb

Tried a couple of times, but I didn't succeed. Can I put up URLs as board_stats. Won't I need to create another div id called as say web_links in the index first ?

SMF 2.1.4 / TP 2.2.2

Sir Osis of Liver

Use the stats div, just replace what's there with your links -



<div id="board_stats">
<span><a href="http://www.nytimes.com">NY Times</a></span>
</div>



Then you can tinker with the formatting.

Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

skb

Thank you Sir Osis. I couldn't change the font color to #fff. It was being over-ridden somewhere else and appears as #000 by default. So I added a light blue background & that's fine too. Got workable links to open in new tabs.

Thanks.

SMF 2.1.4 / TP 2.2.2

Sir Osis of Liver

When you change it to a link, it inherits the overall link style.  You can fix it like this -

In /css/index.css find this -



#board_stats span { font-size: 16px; color: #FFF; text-shadow: 1px 2px 5px rgba(0, 0, 0, 0.6);}



Change it to this -



#board_stats span a { font-size: 16px; color: #FFF; text-shadow: 1px 2px 5px rgba(0, 0, 0, 0.6);}



That will apply the style to your links.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

skb


SMF 2.1.4 / TP 2.2.2

Advertisement: