MyBB Community Forums

Full Version: theme does not expand after adding new things to index page
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I put some codes for social like/share button in the index template before the {$forums}, but theme does not fluid after adding them and bottom part of the web site broken. So what should I do for this error?
Im using the cure theme.
is it a single like type button to share your site link ?
if it is simple html code then put it in the header template
(2011-06-17, 11:32 AM)ranjani Wrote: [ -> ]is it a single like type button to share your site link ?
if it is simple html code then put it in the header template
no i want appear only in the home page.
Here is the code i want to use without the particular error.
<div id="fb-root"></div><script src="http://connect.facebook.net/en_US/all.js#appId=106047096151600&amp;xfbml=1"></script><fb:like href="http://www.facebook.com/t20SLPL" send="false" layout="button_count" width="120" show_faces="false" font=""></fb:like><a href="http://twitter.com/share" class="twitter-share-button" data-url="http://www.slplfever.uni.cc" data-count="horizontal">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script>
<script type="text/javascript">
(function() {
var s = document.createElement('SCRIPT'), s1 = document.getElementsByTagName('SCRIPT')[0];
s.type = 'text/javascript';
s.async = true;
s.src = 'http://widgets.digg.com/buttons.js';
s1.parentNode.insertBefore(s, s1);
})();
</script>
<!-- Compact Button -->
<a class="DiggThisButton DiggCompact"></a><br /> <br />
</ div>
put the code at the bottom of headerinclude template (ungrouped template set) AND test it..
it should appear on all the pages without any problem. wait for an expert to suggest changes
for showing it only on the home page..
Hmm. I just tried it on a test forum of mine, and it works fine with ""the cure" theme.

Just noticed, its showing in bottom of your Forum. Can you mention where exactly you placed the code?

Also, FireFox flags your site as "attack page".
attack page? :O
What that case?
Me too using firefox. But no such warning for my own site when I browsing as a guest.
I want add those buttons above the 'General' category in my web site without affecting the theme.
(2011-06-17, 05:17 PM)dumindu89 Wrote: [ -> ]attack page? :O
What that case?
Me too using firefox. But no such warning for my own site when I browsing as a guest.
I want add those buttons above the 'General' category in my web site without affecting the theme.

It adopts the reputation of uni.cc domain whose subdomain you are using.

http://www.avgthreatlabs.com/sitereports...c%2F&check=

And to get the buttons before general category, plate the code in index templates above {$forums}
basically java scripts & any css links should be added in the headerinclude
template AND the remaining button parts can be used anywhere ...

javascript part :
<script src="http://connect.facebook.net/en_US/all.js#appId=106047096151600&amp;xfbml=1"></script>
<script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script>
<script type="text/javascript">
(function() {
var s = document.createElement('SCRIPT'), s1 = document.getElementsByTagName('SCRIPT')[0];
s.type = 'text/javascript';
s.async = true;
s.src = 'http://widgets.digg.com/buttons.js';
s1.parentNode.insertBefore(s, s1);
})();
</script>

AND remaining buttons part :
<div id="fb-root"></div><fb:like href="http://www.facebook.com/t20SLPL" send="false" layout="button_count" width="120" show_faces="false" font=""></fb:like><a href="http://twitter.com/share" class="twitter-share-button" data-url="http://www.slplfever.uni.cc" data-count="horizontal">Tweet</a>
<!-- Compact Button -->
<a class="DiggThisButton DiggCompact"></a><br /> <br />
</div>

not sure the reason for having two div closing tags ?!
(2011-06-17, 05:29 PM)ranjani Wrote: [ -> ]not sure the reason for having two div closing tags ?!

I have been wondering about that too. But when i placed the code in index templates, it worked fine, as index template don't have any <div> tag before {$forums}
oops.. I don't know about html.
Pls correct the wrong tags in my code and give me the pure code. Smile
Tnx ranjani. Your I did the modification according to your 3rd post and it works. Smile