collapse

* User Info

 
 
Welcome, Guest. Please login or register.
Did you miss your activation email?

* Who's Online

  • Dot Guests: 167
  • Dot Hidden: 0
  • Dot Users: 0

There aren't any users online.

* Shoutbox

Refresh History
  • Shoutbox is not for support!
  • Jade Elizabeth: It's GREAT to see you too Sinan!! :D
    July 06, 2016, 02:33:26 am
  • [SiNaN]: Hey Jade! It's great to see you around! Jade!
    July 03, 2016, 06:51:31 am
  • Jade Elizabeth: Oops, sorry I mean HEY SINAN! ;)
    July 01, 2016, 11:07:13 am
  • Jade Elizabeth: Hey Sinan!! :D
    July 01, 2016, 11:06:59 am
  • [SiNaN]: But you shouldn't wait for a security issue and drop by more often. :D
    June 27, 2016, 04:32:18 pm
  • [SiNaN]: Hey ディン1031! It's great to see you around!
    June 27, 2016, 04:31:56 pm
  • ディン1031: Uh to long ago that i was last time here xD
    June 27, 2016, 02:03:08 pm
  • Schnuffeltier: :D
    June 24, 2016, 05:22:34 am
  • Jade Elizabeth: SHOUTBOX IS FOR SHOUTING AAAAAAHHHHHHHHHHH!!
    June 24, 2016, 12:57:05 am
  • [DFg]DJF-1975: Thank you, SP!
    June 21, 2016, 01:35:09 pm
  • Skhilled: phpBB is a good product but has a steeper learning curve.
    June 21, 2016, 08:19:04 am
  • ♦ Ninja ZX-10RR ♦: Hmm, not so sure about it, Eliana: [link]
    May 05, 2016, 02:03:02 am
  • Eliana Tamerin: That may have faded away now, or gotten better. I hope so. I see a lot of happy phpBB users, so I have to imagine someone is having success.
    April 25, 2016, 12:48:06 am
  • Eliana Tamerin: @andy, the phpBB folks had (at one point, not sure how it is now) a specific set of rules you had to follow to get support. Anyone not found doing so would have their topic ignored.
    April 25, 2016, 12:47:40 am
  • andy: SP team is a breath of fresh air...
    April 24, 2016, 11:24:32 pm
  • andy: Yes they are difficult to deal with at SMF. I never experienced anybody like that at phpbb several years ago.
    April 24, 2016, 11:24:03 pm
  • D.Va: Their team is very antagonistic and I prefer this forum and this staff far more. So kudos to SP for doing it right.
    April 24, 2016, 09:18:21 pm
  • andy: When SMF went gold there was a lot of optimism about progress and talk of 3.0.  Five years on and that soulds like SF.
    April 24, 2016, 08:37:31 pm
  • andy: Just my frustration at the slow pace of SMF. I suppose we have an alternative now.
    April 24, 2016, 08:34:38 pm
  • Burke Knight: Andy, as long as the SMF team keeps like they are doing, there's always going to be bugs, mainly due to SMF issues, because the team can't get their stuff straight.
    April 24, 2016, 08:25:41 pm
Installation errors? Mod incompatibilities? Upgrade problems? Make your way over to the Install and Upgrade Support board for all your solutions!

Author Topic: Noob question about image links in a block  (Read 1867 times)

0 Members and 1 Guest are viewing this topic.

Offline HappyHooligan

  • Just Registered
  • Posts: 1
  • SMF Version: 2.0.2
  • SP Version: 2.0.3
Noob question about image links in a block
« on: January 16, 2013, 05:03:39 pm »
Hi,

Question: Can i put image links in a custom block on Simple Portal?
This is my first forum I'm making for my local community and I wanted to add some image links in a block but the images are not showing? Like I said I'm a bit of a noob when it comes to HTML but this is the code i entered for the block...

<a href="http://www.eastbourneherald.co.uk/"><img style="border: 0px solid ; width: 160px; height: 37px;" alt="" src="images/heraldlogo.png"></a><br>
<a href="http://www.sovereignfm.com/"><img style="border: 0px solid ; width: 160px; height: 37px;" alt=""
 src="/images/sovfmlogo.png"></a><br>
<a href="http://www.eastbourne.gov.uk/"><img style="border: 0px solid ; width: 160px; height: 37px;" alt=""
 src="file:///C:/Users/Dean/Desktop/ebclogo.png"></a><br>
<a href="http://www.visiteastbourne.com/"><img style="border: 0px solid ; width: 160px; height: 37px;" alt=""
 src="/images/visiteblogo.png"></a><br>
<a href="http://www.savethedgh.org.uk/"><img style="border: 0px solid ; width: 160px; height: 37px;" alt=""
 src="/images/savedgh.png"></a>
<a href="http://www.savethedgh.org.uk/"><img src="/images/savedgh.jpg" /></a>


I've then created the relevant folder with the images in.
The forum is not finished but you are more than welcome to take a look and see where the links should be on the left hand side.

www.eastbournesoapbox.co.uk

Any help would be appreciated  :D

Thanks,
Dean

Offline andy

  • On Leave
  • *
  • Posts: 833
  • Gender: Male
    • Outdoor Club Japan (OCJ) アウトドア・クラブ・ジャパン
  • SMF Version: 2.0.11
  • SP Version: 2.3.6
  • Elkarte Version: None
Re: Noob question about image links in a block
« Reply #1 on: January 17, 2013, 10:29:02 am »
404 error for the images at

http://www.eastbournesoapbox.co.uk/images/heraldlogo.png
I also took a wild guess at /forum/images ... but nothing there either.

So the images are not where you are directing the html to get them?
Also make sure you are using the SPortal html block (not another type). You could use a BBCode block with that syntax as an alternative.

Lots of online advice for displaying html and bbcode images - google search will bring it up.
Just in case there is an issue with the syntax you have already (I havent checked it), I would start with the most basic html tag for displaying the image - see if that works. If ok, then try the extra styles.


And this looks very dodgy....

file:///C:/Users/Dean/Desktop/ebclogo.png

Looks like you are tying to link to something on your pc. Unless you are running the server from it!??? And I guess that might not work anyway.


An simple example from my site (linked below):

<a href="http://paddington-school.com"><img src="http://outdoorclubjapan.com/site_images/speciallinks/ichikawa_eikaiwa.png"/></a>


I tested this using my images and url and it works. So probably you do not have the images in the folders on there server.
Quote
/images/heraldlogo.png

<a href="http://www.eastbourneherald.co.uk/"><img style="border: 0px solid ; width: 160px; height: 37px;" alt="" src="images/heraldlogo.png">
« Last Edit: January 17, 2013, 10:39:42 am by igirisjin »
Everyone is a volunteer here so please try and make a small donation to keep the Simple Portal website running


Offline Chen Zhen

  • The Underdog
  • Support
  • *
  • Posts: 1221
  • Gender: Male
  • MOOSE KNUCKLES
    • WebDev
  • SMF Version: 2.0.11
  • SP Version: 2.3.6
  • Elkarte Version: None
Re: Noob question about image links in a block
« Reply #2 on: January 17, 2013, 02:46:40 pm »
HappyHooligan,

  Place all of your needed images into the default theme's images directory.

Create/use a php block:
Code: [Select]
global $settings;
$sites = array(
'eastbourneherald.co.uk' => 'heraldlogo.png',
'sovereignfm.com' => 'sovfmlogo.png',
'eastbourne.gov.uk' => 'ebclogo.png',
'savethedgh.org.uk' => 'savedgh.png'
);
foreach ($sites as $site => $image)
echo '
<a href="http://www.'.$site.'" title="'.$site.'">
<img style="border: 0px solid ; width: 160px; height: 37px;" alt="" src="'.$settings['default_theme_url'].'/images/'.$image.'" />
</a>
<br />';
« Last Edit: January 17, 2013, 02:58:33 pm by Underdog »

Offline andy

  • On Leave
  • *
  • Posts: 833
  • Gender: Male
    • Outdoor Club Japan (OCJ) アウトドア・クラブ・ジャパン
  • SMF Version: 2.0.11
  • SP Version: 2.3.6
  • Elkarte Version: None
Re: Noob question about image links in a block
« Reply #3 on: January 20, 2013, 10:50:03 am »
Seems he was using . png for some links when the files were actually  .jpg.

As it looks solved I will mark it so. Uhm, cant mark it solved, I guess this really belongs in  support.


Quote
http://www.eastbournesoapbox.co.uk/images/heraldlogo.jpg
Everyone is a volunteer here so please try and make a small donation to keep the Simple Portal website running