Viewing 16 replies (of 16 total)
  • Thread Starter chelminski

    (@chelminski)

    Hi ??
    Maybe this can be simplified. E.g.

    1. Adding a new shortcode in the panel
      shortcode content: [su_user field=”display_name”]
      shortcode name: test1
    2. Instead of adding the entire shortcode content, use only the shortcode name from your plugin (in this case “test1”)

    The original shortcode if we want to search by the value “chelminski”:

    [sv slug=”sc-db-value-by-id” table=”proxy_ip” column=”ip” column-to-search=”name” key=”chelminski” key-format=”%s” message-not-found=”Could not find user”]

    And here we replace “key” with something else. E.g. “key-id” to search using another shortcode saved in the plugin under that name.

    [sv slug=”sc-db-value-by-id” table=”proxy_ip” column=”ip” column-to-search=”name” key-id=”test1” key-format=”%s” message-not-found=”Could not find user”]

    Then, do not search using the “test1” value, but search using what we have under the shortcode “test1”

    Then we move everything to plugin instead of WordPress. The plugin would have to perform actions sequentially.

    1. Query the value for shortcode test1. Let’s assume that the value would be “xxx”
    [su_user field=”display_name”]

    return value to the user –> “xxx”

    2. Substituting this into the second query and showing the results.

    [sv slug=”sc-db-value-by-id” table=”proxy_ip” column=”ip” column-to-search=”name” key-id=”test1” key-format=”%s” message-not-found=”Could not find user”]

    return value to the user –> “127.0.0.1”

    I don’t know if I’m helping or creating chaos ??

Viewing 16 replies (of 16 total)
  • The topic ‘Database’ is closed to new replies.