“AddThis” under first post

Support for PhpBB3. Post here to get help with any phpBB3 related issue here
There is no support here! Only Read Access!
Forum rules
In order the get any support, you will have to do following:
1. Use a describing title!
2. Describe your problem and what happened when the problem occured
3. Tell us what version of phpBB3 you are currently using.
Else your topic may be ignored or locked!
User avatar
Makis
BBCoder III
BBCoder III
Posts: 91
Joined: 10 Mar 2010, 18:01
BBCodes: 67
Favourite MOD: Welcome On Index
Location: Athens Greece

“AddThis” under first post

Post by Makis »

Would anyone (stoker :-D ) please tell me how to add (“AddThis” sharing tool) under first posts in specific forum?

Thanks in advance
Last edited by Makis on 22 Jun 2010, 15:55, edited 1 time in total.
cisco007
BBCoder VI
BBCoder VI
Posts: 1015
Joined: 16 Mar 2010, 18:14
Location: Don't really know!

Re: “AddThis” under first post

Post by cisco007 »

well i guess you would first have to get the ID of all the forums in which you would like it to show, and in viewtopic_body.html add your addthis code in between this

Code: Select all

<!-- IF FORUM_ID eq x or FORUM_ID eq x and postrow.S_FIRST_ROW --> addthis code here<!-- ENDIF -->
 
and add it all before <!-- END POSTROW -->

replace the x with the ID number of the forum number you wish for it to show!
I think that will work, i have tried it before, but not lately!

[edit]small edit to the code![/edit]
User avatar
Makis
BBCoder III
BBCoder III
Posts: 91
Joined: 10 Mar 2010, 18:01
BBCodes: 67
Favourite MOD: Welcome On Index
Location: Athens Greece

Re: “AddThis” under first post

Post by Makis »

Thanks a lot cisco007 but I get this

Code: Select all

Parse error: syntax error, unexpected T_LNUMBER in /home/ourdogs/public_html/ad/includes/template.php(175) : eval()'d code on line 168
cisco007
BBCoder VI
BBCoder VI
Posts: 1015
Joined: 16 Mar 2010, 18:14
Location: Don't really know!

Re: “AddThis” under first post

Post by cisco007 »

can you post the code and edits you used!? and to what file(s)?
User avatar
Makis
BBCoder III
BBCoder III
Posts: 91
Joined: 10 Mar 2010, 18:01
BBCodes: 67
Favourite MOD: Welcome On Index
Location: Athens Greece

Re: “AddThis” under first post

Post by Makis »

In viewtopic_body.html and before <!-- END POSTROW -->

Code: Select all

<!-- IF postrow.S_FIRST_ROW -->
<!-- IF FORUM_ID 31 --> '<div class="addthis_toolbox addthis_default_style">
'<a href="http://www.addthis.com/bookmark.php?v=250&username=ourdogs" class="addthis_button_compact">Share</a>
'<span class="addthis_separator">|</span>
'<a class="addthis_button_facebook"></a>
'<a class="addthis_button_live"></a>
'<a class="addthis_button_myspace"></a>
'<a class="addthis_button_google"></a>
'<a class="addthis_button_twitter"></a>
'<a class="addthis_button_delicious"></a>
'<a class="addthis_button_digg"></a>
'
'</div>
'<script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js#username=ourdogs"></script><!-- ENDIF -->
<!-- ENDIF --> 
Edit: I just show your edit, let me try again…
cisco007
BBCoder VI
BBCoder VI
Posts: 1015
Joined: 16 Mar 2010, 18:14
Location: Don't really know!

Re: “AddThis” under first post

Post by cisco007 »

you did not add the code like i posted in my previous post you are supposed to use
<!-- IF FORUM_ID eq 31 -->
you forgot the eq you must have added the code before you saw my edited post!
and my I ask why all the ' in the code?
User avatar
Makis
BBCoder III
BBCoder III
Posts: 91
Joined: 10 Mar 2010, 18:01
BBCodes: 67
Favourite MOD: Welcome On Index
Location: Athens Greece

Re: “AddThis” under first post

Post by Makis »

and my I ask why all the ' in the code?
I don’t know for these probably became from copy past, anyway it works now but not only under the first but under all posts in every topic.
And if I’m not asking too much cisco007 I imagine this align center

The code as it is now

Code: Select all

<!-- IF FORUM_ID eq 30 or FORUM_ID eq 31 and postrow.S_FIRST_ROW --> <!-- AddThis Button BEGIN -->
<div class="addthis_toolbox addthis_default_style">
<a href="http://www.addthis.com/bookmark.php?v=250&username=xa-4c20ddf6669ece0a" class="addthis_button_compact">Share</a>
<span class="addthis_separator">|</span>
<a class="addthis_button_facebook"></a>
<a class="addthis_button_myspace"></a>
<a class="addthis_button_google"></a>
<a class="addthis_button_twitter"></a>
</div>
<script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js#username=xa-4c20ddf6669ece0a"></script>
<!-- AddThis Button END --><!-- ENDIF -->
User avatar
Makis
BBCoder III
BBCoder III
Posts: 91
Joined: 10 Mar 2010, 18:01
BBCodes: 67
Favourite MOD: Welcome On Index
Location: Athens Greece

Re: “AddThis” under first post

Post by Makis »

------- SOLVED --------

Just tell me if you please how to align it to center? ;)

PS:
Can I save the html in utf-8
Last edited by Makis on 22 Jun 2010, 19:27, edited 1 time in total.
cisco007
BBCoder VI
BBCoder VI
Posts: 1015
Joined: 16 Mar 2010, 18:14
Location: Don't really know!

Re: “AddThis” under first post

Post by cisco007 »

glad you got it working because it was working for me! I cannot get it to center either!

don't really know why you want to save it as utf-8, don't know since i just use notepad++ and save it as is and have no problems!
User avatar
Makis
BBCoder III
BBCoder III
Posts: 91
Joined: 10 Mar 2010, 18:01
BBCodes: 67
Favourite MOD: Welcome On Index
Location: Athens Greece

Re: “AddThis” under first post

Post by Makis »

I know who knows about that center thing I hope he will see,
anyway thank you very much for your help!! :thumb:
Locked