Skip to:
Content
Pages
Categories
Search
Top
Bottom

Php print ip without ( )'s need advice

  • @perineo

    Participant

    Can somebody please tell me why this

    bbp_author_ip( bbp_get_reply_id() );

    prints me the correct ip but with ( ) before and after like this -> (02.02.02.02) instead of just 02.02.02.02

    thanks in advance

Viewing 10 replies - 1 through 10 (of 10 total)
  • @johnjamesjacoby

    Keymaster

    `bbp_author_ip` accepts an array of arguments that allow you to change the before and after.

    Use it like:

    `bbp_author_ip( array(
    ‘post_id’ => bbp_get_reply_id(),
    ‘before’ => ”,
    ‘after’ => ”
    ) );`

    @perineo

    Participant

    wow John this works like a charm, thank you mate. Now it prints out the ip as I wantend, but I fronted a new problem, I cant execute shortcode’s outside the post of the reply where I tested and it works. In the contenct of the post it works, but otside not (under avatar) 🙁 Any suggestions ?

    thank you in advance!

    @johnjamesjacoby

    Keymaster

    bbPress disables shortcode execution within it’s output, so that non-privileged users can’t gain access to all of the shortcodes available within WordPress. The problem is that shortcodes don’t come packaged with role/capability restrictions on their usage, allowing anyone that can create topics or replies to use any available shortcode. This is risky, so we globally disallow them.

    @perineo

    Participant

    yes but with third plugins i can re-open this right? i have to pay for this? Thank you in advance
    not even with do_shortcode? globals, im very newbie in php understand my syntax mistakes 🙂

    @johnjamesjacoby

    Keymaster

    i have to pay for this?

    Hopefully not. A quick Google search found this plugin, though I’m not sure how well it works.

    @perineo

    Participant

    Actually the members of my forum are short and fully trustee, can i disable this in anyway? thank you maybe some users may find this interesnting

    @johnjamesjacoby

    Keymaster

    There is no easy on/off switch to enable/disable this, unfortunately. It would take a bit of code to make it work (a custom plugin, etc…)

    @perineo

    Participant

    i have to contact with a programer and solve this, do you know anyone trustable? thanks mate again for being so persistent, thanks john

    @perineo

    Participant

    it works ! prints the ip of the reply user inside of its shortcode, and it works inside the posts (with plugins enable BBCODE GD BB TOOLS and stuff…) but, can I use do_shortcode for making the shortcode work other than in the reply content?

    something like this?

    http://pastecan.com/v/poO9jLb

    this dosnt work, but how could i use it? thanks in advance

    @perineo

    Participant

    dylan helped me with this one, it works 100% it shows a flag using ip of the replier under the avatar (dance)

    http://pastecan.com/v/4oO9jLb

    you will need third plugins like quick-flag to work with this code, good luck

Viewing 10 replies - 1 through 10 (of 10 total)
  • You must be logged in to reply to this topic.
Skip to toolbar