|
View previous topic :: View next topic |
| Author |
Message |
Eestlane I18N / L10N Lead Dev


Offline Joined: Apr 06, 2005 Posts: 1404 Location: Estonia
|
Posted: Tue Jul 03, 2007 10:27 am Post subject: Re: Mod Wanted - "go to page" text box |
|
I don't understand, Phoenix :S
Eestlane's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS) Linux/2.0.63/5.0.67/5.2.8/9.2.1
|
|
| Back to top |
|
 |
piraja Nice poster


Offline Joined: Apr 28, 2006 Posts: 63 Location: Finland
|
Posted: Wed Jul 04, 2007 7:43 am Post subject: Re: Mod Wanted - "go to page" text box |
|
How about same thing to the memberlist? Difficult to do?
piraja's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS) Linux / 2.0 / 5.0.67 / 5.2.6 / 9.2.1
|
|
| Back to top |
|
 |
Eestlane I18N / L10N Lead Dev


Offline Joined: Apr 06, 2005 Posts: 1404 Location: Estonia
|
Posted: Wed Jul 04, 2007 11:00 am Post subject: Re: Mod Wanted - "go to page" text box |
|
I guess it is.
I have done the alphabetical letters to choose from for memberlist, though I never finished it...
Eestlane's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS) Linux/2.0.63/5.0.67/5.2.8/9.2.1
|
|
| Back to top |
|
 |
piraja Nice poster


Offline Joined: Apr 28, 2006 Posts: 63 Location: Finland
|
Posted: Wed Jul 04, 2007 12:32 pm Post subject: Re: Mod Wanted - "go to page" text box |
|
| Eestlane wrote: |
I guess it is.
I have done the alphabetical letters to choose from for memberlist, though I never finished it... |
Would you share it?
piraja's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS) Linux / 2.0 / 5.0.67 / 5.2.6 / 9.2.1
|
|
| Back to top |
|
 |
Eestlane I18N / L10N Lead Dev


Offline Joined: Apr 06, 2005 Posts: 1404 Location: Estonia
|
Posted: Wed Jul 04, 2007 12:37 pm Post subject: Re: Mod Wanted - "go to page" text box |
|
It's so not ready, that atm I wouldn't give it. I want to finish it sometimes, but atm I'm making other module...
Eestlane's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS) Linux/2.0.63/5.0.67/5.2.8/9.2.1
|
|
| Back to top |
|
 |
piraja Nice poster


Offline Joined: Apr 28, 2006 Posts: 63 Location: Finland
|
Posted: Wed Jul 04, 2007 5:56 pm Post subject: Re: Mod Wanted - "go to page" text box |
|
Ok  No problem
piraja's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS) Linux / 2.0 / 5.0.67 / 5.2.6 / 9.2.1
|
|
| Back to top |
|
 |
Marcus81 Newbie


Offline Joined: Jun 01, 2005 Posts: 47 Location: Beograd
|
Posted: Sat Sep 01, 2007 8:52 pm Post subject: Re: Mod Wanted - "go to page" text box |
|
I do like you said.. And this form works.. but page number don't listed like 1,2,3,4,5,6,7,8,9,10 ..
They still listed 1,2,3 ... 8,9,10.
Marcus81's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS) Dragonfly 9.1.1 / Apache/ PHP 4.4.1
|
|
| Back to top |
|
 |
hqarrse Diamond Supporter


Offline Joined: Mar 20, 2005 Posts: 177
|
Posted: Thu Sep 27, 2007 11:49 am Post subject: Re: Mod Wanted - "go to page" text box |
|
Surely making page numbers like you've suggested would be crazy - once threads got beyond 20 pages or so you would have one hell of a list. The standard pagination is the only viable option surely?
_________________ Olive Net
British Army
Royal Navy
Military Clothing and Equipment - This Tribe
hqarrse's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS) Slackware 12 / CentOS, PHP 5.6, MySQL 5, Apache 2
|
|
| Back to top |
|
 |
piraja Nice poster


Offline Joined: Apr 28, 2006 Posts: 63 Location: Finland
|
Posted: Sun Feb 17, 2008 7:05 pm Post subject: Re: Mod Wanted - "go to page" text box |
|
| hqarrse wrote: |
And the topics:
viewtopic.php at about line 50:
change
| Code:: |
$start = ( isset($_GET['start']) ) ? intval($_GET['start']) : 0;
|
to
| Code:: |
$start = 0;
if (isset($_POST['startpage']))
{
$start = $board_config['posts_per_page']*(intval($_POST['startpage']) - 1);
}
elseif (isset($_GET['start']))
{
$start = intval($_GET['start']);
}
|
then in viewtopic_body.html
| Code:: |
<form action="{U_VIEW_TOPIC}" method="post" name="gotopageform">
<input name="startpage" type="text" size="3" maxlength="4" length="3"/>
<input type="submit" name="Submit" value="Go to Page" id="Submit" />
</form>
|
Neither of those has been run live yet so there's no guarantee there won't be side effects. Obviously I'll post any that I find once I start using it. |
How about this with newest DF?
piraja's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS) Linux / 2.0 / 5.0.67 / 5.2.6 / 9.2.1
|
|
| Back to top |
|
 |
Eestlane I18N / L10N Lead Dev


Offline Joined: Apr 06, 2005 Posts: 1404 Location: Estonia
|
Posted: Sun Feb 17, 2008 7:45 pm Post subject: Re: Mod Wanted - "go to page" text box |
|
Have you tested it, piraja?
Eestlane's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS) Linux/2.0.63/5.0.67/5.2.8/9.2.1
|
|
| Back to top |
|
 |
piraja Nice poster


Offline Joined: Apr 28, 2006 Posts: 63 Location: Finland
|
Posted: Sun Feb 17, 2008 8:07 pm Post subject: Re: Mod Wanted - "go to page" text box |
|
Jap.. dont find this:
| Quote:: |
| $start = ( isset($_GET['start']) ) ? intval($_GET['start']) : 0; |
The part of the viewforum was fine...
piraja's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS) Linux / 2.0 / 5.0.67 / 5.2.6 / 9.2.1
|
|
| Back to top |
|
 |
Eestlane I18N / L10N Lead Dev


Offline Joined: Apr 06, 2005 Posts: 1404 Location: Estonia
|
Posted: Sun Feb 17, 2008 8:11 pm Post subject: Re: Mod Wanted - "go to page" text box |
|
modules/Forums/viewtopic.php
Line 54:
| PHP: |
$start = ( isset($_GET['start']) ) ? intval($_GET['start']) : 0;
|
EDIT: BTW, she got it fixed. The problem was not in Dragonfly 9.2.1.
Eestlane's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS) Linux/2.0.63/5.0.67/5.2.8/9.2.1
|
|
| Back to top |
|
 |
Phoenix • Many Posts •


Offline Joined: Apr 19, 2004 Posts: 8799 Location: Netizen
|
Posted: Sun Feb 17, 2008 10:40 pm Post subject: Re: Mod Wanted - "go to page" text box |
|
Can also optimize that "to" code to 1 line, if you wish
| PHP: |
$start = isset($_POST['startpage']) ? $board_config['posts_per_page']*(intval($_POST['startpage']) - 1) : (isset($_GET['start']) ? intval($_GET['start']) : 0);
|
Phoenix's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
|
|
| Back to top |
|
 |
hqarrse Diamond Supporter


Offline Joined: Mar 20, 2005 Posts: 177
|
Posted: Thu Nov 05, 2009 7:50 pm Post subject: Re: Mod Wanted - "go to page" text box |
|
Whichever way you do it, there is a change needed to stop a MySQL error which comes from a LIMIT clause with a minus argument (LIMIT -20,20 in my case where 20 is the number of posts per page).
"startpage" needs to be tested for zero. If someone entered 0 in the go-to-page box they would cause the error, so replace:
isset($_POST['startpage'])
with
isset($_POST['startpage']) && $_POST['startpage'] > 0
_________________ Olive Net
British Army
Royal Navy
Military Clothing and Equipment - This Tribe
hqarrse's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS) Slackware 12 / CentOS, PHP 5.6, MySQL 5, Apache 2
|
|
| Back to top |
|
 |
|
|