Customizing SMF > Modifications and Packages
Share This Topic
Suki:
It's added via $context['html_headers'] and Jquery. Once the DOM is ready jquery finds the class navigate_section and appends the share button to it.
If you want to change the button, it is located on Sources/ShareThis.php
--- Code: ---<script type="text/javascript">
jQuery(document).ready(function($)
{
jQuery(function()
{
jQuery(\'.navigate_section\').append(\'<span class="sharethis_addthis_script"><a class="addthis_button" href="http://www.addthis.com/bookmark.php?v=250&pubid=xa-4f0f51eb17eb2a19"><img src="http://s7.addthis.com/static/btn/v2/lg-share-en.gif" width="125" height="16" style="border:0"/></a></span>\');
});
});
</script>
--- End code ---
The code looks for an specific class or ID and append the button to it, if you want to change the position then you will have to find another unique ID or class within your page. I chose .navigate_section because it is present on every page and because it is easily reachable.
Texan78:
Thank you, that is a big help. So would it be possible to make a new class for it all together rather then just assigning it to different one. I am actually just trying to tweak the location of it to line it up with some other icons. Does it have independent style settings or does it inherit the navigate_section style?
If I create a new class for it how would I call it on a page?
Thanks
Suki:
If you want to change the location then you will have to manually put the code on your template file, as it is right not it doesn't provide any alternatives.
Just take the code from the span tag until the span tag closes, as you can see, the span tag has it's own class, that class can be changed in the same file a few lines below
belgium-gravure:
Traduc in french?
dank'u
Suki:
Currently there aren't any translations besides Spanish and English, my level of French isn't enough to translate the mod.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version