xoops forums

Bleekk

Theme Designer
Posted on: 2014/1/4 13:42
Bleekk
Bleekk (Show more)
Theme Designer
Posts: 934
Since: 2002/12/14
#11

Re: use smartys in theme

I am not sure if I understand you right, you want one block to use twice on a website. For example one time to show only the title and second time to show only the article image?
Is this right?

Bleekk

Theme Designer
Posted on: 2014/1/4 15:19
Bleekk
Bleekk (Show more)
Theme Designer
Posts: 934
Since: 2002/12/14
#12

Re: use smartys in theme

I have created a smarty for you to get the title or image from the latest publisher article.

Please download this one
Unzip it and put it in following folder 'class/smarty/xoops_plugins/'

Now can use this smarty wherever you want in your theme

For image url:
<{publisher_latest}>
or
<{
publisher_latest ret='image'}>


For the article title:
<{publisher_latest ret='title'}>


Let me know if it works

heyula

Theme Designer
Posted on: 2014/1/5 9:07
heyula
heyula (Show more)
Theme Designer
Posts: 471
Since: 2008/4/24
#13

Re: use smartys in theme

@Bleekk
awesome super
Thank you

sova

Not too shy to talk
Posted on: 2014/1/5 10:20
sova
sova (Show more)
Not too shy to talk
Posts: 149
Since: 2010/4/13
#14

Re: use smartys in theme

Quote:

Bleekk wrote:
I have created a smarty for you to get the title or image from the latest publisher article.

Please download this one
Unzip it and put it in following folder 'class/smarty/xoops_plugins/'

Now can use this smarty wherever you want in your theme

For image url:
<{publisher_latest}>
or
<{
publisher_latest ret='image'}>


For the article title:
<{publisher_latest ret='title'}>


Let me know if it works


Thank you Dear Bleekk.
Of This Smartys for all modules

Bleekk

Theme Designer
Posted on: 2014/1/5 10:24
Bleekk
Bleekk (Show more)
Theme Designer
Posts: 934
Since: 2002/12/14
#15

Re: use smartys in theme

@heyula @sova you are welcome

you can not have one smarty for all modules because every module handles the images in a different way

sova

Not too shy to talk
Posted on: 2014/1/5 12:21
sova
sova (Show more)
Not too shy to talk
Posts: 149
Since: 2010/4/13
#16

Re: use smartys in theme

I say writing For all modules

heyula

Theme Designer
Posted on: 2014/1/5 17:51
heyula
heyula (Show more)
Theme Designer
Posts: 471
Since: 2008/4/24
#17

Re: use smartys in theme

@Bleekk

Can we call multiple images to?

$itemsObj $publisher->getHandler('item')->getItems($limit 3$start 0'', -1$sort 'datesub'$order='DESC'''true$criteria nulltrue);

Bleekk

Theme Designer
Posted on: 2014/1/7 10:41
Bleekk
Bleekk (Show more)
Theme Designer
Posts: 934
Since: 2002/12/14
#18

Re: use smartys in theme

I am sure that it will work. I will take a look at it asap

Bleekk

Theme Designer
Posted on: 2014/1/7 14:44
Bleekk
Bleekk (Show more)
Theme Designer
Posts: 934
Since: 2002/12/14
#19

Re: use smartys in theme

HERE is the same smarty for the xnews module because @sova asked for it
you use it like the one for publisher
<{xnews_latest}>

sova

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

Re: use smartys in theme

is It smarty, the latest news shows?
Do can display a category's latest news?

==============================
Excuse me.
I can not speak English well.
I get help from Google Translate.