• Page 1 of 1
  • 1
Forum moderator: bigblog  
uCoz Community » For Webmasters » Design Customization » Display image of an entry in informers (very first image in the entry)
Display image of an entry in informers
NormalX
Posts: 94
Reputation: 7

Message # 1 | 10:37 PM
is it possible to display only the image associated with the entry...

i.e. If i want to display top movies (entries), informer would only display the cover that is associated with that movie (entry)
Sunny
Posts: 9296
Reputation: 456

Message # 2 | 1:24 PM
NormalX, yes, you customize the informer template as you need.
I'm not active on the forum anymore. Please contact other forum staff.
NormalX
Posts: 94
Reputation: 7

Message # 3 | 8:40 PM
Sunny, can you give me an example on how to customize the informer so it only displays image and not other text (including title, entry description, details, etc)

Thanks!
Sunny
Posts: 9296
Reputation: 456

Message # 4 | 11:16 AM
NormalX,
Code
<a href="$ENTRY_URL$"><img src="$IMG_URL1$"></a>


This will be the code a clickable entry image that takes you to the entry page. The rest - styles, spacing etc, can be set as you like.

I'm not active on the forum anymore. Please contact other forum staff.
NormalX
Posts: 94
Reputation: 7

Message # 5 | 8:53 PM
Sunny, Tried,it didn't work

Here is code for homepage
Code
$MYINF_1$


Informer 1 Code
Code
<a href="$ENTRY_URL$"><img src="$IMG_URL1$"></a>


Link to entries - http://alphax.ucoz.com/news

Added (2014-04-20, 2:53 PM)
---------------------------------------------
I figured out why it is not working...this codes only work if you upload an image through the image option when adding entry, but i manually coded all my entries...

is there anyway without having an image through option

and also it should have ability to add image from file manager

joexyz
JOE-vascript
Posts: 1770
Reputation: 78

Message # 6 | 9:33 PM
NormalX, try this:
In the Page of full entry and its associated comments replace $BODY$ with:
Code
<div id="fromhereimg">$BODY$</div>


Then in the informer's template, where you want image to apperrar:
Code
<script>$(document).ready(function(){
  $('#imgload').load('$ENTRY_URL$ #fromhereimg img:nth-child(1)');
  });</script>
<div id="imgload"></div>


If you want to associate style to the images, write at the end of the informer's template:
Code
<style>#imgload img {
  /* --- CSS --- */
}</style>


I'm not sure if it will work.

hey i'm joe and i do not work for the company anymore, please contact other staff or tech support
icon by ch-chau

sometimes i lurk here
NormalX
Posts: 94
Reputation: 7

Message # 7 | 0:01 AM
bigblog, thx
uCoz Community » For Webmasters » Design Customization » Display image of an entry in informers (very first image in the entry)
  • Page 1 of 1
  • 1
Search: