1
Wayde
Adding a block to a template
  • 2005/5/28 22:22

  • Wayde

  • Just popping in

  • Posts: 58

  • Since: 2004/9/14


Hey guys,
What im trying to do is add a block to the bottom of my index page in newbb...

when i insert the code into the index template...
the block shows its table... but its empty..

wat do i have to do to get the block to work within the newbb index page?

Cheers

Wayde

2
ladon
Re: Adding a block to a template
  • 2005/5/28 23:32

  • ladon

  • Quite a regular

  • Posts: 284

  • Since: 2003/10/31


What are you inserting? PHP script or plain HTML? Make sure you select the right type. It might be helpful if you could post the content yoo put in the block.

3
Wayde
Re: Adding a block to a template
  • 2005/5/29 1:11

  • Wayde

  • Just popping in

  • Posts: 58

  • Since: 2004/9/14


Hey, Thanks for the reply.

Quote:


<{if $block.disp_mode == 0}>








<{foreach item=topic from=$block.topics}>
">






<{/foreach}>

<{elseif $block.disp_mode == 1}>







<{foreach item=topic from=$block.topics}>
">




<{/foreach}>

<{elseif $block.disp_mode == 2}>

<{foreach item=topic from=$block.topics}>
">


<{/foreach}>

<{/if}>

<{$block.lang_forum}> <{$block.lang_topic}> <{$block.lang_replies}> <{$block.lang_views}> <{$block.lang_lastpost}>
<{$topic.forum_name}>

<{if $topic.topic_subject eq NONE}>
<{else}>
<{$topic.topic_subject}>
<{/if}>

<{$topic.title}>
<{$topic.topic_page_jump}>
<{$topic.replies}> <{$topic.views}> <{$topic.time}>
<{$topic.topic_poster}> <{$topic.jump_post}>
<{$block.lang_topic}> <{$block.lang_replies}> <{$block.lang_lastpost}>
<{$topic.title}> <{$topic.replies}> <{$topic.time}>
<{$topic.topic_poster}> <{$topic.jump_post}>
<{$topic.title}>


Thats wat im wanting to add to just the "index" template in newbb...,.(its a block from newbb)
but when i do that... the tables are there.... but nothing shows.....
any ideas?

THanks

Wayde

4
ladon
Re: Adding a block to a template
  • 2005/5/29 9:32

  • ladon

  • Quite a regular

  • Posts: 284

  • Since: 2003/10/31


The reason that it's emty is because you're including a if/else statement that gets no input. To add a newbbblock, look here: click. It will tell you all you need to know to achieve adding a that particular block.

5
Wayde
Re: Adding a block to a template
  • 2005/5/29 12:08

  • Wayde

  • Just popping in

  • Posts: 58

  • Since: 2004/9/14


ok... thanks for that.. not wat i was really wat i was after..
ill try and explain it more ...

What im trying to do is...
Put the rececnt topics block at the bottom of the newbb index page.
when i add the above code into the newbb index.html template..
the block in empty.. as it says in the above post that theres no input..

how can i get the recent topics block to work within the newbb index.html template?

hope that explains it a bit better wat im tryin to do..
thanks for your replys so far...

Wayde

6
pod
Re: Adding a block to a template
  • 2005/5/29 12:20

  • pod

  • Quite a regular

  • Posts: 301

  • Since: 2003/4/19


The simple answer is: It's just not that easy.

Blocks use block.variables, templates use template.variables. They arent interchangable.

A workaround might be to get the header hack from happy linux and use center-down or center-top blocks in your theme, placing one or the other where you want to insert the newbb block, then do just that.

An alternative might be to get all the template.variables you need & do-it-yourself to achieve the result you're after. A 3rd alternative might be to create template.variables yourself.
I don't know your level of XOOPS expertise but if you have no idea how to do these two latter suggestions, I suggest going w the header hack. I can't really assist ya more than that as I have never used newbb, nor do I intend to start trying.

Hope this helps a lil.

Login

Who's Online

258 user(s) are online (148 user(s) are browsing Support Forums)


Members: 0


Guests: 258


more...

Donat-O-Meter

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

Latest GitHub Commits