How to add image to a board, example
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fwebpages.charter.net%2Fosipof%2Fsmf%2Fboardimage.jpg&hash=f075713eb40da035f9dd5a12ef321af7b57eecbf)
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, tried your suggestion, I get Template Parse Error!
Parse error: parse error, unexpected T_STRING, expecting ',' or ';' in BoardIndex.template.php
'.gif'
should be
'.gif"'
try changing the .gif' to .gif" :)
Quote from: Jerry on May 19, 2005, 07:24:29 PM
try changing the .gif' to .gif" :)
That worked, thanks
You can also use html in names and descriptions.
-[Unknown]
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fi.lag.in%2Fhelp%2F1.JPG&hash=3244a02e3a6e7a81177ea5f3a77f9b99795dea42)
Hello... could u help me with code... i get new theme --->Here (http://www.alnabri.net/smf-stuff/SMFone_gray.gif)
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 Here (http://i.lag.in/help/BoardIndex.template.txt)
Where should i change the code?
Thank's
You can also do that with this mod.
http://www.simplemachines.org/community/index.php?topic=29991.0
-Dan The Man
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
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fi.lag.in%2Fhelp%2F2.JPG&hash=a24e67846d1cc07815aa3742e0eb5ef6c39f4907)
How can i put title on the midle?
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]
Thanks..
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.
Try on a none production site
http://mods.simplemachines.org/index.php?mod=496
or
http://mods.simplemachines.org/index.php?mod=511
hi,
how can i do this with different pic for each board ???
for 1.5
thx for help
Maxx
Try this mod:
http://custom.simplemachines.org/mods/index.php?mod=511
thx for answer
i try it out
ty again