ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

User comment URL's not showing

April 06, 2008 1:35pm

Subscribe [1]
  • #1 / Apr 06, 2008 1:35pm

    joshmarch

    14 posts

    Below is the code for my blog with commenting.  The problem is when someone enters their URL along with their name and comment, the URL is not active when the comment is posted.  Did I do something wrong here, or do I need to turn it on somewhere in admin?  Thanks!

    {exp:weblog:entries weblog="articles" limit="1" }
                <div id="leftcontent_b">{title}
    <hr >
                <div class="recent_date">{weblog_date format="%M %d, %Y"}</div>
    
                <div class="blog_content">{weblog_content}</div></div>
    
                {if logged_out}
                {exp:comment:entries sort="asc" limit="15"}
                <div class="comments">
                {if url != ""}<a href="http://{url}">{/if}{name}{if url != ""}</a>{/if} says:
                <div class="commenttext">{comment}</div></div>
                {/exp:comment:entries}
                {exp:comment:form weblog="articles" preview="web/preview"}
                <div id="usercomment">
    Post a comment:
                {/if}
                Name: (required)
    
                <input type="text" name="name" value="" size="40" />
                Email: (required, spam-protected)
    
                <input type="text" name="email" value="" size="40" />
                URL: (optional)
    
                <input type="text" name="url" value="" size="40" />
                
                <textarea name="comment" cols="70" rows="6">{comment}</textarea>
                <input type="checkbox" name="save_info" value="yes" {save_info} /> Remember my personal information
                <input type="checkbox" name="notify_me" value="yes" {notify_me} /> Notify me of follow-up comments?
                {if captcha}
                Please enter the word you see in the image below:
                {captcha}
    
                <input type="text" name="captcha" value="{captcha_word}" maxlength="20" />
                {/if}
                <input type="submit" name="submit" value="Submit" />
                <input type="submit" name="preview" value="Preview" />
                </div>
  • #2 / Apr 06, 2008 1:52pm

    Robin Sowell

    13255 posts

    Are you nesting the comment tags inside a weblog tag?  That’s what it looks like.  You don’t want to do that- will run into all sorts of variable conflicts.  Close the weblog tag- and then see if that helps.  Might also go with {url_as_author} instead of the conditional.

  • #3 / Apr 06, 2008 2:05pm

    joshmarch

    14 posts

    Perfect!  Thanks Robin!

  • #4 / Apr 07, 2008 11:52am

    Robin Sowell

    13255 posts

    Whee!  Glad it was an easy fix!

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases