• Resolved gotequity

    (@gotequity)


    Hi Kento,

    Your plugin is exactly what I’ve been searching for to contol access to HTML category descriptions on a private client portal. Everything works as described, so no complaints about the functionality.

    The only issue I’ve noticed is that extra line breaks are inserted where I’ve placed the shortcode, thus leaving empty gaps between divs. This is occurring across all browers when nesting shortcodes to restrict access to specific fields to a sub group of users.

    Here’s an example of the code I’m using – note the restriction of all content to registered users, and further restriction of the Gravity Form to a sub-group of users:

    [groups_member group="Registered"]
    <p>Example text viewable by "Registered" group members</p>
    [/groups_member]
    [groups_member group="Formview"]
    <strong>Private Form</strong>
    <br />
    <img src="http://www.website.com/images/image.jpg">
    <br />
    [gravityform id="1" name="Gravity Form" title="false" description="false" ajax="true"]
    [/groups_member]
    [groups_member group="Registered"]
    <p>Example text viewable by "Registered" group members</p>
    [/groups_member]

    In this example, the two
    tags are still being computed even though they are wrapped by a nested shorcode. If I remove the nested “Formview” shortcode and just restrict the content to “Registered” users, the line breaks still display.

    Any thoughts?

    http://wordpress.org/extend/plugins/groups/

Viewing 1 replies (of 1 total)
  • Plugin Author itthinx

    (@itthinx)

    This rather looks like the wpautop filter’s fiendish plot to me 😉

    If you try this …

    [groups_member group="Registered"]
    <p>Example text viewable by "Registered" group members</p>
    [/groups_member]
    [groups_member group="Formview"]
    <div style="background-color:#f00">
    <strong>Private Form</strong>
    <br />
    <img src="http://www.website.com/images/image.jpg">
    <br />
    [gravityform id="1" name="Gravity Form" title="false" description="false" ajax="true"]
    </div>
    [/groups_member]
    [groups_member group="Registered"]
    <p>Example text viewable by "Registered" group members</p>
    [/groups_member]

    … you will see that the red area renders with additional breaks added for those that belong to the ‘Formview’ group.

    For those who don’t, no red area is displayed. You should be able to eliminate the extra breaks be writing some things on one line, in any case, Groups doesn’t produce these. Another option is to disable the filter altogether, but then you don’t have it working when you want it to. Tricky sometimes, but I’ve usually come around it by adjusting the page and editing in HTML mode.

Viewing 1 replies (of 1 total)
  • The topic ‘HTML Line Breaks and Groups’ is closed to new replies.