PEAK XOOPS - Moblog/Phoblog - Images in Block in englishin japanese

Moblog/Phoblog - Images in Block

  • You cannot open a new topic into this forum
  • Guests cannot post into this forum
Previous post - Next post | Parent - Children.1 | Posted on 2006/1/19 6:30
dadruid  二等兵   Posts: 3
Hello, I'm trying to display a "moblog" or photo-log on the top page of my site by displaying a feed that contains images from somewhere else. While xhld (3.01) displays html (and thus the images) in the full dipslay, the block on the top page only displays links. Is there a way to display images in the block? Possibly by changing the template? Thanks a bunch, and great work, I use several of your modules on my site. Thanks again!
Votes:0 Average:0.00
Previous post - Next post | Parent - Children.1 | Posted on 2006/1/20 14:34
dadruid  二等兵   Posts: 3
Anybody? Is this just not possible?
Votes:0 Average:0.00
Previous post - Next post | Parent - Children.1 | Posted on 2006/2/4 6:18
GIJOE  先任軍曹   Posts: 4110
It's just an issue of template.

try to insert this into xhld*_block.html
<{$items[i].description}>
Votes:0 Average:0.00
Previous post - Next post | Parent - Children.1 | Posted on 2006/3/21 1:57
Nobelium  伍長   Posts: 47
This is exactly what I need..but where exactly does this go in the template?

I'm looking for a simple BLOCK template that will show:
Item Title,
Image, (or Enclosure or EnclosureURL sometimes called)
and then up to the full contents (I can then truncate to 300 or something in the template)

Much thanks.
Votes:0 Average:0.00
Previous post - Next post | Parent - Children.1 .2 | Posted on 2006/3/21 2:32
dadruid  二等兵   Posts: 3
This is what I used, edit the block you're displaying and use the Edit Template link, and replace that code. That code (and this) is a combination of html and php. Notice the static html elements like "<ul>" (unordered list). These elements are inerspaced with code that gets evaluated, and the text that is returned by the code when it gets evaluated is inserted where the code previously was, so you end up with html elements with text between them, which is just normal html. Because you have an unspecific amount of info to display in the block, this is all placed in a loop.

I hope that helps. (And take everything I said with a grain of salt, I'm new at this too)


<script type="text/javascript" src="<{$block.mod_url}>/phpdate.js"></script>
<ul>
<{section name=i loop=$block.items max=$block.maxitem}>
  <{if $block.items[i].title != ""}>
  <li>
    <a href="<{$block.items[i].link}>" target="_blank"><{$block.items[i].title}></a>
    <br> 
    <a href="<{$block.items[i].link}>" target="_blank"><{$block.items[i].description}></a>    
  </li>
  <{/if}>
<{/section}>
</ul>


Don't forget to clone your template set and modify that one instead of the default set. Look at the xoops documentation for how and why to do this, it's been too long since I did so I don't remember.
Votes:0 Average:0.00
Previous post - Next post | Parent - Children.1 | Posted on 2006/3/21 3:39
Nobelium  伍長   Posts: 47
Thanks. It didn't quite work as is, but I figured it out...

Your code from <ul> to </ul> inserted into the current xhld0_block_mixed.html, did work. Resulting in...

<script type="text/javascript" src="<{$block.mod_url}>/phpdate.js"></script>
<ul>
<{section name=i loop=$block.items max=$block.maxitem}>
<{if $block.items[i].title != ""}>
<li>
<a href="<{$block.items[i].link}>" target="_blank"><{$block.items[i].title}></a>
<br>
<a href="<{$block.items[i].link}>" target="_blank"><{$block.items[i].description}></a>
</li>
<{/if}>
<{/section}>
</ul>

Don't know why yours didn't work as is...seems to be about the same.

If others have custom templates for this module - please post a copy! Thanks.

Votes:0 Average:0.00
Previous post - Next post | Parent - No child | Posted on 2006/3/21 6:24
Nobelium  伍長   Posts: 47
And one more...

The Headlines Block (not Recent) template works differently...??

<script type="text/javascript" src="<{$block.mod_url}>/phpdate.js"></script>
<{html_table loop=$block.feeds cols=$block.cols table_attr='border="0" width="95%" class="xhld"' tr_attr='class="xhld"' td_attr=$block.td_attr}>

It's using/calling another template file? Where I can change/input your previous change also?

Trying to change this to display images/description also - so, i can have several feeds displayed with images - whereas the Recent headlines Block only displays one feed.

Thanks.
Votes:0 Average:0.00
Previous post - Next post | Parent - Children.1 | Posted on 2006/3/21 7:56
Nobelium  伍長   Posts: 47
Nope, this did not work afterall...seems this DOES work for the Yahoo feed, but nothing else (so far)

This, for xhld0_block_mixed.html:

<script type="text/javascript" src="<{$block.mod_url}>/phpdate.js"></script>
<ul>
<{section name=i loop=$block.items max=$block.maxitem}>
<{if $block.items[i].title != ""}>
<li>
<a href="<{$block.items[i].link}>" target="_blank"><{$block.items[i].title}></a>
<br>
<a href="<{$block.items[i].link}>" target="_blank"><{$block.items[i].description}></a>
</li>
<{/if}>
<{/section}>
</ul>

works for Yahoo...but not for other feeds that DO validate. (it displays the title (linked) and the description (also linked (and in same font - a problem))).

Whereas the Yahoo feed displays a title (font white and linked) and the image and the description (in body font).

The Yahoo feed does not validate, but not for any serious issues that would make a difference here.

I guess I'm gonna try hacking the xhld0_index.html file...

Votes:0 Average:0.00
Previous post - Next post | Parent - No child | Posted on 2006/5/8 6:00
GIJOE  先任軍曹   Posts: 4110
Though I don't read whole of your post, try the latest xhld (3.03).

In this version, treating Moblog/Phoblog are modified.
(turn "Allow HTML" on )
Votes:0 Average:0.00

  Advanced search


Login
Username or e-mail:

Password:

Remember Me

Lost Password?

Register now!