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

ScottDB

Quote@ ScottDB: No it shouldn't. See if the ad mod does any .css edits.
OK, I'm a little confused. Did you mean to say see if the add mod did anything to my css or see if the creator of the add mod could do any css edits? Thought you were the creator of the ad mod?
Thank you,
Scott

If at first you don't succeed. post and post again.

bdewong

I believe there is a bug in the install.xml file. In this section, I believe that the last closing "div" shouldn't be there.
Quote<file name="$themedir/Display.template.php">
   <operation>
      <search position="before"><![CDATA[global $context, $settings, $options, $txt, $scripturl, $modSettings;]]></search>
...

if(function_exists("show_lastpostAds") && function_exists("show_posts"))
{
   if(($adpost = show_lastpostAds()) && !show_posts($adcounter))
   {
      if($modSettings['ads_lookLikePosts'])
      {
         echo '
         <div class="bordercolor">
            <div class="clearfix windowbg3 largepadding">';
   
         // Show information about the poster of this message.
         echo '
               <div class="floatleft poster">
                  <h4>', $context['forum_name'], '</h4>';
   
         // Done with the information about the poster... on to the post itself.
         echo '
               </div>
               <div class="postarea">
                  <div class="keyinfo">&nbsp;
                     <div id="msg_', $message['id'], '_quick_mod">&nbsp;</div>
                  </div>';
   
         // If this is the first post, (#0) just say when it was posted - otherwise give the reply #.
         echo '
                  <ul class="smalltext postingbuttons">';
   
         // Can they reply? Have they turned on quick reply?
         if ($context['can_reply'] && !empty($options['display_quick_reply']))
            echo '
                     <li>', $reply_button, '</li>';
   
         // So... quick reply is off, but they *can* reply?
         elseif ($context['can_reply'])
            echo '
                     <li>', $reply_button, '</li>';
   
         // Show the post itself, finally!
         echo '
                  </ul>
                  <div class="post" id="msg_', $message['id'], '"', '>
                     ', $adpost['type'] == 0 ? $adpost['content'] : eval($adpost['content']) ,'

               </div>
            </div>
         </div>';
      }
      else
         echo '
            <div class="bordercolor">
               <div class="clearfix windowbg3 largepadding">', $adpost['type'] == 0 ? $adpost['content'] : eval($adpost['content']) ,'</div>
            </div>';
   }
}
echo '</div>';]]>
</add>
</operation>
</file>

temii

 Hello,I hav problem with the ads manager i just installed.I cant find it under configuration in my hxxp:forum.im [nonactive] using the latest version of smf(1.1.10).Im seriously worried,I need help urgently.

MultiformeIngegno

I think bdewong is right!
RockCiclopedia (wiki - forum), Tutta la storia del rock, scritta da voi ...
Rimanere aggiornati sul mondo della musica grazie al nuovo feed "RockCiclopedia Music News"!

the_shadow

hello ppl

i've installed this mod but the adds doesn't show in my forum... i try uninstall but it's missing something in Display.template

then i try add the missing part and says

Find: [Select]

</div>';
}


Replace With: [Select]

</div>';
if (function_exists("show_posts"))
{
if ($adpost = show_posts($adcounter))
{
if($modSettings['ads_lookLikePosts'])
{
echo '
<div class="bordercolor">
<div class="clearfix windowbg3 largepadding">';

// Show information about the poster of this message.
echo '
<div class="floatleft poster">
<h4>', $context['forum_name'], '</h4>';

// Done with the information about the poster... on to the post itself.
echo '
</div>
<div class="postarea">
<div class="keyinfo">
<h5 id="subject_', $message['id'], '">
<a href="', $message['href'], '" rel="nofollow">', $message['subject'], '</a>
</h5>
<div class="smalltext">« <strong>', !empty($message['counter']) ? $txt['reply'] . ' #' . $message['counter'] : '', ' ', $txt['on'], ':</strong> ', $message['time'], ' »</div>
<div id="msg_', $message['id'], '_quick_mod"></div>
</div>';

// If this is the first post, (#0) just say when it was posted - otherwise give the reply #.
echo '
<ul class="smalltext postingbuttons">';

// Can they reply? Have they turned on quick reply?
if ($context['can_reply'] && !empty($options['display_quick_reply']))
echo '
<li>', $reply_button, '</li>';

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

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

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

// What about splitting it off the rest of the topic?
if ($context['can_split'])
echo '
<li>', $split_button, '</li>';

// Can we restore topics?
if ($context['can_restore_msg'])
echo '
<li>', $restore_message_button, '</li>';

// Show the post itself, finally!
echo '
</ul>
<div class="post" id="msg_', $message['id'], '"', '>
', $adpost['type'] == 0 ? $adpost['content'] : eval($adpost['content']) ,'
</div>

</div>
</div>
</div>';
}
else
echo '
<div class="bordercolor">
<div class="clearfix windowbg3 largepadding">', $adpost['type'] == 0 ? $adpost['content'] : eval($adpost['content']) ,'</div>
</div>';
}
}
}

if(function_exists("show_lastpostAds") && function_exists("show_posts"))
{
if(($adpost = show_lastpostAds()) && !show_posts($adcounter))
{
if($modSettings['ads_lookLikePosts'])
{
echo '
<div class="bordercolor">
<div class="clearfix windowbg3 largepadding">';

// Show information about the poster of this message.
echo '
<div class="floatleft poster">
<h4>', $context['forum_name'], '</h4>';

// Done with the information about the poster... on to the post itself.
echo '
</div>
<div class="postarea">
<div class="keyinfo">&nbsp;
<div id="msg_', $message['id'], '_quick_mod">&nbsp;</div>
</div>';

// If this is the first post, (#0) just say when it was posted - otherwise give the reply #.
echo '
<ul class="smalltext postingbuttons">';

// Can they reply? Have they turned on quick reply?
if ($context['can_reply'] && !empty($options['display_quick_reply']))
echo '
<li>', $reply_button, '</li>';

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

// Show the post itself, finally!
echo '
</ul>
<div class="post" id="msg_', $message['id'], '"', '>
', $adpost['type'] == 0 ? $adpost['content'] : eval($adpost['content']) ,'

</div>
</div>
</div>';
}
else
echo '
<div class="bordercolor">
<div class="clearfix windowbg3 largepadding">', $adpost['type'] == 0 ? $adpost['content'] : eval($adpost['content']) ,'</div>
</div>';
}
}
echo '</div>';


and i find 6 matches in my Display.template for


</div>';
}


i'll leave where my display.template for someone see if can help me

thnkx ppl

temii

let someone help,ive installed ads manager but i cant find it under configuration.

John Kitchens

Hello Temii,

Try this: Go to server settings in your admin control panel and change the default forum language to "English".

After you do that it should then say Ad Management under Configuration.

John Kitchens

temii

oh this is great ive seen it thankx folks.

John Kitchens

Hello Everyone!

Well I made a post the other day, and I didn't get a reply. I am not complaining!

I have the ad mod working on my default template, but I downloaded the Analysis template and couldn't make it work.

I read and read and read some more and knew I had to manually edit some files, but I didn't know HOW to do it.

I kept reading post after post from Bigguy where he talked about the Parser. I didn't know what a parser was, but finally I figured it out!!!!!!!

So if any of you are having trouble getting your ads to work on any template besides the default template use the parser like bigguy tells us to.

Now if you were like me and didn't know what or where the parser is located I am going to tell you now. For those that think I am an idiot for not knowing so be it. I am a happy idiot because I am finally finished with this project!

The Parser can be found on this page: http://mods.simplemachines.org/index.php?mod=255

You will see "Manual Install Instructions for SMF" from the dropdown choose your version and select (that's right) Parse.

For the Analysis template all I had to edit was the index.template.php file. The parser told me what to look for and what to add.

It worked the very first time after I added the correct code.

Thanks to Jerm for creating the ad module and thanks to BigGuy for helping so many others, and myself, through your many posts.

John Kitchens

Smitten

I have a problem with Kani Theme in the display.template and index.template.

I give you the files, can yo do it? thanks for all genius!

BAMAVAMP

Thank you John. We changed templates about a week ago and found that the AM mod was not working for us...we are gonna try what was suggested about manually coding the index.template and hope it works out for us too!

BAMAVAMP

I have read over pages of this mod and I know where my forum is not reading it correctly. We are using a theme called BackNBlack..and I cannot for the life of me figure out where to put the code for the boardindex.template file for this theme. I have about 20 places in the file where it says echo' but none where it says echo' </div> like the parse instructions ask for.
And yes I did compare the boardindex file of the default theme with the boardindex of the theme we are using and it helps none cause the information is all in different places.

We are running SMF 1.1.10 and these are the parse instructions that I am having problems with, and I have attached the boardindex file for the theme we are using.
Thanks to anyone who can help out!

Quote./Themes/default/BoardIndex.template.php

Find: [Select]

      echo '
   </div>';

Add After: [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);
   }


adamspt2

I'm using SMF 2.0 RC 1.2 which may be the problem. I've got an ad at the top of my boards and another one at the bottom. For some reason, it runs each ad twice so I wind up with two ads stacked on top of each other, then the boards, then two ads stacked on top of each other at the bottom. Any suggestions? So far I have uninstalled and reinstalled the mod; I've also deleted all my ads and recreated them. I am using the SimplePortal mod as well.


John Kitchens

Hey BAMAVAMP,

I can feel your pain. Honestly I can, the Analysis template didn't have a boardindex.template file that I had to modify. I only had to modify the index.template file for my new template.

I wish I knew what to tell you. I would help you if I could, but I just don't know.

John Kitchens

neo2504

I've installed the mod but when I'm trying tu put an ad I got this error:
QuoteParse error: syntax error, unexpected '<' in /membri/manimen/Sources/Load.php(2245) : eval()'d code(17) : eval()'d code on line 1

I've checked on this string and I got this:
Quote// Are we going to use eval?
   if (empty($modSettings['disableTemplateEval']))
   {
      $file_found = file_exists($filename) && eval('?' . '>' . rtrim(file_get_contents($filename))) !== false;
      $settings['current_include_filename'] = $filename;
   }

Can someone help? What I have to modify?

BAMAVAMP

Thanks anyway John. I have tried 100 different places of putting in the code and it just gives us a template error when the forum loads.

Does the person who wrote this mod not exist anymore? Normally mods are taken over by someone else who knows what they are doing, and its clear someone like that could really be used here. I think if there is no more direct support for the mod at hand that it should be removed to save a lot of us some grief.

limon1

Can anyone supply me with a link to a downlod ADS that will install trouble free. I am running smf1.1.10 Theme Nooygel. I am a newbie and there seems lots of problems on this mod.
Thanks in advance

John Kitchens

Hey BAMAVAMP,
I wish I knew what to tell you. I struggled to get mine working on a custom template as well.  The person that wrote the mod Jerm does still exist and is still here, but I have no idea what his situation is.

The latest person that has been helping a lot of folks out is Bigguy. I know these guys are very busy and they help all of us out when they can.

BAMA, did you ever get the ad management to work properly on a default template? I would think that would be the place to start. (That is where I started).

I installed it and had it working fine on 1.1.10 on the default template. All of my trouble started when we changed to a new template.

If at all possible I would check that and make sure that it works on the default template first. Is your forum a new forum or one with posts already on it? Luckily I did all of my testing on a test site that the public couldn't see. Then as I got everything working I made the change on my real forum.

LIMONP: Same question. Did you ever have the program installed and working properly on your default template? I think you should try that first. The reason I say this is because if it won't work on the default template you have a problem. A different problem from it not working on your custom template.

I wish I was more help guys, but I am a newbie when it comes to this stuff as well.  I kind of got handed this project and just took the ball and ran but please know that I will be glad to help any of you if I can. Believe me I know how frustrating it is to need help and not be able to get it.

John Kitchens

Smitten

Quote from: Smitten on September 02, 2009, 01:19:10 AM
I have a problem with Kani Theme in the display.template and index.template.

I give you the files, can yo do it? thanks for all genius!

Solved...

John Kitchens

Hey Smitten,

I am glad you solved your problem. Please post the solution for the others here that will need it.

John Kitchens

Advertisement: