Support for PhpBB3.
Post here to get help with any phpBB3 related issue
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.
If not your topic may be ignored or locked!
Post
by Makis » 22 Jun 2010, 13:54
Would anyone (stoker
) 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, 13:55, edited 1 time in total.
Post
by cisco007 » 22 Jun 2010, 15:12
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]
Post
by Makis » 22 Jun 2010, 16:09
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
Post
by cisco007 » 22 Jun 2010, 16:22
can you post the code and edits you used!? and to what file(s)?
Post
by Makis » 22 Jun 2010, 16:30
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…
Post
by cisco007 » 22 Jun 2010, 16:38
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?
Post
by Makis » 22 Jun 2010, 17:06
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 -->
Post
by Makis » 22 Jun 2010, 17:23
-------
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, 17:27, edited 1 time in total.
Post
by cisco007 » 22 Jun 2010, 17:31
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!
Post
by Makis » 22 Jun 2010, 18:19
I know who knows about that center thing I hope he will see,
anyway thank you very much for your help!!