miniBB ® 

miniBB

®
Support Forums
  
 | Start | Register | Search | Statistics | File Bank | Manual |
Custom Tutorials and Modifications miniBB Support Forums / Custom Tutorials and Modifications /  
 

When posts are sorted in DESC order, after posting a topic, the forum redirects to the last page

 
Author Anonymous
Guest
#1 | Posted: 3 Apr 2004 22:44 
I have changed stuff so the last post is always on top of the first page.
Can i anchor the redirecting to the first post instead off the last?

Author Anonymous
Guest
#2 | Posted: 17 May 2004 23:06 
Let me make myself clear on this....

I have changed the forum orders to ASC instead of DESC and the problem that i have is that when a user posts a message, the forum goes to the last page instead of the first page.
I know it's an anchorthing, so team please let me know if it is possibble to change the page redirects.

Author Sergei
Team member
#3 | Posted: 18 May 2004 00:56 
i'm confused.. have you changed post order or forum order?

Author Anonymous
Guest
#4 | Posted: 20 May 2004 02:39 
The forum order looks like this:

Suppose there are 4 pages filled with posts.
The last post is now on top off page 1 ASC instead off page 4 DESC
When someone replies on the last post wich is on page 1 and pushes the submit button, the forum shows page 4 instead off page 1 where the last post is at that moment.

Author Team
8-)
#5 | Posted: 24 May 2004 10:27 
This is redirect algorithm. You need to change also bb_pthread. When header("location"...) goes to page=-1, it goes to the last page. You need to set location's page to 0.

Author Anonymous
Guest
#6 | Posted: 24 May 2004 14:48 
I cannot seem to find this in bb_func_pthread

Is it somewhere near this anchor:

$totalPosts = (integer) DB_query(6,0);
$vmax = (integer) $viewmaxreplys;
$anchor = $totalPosts;
if ($anchor>$vmax) { $anchor = $totalPosts-((floor($totalPosts/$vmax))*$vmax); if ($anchor==0) $anchor=$vmax;}
}
?>

Author Team
8-)
#7 | Posted: 24 May 2004 15:02 
Sorry... you'll find it in index.php
Look for page=$page

Author Anonymous
Guest
#8 | Posted: 24 May 2004 21:07 
Got it ;)

The best forum i ever had is mini_bb !!
keep up the good work.....

Marc

Author Anonymous
Guest
#9 | Posted: 29 Jun 2006 21:47 
I have got the same problem and I can´t find header("location"...) in index.php . Can anybody help?

Author Paul
Lead Developer 
#10 | Posted: 30 Jun 2006 07:23 
Look up for:

header("Location

in index.php and you'll find if($action=='pthread') { above this code. This is a place of redirection.

Nothing changed here for about 2 years :)

Author Jana
Guest
#11 | Posted: 30 Jun 2006 09:56 
I found this:

if($action=='pthread') {
if (!isset($errorMSG)) {
if(isset($anchor)) $anchor='#msg'.$anchor; else $anchor='';
if(file_exists($pathToFiles.'bb_plugins2.php')) require_once($pathToFiles.'bb_plugins2.php');
if(isset($metaLocation)) {
$meta_relocate="https://www.minibb.com/forums/{$indexphp}action=vthread&forum=$forum&top ic=$topic&page=$page{$ancho

r}"; echo ParseTpl(makeUp($metaLocation)); exit; } else { if(isset($mod_rewrite) and

$mod_rewrite) $furl=$forum.'_'.$topic.'_'.$page.'.html'.$anchor; else

$furl="{$indexphp}action=vthread&forum=$forum&topic=$topic&page=$page{ $anchor}";
header("Location: https://www.minibb.com/forums/{$furl}"); exit; }
}

But I still don´t know what to change there

Author Paul
Lead Developer 
#12 | Posted: 30 Jun 2006 09:59 
In general, what are you trying to achieve? Why do you need to change something there? If you are not experienced PHP coder, we are not the right people to teach you.

Author Jana
Guest
#13 | Posted: 30 Jun 2006 10:03 
I´ve changed the posts order so the newest posts are on the first page, but when I add new post it redirects me to the last page instead of the first one.

Author Paul
Lead Developer 
#14 | Posted: 30 Jun 2006 10:17 
Ok, so in the code above, you need to replace $page to '0' everywhere you can find it.

Author Jana
Guest
#15 | Posted: 30 Jun 2006 10:36 
Thanks very much! It works now!

Custom Tutorials and Modifications miniBB Support Forums / Custom Tutorials and Modifications /
 When posts are sorted in DESC order, after posting a topic, the forum redirects to the last page
 Share Topic's Link

Your Reply Click this icon to move up to the quoted message


  ?
Post as a Guest, leaving the Password field blank. You could also enter a Guest name, if it's not taken by a member yet. Sign-in and post at once, or just sign-in, bypassing the message's text.


Before posting, make sure your message is compliant with forum rules; otherwise it could be locked or removed with no explanation.

 

 
miniBB Support Forums Powered by Forum Software miniBB ® Home  Features  Requirements  Demo  Download  Showcase  Gallery of Arts
Compiler  Premium Extensions  Premium Support  License  Contact Us
Proceed with the Captcha add-on: protect your miniBB-forums from the automated spam and flood.


  ⇑