11-08-2017
FYI: Have made it so search results (new topics page, posts in last 24 hours page, etc.) and who is online (whoisonline) page auto refreshes every (configurable) 30 seconds in the mobile prototype.
I use this feature often on my iPhone+ as I watch the news or do other tasks to keep an eye on the forums.
Yesterday I tried some Javascript "swiper code" so we can do pagination on mobile with right and left screen swipes, but for some odd reason the code worked fine on text pages before I wrapped the forum pages inside. Worked on this feature for a few hours and decided to take a break and will try again another day soon.
May take a break and get some badly needed exercise, LOL.
8 More Discussions You Might Find Interesting
1. What is on Your Mind?
Do we have a mobile app for unix.com? (1 Reply)
Discussion started by: ahamed101
1 Replies
2. Shell Programming and Scripting
Is it possible to add Pager Notification to mailx command??
Or by any other mean.
just want to specify that by Pager i mean a message to the mobile number.
Suppose i have following condition
If ];then
send a message to 9999999999
else
no message to be sent
fi
Is it possible?
I... (5 Replies)
Discussion started by: Sharma331
5 Replies
3. What is on Your Mind?
Hello,
I have noticed some problems with Google complaining our site is not "https://search.google.com/www.usearch-console/mobile-friendly" using only Tapatalk.
So, after a lot of work, I have re-enabled our legacy mobile style and make some improvements and Google has declared us "mobile... (2 Replies)
Discussion started by: Neo
2 Replies
4. What is on Your Mind?
I'm working on updates to the mobile phone view, and it's going to look much better I think. Here are some current prototypes:
Prototype Mobile Home Page:
https://www.unix.com/members/1-albums214-picture690.jpg
Prototype Mobile Search Page:
... (43 Replies)
Discussion started by: Neo
43 Replies
5. What is on Your Mind?
From Prototyping New Responsive Mobile for UNIX.COM - Phase II, we move to Phase III.
Basically, the core prototype for every day browsing the forums, replying, posting and editing on mobile is nearly finished with the exception of a few formatting issues with regard to rare system messages or... (4 Replies)
Discussion started by: Neo
4 Replies
6. What is on Your Mind?
Having given up for the time being with a very difficult game engine project to virtualizing cyberspace, am working on the forums again.
Just updated a few icons on the mobile site. Explanations in the picture captions:
https://www.unix.com/members/1-albums214-picture855.jpeg
... (1 Reply)
Discussion started by: Neo
1 Replies
7. What is on Your Mind?
If you have not visited the site on mobile lately, you are missing out on a great looking mobile web site.
If you don't have a mobile, you can always navigate to the sliding member panel and click on "Mobile View"....
It's really looking killer'......
I'm starting to think that soon the... (6 Replies)
Discussion started by: Neo
6 Replies
8. What is on Your Mind?
Just created (actually, only modified... it was created by ShoutOut) a new responsive 404 "not found" page with the help of ShoutOut free templates.
https://www.unix.com/status/404.html
Same for 401 and 403 errors.
Picture sans animation:
... (2 Replies)
Discussion started by: Neo
2 Replies
LEARN ABOUT PHP
ldap_control_paged_result
LDAP_CONTROL_PAGED_RESULT(3) 1 LDAP_CONTROL_PAGED_RESULT(3)
ldap_control_paged_result - Send LDAP pagination control
SYNOPSIS
bool ldap_control_paged_result (resource $link, int $pagesize, [bool $iscritical = false], [string $cookie = ""])
DESCRIPTION
Enable LDAP pagination by sending the pagination control (page size, cookie...).
PARAMETERS
o $link
- An LDAP link identifier, returned by ldap_connect(3).
o $pagesize
- The number of entries by page.
o $iscritical
- Indicates whether the pagination is critical of not. If true and if the server doesn't support pagination, the search will
return no result.
o $cookie
- An opaque structure sent by the server (ldap_control_paged_result_response(3)).
RETURN VALUES
Returns TRUE on success or FALSE on failure.
EXAMPLES
The example below show the retrieval of the first page of a search paginated with one entry by page.
Example #1
LDAP pagination
<?php
// $ds is a valid link identifier (see ldap_connect)
ldap_set_option($ds, LDAP_OPT_PROTOCOL_VERSION, 3);
$dn = 'ou=example,dc=org';
$filter = '(|(sn=Doe*)(givenname=John*))';
$justthese = array('ou', 'sn', 'givenname', 'mail');
// enable pagination with a page size of 1.
ldap_control_paged_result($ds, 1);
$sr = ldap_search($ds, $dn, $filter, $justthese);
$info = ldap_get_entries($ds, $sr);
echo $info['count'] . ' entries returned' . PHP_EOL;
The example below show the retrieval of all the result paginated with 100 entries by page.
Example #2
LDAP pagination
<?php
// $ds is a valid link identifier (see ldap_connect)
ldap_set_option($ds, LDAP_OPT_PROTOCOL_VERSION, 3);
$dn = 'ou=example,dc=org';
$filter = '(|(sn=Doe*)(givenname=John*))';
$justthese = array('ou', 'sn', 'givenname', 'mail');
// enable pagination with a page size of 100.
$pageSize = 100;
$cookie = '';
do {
ldap_control_paged_result($ds, $pageSize, true, $cookie);
$result = ldap_search($ds, $dn, $filter, $justthese);
$entries = ldap_get_entries($ds, $result);
foreach ($entries as $e) {
echo $e['dn'] . PHP_EOL;
}
ldap_control_paged_result_response($ds, $result, $cookie);
} while($cookie !== null && $cookie != '');
NOTES
Note
Pagination control is a LDAPv3 protocol feature.
SEE ALSO
ldap_control_paged_result_response(3), RFC2696 : LDAP Control Extension for Simple Paged Results Manipulation.
PHP Documentation Group LDAP_CONTROL_PAGED_RESULT(3)