Support has been upgraded!
The Support Forum is closed. Not to worry! Providing the top quality support you expect and we're known for will continue! We're not ending support, just changing where you submit requests. This will provide you with the best experience possible.
Premium Support
Have you purchased an addon for Connections such as one of our premium templates or extensions with a valid license and you need help?
Please open a Support Ticket in your user account.
Free Support
Are you using the free Connections plugin? Don't worry, you are still very important to us! We are still providing you with the same high quality support that we're known for.
Please open a new support topic in the WordPress support forums for Connections.
- This topic has 9 replies, 2 voices, and was last updated 9 years, 5 months ago by
Steven Zahm.
-
AuthorPosts
-
12/17/2013 at 10:10 am #275532
Paul Chitson
ParticipantHi,
I’ve just implemented this on a live system and one of our users decided to enter a blank search….queue 4500 records being returned and the server slowing right down. Apart from slapping the user for being stoopid is there a way I can either prevent a blank search or add a maximum number of items returned? I am sure I’ve read this somewhere on the site but ironically I’m not having much luck with the search.
Thanks!
12/17/2013 at 12:24 pm #275536Steven Zahm
Keymaster@ Paul
If no terms are supplied, no search is perform and the results should be limited to the templates pagination value … unless you’re using a template that has no pagination. Can you share a link to your directory page.
12/18/2013 at 5:40 am #275579Paul Chitson
ParticipantThanks for getting back to me Steven
I am using the default CARD template but I have modified it to remove the categories and last updated information. The page the search results print to is just a standard WP page with [connections] tag, there are no additional parameters in the tag. As you can see (attached document) I don’t have any pagination, is this a feature of the premium templates?
I’ve also included a screenshot of the Search settings, according to the text at the bottom of the screen the search shouldn’t work if there is less than 3 characters it won’t return a result.
Really appreciate you efforts on this.
Attachments:
You must be logged in to view attached files.12/18/2013 at 5:41 am #275581Paul Chitson
ParticipantHere is the template code
<?php /** * Template HTML Output. * * @package Connections * @subpackage Template HTML Output * @copyright Copyright (c) 2013, Steven A. Zahm * @license http://opensource.org/licenses/gpl-2.0.php GNU Public License * @since unknown */ // Exit if accessed directly if ( ! defined( 'ABSPATH' ) ) exit; ?> <div class="cn-entry" style="-moz-border-radius:4px; background-color:#FFFFFF; border:1px solid #E3E3E3; color: #000000; margin:8px 0px; padding:6px; position: relative;"> <div style="width:49%; float:left"> <?php $entry->getImage(); ?> <div style="clear:both;"></div> <div style="margin-bottom: 10px;"> <span style="font-size:larger;font-variant: small-caps"><strong><?php echo $entry->getNameBlock(); ?></strong></span> <?php $entry->getTitleBlock(); ?> <?php $entry->getOrgUnitBlock(); ?> <?php $entry->getContactNameBlock(); ?> <?php $entry->getNotesBlock(); ?> </div> <?php $entry->getAddressBlock(); ?> </div> <div align="right"> <?php $entry->getFamilyMemberBlock(); ?> <?php $entry->getPhoneNumberBlock(); ?> <?php $entry->getEmailAddressBlock(); ?> <?php $entry->getImBlock(); ?> <?php $entry->getSocialMediaBlock(); ?> <?php $entry->getLinkBlock(); ?> <?php $entry->getDateBlock(); ?> </div> <div style="clear:both"></div> <div class="cn-meta" align="left" style="margin-top: 6px"> </span> <span><?php $entry->vcard(); ?></span> </div> </div>
-
This reply was modified 9 years, 5 months ago by
Paul Chitson.
12/18/2013 at 11:03 am #275595Steven Zahm
Keymaster@ Paul
Right, searches of strings 3 character or less will not return a result. However, when submitting nothing thru search, no search is being performed, at all. The default output is to list the entire directory unless the template supports pagination in which case the output would be paginated. If you were to visit the page with the [connections] shortcode, you would see the same end result as the user who did an empty search. Since you have 4500+ entries, you should really have a template that support paginated results. Depending on your exact usage requirements, you could perhaps use the undocumented
limit
shortcode option like so:[connections limit=100]
. Since you’re only searching for names, that very well could be a viable option.Hope that helps.
12/18/2013 at 11:20 am #275597Paul Chitson
ParticipantSteven
Thanks for that, yes that does “fix” the issue which is great. I guess there is no demand but if you did a nice simple template like “Card” as a premium one then I would be very interested.
12/18/2013 at 2:02 pm #275611Steven Zahm
Keymaster@ Paul
I’ve thought about it. You could use cMap, edit the CSS removing the background gradient and it is very, very close. Maybe I should sit down and do that this weekend … the time wouldn’t be then change but all the time it takes to put up all the requisite pages on the site…
12/19/2013 at 5:24 am #275652Paul Chitson
ParticipantSteven
No rush but if you do then drop me a line. In the meantime the “limit” is doing the job and stopping the DB from hanging up.
12/20/2013 at 11:07 am #275781Steven Zahm
Keymaster@ Paul
I’ve been kicking the idea around in my head for awhile now of simply adding an option to cMap that would allow turning off the gradient and changing it’s color.
Would that work?
12/29/2013 at 12:17 pm #276136Steven Zahm
Keymaster@ Paul
I just released an update to cMap that includes many little fixes and a couple new features. The background gradient and background color can be turned off and the color changed. Here are some examples:
Change the background color from grey to a light blue with gradient.
[connections background_color="#CAE1FF"]
Keep the light blue background color without the gradient.
[connections background_color="#CAE1FF" background_gradient=FALSE]
Keep the default grey background without the gradient.
[connections background_gradient=FALSE]
Remove the background color and gradient.
[connections background_color="transparent" background_gradient=FALSE]
I’ll be updating both Tile and Tile Plus with the same options later this week.
-
This reply was modified 9 years, 5 months ago by
Steven Zahm.
-
This reply was modified 9 years, 5 months ago by
-
AuthorPosts
You cannot reply to this support topic. Please open your own support topic.