Home Private Messages Search
CPG Dragonfly™ CMS stopsoftwarepatents.eu petition banner
Toggle Content
 
Forums ⇒ DragonflyCMS ⇒ CPG-BB (forum) ⇒ Mod Wanted - "go to page" text box


Mod Wanted - "go to page" text box
Please post bugs in the Projects Module.
Post anything and everything else about CPG-BB in this forum.
Formerly known as phpBB but no longer compatible.

Go to page Previous  1, 2
Post new topic    Reply to topic    Printer Friendly Page     Forum Index ⇒  Add-Ons & BlocksCPG-BB (forum)

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

Offline Offline
Joined: Apr 06, 2005
Posts: 1404
Location: Estonia
PostPosted: 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
View user's profile Send e-mail Visit poster's website
piraja
Nice poster
Nice poster

Offline Offline
Joined: Apr 28, 2006
Posts: 63
Location: Finland
PostPosted: 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
View user's profile Visit poster's website
Eestlane
I18N / L10N Lead Dev
I18N / L10N Lead Dev

Offline Offline
Joined: Apr 06, 2005
Posts: 1404
Location: Estonia
PostPosted: 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
View user's profile Send e-mail Visit poster's website
piraja
Nice poster
Nice poster

Offline Offline
Joined: Apr 28, 2006
Posts: 63
Location: Finland
PostPosted: 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
View user's profile Visit poster's website
Eestlane
I18N / L10N Lead Dev
I18N / L10N Lead Dev

Offline Offline
Joined: Apr 06, 2005
Posts: 1404
Location: Estonia
PostPosted: 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
View user's profile Send e-mail Visit poster's website
piraja
Nice poster
Nice poster

Offline Offline
Joined: Apr 28, 2006
Posts: 63
Location: Finland
PostPosted: Wed Jul 04, 2007 5:56 pm
Post subject: Re: Mod Wanted - "go to page" text box

Ok Smile 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
View user's profile Visit poster's website
Marcus81
Newbie
Newbie

Offline Offline
Joined: Jun 01, 2005
Posts: 47
Location: Beograd
PostPosted: 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
View user's profile Visit poster's website
hqarrse
Diamond Supporter
Diamond Supporter

Offline Offline
Joined: Mar 20, 2005
Posts: 177

PostPosted: 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
View user's profile Send e-mail Visit poster's website
piraja
Nice poster
Nice poster

Offline Offline
Joined: Apr 28, 2006
Posts: 63
Location: Finland
PostPosted: 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? Confused


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
View user's profile Visit poster's website
Eestlane
I18N / L10N Lead Dev
I18N / L10N Lead Dev

Offline Offline
Joined: Apr 06, 2005
Posts: 1404
Location: Estonia
PostPosted: 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
View user's profile Send e-mail Visit poster's website
piraja
Nice poster
Nice poster

Offline Offline
Joined: Apr 28, 2006
Posts: 63
Location: Finland
PostPosted: 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
View user's profile Visit poster's website
Eestlane
I18N / L10N Lead Dev
I18N / L10N Lead Dev

Offline Offline
Joined: Apr 06, 2005
Posts: 1404
Location: Estonia
PostPosted: 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
View user's profile Send e-mail Visit poster's website
Phoenix
• Many Posts •
• Many Posts •

Offline Offline
Joined: Apr 19, 2004
Posts: 8799
Location: Netizen
PostPosted: 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
View user's profile Visit poster's website Photo Gallery
hqarrse
Diamond Supporter
Diamond Supporter

Offline Offline
Joined: Mar 20, 2005
Posts: 177

PostPosted: 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
View user's profile Send e-mail Visit poster's website
Display posts from previous:   
Post new topic    Reply to topic    Printer Friendly Page    Forum Index ⇒  Add-Ons & BlocksCPG-BB (forum)
Page 2 of 2
All times are GMT
Go to page Previous  1, 2



Jump to:  


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum


 
   Toggle Content User Info

Welcome Anonymous

Nickname
Password
(Register)

   Toggle Content Last CVS commits
· Fixed .ico Expires header.
· Removed domain name from cookies so subdomains wont access them anymore.
· CSS and JS, case insensitives.
· CSS and JS, send correct HTTP 1.1 headers and fixed issues where themes and...
· Further security class improvements.
· 301 redirects on LEO changes
· Option to force 3xx http status codes
· Validate googlebot.com and google.com crawlers.
· CCBot
· Rss with etag and atom.

read more...

   Toggle Content Community

Support for DragonflyCMS in a other languages:

Deutsch
Español

   Toggle Content X-links
UltraEdit Browse Happy logo Firefox MySQL PostgreSQL Valid CSS! Valid XHTML 1.0! Unicode Encoded Badge NukeBiz Resources Raven DragonflyCMS Dedicated Now InsideSupport Lampe Berger

You are seeing squares or questionmarks on this page?

All content of this website is copyrighted by the Creative Commons NC-SA
The logos and trademarks used on this site are the property of their respective owners
We are not responsible for comments posted by our users, as they are the property of the poster.
Our server runs on a P3 1.2GHz with 512MB RAM with no accelerators
Support GoPHP5.org
Interactive software released under GNU GPL, Code Credits, Privacy Policy