Giter Site home page Giter Site logo

helgatheviking / simple-user-listing Goto Github PK

View Code? Open in Web Editor NEW
20.0 4.0 8.0 2.37 MB

A shortcode for displaying lists of users in a simple, easy-to-customize (uses template parts) fashion

JavaScript 40.81% PHP 57.74% SCSS 1.45%
wordpress shortcode users directory hacktoberfest

simple-user-listing's Issues

Adjusting the number of users displayed per page

I have custom template to display all the users on my WordPress site. I'm using the following function in my template to display all the Authors.

<?php echo do_shortcode("[userlist]"); ?>

This works perfectly, but I would like to display all the Authors without navigating to a second page. I currently have my Reading Settings set to 10 post per page and I have 17 users. I have copied the content-author.php , navigation-author.php and search-author.php to my theme. What is the best way to override the wp_pagenavi to display all my users?

Search from paged page should reset to first page

Ex: if you are on /directory/page/2 and you run a search, you should be sent back to /directory. The easiest way to do this is to make the form action equal to the permalink. This is what is used to be, but it was removed (I think to support custom $_GET params and maybe use as a widget). How to achieve this without changing the action?

Would want to redirect to page 1 when form is submitted, but not in cases where search results may legit span multiple pages.

Form $_POST ? pre_get_posts?

Sadly, this did not work:

function search_filter( $query ) {
  if ( isset( $_POST['as'] ) ) {
        $query->set( 'paged', 0 );
  }
}
add_action( 'pre_get_posts', 'search_filter' );

Remove the Search Input code no longer works

Not sure when this occurred; but the functions.php code (listed in the FAQ tab) for removing the Search Input no longer works.

I use the Code Snippets plugin for all functions.php changes.

Could you please update this code?

Thank you very much!

Switch to _n for translation

In content-author.php,

<?php printf( __( '%s posts', 'simple-user-listing'), count_user_posts( $user->ID ) ); ?>

fix so it doesn't read "1 posts."

Decoded arrows

In content-author.php, the description says "The Template for displaying No Results."

I imported the Templates directory to my theme, and when I ran Theme Check it said that there were was a problem with arrows in navigation-author.php. Somehow they got de-encoded and show up as โ† instead of โ†

About user search function

Hi Kathy,

I'm writing this regarding to the forum topic http://wordpress.org/support/topic/about-search-function?replies=2#post-5026619 .

Since, you couldn't regenerate the issue, I re-installed a fresh copy of the WP 3.8 and your plugin. Finally, I found the reason behind of this issue. This issue is generated with the s2member plugin. Since, I'm testing with a localhost project;I hosted a sample application in a free hosting account for your reference. It will be automatically expired after next 2 weeks.

http://simplelisting.cuccfree.org/
Username: admin
Password:simple123

You can generate this issue as this way,

  1. Go to http://simplelisting.cuccfree.org/authors/ and do a search as typing the word "ja" in the search area.
  2. You can see 2 searched results as .
    Antawn Jamison and Jason Chaffetz

But it is wrong. Because Antawn Jamison is not an author, he is a subscriber http://simplelisting.cuccfree.org/subscribers/ .

This is happening only with the search function; not with the page loading time.

When you deactivate the s2member plugin; search function is working without any issue.

But I need to use s2member plugin and your plugin both. If you can do something for this, it will be a great help to me.

Thanks,
Chathuranga.

Block Design Discussion

Current Design: https://www.figma.com/file/H5U237OsRZ5XPY4LBxSiO6/SUL-block?node-id=0%3A1

I've definitely seen some blocks that use the pattern you've got going on in the design, where almost all of the work happens in the main editor screen in a sort of "edit" mode. However, given the type of parameters the User Query has, I think there's a strong argument here to put all the major settings in the Inspector and have the editor simply be the Live Preview of the shortcode.

I also think that there should probably be a separate block for multisite and single installation to start with, just to lower the complexity of the blocks and what they are trying to achieve.

Does the Figma file represent the initial settings you'd like the block to have @helgatheviking?

I'm interpreting these settings as follows:

  • Display all users (default behaviour)
  • Ability to custom select users
  • Ability to exclude users by role

FQDN in Picture-Path

Images from local source are linked als

< img src="http:/fqd.name/wp-content/plugins/user-avatar/user-avatar-pic.php?src=http://fqd.name/wp-content/uploads/avatars/3/picture.jpg&amp;w=90&amp;id=3&amp;random=1406624605" alt="" class="avatar avatar-90 photo user-3-avatar" width="90" height="90" >

using the http-request within the ?src-Parameter fails when using security tools like iThemes Security which allows to rewrite such requests for security-reasons (Cross-Site-Scripting-Attack).

Better would be to use relative paths like

< img src="http:/fqd.name/wp-content/plugins/user-avatar/user-avatar-pic.php?src=/wp-content/uploads/avatars/3/picture.jpg&w=90&id=3&random=1406624605" alt="" class="avatar avatar-90 photo user-3-avatar" width="90" height="90" >

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.