1
Will_H
RRP in CBB on XOOPS 2.2.4
  • 2006/4/26 7:18

  • Will_H

  • Friend of XOOPS

  • Posts: 1786

  • Since: 2004/10/10


This is driving me nuts, the answer is so simple and I have had it working before. So please hold the flames

Ok so I want my "recent replied topics" from the cbb module to scroll.

I have tried editing the template but to no evail.

Do i have to create a custom block?

Is there already a working, available hack for this?

Any help? ty.

2
Will_H
Re: RRP in CBB on XOOPS 2.2.4
  • 2006/4/26 22:11

  • Will_H

  • Friend of XOOPS

  • Posts: 1786

  • Since: 2004/10/10


bump much?

3
Will_H
Re: RRP in CBB on XOOPS 2.2.4
  • 2006/4/27 3:05

  • Will_H

  • Friend of XOOPS

  • Posts: 1786

  • Since: 2004/10/10


Seriously?

No one knows how to add marquee code to the recent replied posts block?

4
CeBepuH
Re: RRP in CBB on XOOPS 2.2.4
  • 2006/4/27 6:22

  • CeBepuH

  • Not too shy to talk

  • Posts: 128

  • Since: 2002/6/10


Well, you should edit the template. I can't think of any other way.

For Recent Replied Topics edit newbb_block.html and make your changes to those lines:

<{if $block.disp_mode == 0}>
  <
tr>
    <
th class="head" nowrap="nowrap"><{$smarty.const._MB_NEWBB_FORUM}></th>
    <
th class="head" nowrap="nowrap"><{$smarty.const._MB_NEWBB_TOPIC}></th>
    <
th class="head" align="center" nowrap="nowrap"><{$smarty.const._MB_NEWBB_RPLS}></th>
    <
th class="head" align="center" nowrap="nowrap"><{$smarty.const._MB_NEWBB_VIEWS}></th>
    <
th class="head" align="center" nowrap="nowrap"><{$smarty.const._MB_NEWBB_LPOST}></th>
  </
tr>

  <{foreach 
item=topic from=$block.topics}>
  <
tr class="<{cycle values="even,odd"}>">
    <
td><a href="<{$xoops_url}>/modules/newbb/viewforum.php?forum=<{$topic.forum_id}>"><{$topic.forum_name}></a></td>
    <
td><a href="<{$xoops_url}>/modules/newbb/viewtopic.php?topic_id=<{$topic.id}>&amp;forum=<{$topic.forum_id}>&amp;post_id=<{$topic.post_id}>#forumpost<{$topic.post_id}>">
        <{if 
$topic.topic_subject}>
        <{
$topic.topic_subject}>
        <{/if}>
        <{
$topic.title}></a><{$topic.topic_page_jump}></td>
    <
td align="center"><{$topic.replies}></td>
    <
td align="center"><{$topic.views}></td>
    <
td align="right"><{$topic.time}><br /><{$topic.topic_poster}></td>
  </
tr>
  <{/foreach}>


Don't forget to clear templates_c when you're finished.
Humans need fantasy to be humans. To be the place where the fallen angel meets the rising ape.

5
Will_H
Re: RRP in CBB on XOOPS 2.2.4
  • 2006/4/27 21:35

  • Will_H

  • Friend of XOOPS

  • Posts: 1786

  • Since: 2004/10/10


Cool, thats where I was working but I cant seem to get the scroll to work. Where should I be placing the code?

6
Will_H
Re: RRP in CBB on XOOPS 2.2.4
  • 2006/4/28 0:22

  • Will_H

  • Friend of XOOPS

  • Posts: 1786

  • Since: 2004/10/10


Ok heres what I'm going for

<marquee direction="up" scrollamount="1" style="text-align:center;background-color:black;color:white;">
<
center><table cellspacing="0" align="center">
<
tr>
<
td align="center">
<{if 
$block.fadeImage != ""}>
<{
literal}>
<
script type="text/javascript">
<!--
nereidFadeObjects = new Object();
nereidFadeTimers = new Object();
function 
nereidFade(objectdestOpratedelta){
if (!
document.all) {
return;
}
if (
object != '[object]'){
setTimeout('nereidFade('+object+','+destOp+','+rate+','+delta+')',0);
return;
}
clearTimeout(nereidFadeTimers[object.sourceIndex]);
diff destOp-object.filters.alpha.opacity;
direction 1;
if (
object.filters.alpha.opacity destOp){
direction = -1;
}
delta Math.min(direction*diff,delta);
object.filters.alpha.opacity+=direction*delta;
if (
object.filters.alpha.opacity != destOp){
nereidFadeObjects[object.sourceIndex]=object;
nereidFadeTimers[object.sourceIndex]=setTimeout('nereidFade(nereidFadeObjects['+object.sourceIndex+'],'+destOp+','+rate+','+delta+')',rate);
}
}
//-->
</script>
<{/
literal}>
<{/if}>
<
br/>
<
table class="outer" cellspacing="1">
  <{if 
$block.disp_mode == 0}>
  <
tr>
    <
th class="head" nowrap="nowrap"><{$smarty.const._MB_NEWBB_FORUM}></th>
    <
th class="head" nowrap="nowrap"><{$smarty.const._MB_NEWBB_TOPIC}></th>
    <
th class="head" align="center" nowrap="nowrap"><{$smarty.const._MB_NEWBB_RPLS}></th>
    <
th class="head" align="center" nowrap="nowrap"><{$smarty.const._MB_NEWBB_VIEWS}></th>
    <
th class="head" align="center" nowrap="nowrap"><{$smarty.const._MB_NEWBB_LPOST}></th>
  </
tr>

  <{foreach 
item=topic from=$block.topics}>
  <
tr class="<{cycle values="even,odd"}>">
    <
td><a href="<{$xoops_url}>/modules/newbb/viewforum.php?forum=<{$topic.forum_id}>"><{$topic.forum_name}></a></td>
    <
td><a href="<{$xoops_url}>/modules/newbb/viewtopic.php?topic_id=<{$topic.id}>&amp;forum=<{$topic.forum_id}>&amp;post_id=<{$topic.post_id}>#forumpost<{$topic.post_id}>">
        <{if 
$topic.topic_subject}>
        <{
$topic.topic_subject}>
        <{/if}>
        <{
$topic.title}></a><{$topic.topic_page_jump}></td>
    <
td align="center"><{$topic.replies}></td>
    <
td align="center"><{$topic.views}></td>
    <
td align="right"><{$topic.time}><br /><{$topic.topic_poster}>&nbsp;<{$topic.jump_post}></td>
  </
tr>
  <{/foreach}>
  <{elseif 
$block.disp_mode == 1}>

  <
tr>
    <
th class="head" nowrap="nowrap"><{$smarty.const._MB_NEWBB_TOPIC}></th>
    <
th class="head" align="center" nowrap="nowrap"><{$smarty.const._MB_NEWBB_RPLS}></th>
    <
th class="head" align="center" nowrap="nowrap"><{$smarty.const._MB_NEWBB_LPOST}></th>
  </
tr>

  <{foreach 
item=topic from=$block.topics}>
  <
tr class="<{cycle values="even,odd"}>">
    <
td><a href="<{$xoops_url}>/modules/newbb/viewtopic.php?topic_id=<{$topic.id}>&amp;forum=<{$topic.forum_id}>&amp;post_id=<{$topic.post_id}>#forumpost<{$topic.post_id}>"><{$topic.title}></a></td>
    <
td align="center"><{$topic.replies}></td>
    <
td align="right"><{$topic.time}><br /><{$topic.topic_poster}>&nbsp;<{$topic.jump_post}></td>
  </
tr>
  <{/foreach}>

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

  <{foreach 
item=topic from=$block.topics}>
  <
tr class="<{cycle values="even,odd"}>">
    <
td><a href="<{$xoops_url}>/modules/newbb/viewtopic.php?topic_id=<{$topic.id}>&amp;forum=<{$topic.forum_id}>&amp;post_id=<{$topic.post_id}>#forumpost<{$topic.post_id}>"><{$topic.title}></a></td>
  </
tr>
  <{/foreach}>

  <{/if}>

</
table>

<{if 
$block.indexNav}>
<
div style="text-align:right; padding: 5px;">
<
a href="<{$xoops_url}>/modules/newbb/viewpost.php"><{$smarty.const._MB_NEWBB_ALLPOSTS}></a> |
<
a href="<{$xoops_url}>/modules/newbb/viewall.php"><{$smarty.const._MB_NEWBB_ALLTOPICS}></a> |
<
a href="<{$xoops_url}>/modules/newbb/"><{$smarty.const._MB_NEWBB_VSTFRMS}></a>
</
div>
<{/if}>
</
marquee>


I am stumped.

7
CeBepuH
Re: RRP in CBB on XOOPS 2.2.4
  • 2006/4/28 2:11

  • CeBepuH

  • Not too shy to talk

  • Posts: 128

  • Since: 2002/6/10


Try doing it this way:


<marquee direction="up" scrollamount="1" style="text-align:center;background-color:black;color:white;">

<{if 
$block.fadeImage != ""}>
<{
literal}>
<
script type="text/javascript">
<!--
nereidFadeObjects = new Object();
nereidFadeTimers = new Object();
function 
nereidFade(objectdestOpratedelta){
if (!
document.all) {
return;
}
if (
object != '[object]'){
setTimeout('nereidFade('+object+','+destOp+','+rate+','+delta+')',0);
return;
}
clearTimeout(nereidFadeTimers[object.sourceIndex]);
diff destOp-object.filters.alpha.opacity;
direction 1;
if (
object.filters.alpha.opacity destOp){
direction = -1;
}
delta Math.min(direction*diff,delta);
object.filters.alpha.opacity+=direction*delta;
if (
object.filters.alpha.opacity != destOp){
nereidFadeObjects[object.sourceIndex]=object;
nereidFadeTimers[object.sourceIndex]=setTimeout('nereidFade(nereidFadeObjects['+object.sourceIndex+'],'+destOp+','+rate+','+delta+')',rate);
}
}
//-->
</script>
<{/
literal}>
<{/if}>
<
br/>
<
table class="outer" cellspacing="1">
  <{if 
$block.disp_mode == 0}>
  <
tr>
    <
th class="head" nowrap="nowrap"><{$smarty.const._MB_NEWBB_FORUM}></th>
    <
th class="head" nowrap="nowrap"><{$smarty.const._MB_NEWBB_TOPIC}></th>
    <
th class="head" align="center" nowrap="nowrap"><{$smarty.const._MB_NEWBB_RPLS}></th>
    <
th class="head" align="center" nowrap="nowrap"><{$smarty.const._MB_NEWBB_VIEWS}></th>
    <
th class="head" align="center" nowrap="nowrap"><{$smarty.const._MB_NEWBB_LPOST}></th>
  </
tr>

  <{foreach 
item=topic from=$block.topics}>
  <
tr class="<{cycle values="even,odd"}>">
    <
td><a href="<{$xoops_url}>/modules/newbb/viewforum.php?forum=<{$topic.forum_id}>"><{$topic.forum_name}></a></td>
    <
td><a href="<{$xoops_url}>/modules/newbb/viewtopic.php?topic_id=<{$topic.id}>&forum=<{$topic.forum_id}>&post_id=<{$topic.post_id}>#forumpost<{$topic.post_id}>">
        <{if 
$topic.topic_subject}>
        <{
$topic.topic_subject}>
        <{/if}>
        <{
$topic.title}></a><{$topic.topic_page_jump}></td>
    <
td align="center"><{$topic.replies}></td>
    <
td align="center"><{$topic.views}></td>
    <
td align="right"><{$topic.time}><br /><{$topic.topic_poster}>&nbsp;<{$topic.jump_post}></td>
  </
tr>
  <{/foreach}>
  <{elseif 
$block.disp_mode == 1}>

  <
tr>
    <
th class="head" nowrap="nowrap"><{$smarty.const._MB_NEWBB_TOPIC}></th>
    <
th class="head" align="center" nowrap="nowrap"><{$smarty.const._MB_NEWBB_RPLS}></th>
    <
th class="head" align="center" nowrap="nowrap"><{$smarty.const._MB_NEWBB_LPOST}></th>
  </
tr>

  <{foreach 
item=topic from=$block.topics}>
  <
tr class="<{cycle values="even,odd"}>">
    <
td><a href="<{$xoops_url}>/modules/newbb/viewtopic.php?topic_id=<{$topic.id}>&forum=<{$topic.forum_id}>&post_id=<{$topic.post_id}>#forumpost<{$topic.post_id}>"><{$topic.title}></a></td>
    <
td align="center"><{$topic.replies}></td>
    <
td align="right"><{$topic.time}><br /><{$topic.topic_poster}>&nbsp;<{$topic.jump_post}></td>
  </
tr>
  <{/foreach}>

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

  <{foreach 
item=topic from=$block.topics}>
  <
tr class="<{cycle values="even,odd"}>">
    <
td><a href="<{$xoops_url}>/modules/newbb/viewtopic.php?topic_id=<{$topic.id}>&forum=<{$topic.forum_id}>&post_id=<{$topic.post_id}>#forumpost<{$topic.post_id}>"><{$topic.title}></a></td>
  </
tr>
  <{/foreach}>

  <{/if}>

</
table>
</
marquee>

<{if 
$block.indexNav}>
<
div style="text-align:right; padding: 5px;">
<
a href="<{$xoops_url}>/modules/newbb/viewpost.php"><{$smarty.const._MB_NEWBB_ALLPOSTS}></a> |
<
a href="<{$xoops_url}>/modules/newbb/viewall.php"><{$smarty.const._MB_NEWBB_ALLTOPICS}></a> |
<
a href="<{$xoops_url}>/modules/newbb/"><{$smarty.const._MB_NEWBB_VSTFRMS}></a>
</
div>
<{/if}>


You just opened these tags at the beginning:

<center><table cellspacing="0" align="center">
<
tr>
<
td align="center">


and did not close them at the end. I've deleted them from my version. Notice that I have moved the closing marquee tag several lines up. That way the navigation line 'Posts | Topics | Forums' will stay visible all the time (if you have set them to be showed).

Btw, I don't think the fade in /fade out image script will work on Firefox.
Humans need fantasy to be humans. To be the place where the fallen angel meets the rising ape.

8
Will_H
Re: RRP in CBB on XOOPS 2.2.4
  • 2006/4/28 13:00

  • Will_H

  • Friend of XOOPS

  • Posts: 1786

  • Since: 2004/10/10


Excellent its finaaly scrolling, the only problem is that the heaser is scrolling with it(ie topic, author, replies, date.

9
bluenova
Re: RRP in CBB on XOOPS 2.2.4

I think u would need to split it into 2 tables, perhaps like this:
...........
    <
th class="head" align="center" nowrap="nowrap"><{$smarty.const._MB_NEWBB_LPOST}></th>
  </
tr>
</
table>
<
marquee direction="up" scrollamount="1" style="text-align:center;background-color:black;color:white;">
<
table>
  <{foreach 
item=topic from=$block.topics}>
...............


not sure how your fading thing would work afterwards though.

10
Will_H
Re: RRP in CBB on XOOPS 2.2.4
  • 2006/4/28 13:24

  • Will_H

  • Friend of XOOPS

  • Posts: 1786

  • Since: 2004/10/10


yep that worked thanks guys.

Login

Who's Online

209 user(s) are online (115 user(s) are browsing Support Forums)


Members: 0


Guests: 209


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