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
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.
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?
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
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?
@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... ;-)
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.
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
Comments
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?
as such, when i activate this extension, i get the following
this is the topic title 1 2 .gif" />
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
$Discussion->Context->Configuration['[']
it looks a bit wrong... i don't think i'm doing it right?
$C
to]
i.e.:
// some code... $PageList = ']'; //some more code ... $PageList .= '['; ...
Will try to get the friendly URLs bug (#22) and the numbering issue (#23) worked out.