Calendar moderator var

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • rlamego
    Member
    • Nov 2004
    • 37
    • 3.0.3

    Calendar moderator var

    Hi!
    Is there a calendar moderator variable? Something I can use in a if conditional to hide/display a custom field?

    Here's the thing: I created a custom field to classify calendar events as "recommended" but I want only the admins or calendar moderators to see and edit that custom field.

    I went through all templates and found nothing else beside the $show['caneditevent'], $show['candeleteevent'] and $show['canmoveevent'] which are not useful in this case.

    Something along the lines of:
    if user is admin or calendar moderator
    - show custom field
    end if
    would be fine but I'm open to other alternatives except asking for help in vb.org =)

    Thanks =)
    Ricardo
  • Jake Bunce
    Senior Member
    • Dec 2000
    • 46598
    • 3.6.x

    #2
    I was experimenting with this. I was trying this code in the calendar_showeventsbit template, but the template doesn't save with this condition:

    Code:
    <if condition="can_moderate_calendar($eventinfo[calendarid], '', $bbuserinfo[userid])">
    test
    </if>
    I think it might work if the template would save. I am not sure why it isn't saving... no errors, nothing. See if it works for you.

    Comment

    • rlamego
      Member
      • Nov 2004
      • 37
      • 3.0.3

      #3
      No. When I click Save, I'm taken to admincp/template.php with the dark blue background and the light blue Style Manager bar on top and nothing else. No success or error message. Just that.

      Comment

      • Jake Bunce
        Senior Member
        • Dec 2000
        • 46598
        • 3.6.x

        #4
        Originally posted by rlamego
        No. When I click Save, I'm taken to admincp/template.php with the dark blue background and the light blue Style Manager bar on top and nothing else. No success or error message. Just that.
        I had the same problem. I guess it doesn't work.

        Comment

        • rlamego
          Member
          • Nov 2004
          • 37
          • 3.0.3

          #5
          Now what?

          Comment

          • Jake Bunce
            Senior Member
            • Dec 2000
            • 46598
            • 3.6.x

            #6
            I would have recommended posting on www.vbulletin.org, but you said you don't want to do that, so I tried to help you the best I could.

            Comment

            • rlamego
              Member
              • Nov 2004
              • 37
              • 3.0.3

              #7
              Ok, fair enough =)

              If this can't be solved using only a conditional, then maybe a few lines of code on calendar.pho might do the trick.
              I know you don't sanction code changes but this is one of those situations where vB is lacking a simple feature supported by the rest of the software.
              If I can set someone as a calendar moderator, I should be able to check it to hide/display content, much like what is already done with mods/admins conditionals across the forum pages.

              As I'm sure you'll agree, this is not vb.org material and as I'm sure you'll understand, I'm not going to waste my time on vb.org asking for help to people that don't have any kind of obligation towards me.

              I thank you for your kind help but if you feel you can't solve my problem, please be so kind and get me someone who can.

              Thanks again =)
              Ricardo

              Comment

              • Jake Bunce
                Senior Member
                • Dec 2000
                • 46598
                • 3.6.x

                #8
                I will ask the others.

                Comment

                • Mike Sullivan
                  Former vBulletin Developer
                  • Apr 2000
                  • 13327
                  • 3.6.x

                  #9

                  That fixes the problem of not being able to save the template.

                  Comment

                  widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
                  Working...