Support Forum

Weird Problem all text in Forums are Centered

JM Jonathan Yovani Muñoz
Jonathan Yovani Muñoz
Member

So All the Text on my forums are centered from the last 2 updates for the forum what can be the problem? this is my forum www.somosguatemala.com/foros

9 Answers

New Answer

MP Mr Papa
Mr Papa
Member

that would be your wp theme…  look at the page template you are using for the forum page… it is performing two <center> tags on all the content on the page…  before you ever get to our stuff which starts with #spMainContainer

div class=”entry”>
    <p></p>
    <center>
        <script type=”text/javascript”>
        <br>
        <script src=”http://pagead2.googlesyndication.com/pagead/show_ads.js” type=”text/javascript”>
        <center>
            <p></p>
            <div id=”dialogcontainer” style=”display:none;”></div>
            <noscript><div class=”sfregmessage”>This forum requires Javascript to be enabled for posting content</div></noscript>
            <a id=”spForumTop” name=”spForumTop”></a>
            <div id=”spMainContainer”>

JM Jonathan Yovani Muñoz
Jonathan Yovani Muñoz
Member

lol thanx so much silly mistake on my part i forgot to close the centering of an ad another question how do i put ads between posts like say after the first post?

MP Mr Papa
Mr Papa
Member

put the code for the ads in your sp theme where you want them…

JM Jonathan Yovani Muñoz
Jonathan Yovani Muñoz
Member

ok but i tried and i couldn’t the do it i get an error. In what file .php do i put it in? and where do i put it so it gets put only after the first post? this is the ad code

<script type="text/javascript"><!--
google_ad_client = "";
/* Top and Bottom Banner Foros */
google_ad_slot = "1684183738";
google_ad_width = 728;
google_ad_height = 90;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
MP Mr Papa
Mr Papa
Member

you cannot put html in a php code segment…  try outputting it instead… like:

echo '
<script type="text/javascript"><!--
google_ad_client = "";
/* Top and Bottom Banner Foros */
google_ad_slot = "1684183738";
google_ad_width = 728;
google_ad_height = 90;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
';
JM Jonathan Yovani Muñoz
Jonathan Yovani Muñoz
Member

Awsome thanx it worked! one last request. How do i put the ad in the post just for the first post or say for just the last post in my spTopicView.php. Here is how it looks http://www.somosguatemala.com/foros/futbol-nacional/torneo-clausura-2012/#spForumTop

 

Here is where i put it in   

                       

                        sp_ColumnEnd();
                        
                        
                        sp_InsertBreak();
                        
                        echo '<center><input type="hidden" name="IL_RELATED_TAGS" value="1"/></center>';    

                    sp_SectionEnd('', 'post');
                    
                    echo '
    <center>
    <script type="text/javascript"><!--
google_ad_client = "ca-pub-3196178578194752";
/* Top and Bottom Banner Foros */
google_ad_slot = "1684183738";
google_ad_width = 728;
google_ad_height = 90;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</center>
';     
YS Yellow Swordfish
Yellow Swordfish
Member

You can check for the last post on a page by testing:

if ( $spThisPost->last_post_on_page == true ) ...

You can check for the first post on a page by testing:

if ( $spThisPost->post_index == 1 ) ...

however that last one will only work for the first post of the whole topic so would not work for page 2 of a topic etc.

if you would like me to add a new data item ‘first_post_on_page’ then I could do thjat as it may prove useful but you would have to wait for the next update to get that. Actually – i will add that anyway.

JM Jonathan Yovani Muñoz
Jonathan Yovani Muñoz
Member

awsome thanx i will be waiting for that!

YS Yellow Swordfish
Yellow Swordfish
Member

Will be in 5.0.1 which wont be a long wait…