xoops forums

Bleekk

Theme Designer
Posted on: 2014/1/8 21:32
Bleekk
Bleekk (Show more)
Theme Designer
Posts: 934
Since: 2002/12/14
#21

Re: use smartys in theme

Ok now you can use category id to call the latest article from a certain category
<{xnews_latest ret='title' topic='2'}>

The category id is optional

Download it HERE

sova

Not too shy to talk
Posted on: 2014/1/9 4:28
sova
sova (Show more)
Not too shy to talk
Posts: 149
Since: 2010/4/13
#22

Re: use smartys in theme

does not work
I'm using this code:
<{xnews_latest ret='image' topic='25'}>
<{xnews_latest ret='title' topic='25'}>
in theme
But what it does show.

Bleekk

Theme Designer
Posted on: 2014/1/9 8:27
Bleekk
Bleekk (Show more)
Theme Designer
Posts: 934
Since: 2002/12/14
#23

Re: use smartys in theme

xnews smarty works a little bit different

<{xnews_latest ret='image' topic='25'}> returns a image link
<a href="path_to_article"><img src="image.jpg"/></a>


<{xnews_latest ret='title'}> returns a link
<a href="path_to_article">article title</a>

sova

Not too shy to talk
Posted on: 2014/1/9 8:44
sova
sova (Show more)
Not too shy to talk
Posts: 149
Since: 2010/4/13
#24

Re: use smartys in theme

Hi
Quote:

Bleekk wrote:
xnews smarty works a little bit different

<{xnews_latest ret='image' topic='25'}> returns a image link
<a href="path_to_article"><img src="image.jpg"/></a>


<{xnews_latest ret='title'}> returns a link
<a href="path_to_article">article title</a>

Explain more precisely?

----------------------------

This work is being done?
For example,
<div id="latest-news">
<{
xnews_latest topic='2'}>
<{
xnews_latest ret='image' width='80'px height='80'px}>
<{
xnews_latest ret='title' ch='85'}>
<{
xnews_latest ret='text' ch='220'}>
</
div>


ch => Characters

Bleekk

Theme Designer
Posted on: 2014/1/9 9:29
Bleekk
Bleekk (Show more)
Theme Designer
Posts: 934
Since: 2002/12/14
#25

Re: use smartys in theme

difference between publisher and xnews is following

<{publisher_latest ret='title'}> returns
This is my title

<{xnews_latest ret='title'}> returns
<a href="http://linkToArticle">This is my title</a>


If you want it to work like publisher then you need to edit the xnews code.

I would suggest you to use publisher instead of the xnews module

Mamba

Moderator
Posted on: 2014/1/9 9:33
Mamba
Mamba (Show more)
Moderator
Posts: 10838
Since: 2004/4/23
#26

Re: use smartys in theme

Quote:
I would suggest you to use publisher instead of the xnews module

+1
Support XOOPS => DONATE
Use 2.5.10 | Docs | Modules | Bugs