SMF Ads Support Forum
May 23, 2013, 12:01:24 pm *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Help keep this project going by donating.
 
   Home   Help Downloads Login Register  
Pages: 1 ... 4 5 [6] 7  All   Go Down
  Print  
Author Topic: Edits for ad_mod_1-1-1_v2-3  (Read 57110 times)
0 Members and 1 Guest are viewing this topic.
Knibal
Newbie
*
Offline Offline

Posts: 1


« Reply #75 on: December 06, 2007, 07:09:39 pm »

Just wanted to give thanks for this help, I edited the hole files and now it works great on my own theme!!! Wink
Logged

myaicons
Newbie
*
Offline Offline

Posts: 5


« Reply #76 on: January 18, 2008, 09:26:06 pm »

ok... so i figured it out... all the edits were made when i installed the mod... except for the ones for the index.template.php file...

so i did the edits for that file and the appropriate ads started showing up.... all except for the welcome user area... because im not sure which instance of the </td> i need to add the code to...

Quote
In the same file find:

Code:

                     </td>


After that add:

Code:

';
                     //Welcome Ads
                     if (function_exists("show_welcomeAds"))
                     {
                        $ads = show_welcomeAds();
                        if(!empty($ads))
                        {
                           echo '<td class="windowbg2">';
                           if($ads['type']==0)
                              echo $ads['content'];
                           else
                              eval($ads['content']);
                           echo '</td>';
                        }
                        unset($ads);
                     }
                  echo '


so.... can i get a clarification as to where to exactly put the welcome ads code???

thanks


Logged
neotan
Newbie
*
Offline Offline

Posts: 3


Email
« Reply #77 on: February 02, 2008, 09:55:53 am »

Works great !!! Thanks


============
SMF 1.1.4

Black Rain v2

http://jparts.info/forum
Logged
utal
Newbie
*
Offline Offline

Posts: 1


« Reply #78 on: February 17, 2008, 02:32:56 pm »

heys!

how did you managed to put all the edits in the files in version 1.1.4? there are some file edits in files that aren't in BlackRain V2 (for instance Display.template.php)

can you help please?

tks!

Works great !!! Thanks


============
SMF 1.1.4

Black Rain v2

http://jparts.info/forum
Logged
mcichocki
Newbie
*
Offline Offline

Posts: 1


« Reply #79 on: March 09, 2008, 04:45:22 pm »

These are the edits for the ad mod version 2.3

In index.php look for:

Code:
'trackip' => array('Profile.php', 'trackIP'),

Before that add:

Code:
'admod' => array('Ads.php', 'Ads'),

In the same file search for:

Code:
require_once($sourcedir . '/Security.php');

Before that add:

Code:
if (file_exists($sourcedir . '/LoadAds.php'))
require_once($sourcedir . '/LoadAds.php');

In the same file search for:

Code:
loadPermissions();

Before that add:

Code:
// Load all the ads up
if (function_exists("loadAds"))
loadAds();

Save and upload after backing up the original.
NOTE: Only do this edit if installing manually


In your Sources Directory find and open Subs.php, Search for:

Code:
loadLanguage('Admin');

Before that add:

Code:
loadLanguage('Ads');

In the same file search for:

Code:
'manage_themes' => '<a href="' . $scripturl . '?action=theme;sa=admin;sesc=' . $sc . '">' . $txt['theme_admin'] . '</a>',

Before that add:

Code:
'edit_addmod' => '<a href="' . $scripturl . '?action=admod">' . $txt['ad_management'] . '</a>',

Save and upload after backing up the original.
NOTE: Only do this edit if installing manually


In your theme directory find and open index.template.php and search for:

Code:
<body>';

After that add:

Code:
//Display ads on the top of the page
if (function_exists("show_topofpageAds"))
{
$ads = show_topofpageAds();
if(!empty($ads))
if($ads['type']==0)
echo $ads['content'];
else
eval($ads['content']);
unset($ads);
}

In the same file find:

Code:
</td>

After that add:

Code:
';
//Welcome Ads
if (function_exists("show_welcomeAds"))
{
$ads = show_welcomeAds();
if(!empty($ads))
{
echo '<td class="windowbg2">';
if($ads['type']==0)
echo $ads['content'];
else
eval($ads['content']);
echo '</td>';
}
unset($ads);
}
echo '

In the same file find:

Code:
template_menu();

After that add:

Code:
//Below the menu ads
if (function_exists("show_indexAds") && function_exists("show_towerleftAds") && function_exists("show_towerrightAds"))
{
$ads = show_indexAds();
if(!empty($ads))
if($ads['type']==0)
echo $ads['content'];
else
eval($ads['content']);
unset($ads);

//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);
}

In the same file find:

Code:
// Show the "Powered by" and "Valid" logos, as well as the copyright. Remember, the copyright must be somewhere!

Before that add:

Code:
//Close table for towerright ads
if (function_exists("show_towerrightAds") && function_exists("show_towerleftAds") && function_exists("show_bottomAds"))
{
$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);

//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);
}


In BoardIndex.template.php find:

Code:
// Show some statistics next to the link tree if SP1 info is off.

Before that add:

Code:
//Display ads on the board index
if (function_exists("show_boardAds"))
{
$ads = show_boardAds();
if(!empty($ads))
if($ads['type']==0)
echo $ads['content'];
else
eval($ads['content']);
unset($ads);
}

In the same file find:

Code:
echo '
</div>';

After that add:

Code:
//Display ads Between cats
if (function_exists("show_category"))
{
$ads = show_category($category['id']);
if(!empty($ads))
if($ads['type']==0)
echo $ads['content'];
else
eval($ads['content']);
unset($ads);
}


In Display.template.php find:

Code:
global $context, $settings, $options, $txt, $scripturl, $modSettings;

After that add:

Code:
//Display ads on the thread page
if (function_exists("show_threadAds"))
{
$ads = show_threadAds();
if(!empty($ads))
if($ads['type']==0)
echo $ads['content'];
else
eval($ads['content']);
unset($ads);
}

In the same file find:

Code:
// Get all the messages...

And replace with:

Code:
//Ad Counter
$adcounter =0;
// Get all the messages...
while ($message = $context['get_message']())
{
$adcounter++;

In the same file find:

Code:
</td></tr>';
}

And replace with:

Code:
</td></tr>';
if (function_exists("show_posts"))
{
if ($adpost = show_posts($adcounter))
{
if($modSettings['ads_lookLikePosts'])
{
echo '

<tr><td style="padding: 1px 1px 0 1px;">
<table width="100%" cellpadding="3" cellspacing="0" border="0">
<tr><td class="windowbg3">
<table width="100%" cellpadding="5" cellspacing="0" style="table-layout: fixed;">
<tr>
<td valign="top" width="16%" rowspan="2" style="overflow: hidden;">
<b>', $context['forum_name'], '</b>
<div class="smalltext">
</div>
</td>
<td valign="top" width="85%" height="100%">
<table width="100%" border="0"><tr>
<td valign="middle"><img src="', $message['icon_url'] . '" alt="" border="0" /></td>
<td valign="middle">
<div style="font-weight: bold;" id="subject_', $message['id'], '">
<a href="', $message['href'], '">', $message['subject'], '</a>
</div>
<div class="smalltext">&#171; <b>', !empty($message['counter']) ? $txt[146] . ' #' . $message['counter'] : '', ' ', $txt[30], ':</b> ', $message['time'], ' &#187;</div></td>
<td align="', !$context['right_to_left'] ? 'right' : 'left', '" valign="bottom" height="20" style="font-size: smaller;">';
if ($context['can_reply'] && !empty($options['display_quick_reply']))
echo '
', $reply_button, '';

// So... quick reply is off, but they *can* reply?
elseif ($context['can_reply'])
echo '
', $reply_button, '';

// Can the user modify the contents of this post?
if ($message['can_modify'])
echo '
', $modify_button, '';

// How about... even... remove it entirely?!
if ($message['can_remove'])
echo '
', $remove_button, '';

// What about splitting it off the rest of the topic?
if ($context['can_split'])
echo '
', $split_button, '';
echo '
</td>
</tr></table>
<hr width="100%" size="1" class="hrcolor" />
<div class="post">', $adpost['type'] == 0 ? $adpost['content'] : eval($adpost['content']) , '</div>
</td>
</tr>
<tr>
<td valign="bottom" class="smalltext" width="85%">
<table width="100%" border="0" style="table-layout: fixed;"><tr>
<td colspan="2" class="smalltext" width="100%">
</tr><tr>
<td valign="bottom" class="smalltext" id="modified_', $message['id'], '">
</td>
<td align="', !$context['right_to_left'] ? 'right' : 'left', '" valign="bottom" class="smalltext">
<img src="', $settings['images_url'], '/ip.gif" alt="" border="0" />&nbsp;', $txt[511], '
</td>
</tr></table>
</tr>
</table>
</td></tr>
</table>
</td></tr>';
}
else
echo '
<tr><td style="padding: 1px 1px 0 1px;">
<table width="100%" cellpadding="3" cellspacing="0" border="0">
<tr>
<td class="windowbg3">', $adpost['type'] == 0 ? $adpost['content'] : eval($adpost['content']) , '</td>
</tr>
</table>
</td></tr>';
}

}

}

if(function_exists("show_lastpostAds") && function_exists("show_posts"))
{
if(($ads = show_lastpostAds()) && !show_posts($adcounter))
{
if($modSettings['ads_lookLikePosts'])
{
echo '

<tr><td style="padding: 1px 1px 0 1px;">
<table width="100%" cellpadding="3" cellspacing="0" border="0">
<tr><td class="windowbg3">
<table width="100%" cellpadding="5" cellspacing="0" style="table-layout: fixed;">
<tr>
<td valign="top" width="16%" rowspan="2" style="overflow: hidden;">
<b>', $context['forum_name'], '</b>
<div class="smalltext">
</div>
</td>
<td valign="top" width="85%" height="100%">
<table width="100%" border="0"><tr>
<td valign="middle"><img src="', $message['icon_url'] . '" alt="" border="0" /></td>
<td valign="middle">
&nbsp;</td>
<td align="', !$context['right_to_left'] ? 'right' : 'left', '" valign="bottom" height="20" style="font-size: smaller;">';
if ($context['can_reply'] && !empty($options['display_quick_reply']))
echo '
', $reply_button, '';

// So... quick reply is off, but they *can* reply?
elseif ($context['can_reply'])
echo '
', $reply_button, '';


echo '
</td>
</tr></table>
<hr width="100%" size="1" class="hrcolor" />
<div class="post">', $ads['type'] == 0 ? $ads['content'] : eval($ads['content']) , '</div>
</td>
</tr>
<tr>
<td valign="bottom" class="smalltext" width="85%">
<table width="100%" border="0" style="table-layout: fixed;"><tr>
<td colspan="2" class="smalltext" width="100%">
</tr><tr>
<td valign="bottom" class="smalltext" id="modified_', $message['id'], '">
</td>
<td align="', !$context['right_to_left'] ? 'right' : 'left', '" valign="bottom" class="smalltext">
<img src="', $settings['images_url'], '/ip.gif" alt="" border="0" />&nbsp;', $txt[511], '
</td>
</tr></table>
</tr>
</table>
</td></tr>
</table>
</td></tr>';
}
else
echo '
<tr><td style="padding: 1px 1px 0 1px;">
<table width="100%" cellpadding="3" cellspacing="0" border="0">
<tr>
<td class="windowbg3">', $ads['type'] == 0 ? $ads['content'] : eval($ads['content']) , '</td>
</tr>
</table>
</td></tr>';

}

}


In MessageIndex.template.php find:

Code:
global $context, $settings, $options, $scripturl, $modSettings, $txt;

After that add:

Code:
//Display Ads on the Message index
if (function_exists("show_threadindexAds"))
{
$ads = show_threadindexAds();
if(!empty($ads))
if($ads['type']==0)
echo $ads['content'];
else
eval($ads['content']);
unset($ads);
}

In the same file find:

Code:
echo '
</table>
</div>';

After that add:

Code:
//Display Ads on the Message index
if (function_exists("show_underchildren"))
{
$ads = show_underchildren();
if(!empty($ads))
if($ads['type']==0)
echo $ads['content'];
else
eval($ads['content']);
unset($ads);
}


In ManagePermissions.php in the sources directory find:

Code:
'pm' => array(

And replace with:

Code:
'ad_manage' => array(
'ad_manageperm' => false,
),
'pm' => array(

Save and upload after backing up the original.
NOTE: Only do this edit if installing manually


ONLY If installing manually you will require these 2 files to be in your Sources Directory:

Ads.php
LoadAds.php

And this file to be in your theme directory:

Ads.template.php

And this file to be in your Langauge directory:

Ads.english.php

So the very first step...what index.php am I editing?
The one in the themes folder has no code as indicated.

I'm a noob so I'm sorry if this is obvious to some others. Wink

Thanks,
MC


Added---
http://custom.simplemachines.org/themes/index.php?lemma=519
This is the theme I'm using if that helps at all.
« Last Edit: March 09, 2008, 04:50:47 pm by mcichocki » Logged
geoffstr
Newbie
*
Offline Offline

Posts: 1


Email
« Reply #80 on: March 11, 2008, 09:01:07 am »

I'm using the Black RainTheme. It doesn't contain messageindex.template.pho, display.template.php or Boardindex.template.php

Will I be able to use ad mod with this following the instructions posted?
Logged
sturmkatze
Newbie
*
Offline Offline

Posts: 2


Just work dammit!

sturmkatze sturmkatze
WWW
« Reply #81 on: March 19, 2008, 12:05:49 pm »

I am using ig-oh theme. I was trying to do the edits and in the BoardIndex.template.php file, I cannot find this part:

Quote
In the same file find:

Code:

      echo '
   </div>';

I have done searches for it and it just ain't there. What do I do? I need this mod to work and it's just not  Angry Here, attached is the file...
Logged

Marsh Wise
reenactor.Net
www.reenactor.net/
reenactor.Net Forums: http://www.reenactor.net/forums/index.php
ramsen
Newbie
*
Offline Offline

Posts: 1


« Reply #82 on: March 23, 2008, 08:22:14 am »

Great, thanks  Smiley
Logged
frosted
Newbie
*
Offline Offline

Posts: 3


Email
« Reply #83 on: April 01, 2008, 04:26:34 pm »

hey i tried to install those mods but as u have pointed out some of the text is not there

i read that dawn said changes were made but im not too comfortable with php yet because im quite new

i have the aa new damage theme from webtechnica

my planning is to do the adds from google adsense AND place a rotating banner cycle for the site


ne ideas on how i could change  this mod to work with that
Logged
Talkrooms
Newbie
*
Offline Offline

Posts: 1


Email
« Reply #84 on: April 01, 2008, 08:36:15 pm »

Im am using SEO Light Theme.

In the very first post it states "index.php" search for....

My index.php file only has the following.

//
<?php

// Try to handle it with the upper level index.php.  (it should know what to do.)


if (file_exists(dirname(dirname(__FILE__)) . '/index.php'))


   include (dirname(dirname(__FILE__)) . '/index.php');


else


   exit;


?>

can you assist me in where to stat the install of admanagement?

thanks!
Mike.
Logged
ideasworld
Newbie
*
Offline Offline

Posts: 4


Email
« Reply #85 on: April 13, 2008, 01:28:49 am »

Thanks for the post, but I could not fine these files

Quote
echo '
   </div>';

and when I replace
Quote
// Get all the messages...
with
Quote
//Ad Counter
   $adcounter =0;
   // Get all the messages...
   while ($message = $context['get_message']())
   {
      $adcounter++;
, i get errors.



Please, i want the ads centered and not aligned to the left. How do i rotate the ad?, like showing a different ad when the page refreshed. 
Please help me out.  police


Logged
toofaan
Newbie
*
Offline Offline

Posts: 7


Email
« Reply #86 on: July 19, 2008, 02:11:59 am »

Quote
Code:

<body>';


After that add:

Code:

   //Display ads on the top of the page
   if (function_exists("show_topofpageAds"))
   {
      $ads = show_topofpageAds();   
      if(!empty($ads))
         if($ads['type']==0)
            echo $ads['content'];
         else
            eval($ads['content']);   
      unset($ads);
   }
i can not find <body>'; .
i am using Anecdota theme + smf 1.1.15
Logged
toofaan
Newbie
*
Offline Offline

Posts: 7


Email
« Reply #87 on: July 20, 2008, 10:04:01 am »

very bad support.
Logged
gri
Full Member
***
Offline Offline

Posts: 111


Space Human


WWW
« Reply #88 on: July 20, 2008, 11:07:50 am »

very bad support.

toofaan,
Would you like to have a dialogue with me ?
Logged

Instruction on getting Help on PAY-ME (AdManagement) mod installing.
Your GRItoadMIXes
toofaan
Newbie
*
Offline Offline

Posts: 7


Email
« Reply #89 on: July 20, 2008, 01:43:13 pm »

very bad support.

toofaan,
Would you like to have a dialogue with me ?

Yas.
Logged
SMF Ads Support Forum
   

.
 Logged
Pages: 1 ... 4 5 [6] 7  All   Go Up
  Print  
 
Jump to:  

.
Powered by SMF 1.1.18 | SMF © 2013, Simple Machines
SMFAds for Free Forums
SMF and SimpleMachines are registered trademarks of Simple Machines. SMFAds.com is not affiliated with nor endorsed by Simple Machines.