Coinbase

Author Topic: Edits for ad_mod_1-1-1_v2-3  (Read 95881 times)

0 Members and 1 Guest are viewing this topic.

Offline Knibal

  • Newbie
  • *
  • Posts: 1
Re: Edits for ad_mod_1-1-1_v2-3
« 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!!! ;)

Offline myaicons

  • Newbie
  • *
  • Posts: 5
Re: Edits for ad_mod_1-1-1_v2-3
« 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



Offline neotan

  • Newbie
  • *
  • Posts: 3
    • Email
Re: Edits for ad_mod_1-1-1_v2-3
« Reply #77 on: February 02, 2008, 09:55:53 am »
Works great !!! Thanks


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

Black Rain v2

http://jparts.info/forum

Offline utal

  • Newbie
  • *
  • Posts: 1
Re: Edits for ad_mod_1-1-1_v2-3
« 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

Offline mcichocki

  • Newbie
  • *
  • Posts: 1
Re: Edits for ad_mod_1-1-1_v2-3
« Reply #79 on: March 09, 2008, 03:45:22 pm »
These are the edits for the ad mod version 2.3

In index.php look for:

Code: [Select]
'trackip' => array('Profile.php', 'trackIP'),
Before that add:

Code: [Select]
'admod' => array('Ads.php', 'Ads'),
In the same file search for:

Code: [Select]
require_once($sourcedir . '/Security.php');
Before that add:

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

In the same file search for:

Code: [Select]
loadPermissions();
Before that add:

Code: [Select]
// 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: [Select]
loadLanguage('Admin');
Before that add:

Code: [Select]
loadLanguage('Ads');
In the same file search for:

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

Code: [Select]
'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: [Select]
<body>';
After that add:

Code: [Select]
//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: [Select]
</td>
After that add:

Code: [Select]
';
//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: [Select]
template_menu();
After that add:

Code: [Select]
//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: [Select]
// Show the "Powered by" and "Valid" logos, as well as the copyright. Remember, the copyright must be somewhere!
Before that add:

Code: [Select]
//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: [Select]
// Show some statistics next to the link tree if SP1 info is off.
Before that add:

Code: [Select]
//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: [Select]
echo '
</div>';

After that add:

Code: [Select]
//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: [Select]
global $context, $settings, $options, $txt, $scripturl, $modSettings;
After that add:

Code: [Select]
//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: [Select]
// Get all the messages...
And replace with:

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

In the same file find:

Code: [Select]
</td></tr>';
}

And replace with:

Code: [Select]
</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: [Select]
global $context, $settings, $options, $scripturl, $modSettings, $txt;
After that add:

Code: [Select]
//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: [Select]
echo '
</table>
</div>';

After that add:

Code: [Select]
//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: [Select]
'pm' => array(
And replace with:

Code: [Select]
'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. ;)

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, 03:50:47 pm by mcichocki »

Offline geoffstr

  • Newbie
  • *
  • Posts: 1
    • Email
Re: Edits for ad_mod_1-1-1_v2-3
« Reply #80 on: March 11, 2008, 08: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?

Offline sturmkatze

  • Newbie
  • *
  • Posts: 2
  • Just work dammit!
    • reenactor.Net Forums
Re: Edits for ad_mod_1-1-1_v2-3
« Reply #81 on: March 19, 2008, 11:05:49 am »
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  >:( Here, attached is the file...
Marsh Wise
reenactor.Net
www.reenactor.net/
reenactor.Net Forums: http://www.reenactor.net/forums/index.php

Offline ramsen

  • Newbie
  • *
  • Posts: 1
Re: Edits for ad_mod_1-1-1_v2-3
« Reply #82 on: March 23, 2008, 07:22:14 am »
Great, thanks  :)

Offline frosted

  • Newbie
  • *
  • Posts: 3
    • Email
Re: Edits for ad_mod_1-1-1_v2-3
« Reply #83 on: April 01, 2008, 03: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

Offline Talkrooms

  • Newbie
  • *
  • Posts: 1
    • Email
Re: Edits for ad_mod_1-1-1_v2-3
« Reply #84 on: April 01, 2008, 07: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.

Offline ideasworld

  • Newbie
  • *
  • Posts: 4
    • Email
Re: Edits for ad_mod_1-1-1_v2-3
« Reply #85 on: April 13, 2008, 12: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:



Offline toofaan

  • Newbie
  • *
  • Posts: 7
    • Email
Re: Edits for ad_mod_1-1-1_v2-3
« Reply #86 on: July 19, 2008, 01: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

Offline toofaan

  • Newbie
  • *
  • Posts: 7
    • Email
Re: Edits for ad_mod_1-1-1_v2-3
« Reply #87 on: July 20, 2008, 09:04:01 am »
very bad support.

Offline gri

  • Full Member
  • ***
  • Posts: 111
  • Space Human
Re: Edits for ad_mod_1-1-1_v2-3
« Reply #88 on: July 20, 2008, 10:07:50 am »
Quote from: [url=http://www.smfads.com/forums/index.php?topic=475.msg6846#msg6846]toofaan in ~Edits for ad_mod_1-1-1_v2-3~[/url]
very bad support.

toofaan,
Would you like to have a dialogue with me ?
Instruction on getting Help on PAY-ME (AdManagement) mod installing.
Your GRItoadMIXes

Offline toofaan

  • Newbie
  • *
  • Posts: 7
    • Email
Re: Edits for ad_mod_1-1-1_v2-3
« Reply #89 on: July 20, 2008, 12:43:13 pm »
Quote from: [url=http://www.smfads.com/forums/index.php?topic=475.msg6846#msg6846]toofaan in ~Edits for ad_mod_1-1-1_v2-3~[/url]
very bad support.

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

Yas.

SMF Ads Support Forum

Re: Edits for ad_mod_1-1-1_v2-3
« Reply #89 on: July 20, 2008, 12:43:13 pm »
.

 

.