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 mether flag of India
1272 29 17 45
http://fedoraproject.org/

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

Evgeny gravatar image Evgeny flag of Chile
11074 50 84 182
http://askbot.org/

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

delete close flag offensive retag edit

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 ( 2011-07-28 22:16:02 -0500 )edit
yes. you are right mether ( 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 NoahY
313 4 2 14
https://github.com/NoahY/...

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 %}
link publish delete flag offensive edit

Comments

note: google+ doesn't seem to have such a link available: http://stackoverflow.com/questions/6676658/share-link-on-googleNoahY ( 2011-07-28 22:19:17 -0500 )edit
@Evgeny, can you merge this functionality? mether ( 2011-07-30 16:51:33 -0500 )edit
Done, many thanks to Noah. Evgeny ( 2011-07-30 21:41:48 -0500 )edit
confirmed that all these works except for email. Posted as a separate bug mether ( 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 ( 2011-08-03 06:12:56 -0500 )edit

Your answer

Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Reliable Askbot Hosting

Create your Q&A site at askbot.com. Managed Askbot hosting at just $15/mo. Dedicated hosting, support contracts, consulting services.

create your Q&A site
30 days free trial

Question tools

Follow
1 follower

subscribe to rss feed

Stats

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

Seen: 88 times

Last updated: Jul 28 '11