Contentteller

Contentteller Support Forums
Home Forums > Contentteller > Troubleshooting and Problems >

Trying to put ADDTHIS at top of articles

Discussion in 'Troubleshooting and Problems' started by mishima, Aug 3, 2011.

  1. mishima Customer

    Hey,

    I'm trying to add the ADDTHIS toolbar to the top of a news story or article but because ADDTHIS uses div tags CT doesn't like it.

    At the top we have the the title, author, date and time etc well we want to add a new section with ADDTHIS within it. Is there are a way to do this without the the source code going crazy because its a div within a div?

    Thanks
    mishima, Aug 3, 2011
    #1
  2. Philipp Administrator

    This should be no problem. Can you post the HTML code of the changed template?
    Philipp, Aug 4, 2011
    #2
  3. mishima Customer

    Sure its below. When posted this causes duplications of <h1> which is just the border and black bg for a section.



    <!-- Template: articles_pages -->
    {$insert['article_toc']}
    <h1>{$insert['article_title']} {$insert['article_edit']} {$insert['article_rating_line']}</h1>
    <div class="authorfont"><b>Editor</b>: {$insert['article_author']} (<i>{$insert['article_extra3']}</i>) &nbsp;<b>Date</b>: {$insert['article_date']} &nbsp; <a href="contentteller{$insert['param_ext']}{$insert['param_ct']}articles{$insert['param_action']}pagesprinter{$insert['param_page']}{$insert['article_seo']},{$insert['articlepage_page']}.html" rel="nofollow"></a><a href="contentteller{$insert['param_ext']}{$insert['param_ct']}articles{$insert['param_action']}summary{$insert['param_page']}{$insert['article_seo']}.html">{$insert['article_comments']} Comment(s)</a> - <a href="{$forum_link}">Join the discussion here</a></div>
    <h1>
    <!-- AddThis Button BEGIN -->
    <div class="addthis_toolbox addthis_default_style ">
    <a class="addthis_button_google_plusone"></a>
    <a class="addthis_button_facebook"></a>
    <a class="addthis_button_twitter"></a>
    <a class="addthis_button_email"></a>
    <a class="addthis_counter addthis_pill_style"></a>
    </div>
    <script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js#pubid=xa-4e3952d27c2d5160"></script>
    <!-- AddThis Button END --></h1>
    mishima, Aug 4, 2011
    #3
  4. Philipp Administrator

    The following two possibilities should work

    1)

    Code:
    <!-- Template: articles_pages -->
    {$insert['article_toc']}
    <h1>{$insert['article_title']} {$insert['article_edit']}  {$insert['article_rating_line']}</h1>
    <div class="authorfont"><b>Editor</b>: {$insert['article_author']} (<i>{$insert['article_extra3']}</i>) &nbsp;<b>Date</b>: {$insert['article_date']} &nbsp;  <a href="contentteller{$insert['param_ext']}{$insert['param_ct']}articles{$insert['param_action']}pagesprinter{$insert['param_page']}{$insert['article_seo']},{$insert['articlepage_page']}.html" rel="nofollow"></a><a href="contentteller{$insert['param_ext']}{$insert['param_ct']}articles{$insert['param_action']}summary{$insert['param_page']}{$insert['article_seo']}.html">{$insert['article_comments']} Comment(s)</a> - <a href="{$forum_link}">Join the discussion here</a>
    <br /><br />
    <!-- AddThis Button BEGIN -->
    <div class="addthis_toolbox addthis_default_style ">
    <a class="addthis_button_google_plusone"></a>
    <a class="addthis_button_facebook"></a>
        <a class="addthis_button_twitter"></a>
        <a class="addthis_button_email"></a>
    <a class="addthis_counter addthis_pill_style"></a>
    </div>
    <script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js#pubid=xa-4e3952d27c2d5160[/URL]"></script>
    <!-- AddThis Button END -->
    </div>
    2)

    Code:
    <!-- Template: articles_pages -->
    {$insert['article_toc']}
    <h1>{$insert['article_title']} {$insert['article_edit']} {$insert['article_rating_line']}</h1>
    <div class="authorfont"><b>Editor</b>: {$insert['article_author']} (<i>{$insert['article_extra3']}</i>) &nbsp;<b>Date</b>: {$insert['article_date']} &nbsp; <a href="contentteller{$insert['param_ext']}{$insert['param_ct']}articles{$insert['param_action']}pagesprinter{$insert['param_page']}{$insert['article_seo']},{$insert['articlepage_page']}.html" rel="nofollow"></a><a href="contentteller{$insert['param_ext']}{$insert['param_ct']}articles{$insert['param_action']}summary{$insert['param_page']}{$insert['article_seo']}.html">{$insert['article_comments']} Comment(s)</a> - <a href="{$forum_link}">Join the discussion here</a></div>
    <div class="content">
    <!-- AddThis Button BEGIN -->
    <div class="addthis_toolbox addthis_default_style ">
    <a class="addthis_button_google_plusone"></a>
    <a class="addthis_button_facebook"></a>
    <a class="addthis_button_twitter"></a>
    <a class="addthis_button_email"></a>
    <a class="addthis_counter addthis_pill_style"></a>
    </div>
    <script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js#pubid=xa-4e3952d27c2d5160[/URL]"></script>
    <!-- AddThis Button END --></div>
    Philipp, Aug 4, 2011
    #4
  5. mishima Customer

    Thanks Philipp the 2nd one worked a treat :)

    I've been looking at getting the Facebook "like" button onto each article and news story but you are only able to create code for a specified URL : http://developers.facebook.com/docs/reference/plugins/like/#

    Any idea how it can be implemented?
    mishima, Aug 7, 2011
    #5
  6. Philipp Administrator

    This was already part of Contentteller 2.1.3. You find this option under news/articles settings under "Other"

    Show Facebook Recommended button? => Yes

    You may need to add {$insert['newsstory_facebook']} to your news_story_extended and {$insert['article_facebook']} to your articles_summary templates.
    Philipp, Aug 9, 2011
    #6
  7. mishima Customer

    Does it have to go on these pages? I have tried to add it in 'articles_pages' with the above social buttons but it will not diplay!
    mishima, Aug 15, 2011
    #7
  8. Philipp Administrator

    No, only on the article summary page.
    Philipp, Aug 16, 2011
    #8
Show Ignored Content

Share This Page

Tweet
Forgot your password?
Contentteller Support Forums
Home Forums > Contentteller > Troubleshooting and Problems >
  • Home
  • Forums

    Forums

    Quick Links
    • Search Forums
    • What's New?
  • Members

    Members

    Quick Links
    • Registered Members
    • Current Visitors
    • Recent Activity
  • Help

    Help

    Quick Links
    • Smilies
    • BB Codes
    • Trophies

Separate names with a comma.

Useful Searches

  • Recent Threads
More...
    Forum software by XenForo™ ©2010-2012 XenForo Ltd.