How To Display An Image In The Summary
- Wednesday, July 1, 2009, 16:34
- ArticleMs How To
- 642 views
- Add a comment
Maybe you are looking for a way to add and display an image directly into the summary and show all in the Latest articles in the home page.
Something like this : TravelFreeGuides.com
You can proceed this way:
1) From your articlems admin goto
SETTINGS —->
Edit Settings
Per-Template Settings
» Submission Settings
2) Scroll Down and find
Add Another Field —-> Select : IMAGE Then in the Name: put this ” Summary_pic ” and press GO,
then click UPDATE
3) Now goto — TEMPLATES —-> SUBMIT
- in the HTML part
find: Summary
and just below add the following code:
Add a Small Image to the Summary:(Size: width=100 – height=74)
{$Article->input_Summary_pic}
- In the PHP part add the code below:
$this->jquery_ready .= ‘$(“a.add_media”).fancybox({\’zoomSpeedIn\’: 0, \’zoomSpeedOut\’: 0});’;
4) Now goto TEMPLATES — DEFAULT — LATESTARTICLES
find the code {$this->articles[$this->i]->url}’>{$this->articles[$this->i]->title}
and just below add the following code
<span style=”float:left;padding-right:5px;padding-top:5px;”>
{if $this->articles[$this->i]->Summary_pic->url_thumbnail} <img src=”{$this->articles[$this->i]->Summary_pic->url_thumbnail}” width=”100″ heigth=”74″>
{/if}
</span>
That’s it.
Now to test it submit an article and in the summary you can upload an image from your PC. When you have published the article, if all is ok, you’ll see the uploaded image.
I hope this can be useful for you all. If you have any problem feel free to post here your questions.
Enjoy
About the Author
Write a Comment
Gravatars are small images that can show your personality. You can get your gravatar for free today!
