News:

Help keep this project going by donating or buying adseller pro

Main Menu
Coinbase

Edits for ad_mod_1-1-1_v2-3

Started by bigguy, January 11, 2007, 07:42:32 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

iBug


teclive

Quote from: anakmacan on June 01, 2007, 08:45:04 AM


Ive finished editting all theme files as said on first post, but i  dont know how to put tables into database >.< or to run install.php :(( Help me, pls, anyone?



I found this...

http://www.smfads.com/forums/index.php?topic=679.0


teclive

Quote from: dafisher1951 on May 16, 2007, 05:27:40 PM
I tried the file changes on the previous page and got the following message"

forum1.1.2 enterprise theme ad mod 2.3

Table 'dafisher_engforum.dafisher_ads' doesn't exist
File: /home/dafisher/public_html/chaospot/Sources/LoadAds.php
Line: 33

if you did the install manually, you need to add the tables to your db using phpmyadmin, check out this post

http://www.smfads.com/forums/index.php?topic=679.0


asd

#48
QuoteIn 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);
   }
I cant find it, I only find <body>

AND I use pdx-dk-09i

rmg

^I'm trying to do that.. I downloaded the index.template.php file on my comp, edited it and when I tried to save it, the codes looks so screwed up! is it ok? =/

rmg

I had errors on line 3 :
   if (function_exists("show_topofpageAds"))

what to do now? help please..  :-\

whatchamccallum

Just a quick note for some of you that are trying to follow these instructions. The location that Bigguy is giving you won't always exist the way he put it in your themes. You need to be able to read the code and interpret where the ads belong on your site and find the end of table, row, column, beginning of page ect.... exists.

It would be helpful Bigguy if you spelled it out a little clearer where you were expecting the certain block of code to go. ex. ad thread on board index or at top of page, under menu ect... Maybe provide a few examples on what the text could look like.

I'm not sure how much you have vested in helping people edit their themes but it took me a few minutes to catch onto this when I started.

Also this task is not one to be taken by someone that does not know how to read code. You should have a decent amount of experience reading through programming code.

By the way thanks for the thread Bigguy. It was a big help for me I'm just offering up some constructive (hopefully) criticism.  :D

iBug

Please someone help me I'm going crazy .. i unistall the forum and them install it again and after puting the ad mod I'm still getting this problem !!

Parse error: syntax error, unexpected '<' in /home/ran4the/public_html/Sources/Load.php(1726) : eval()'d code(744) : eval()'d code on line 1

iBug

Quote from: iBug on June 28, 2007, 08:21:41 AM
Please someone help me I'm going crazy .. i unistall the forum and them install it again and after puting the ad mod I'm still getting this problem !!

Parse error: syntax error, unexpected '<' in /home/ran4the/public_html/Sources/Load.php(1726) : eval()'d code(744) : eval()'d code on line 1

Oh .. Hey guys .. I solved the problem ! I'm really sorry for the trble i caused...

the problem was in the <?php .. I removed the " php " and everything went okay ..

however, i tried then to change the ?> @ the end of the file by puting space before it and keeping the <?php and again it worked !

bigguy


adrenalinerider

Bigguy:  ;D my brain has just popped up  :D .... I guess I need to first search for all these files some where :D ... i know its stupid to say this but ... let me try once ... wont be bad atleast

bigguy

I answered in your other post. :)

sinaevil

Hi i have some kind of problem with my theme "smfox" after edit this two code in display.template the forum did not work

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>';            
         
      }
      
   }
--------------------------------------------------------------------------------

slvreagl

#58
I got everything to work but my Display.template.php page. I followed the instructions but I keep getting an error ....

Quote
Template Parse Error!
There was a problem loading the /Themes/helios_multi11_rc3_tp/Display.template.php template or language file. Please check the syntax and try again - remember, single quotes (') often have to be escaped with a slash (\). To see more specific error information from PHP, try accessing the file directly.

You may want to try to refresh this page or use the default theme.
--------------------------------------------------------------------------------

syntax error, unexpected $end

I uploaded the Display.template.php you had recoded for Polymath on page two of this topic and it works flawlessly I try my version again and I get the same error... :'( Can you re-code my Display.template.php file for me too? I run a moded site with the helios_multi11_rc3_tp theme and dont want to miss out on any of my mod functions. Thanks in advance!

I just noticed there is a topic area for my exact request so I will re-post it there...
http://www.smfads.com/forums/index.php?topic=974.msg5116#new

slackerpunk

Anyone with Themis_TP version have working template files? I am using 1.1.3 and TP 0.9.7 the ad management mod works fine if I am using the default theme but when I try to use Themis_TP nothing shows up I tried to edit the 4 template files manually but I cannot find the lines need to be edited not sure why

if anyone can help please I have attached the 4 template files since reading 4 pages it tells me that if the adworks and is installed then I should just be editing template files inside the theme folder that I want