News:

Wondering if this will always be free?  See why free is better.

Main Menu

Ad Management mod

Started by SMFHacks.com Team, January 30, 2006, 08:41:19 PM

Previous topic - Next topic

MYBESTHOMESnet

#2300
Hi all,

I already have the code (from my good friend JohnyB) of inserting the ads upper-right portion inside the post:

// Show the post itself, finally!
echo '
</td>
</tr></table>
<hr width="100%" size="1" class="hrcolor" />
<table width="100%" border="0">
<tr>
<td width="80%"  align="left" valign="top" style="overflow: auto;>
<div class="post"', $message['can_modify'] ? ' id="msg_' . $message['id'] . '"' : '', '>', $message['body'], '</div>', $message['can_modify'] ? '
<img src="' . $settings['images_url'] . '/icons/modify_inline.gif" alt="" align="right" id="modify_button_' . $message['id'] . '" style="cursor: pointer; display: none;" onclick="modify_msg(\'' . $message['id'] . '\', \'' . $context['session_id'] . '\')" />' : '' , '
</td>';
if ($message['id'] == $context['first_message'])
{
echo '
<td width="20%"  align="right" valign="top">
<script type="text/javascript"><!--
google_ad_client = "pub-7627496990366315";
/* 250x250, created 2/24/08 */
google_ad_slot = "4979714420";
google_ad_width = 250;
google_ad_height = 250;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</td>';
}
echo '
</tr>
</table>
</td>
</tr>';


but the problem is i can't post the area below the ads. Instead, it will stretch  downward the message area. As shown below:



Please help me on this problem.

thanks

mobiplanet

i wanna show admob php adsense code, but with this ad management mod , i am unable to do it. Can any one help?

sfreak

Quote from: Bigguy on March 13, 2008, 01:09:24 AM
Have you done the database edits yet as suggested above by Jerm. ???



no dude......

only i ran that in phpmyadmin ....

please tell me how to put those codes in smf database....


robbieruckus

Quote from: Assistance on March 10, 2008, 03:29:21 AM
enabled them per group permissions

ive tried that.. i have them enable in member groups and in the ad management..

still nothing?

www.nintendope.com is the site  if anyone can help it would be appreciated.

take note the ad on the top i put in myself.

Bigguy

Did you do all the manual edits to the template files of your custom theme. ???

robbieruckus

Quote from: Bigguy on March 13, 2008, 09:46:27 PM
Did you do all the manual edits to the template files of your custom theme. ???

they dont show up when i put i change it to the default theme either.  point me towards what changes i have to make..


Bigguy

All the edits are written out here. Or you can run it through a package parser. I don't have a link handy to one right now. All that has to be done is the template files. All other edits are already done when you install it. if you can't find a certain template file in your custom theme you don't need to worry about doing it either as it was done during install as well. Only do the template files that are listed in your custom theme.

sfreak

@bigguy...

whats the problem with me mate....

why r u not replying to my question,,,,,,

please tell me friend.


Bigguy


sfreak

i am extremely sorry friend......


i didnt see my message..

ok if  it puts code in my datbase... then i think answer to u r last question is yes..




then why i am getting that error...

and whats the solution...

Bigguy

You will have to go back through all your edits and see if you missed anything. Check the index.php file.

mobiplanet

Can anyone solve my problem ? I desperately wanna add admob php adsense code on the top of my forum..Pls help..Thanks

sfreak

Quote from: Bigguy on March 13, 2008, 10:18:34 PM
You will have to go back through all your edits and see if you missed anything. Check the index.php file.

i checked all edits friend.

they are well......

then whats the solution..

symon

Posted this on their forum but it seems dead :(

Hi all,

Great mod. I've manually installed this on Babylon and it works great. However, as I have a fixed width forum I'm trying to get the towers outside my containing div but inside my main containing div.

I have an extra container around my forum so I can get the side towers in it but keep the fixed width I have. I still need to tweak the css but in index.template I'm doing this:

I've put this code under the beginning of that div:

//Side ads mod
if (function_exists"show_towerleftAds") && function_exists("show_towerrightAds"))
{
//Tower left Ads
$ads = show_towerleftAds();
if(!empty($ads))
echo '<table><tr><td valign="top">', $ads['type']==0 ? $ads['content'] : eval($ads['content']) ,'</td><td width="100%" valign="top">';
unset($ads);

//Tower Right Ads
$ads = show_towerrightAds();
if(!empty($ads))
echo '<table><tr><td width="100%" valign="top">';
unset($ads);
}


And put this at the end:

//Close table for towerright ads
if (function_exists("show_towerrightAds") && function_exists("show_towerleftAds"))
{
$ads = show_towerrightAds();
if(!empty($ads))
echo '</td><td valign="top">', $ads['type']==0 ? $ads['content'] : eval($ads['content']) ,'</td></tr></table>';
unset($ads);

//Close table for towerleft ads
$ads = show_towerleftAds();
if(!empty($ads))
echo '</td></tr></table>';
unset($ads);
}


And the code that's left over I've left in it's original place:

if (function_exists("show_bottomAds"))

//Show ads on the bottom of the page
$ads = show_bottomAds();
if(!empty($ads))
if($ads['type']==0)
echo $ads['content'];
else
eval($ads['content']);
unset($ads);


But I get a parse error which is syntax related. What have I missed in my ignorance? :)

Many thanks for your time :)

Bigguy

@ symon: Can you post the file. I will try to take a look at it.

@ kcscm: What are you file permissions set at.


Bigguy

And there's no errors AT ALL in the forums error logs.

sfreak

in forum eror logs i have two errors..

8: Undefined index: phpInfo_title
File: /mounted-storage/home34a/sub001/sc27813-WZXZ/studentsspot.com/Sources/Subs.php
Line: 2812

Undefined index: CATEGORY
File: /mounted-storage/home34a/sub001/sc27813-WZXZ/studentsspot.com/Sources/LoadAds.php
Line: 42

Bigguy

Is LoadAds.php in your Sources Directory. ???

Advertisement: