Results 1 to 3 of 3

How to add a usergroup conditional into my plugin

This is a discussion on How to add a usergroup conditional into my plugin within the Template Modifications forums, part of the vBulletin SEO Discussion category; Hi guys, Probably a simple one for some of you seasoned guys... Well at least i'm hoping so! I've created ...

  1. #1
    Junior Member
    Real Name
    Gordon Rankin
    Join Date
    Jun 2011
    Posts
    6
    Liked
    0 times

    How to add a usergroup conditional into my plugin

    Hi guys,

    Probably a simple one for some of you seasoned guys... Well at least i'm hoping so!

    I've created a plugin that redirects users who try to post a new thread in a certain forum to a form which I have created with the Easy forms mod.

    This works fine... However I want the plugin to only redirect who are in a certain usergroup AND in trying to post a new thread in certain forum.

    How do i add this second conditional?


    Here is my plugin code:-


    Quote:
    if (in_array($forumid, array(13)))
    {
    header( 'Location: http://www.my-site.com/forum/misc.php?do=form&fid=1' ) ;
    }



    Thanks!
    Last edited by Andrés Durán Hewitt; 06-21-2011 at 03:29 PM. Reason: Link removed

  2. #2
    vBSEO Staff Andrés Durán Hewitt's Avatar
    Real Name
    Andrés Durán
    Join Date
    Jul 2009
    Location
    Costa Rica
    Posts
    3,393
    Liked
    411 times
    Blog Entries
    1
    Hello,

    As explained here, these are things we do not support: how-load-my-wordpress-header-footer-dynamically-into-vb4-50190

    Also please keep in mind:

    Hello,

    Support is offered for verified vBSEO customers only. If you hold a valid license, please open a ticket with your transaction ID from your payment receipt along with your forum URL so we can assign it to your account:
    vBSEO.com Helpdesk.

    If you are working on behalf of someone else as a contractor, they need to add you to their Priority Support list:
    Customer Profile.
    Andrés Durán / Crawlability Inc.
    ˇvBSEO 3.6.0 GOLD Liberado!
    Inaugurando el NUEVO vBSEO Sitemap Generator 3.0. - ˇAHORA disponible para Clientes de vBSEO!

    Síguenos en: Facebook | Síguenos en: Twitter


  3. #3
    Junior Member
    Real Name
    Gordon Rankin
    Join Date
    Jun 2011
    Posts
    6
    Liked
    0 times
    I've actually managed to solve it on my own after spending around 4 hours trying all sorts of syntax and conditionals.

    Just in case anyone else ever needs the help, the code to do this is:

    if ($forumid == 13 && is_member_of($vbulletin->userinfo, 10))

    {
    header( 'Location: spam' ) ;
    }

Similar Threads

  1. Help with Conditional in plugin
    By Brutal_Dreamer in forum Template Modifications
    Replies: 2
    Last Post: 01-18-2011, 06:59 PM
  2. Integrate Conditional Sigs into vBSEO plugin
    By webwizzy in forum vBSEO Features Archive
    Replies: 11
    Last Post: 01-28-2009, 08:55 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •