Support Forum

Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
general-topic
Weird Problem all text in Forums are Centered
Avatar
Jonathan Yovani Muñoz
Member
Free Members
sp_UserOfflineSmall Offline
Feb 25, 2012 - 12:07 am

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 http://www.somosguatemala.com/foros

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Feb 25, 2012 - 8:41 am

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">

Avatar
Jonathan Yovani Muñoz
Member
Free Members
sp_UserOfflineSmall Offline
Feb 25, 2012 - 10:31 am

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?

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Feb 25, 2012 - 10:34 am

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

Avatar
Jonathan Yovani Muñoz
Member
Free Members
sp_UserOfflineSmall Offline
Feb 25, 2012 - 2:02 pm

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>
Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Feb 25, 2012 - 2:20 pm

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>
';
Avatar
Jonathan Yovani Muñoz
Member
Free Members
sp_UserOfflineSmall Offline
Feb 26, 2012 - 10:38 pm

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/.....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>
';     
Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Feb 27, 2012 - 4:44 am

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.

andy-signature.png
YELLOW
SWORDFISH
Avatar
Jonathan Yovani Muñoz
Member
Free Members
sp_UserOfflineSmall Offline
Feb 27, 2012 - 10:13 am

awsome thanx i will be waiting for that!

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Feb 27, 2012 - 12:54 pm

Will be in 5.0.1 which wont be a long wait...

andy-signature.png
YELLOW
SWORDFISH
Forum Timezone: Europe/Stockholm
Most Users Ever Online: 1170
Currently Online:
Guest(s) 1
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Mr Papa: 19448
Ike: 2086
Brandon: 864
kvr28: 804
jim: 650
FidoSysop: 577
Conrad_Farlow: 531
fiddlerman: 358
Stefano Prete: 325
Member Stats:
Guest Posters: 620
Members: 17365
Moderators: 0
Admins: 4
Forum Stats:
Groups: 7
Forums: 17
Topics: 10128
Posts: 79626