Ask Your Question
1

footer links to social networking sites and link to tags

asked 2011-07-28 17:43:49 -0500

mether gravatar image

updated 2011-07-28 18:43:54 -0500

Evgeny gravatar image

In stackexchange, every question has a footer

"Know someone who can answer? Share a link to this question via email, twitter, facebook, or linkedin"

Of course, since askbot has support for more including Google Plus now, encouraging users to share questions and answers is important for anyone using askbot. Typically successful sites have large majority of traffic (70 to 80%) that come from search engines and one of the sure shot way of increasing popularity is encouraging people to link to your site. So in addition to the facebook, twitter sharing links on the site of the questions, this is helpful

If you are just browsing a site. this footer is instead

"Not the answer you're looking for? Browse other questions tagged foo or ask your own question."

This is useful in encouraging a tag based search which often yields better answers

edit retag flag offensive close merge delete

Comments

note that it is incorrect to say that 'every question has a footer'... on stackexchange, only those questions _without answers_ have this footer, hence the "else" tag in the example below.
NoahY gravatar imageNoahY ( 2011-07-28 22:16:02 -0500 )edit
yes. you are right
mether gravatar imagemether ( 2011-07-30 16:53:15 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2011-07-28 22:10:12 -0500

NoahY gravatar image

updated 2011-07-28 22:18:24 -0500

Not sure if it's kosher to just copy the code verbatim, but this seems to work:

    {% if answers %}

    ...

    {% else %}
        <h2 class="share-question">{% trans url=settings.APP_URL+question.get_absolute_url()|iriencode, name=settings.APP_SHORT_NAME|iriencode %}Know someone who can answer?  Share a <a href="{{ url }}">link</a> to this question via 
            <a href="mailto:?subject={{ name }}&amp;body={{ url }}">email</a>, 
            <a href="http://twitter.com/share?url={{ url }}">Twitter</a>, 
            <a href="http://www.facebook.com/sharer.php?u={{ url }}">Facebook</a>, or
            <a href="http://www.linkedin.com/shareArticle?mini=true&amp;url={{ url }}&amp;source={{ name }}">Linkedin</a>.{% endtrans %}
        </h2>
    {% endif %}
edit flag offensive delete link more

Comments

note: google+ doesn't seem to have such a link available: http://stackoverflow.com/questions/6676658/share-link-on-google
NoahY gravatar imageNoahY ( 2011-07-28 22:19:17 -0500 )edit
@Evgeny, can you merge this functionality?
mether gravatar imagemether ( 2011-07-30 16:51:33 -0500 )edit
Done, many thanks to Noah.
Evgeny gravatar imageEvgeny ( 2011-07-30 21:41:48 -0500 )edit
confirmed that all these works except for email. Posted as a separate bug
mether gravatar imagemether ( 2011-07-31 08:55:18 -0500 )edit
when using "iriencode" I got a template error "no filter named iriencode". Changing it to urlencode sovles the problem.
DominiCattus gravatar imageDominiCattus ( 2011-08-03 06:12:56 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2011-07-28 17:43:49 -0500

Seen: 193 times

Last updated: Jul 28 '11