Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Discussion Pages (pagenumbers)

2

Comments

  • edited September 2006
    Hi, I've enabled the extension and it is working to a degree, the link to the individual pages come up but the link itself isn't working properly. As a result you can only ever get to the first page regardless of what page number link you click on. From what I can see the link structure the extension spits out is: http://forum url/discussion/discussion no/page no/ When what should be there (well, on mine its what works) is: http://forum url/discussion/discussion no/page no/discussion title/ My only inkling as to what's causing this could be what's in the .htaccess file, has anyone else come across this? The functioning forums are at http://forums.fatloaf.com
  • STE7130 site has pages like this 1,2,3...4,5,6 I think their is no need for ... inbetween 3 and 4 :)
  • edited February 2007
    I've been messing around with vanilla and I got this extension to display the page #'s from each post in the discussion grid. Now the extension is set to display the page list right next to the post title.

    I want to move this down below the post title, next to category with the rest of the post info.

    <?php /* Extension Name: Discussion Pages Extension Url: <a href="http://www.krijtenberg.nl/ Description:">http://www.krijtenberg.nl/ Description:</a> Show links Discussion pages in the Discussion Grid Version: 1.0 Author: Maurice "Jazzman" Krijtenberg Author Url: <a href="http://www.krijtenberg.nl/ ">http://www.krijtenberg.nl/ </a> */ if( $Context->SelfUrl == 'index.php' ) { function DiscussionGrid_DiscussionPages($DiscussionGrid) { $Discussion = &$DiscussionGrid->DelegateParameters['Discussion']; $DiscussionList = &$DiscussionGrid->DelegateParameters['DiscussionList']; $CommentsPerPage = $DiscussionGrid->Context->Configuration['COMMENTS_PER_PAGE']; if( $Discussion->CountComments > $CommentsPerPage ) { $PageList = $Discussion->Context->Configuration['TEXT_PREFIX']; $PageCount = CalculateNumberOfPages($Discussion->CountComments, $CommentsPerPage); for( $i=1; $i <= $PageCount; $i++ ) { $PageList .= ' <a href="'. GetUrl($Discussion->Context->Configuration, 'comments.php', '', 'DiscussionID', $Discussion->DiscussionID, $i) .'" class="DiscussionPageNumber">'. $i .'</a> '; } $PageList .= $Discussion->Context->Configuration['TEXT_SUFFIX']; $DiscussionList = str_replace($Discussion->Name.'</a>', $Discussion->Name .'</a> '. $PageList, $DiscussionList); } } // Add to delegate $Context->AddToDelegate('DiscussionGrid', 'PostDiscussionOptionsRender', 'DiscussionGrid_DiscussionPages'); } ?>

    changing the str_replace line to this:
    $DiscussionList = str_replace($Discussion->Category.'</a>', $Discussion->Category .'</a> '. $PageList, $DiscussionList);

    moves the page list to where I want it. but for some reason, the topic on the top of the list does this: [ 1 2 ][ 1 2 3]. The [1 2 ] being another topic with 2 pages and the [ 1 2 3 ] being for the topic at the top. It also seems that the first posts has the pages for all the topics with them, the second one has the pages for 2 topics with them and the third has it's original pages. There are only 3 topics with more than one page. So if there was four threads with more than one page the first topic would include 4 pages for each topic that has them and so on down to the 4th topic which retains it's original page listing.

    Obviously this is not the desired effect, how would I go about eliminating other threads pages showing up in the listing for a different thread?

    As far as I know it seems to be listing ALL the pages from any topic with more than one page in that first topic. So any Idea's on how to fix this?
  • i have my forum set up to show icons instead of [sticky], [bookmarked] etc, by altering the prefix and suffix in the forum settings.

    as such, when i activate this extension, i get the following

    this is the topic title 1 2 .gif" />
  • edited February 2007
    Circuit:

    Change the $Discussion->Context->Configuration['TEXT_PREFIX'] to '['
    and the $Discussion->Context->Configuration['TEXT_SUFFIX'] to ']' (including quotes)

    Also noticed a potential break in friendly URLs... fix would be adding the discussion topic in the URL
  • Someone shout when it's updated in the downloadable extension file :D
  • edited February 2007
    wallphone: sorry, i don't quite understand which part of the line i have to change. do i replace the words TEXT_PREFIX with the square bracket?

    $Discussion->Context->Configuration['[']

    it looks a bit wrong... i don't think i'm doing it right?
  • edited February 2007
    Replace the whole thing, from $C to ]

    i.e.: // some code... $PageList = ']'; //some more code ... $PageList .= '['; ...
  • I've just upgraded to Vanilla 1.1, and now at the top of my discussions page I get: Notice: Undefined index: TEXT_PREFIX in (...)/extensions/DiscussionPages/default.php on line 18 Notice: Undefined index: TEXT_SUFFIX in (...)/extensions/DiscussionPages/default.php on line 23 Notice: Undefined index: TEXT_PREFIX in (...)/extensions/DiscussionPages/default.php on line 18 Notice: Undefined index: TEXT_SUFFIX in (...)/extensions/DiscussionPages/default.php on line 23 Notice: Undefined index: TEXT_PREFIX in (...)/extensions/DiscussionPages/default.php on line 18 Notice: Undefined index: TEXT_SUFFIX in (...)/extensions/DiscussionPages/default.php on line 23 Notice: Undefined index: TEXT_PREFIX in (...)/extensions/DiscussionPages/default.php on line 18 Notice: Undefined index: TEXT_SUFFIX in (...)/extensions/DiscussionPages/default.php on line 23 Notice: Undefined index: TEXT_PREFIX in (...)/extensions/DiscussionPages/default.php on line 18 Notice: Undefined index: TEXT_SUFFIX in (...)/extensions/DiscussionPages/default.php on line 23 Notice: Undefined index: TEXT_PREFIX in (...)/extensions/DiscussionPages/default.php on line 18 Notice: Undefined index: TEXT_SUFFIX in (...)/extensions/DiscussionPages/default.php on line 23 The updater tells me that I've got the latest version of Discussion Pages. Perhaps it needs to be updated? Can this be easily fixed, or will we have to give up on this extension for the time being?
  • This may have something to do with what has been reported in this discussion.
  • Ironically, applying my changes described a few posts back (February 7 & 8th) will fix this error.
  • @WallPhone: are you able to fix the code in this extension, so that it is fully compatible with version 1.1.1? - ie., so that it looks up the pre/suffix as specified in the new language file? If so, that would be a great help for us who are waiting for these kinks to be ironed out before upgrading... ;-)
  • could be great in this extention to have a last page link like this comments.php?DiscussionID=5&page=LASTPAGE
  • edited March 2007
    icouto: I can work out a patch, but will have to leave updating to Jazzman--he is still active here.
    Will try to get the friendly URLs bug (#22) and the numbering issue (#23) worked out.
  • @jazzman & @WallPhone: you guys are awesome. Thank you so much for all your excellent work!
  • Umm so what's the status of extension currently? I would like to implement it on my site...
  • it is good it works it has been for a while i have it on my site
  • bobthecowbobthecow New
    edited February 2008
    looks good... how soon can we expect an update with the "..." hack? i've got a discussion or two with 50+ pages, so this extension isn't really usable for my forum without the hack :)
  • Is there a way to make page numbers appear in Discussion Overview (extension) ?
  • and while you're at it, can you see why it looks so non-pretty in the theme "organic"
Sign In or Register to comment.