21
chipbyte
Re: xoops banner system into a block?
  • 2008/11/26 19:50

  • chipbyte

  • Just popping in

  • Posts: 12

  • Since: 2007/11/1


Thanks guys

I've allready edit to /include/functions.php and then, i've several banners, i'm using on blocks other banners. But i want to use the other one by id

So where exactly must i put this code in theme.html. Which line?

<{php}> echo getbanner_from_id_banner(1); <{/php}>

22
Anonymous
Re: xoops banner system into a block?
  • 2008/11/26 20:30

  • Anonymous

  • Posts: 0

  • Since:


If you want to use many blocks with different banners, create new custom blocks and use in each block:

echo getbanner_from_id_banner(1);

and change (1) where 1 is banner id.

Content Type: PHP Script
Cache lifetime: No Cache


23
chipbyte
Re: xoops banner system into a block?
  • 2008/11/26 21:46

  • chipbyte

  • Just popping in

  • Posts: 12

  • Since: 2007/11/1


Yes i already use this code for block it's ok, it's working

But i want to embed this code or something like that for in any theme

That's the my problem!

24
stefan88
Re: xoops banner system into a block?
  • 2008/11/26 22:41

  • stefan88

  • Community Support Member

  • Posts: 1086

  • Since: 2004/9/20


Quote:
So where exactly must i put this code in theme.html. Which line?

<{php}> echo getbanner_from_id_banner(1); <{/php}>


It depends on your theme and where you want to show the banner. But in any case don't forget to clear the cache to see the changes...
..

25
chipbyte
Re: xoops banner system into a block?
  • 2008/11/26 22:58

  • chipbyte

  • Just popping in

  • Posts: 12

  • Since: 2007/11/1


Ok my theme.html file like this

<tr>
<td id="headerL">&nbsp;</td>
<td id="headerLogo">&nbsp;</td>
<td id="bannerSection"><{$xoops_banner}></td>
<td id="headerR">&nbsp;</td>
</tr>

26
ghia
Re: xoops banner system into a block?
  • 2008/11/27 1:33

  • ghia

  • Community Support Member

  • Posts: 4953

  • Since: 2008/7/3 1


Replace
<{$xoops_banner}>

27
chipbyte
Re: xoops banner system into a block?
  • 2008/11/27 13:17

  • chipbyte

  • Just popping in

  • Posts: 12

  • Since: 2007/11/1


Is this right?

<td id="bannerSection"><{php}> echo getbanner_from_id_banner(1); <{/php}></td>

28
ghia
Re: xoops banner system into a block?
  • 2008/11/27 14:11

  • ghia

  • Community Support Member

  • Posts: 4953

  • Since: 2008/7/3 1


Yes, didn't it work?

29
chipbyte
Re: xoops banner system into a block?
  • 2008/11/27 14:14

  • chipbyte

  • Just popping in

  • Posts: 12

  • Since: 2007/11/1


Yeah buddy, it's working, it's working.. I love XOOPS and you. Thanks everyone and all XOOPS Team.

That's the solution for XOOPS static banner on theme (by Banner ID)

Just 3 Steps

1: First editing root_directory/include/functions.php (Here is the link Thanks Stefano)

2: Editing theme.html
Find this line in theme.html:
<td id="bannerSection"><{$xoops_banner}></td>

Then replace with:
<td id="bannerSection"><{php}> echo getbanner_from_id_banner(1); <{/php}></td>


3: Last step is very important: Clearing temporary files
root_directory/xoops_data/caches/smarty_compile

30
ghia
Re: xoops banner system into a block?
  • 2008/11/27 15:04

  • ghia

  • Community Support Member

  • Posts: 4953

  • Since: 2008/7/3 1


Thanks for reporting back!
It will be very useful for other users too!

Login

Who's Online

222 user(s) are online (140 user(s) are browsing Support Forums)


Members: 0


Guests: 222


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Mar 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits