When you look at the end of an article in News (1.56 - 1.62) with XOOPS 2.2.6 then you see at the bottom something like:
Quote:
Read More... | 6774 bytes more | 16 comments
To my surprise both links point to the same URL of the full article view.
I found that very ennoying and illogical, because when I click on comments, I expect to land on the comments at the bottom of the article and not pages away at the top.
So, I patched it.
First we need an anchor to land. I choose this at the top of the comment functions block (in this way other modules can benefit as well).
In /include/comment_view.php at 153 change
$navbar = '
to
Next we adapt the links in modules\news\class\class.newsstory.php around 640 or 690 from
if ( $ccount == 0 ) {
$morelink .= '">'._NW_COMMENTS.'';
} else {
if ( $fullcount < 1 ) {
if ( $ccount == 1 ) {
$morelink .= '">'._NW_READMORE.' | '.$morelink2.'">'._NW_ONECOMMENT.'';
} else {
$morelink .= '">'._NW_READMORE.' | '.$morelink2.'">';
$morelink .= sprintf(_NW_NUMCOMMENTS, $ccount);
$morelink .= '';
}
} else {
if ( $ccount == 1 ) {
$morelink .= '">'._NW_ONECOMMENT.'';
} else {
$morelink .= '">';
$morelink .= sprintf(_NW_NUMCOMMENTS, $ccount);
$morelink .= '';
}
}
}
in five changes to
if ( $ccount == 0 ) {
$morelink .= '#comments">'._NW_COMMENTS.'';
} else {
if ( $fullcount < 1 ) {
if ( $ccount == 1 ) {
$morelink .= '">'._NW_READMORE.' | '.$morelink2.'#comments">'._NW_ONECOMMENT.'';
} else {
$morelink .= '">'._NW_READMORE.' | '.$morelink2.'#comments">';
$morelink .= sprintf(_NW_NUMCOMMENTS, $ccount);
$morelink .= '';
}
} else {
if ( $ccount == 1 ) {
$morelink .= '#comments">'._NW_ONECOMMENT.'';
} else {
$morelink .= '#comments">';
$morelink .= sprintf(_NW_NUMCOMMENTS, $ccount);
$morelink .= '';
}
}
}
And when we were changing anyway, I found the layout of the comment functions block for posting a comment very confusing and the link to post is easy overlooked. It deserves a more prominent place for easier access.
The four controls are placed in a table with 1 row and 1 column. So I decided to add a new row, because a new column wasn't it what I was looking for.
For this you have to change
$navbar .= ' ._CM_POSTCOMMENT.'" />';
in /include/comment_view.php at 204 to
$navbar .= '._CM_POSTCOMMENT.'" />';
So that looks already much nicer!
Only the text Quote:The comments are owned by the poster. We aren't responsible for their content. looks a little orphaned, maybe I must add it in the table in a row between the controls, but that's for a next time!
2
Very nice! Well though!
3
Nice work!!! Thanks for sharing it!!! Hopefully Herve will include it in the next release of News!
4
very nice . thank you . i gonna test it
331 user(s) are online (231 user(s) are browsing Support Forums)
Members: 0
Guests: 331
more...
Stats |
Goal: |
$100.00 |
Due Date: |
Nov 30 |
Gross Amount: |
$0.00 |
Net Balance: |
$0.00 |
Left to go: |
$100.00 |
|
|