1
Will_H
cbb 3.08 - pagenav in recent topics?
  • 2007/8/13 15:41

  • Will_H

  • Friend of XOOPS

  • Posts: 1786

  • Since: 2004/10/10


It seems that the page jump in the 3.08 was taken out. Though the code is still in place...

The option is also still selectable through block admin.

Anyone know how to get the pagenav to show up in the recent topics block?

I attempted to solve this one, added <$topic.topic_page... to all of the display modes but still didnt show up.

replaced <{$topic.topic_... with <{$pagenac...

still no dice.

idk what the problem is, I tried to look to see if the function was commented out in this release, but that didnt seem to be it.

I was considering replacing using template override and dropping in an old template set.. does anyone know what vers XOOPS.org is using?

2
script_fu
Re: cbb 3.08 - pagenav in recent topics?

Here is a snap of the problem Will is talking about.

3
script_fu
Re: cbb 3.08 - pagenav in Recent Replied Topics?

The block is Recent Replied Topics. Just like the one on the front page here at xoops.

4
script_fu
Re: cbb 3.08 - pagenav in Recent Replied Topics?

bump

5
Will_H
Re: cbb 3.08 - pagenav in recent topics?
  • 2007/8/15 15:45

  • Will_H

  • Friend of XOOPS

  • Posts: 1786

  • Since: 2004/10/10


^^ yeah, the template is newbb_block.html

Heres what I dont get, if you do a /modules/newbb/viewall.php it shows the page numbers per thread. Is there a way to actually pull this into a custom block. In evo you can pull any script into a block... is there a way to do this with XOOPS without it pulling the whole page in.

XOOPS has this in place... is XOOPS using cbb? or still newbb?

why in the world would this feature be taken out? Its just like the quote button thing... why in the world would you remove a feature like this. Not that it was hard to get the quote button back. but its crap that you have to do with each new release of cbb.

#2 I installed 4.0 on a test site, some cool new features so big props for that, but the issue I am having is not resolved in the newer version, so I am guessing that I need to go back.

My question is, if XOOPS is still on newbb, what vers? likewise if its cbb, what vers?

...watch it be newbbex or something lmao.

___

6
iHackCode
Re: cbb 3.08 - pagenav in recent topics?

..

file.. well u know the block file..
function name: b_newbb_show
Add.. well look for the comments.. START and END. it should work. i cut it from cbb 1.16 and pasted it to cbb 4.0.. no guarantees.. but worked for 4.0.
code code.. and more code...

$xoopsLogger->stopTime'XOOPS output block - bb - type' );

$xoopsLogger->startTime'XOOPS output block - bb - assign' );
    foreach (
$rows as $arr) {
        
$topic_page_jump '';
        
        
//START
        
$totalpages ceil(($arr['topic_replies'] + 1) / $newbbConfig['posts_per_page']);
        if (
$totalpages 1) {
            
$topic_page_jump .= '   XOOPS_URL '/images/icons/posticon.gif" alt="" /> ';
            
$append false;
            for (
$i 1$i <= $totalpages$i++) {
                if (
$i && $i $totalpages) {
                    if(!
$append){
                            
$topic_page_jump .= "...";
                            
$append true;
                        }
                } else {
                    
$topic_page_jump .= '[XOOPS_URL '/modules/newbb/viewtopic.php?topic_id=' $arr['topic_id'] . '&start=' . (($i 1) * $newbbConfig['posts_per_page']) . '">' $i ']';
                }
            }
        }
        if (
$arr['icon'] && is_file(XOOPS_ROOT_PATH "/images/subject/" $arr['icon'])) {
            
$last_post_icon 'XOOPS_URL '/images/subject/' $arr['icon'] . '" alt="" />';
        } else {
            
$last_post_icon 'XOOPS_URL '/images/subject/icon1.gif" alt="" />';
        }
        
//END
       
        
$topic['topic_subject'] = empty($type_list[$arr["type_id"]])?"":"[".$type_list[$arr["type_id"]]."] ";
        
        
$topic['post_id'] = $arr['post_id'];
        
$topic['forum_id'] = $arr['forum_id'];
        
$topic['forum_name'] = $myts->htmlSpecialChars($arr['forum_name']);
        
$topic['id'] = $arr['topic_id'];

        
$title $myts->htmlSpecialChars($arr['topic_title']);
        if (!empty(
$options[5])) {
            
$title xoops_substr($title0$options[5]);
        }
        
$topic['title'] = $title;
        
$topic['replies'] = $arr['topic_replies'];
        
$topic['views'] = $arr['topic_views'];
        
$topic['time'] = newbb_formatTimestamp($arr['post_time']);
        if (!empty(
$author_name[$arr['uid']])) {
            
$topic_poster $author_name[$arr['uid']];
        } else {
            
$topic_poster $myts->htmlSpecialChars( ($arr['poster_name'])?$arr['poster_name']:$GLOBALS["xoopsConfig"]["anonymous"] );
        }
CBB / LatestNews / Publisher / XM-Spotlight

(ノ◕ヮ◕)ノ*:・゚✧

7
Will_H
Re: cbb 3.08 - pagenav in recent topics?
  • 2007/8/15 20:49

  • Will_H

  • Friend of XOOPS

  • Posts: 1786

  • Since: 2004/10/10


Beautiful!

in 3.08 its a wee bit different, however it still works.

Thanks Bandit!

foreach ($rows as $arr) {
        
$topic_page_jump '';
        if (
$arr['allow_subject_prefix']) {
            
$subjectpres explode(','$newbbConfig['subject_prefix']);
            if (
count($subjectpres) > 1) {
                foreach(
$subjectpres as $subjectpre) {
                    
$subject_array[] = $subjectpre;
                }
                   
$subject_array[0] = null;
            }
            
$topic['topic_subject'] = $subject_array[$arr['topic_subject']];
        } else {
            
$topic['topic_subject'] = "";
        }

//START NAV HACK
        
$totalpages ceil(($arr['topic_replies'] + 1) / $newbbConfig['posts_per_page']);
        if (
$totalpages 1) {
            
$topic_page_jump .= '   XOOPS_URL '/images/icons/posticon.gif" alt="" /> ';
            
$append false;
            for (
$i 1$i <= $totalpages$i++) {
                if (
$i && $i $totalpages) {
                    if(!
$append){
                            
$topic_page_jump .= "...";
                            
$append true;
                        }
                } else {
                    
$topic_page_jump .= '[XOOPS_URL '/modules/newbb/viewtopic.php?topic_id=' $arr['topic_id'] . '&start=' . (($i 1) * $newbbConfig['posts_per_page']) . '">' $i ']';
                }
            }
        }
        if (
$arr['icon'] && is_file(XOOPS_ROOT_PATH "/images/subject/" $arr['icon'])) {
            
$last_post_icon 'XOOPS_URL '/images/subject/' $arr['icon'] . '" alt="" />';
        } else {
            
$last_post_icon 'XOOPS_URL '/images/subject/icon1.gif" alt="" />';
        }
//END


        
$topic['post_id'] = $arr['post_id'];
        
$topic['forum_id'] = $arr['forum_id'];
        
$topic['forum_name'] = $myts->htmlSpecialChars($arr['forum_name']);
        
$topic['id'] = $arr['topic_id'];

        
$title $myts->htmlSpecialChars($arr['topic_title']);
        if(!empty(
$options[5])){
            
$title xoops_substr($title0$options[5]);
        }

Login

Who's Online

408 user(s) are online (72 user(s) are browsing Support Forums)


Members: 0


Guests: 408


more...

Donat-O-Meter

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

Latest GitHub Commits