By: Veloxi (offline)  Feb 03 09 @ 11:13  (Read 2114 times)  

Hey guys, got a couple of questions for ya:

1. I wanna add code from AddThis (a social bookmarking thingy) to the site so that it shows up on each of our entries, kind of like where the digg, print and email buttons are now. Here's the code:

PHP Formatted Code
<!-- AddThis Button BEGIN -->
<script type="text/javascript">var addthis_pub="veloxi";</script>
<a href="http://www.addthis.com/bookmark.php?v=20" onmouseover="return addthis_open(this, '', '[URL]', '[TITLE]')" onmouseout="addthis_close()" onclick="return addthis_sendto()"><img src="http://s7.addthis.com/static/btn/lg-share-en.gif" width="125" height="16" alt="Bookmark and Share" style="border:0"/></a><script type="text/javascript" src="http://s7.addthis.com/js/200/addthis_widget.js"></script>
<!-- AddThis Button END -->



Where would I add this in the template to make it visible on each entry?

2. Is there a way to make a certain block of text invisible unless its highlighted? We plan on doing this to post spoilers so only those who wish to see them can highlight them. The simplest thing I can think of is to make the text a certain color, but I'm not sure if that'll always work.

Thanks!

   
Forum Active Member
Active Member

Veloxi



Group Comfort
Level:
: +1
Registered:: 11/20/08
Posts: 137
Location: Los Angeles, CA
By: Veloxi (offline)  Feb 03 09 @ 12:59   

3. Forgot to add this earlier. As part of the "Addthis" thing mentioned above, I also want to add the following code to the stories them in the "Story Options" section below "Printable Story Format"

PHP Formatted Code
<!-- AddThis Button BEGIN --><script type="text/javascript">var addthis_pub="veloxi"; var addthis_options = 'facebook, myspace, twitter, delicious, favorites, digg, reddit, friendfeed, google, live, stumbleupon,  more';</script><a href="http://www.addthis.com/bookmark.php"
        style="text-decoration:none;"
        onmouseover="return addthis_open(this, '', '[URL]', '[TITLE]');"
        onmouseout="addthis_close();"
        onclick="return addthis_sendto();">Bookmark or Share</a><script type="text/javascript" src="http://s7.addthis.com/js/200/addthis_widget.js"></script><!-- AddThis Button END -->



Where would I add this into the code of the site's template?

Thanks!

   
Forum Active Member
Active Member

Veloxi



Group Comfort
Level:
: +1
Registered:: 11/20/08
Posts: 137
Location: Los Angeles, CA
By: lgarner (offline)  Feb 03 09 @ 1:47   

Check in storytext.thtml and featuredstorytext.thtml. You can add your AddThis code right after the

PHP Formatted Code
<!-- end Digg.com icon code -->



I'd then also disable Digg in the site config since it seems to be part of AddThis.

   
Forum Admin
Admin

lgarner



Group Comfort
Level:
: +53
Registered:: 06/10/08
Posts: 2124
By: Veloxi (offline)  Feb 03 09 @ 2:02   

Yay, that worked, sadly, the Addthis code didn't, as it only linked to the base site, not the article itself. Ah well, I can add it elsewhere. Thanks!

   
Forum Active Member
Active Member

Veloxi



Group Comfort
Level:
: +1
Registered:: 11/20/08
Posts: 137
Location: Los Angeles, CA
By: lgarner (offline)  Feb 03 09 @ 6:03   

You could try substituting {article_url} in place of [URL] in the AddThis link. In storytext.thtml you should see

digg_url = '{article_url}'; //permalink to article

which looks like it would work for AddThis also. I don't know about the TITLE value.

   
Forum Admin
Admin

lgarner



Group Comfort
Level:
: +53
Registered:: 06/10/08
Posts: 2124
By: Veloxi (offline)  Feb 03 09 @ 6:17   

Quote by: lgarner

You could try substituting {article_url} in place of [URL] in the AddThis link. In storytext.thtml you should see

digg_url = '{article_url}'; //permalink to article

which looks like it would work for AddThis also. I don't know about the TITLE value.


AWESOME! That did the trick! Thank you!

However, question, this isn't showing up in the featured article. How can I add it there?

   
Forum Active Member
Active Member

Veloxi



Group Comfort
Level:
: +1
Registered:: 11/20/08
Posts: 137
Location: Los Angeles, CA
By: lgarner (offline)  Feb 03 09 @ 9:20   

Do the same thing in featuredstorytext.thtml.

   
Forum Admin
Admin

lgarner



Group Comfort
Level:
: +53
Registered:: 06/10/08
Posts: 2124
By: Veloxi (offline)  Feb 03 09 @ 9:31   

That did the trick. Thank you!

   
Forum Active Member
Active Member

Veloxi



Group Comfort
Level:
: +1
Registered:: 11/20/08
Posts: 137
Location: Los Angeles, CA
By: Veloxi (offline)  Feb 13 09 @ 3:59   

Hey guys, anyone have any idea on this?

2. Is there a way to make a certain block of text invisible unless its highlighted? We plan on doing this to post spoilers so only those who wish to see them can highlight them. The simplest thing I can think of is to make the text a certain color, but I'm not sure if that'll always work.



Thanks!

   
Forum Active Member
Active Member

Veloxi



Group Comfort
Level:
: +1
Registered:: 11/20/08
Posts: 137
Location: Los Angeles, CA
By: Geiss (offline)  Feb 13 09 @ 4:15   

A quick Googling for "create spoiler text" reveals quite a few tips, of which http://www.yog-sothoth.com/modules.php?name=Forums&amp;file=viewtopic&amp;t=4817 has some good ideas for use in a forum, and http://tips.blogdoctor.me/2007/11/create-spoilers-in-blog-posts.html has a nifty javascript solution.

Remember, Google is your friend! Big Grin

Thx!

Eric

   
Forum Active Member
Active Member

Geiss



Group Comfort
Level:
: +58
Registered:: 02/15/07
Posts: 2097
Location: Boise, Idaho
By: Veloxi (offline)  Feb 13 09 @ 5:50   

Heh, I figured the simplest way was just to make it white like that one example, didn't know if there was a special way to "glFusion it." Wink Thanks!

   
Forum Active Member
Active Member

Veloxi



Group Comfort
Level:
: +1
Registered:: 11/20/08
Posts: 137
Location: Los Angeles, CA
11 posts :: Page 1 of 1