News:

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

Main Menu

Adding image to a board

Started by Aravot, May 18, 2005, 09:25:17 PM

Previous topic - Next topic

Aravot

How to add image to a board, example


Jerry

well... I think this has been asked before. But here ;):
find in BoardIndex.template.php:
<td align="left">
<b><a href="', $board['href'], '" name="b', $board['id'], '">', $board['name'], '</a></b><br />
', $board['description'];

and replace with:
<td align="left">
<b><img src="', $settings['images_url'], '/boards/', $board['id'], '.gif' alt=" " border="0" /> <a href="', $board['href'], '" name="b', $board['id'], '">', $board['name'], '</a></b><br />
', $board['description'];

this will put a image in front of every board, and looks for it at /theme/images/boards/BOARDID.gif
so if the board id was 1, it would be looking for 1.gif...


- Jerry
Find me on:
Facebook
Twitter
PlanetSMF

"If all you look for is the negative in things, you will never see the positive."

Aravot

#2
Jerry, tried your suggestion, I get Template Parse Error!

Parse error: parse error, unexpected T_STRING, expecting ',' or ';' in BoardIndex.template.php

kegobeer

"The truth of the matter is that you always know the right thing to do. The hard part is doing it." - Norman Schwarzkopf
Posting and you (Click "WATCH THIS MOVIE")

Aravot


Jerry

try changing the .gif' to .gif" :)


- Jerry
Find me on:
Facebook
Twitter
PlanetSMF

"If all you look for is the negative in things, you will never see the positive."

Aravot


[Unknown]

You can also use html in names and descriptions.

-[Unknown]

Barth




Hello... could u help me with code... i get new theme  --->hxxp:www.alnabri.net/smf-stuff/SMFone_gray.gif [nonactive]
And i dont know how to make it look like on the 1st example with the little pictures on the left side...
This is BoardIndex.template hxxp:i.lag.in/help/BoardIndex.template.txt [nonactive]
Where should i change the code?




Thank's

dtm.exe


Barth

Thank's i like that mod...
I Changes codes


found
<b><a href="', $board['href'], '" name="b', $board['id'], '">', $board['name'], '</a></b><br />
', $board['description'];

replaced
<b><img src="', $settings['images_url'], '/boards/', $board['id'], '.gif" alt=" " border="0" /> <a href="', $board['href'], '" name="b', $board['id'], '">', $board['name'], '</a></b><br />
', $board['description'];


Now it looks like this

How can i put title on the midle?

[Unknown]

Use:

<img src="', $settings['images_url'], '/boards/', $board['id'], '.gif" alt="" align="middle" border="0" />

Or:

<img src="', $settings['images_url'], '/boards/', $board['id'], '.gif" alt="" align="top" border="0" />

-[Unknown]

Barth


winaje

Quote from: Jerry on May 18, 2005, 09:57:28 PM
well... I think this has been asked before. But here ;):
find in BoardIndex.template.php:
<td align="left">
<b><a href="', $board['href'], '" name="b', $board['id'], '">', $board['name'], '</a></b><br />
', $board['description'];

and replace with:
<td align="left">
<b><img src="', $settings['images_url'], '/boards/', $board['id'], '.gif' alt=" " border="0" /> <a href="', $board['href'], '" name="b', $board['id'], '">', $board['name'], '</a></b><br />
', $board['description'];

this will put a image in front of every board, and looks for it at /theme/images/boards/BOARDID.gif
so if the board id was 1, it would be looking for 1.gif...

Hi, does this work for 1.1.1?  And if not, how wouold I do the same thing in 1.1.1?

Thanks heaps.


maxxx223

#15
hi,

how can i do this with different pic for each board ???
for 1.5

thx for help


Maxx

[SiNaN]

Former SMF Core Developer | My Mods | SimplePortal

maxxx223

thx for answer


i try it out


ty again

Advertisement: