TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

Members
  • Total Members: 3,973
  • Latest: NonStop
Stats
  • Total Posts: 196,224
  • Total Topics: 21,352
  • Online today: 633
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 1
  • Guests: 184
  • Total: 185
  • @rjen

Need help displaying Images

Started by spark186, December 22, 2008, 04:04:40 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

spark186

I am new to SMF and TP 1.0.6. I am using a theme named Wow-dk v116. I have tried various html commands to display images on the front page/panel. I have place the images in a folder tp-images/image. I just need some help on how to display them on the front page. Any guidance would be greatly appreciated.

Thanks

Zetan

#1
Try this:



<img src="http://www.example.com/examplefolder/example.jpg" alt="example text"/>




[edit] You can omit the alt="   " tag if you don't want mouseover text.

Visit this site: http://www.w3schools.com/

spark186

I've tried that HTML command and it doesn't seem to pull up the picture (i.e. a jpeg). I am current going thru this route to add/edit the main panel. Admin>panel and blocks> add front page block.  Then for type I select HTML+BBC. In the body is where I've tried that command, and i still get a blank panel, the wording is there but no image (FYI not the <img scr="blah blah" />). I've learned tons about setting this all up, but I am no programmer/HTML/php coder  ::)

Thanks for try

JPDeni


Zetan

Use a Script block.

For bbc/html block, I think:



[img]image path here[/img]



like in form posts.

spark186

Ok I've tried the [img file path [/img]http://same result, not sure what a scriptbox is.

this is my current setup (ie testrig)
i am using WAMP for testing the site before i get hosting.

the paths I've been using are

<img scr="http://localhost/tp-images/image/image.jpg" />



another file path i've tried is
file:///C:/wamp/www/tp-images/Image/image.jpg

but i get nothing on the front panel. If i type text i can see the text, just not the image.


JPDeni

Create a new block. When it asks you what kind of block you want, select "scriptbox" instead of "HTML + BBC". You will be able to use any html you want in the scriptbox.

In your image tag, use the URL -- the thing that starts with "http://". Are you currently working on a test forum on your home computer? If not -- if your forum is on a separate server -- you will not able to use the localhost URL for images. (This may not apply at all. If it doesn't ignore the comment. :) )

spark186

Thank you all for the help, All though kinda  strange. On my test rig I could not see the images, But on the hosting site works like a champ.
Thanks Again for all the help. ;D

Bluto

Even on Wamp, I think you need a www/folder/tp/images,....or smf/tp/images/imagename. Something like that.
And tsk tsk Zetan. Search engines don't like missing alt tags, and neither does the big W.

Ianedres

Understanding file paths, in relation to where they are referenced from within SMF/TP, is where the benefit of using the relative paths versus absolute references comes into play.

If you test on a local server using relative paths, then move the database and files to an online host, you should not have much to correct in the way of getting images displayed if you keep the same directory tree structure. Using an exact path is good for checking whether the image is there or available by permissions when testing.

As for the 'alt' tag, FF doesn't seem to like it for the mouseover balloons and uses the 'title' tag instead...

This website is proudly hosted on Crocweb Cloud Website Hosting.