. .
pragmaMx Support Forum 25 Mai 2012, 12:18:20 *
Willkommen Gast. Bitte einloggen oder registrieren.


Einloggen mit Benutzername und Passwort
News:
Brauchen Sie Hilfe? Bitte nutzen Sie unsere Suchfunktion bevor Sie Beiträge oder Fragen ins Board schreiben! Viele Fragen wurden bereits gestellt und beantwortet. Danke!
 
Übersicht Hilfe Forenregeln / Boardrules
 
Suche
Seiten: [1]   Nach unten
Drucken
Autor Thema: Probleme mit Ad Management mod V 2.3  (Gelesen 2850 mal)
0 Mitglieder und 2 Gäste betrachten dieses Thema.
tuningcar
weiss mehr
****
Offline Offline

Geschlecht: Männlich
Beiträge: 363


WWW
« am: 09 April 2007, 19:10:15 »

Habe heute das Ad Management mod V 2.3 in meinen Forum Installiert.

Hatt auch alles geklappt , habe eine Anzeige eingestellt aber im forum erscheint sie nicht.

Habe dann mal einfach das SMF Standarthem getestet und sie he da dort werden die Anzeigen angezeigt.

Nur im pragmaMx Default Theme werden sie nicht angezeigt  gruebel

Hatt von euch wer das Ad Management Mod mit dem pragmaMx Theme funktionsfähig am laufen ?
Gespeichert

exciting
weiss mehr
****
Offline Offline

Beiträge: 287


WWW
« Antworten #1 am: 17 April 2007, 10:09:45 »

ich hab das bei mir eingebaut,
du musst in 2 smf-template-dateien änderungen manuell machen.
in der index.template.php und in der display.template.php, aber bei der index.template.php stimmt die anweisung net ganz in der xml-anweisung, füge einfach den code nach der zeile ein:

<div id="smfoutput">
';

beispiel:
<div id="smfoutput">
';

//Display ads on the top of the page
   if (function_exists("show_topofpageAds"))

denn 2 template-dateien sind beim mx-theme anders.
den rest holt sich smf aus den default-smf-template.


siehe hier Klick

die änderungen die du machen musst, stehen in der xml-datei des gedownloadeten packages.

bei fragen, kann ich dir auch gern helfen natürlich
« Letzte Änderung: 17 April 2007, 10:38:14 von exciting » Gespeichert
tuningcar
weiss mehr
****
Offline Offline

Geschlecht: Männlich
Beiträge: 363


WWW
« Antworten #2 am: 17 April 2007, 21:18:56 »

Habe das in die index.template.php eingebaut , kanns du mir auch sagen was ich in der display.template.php einfügen muss das es geht .

Kann aus den xml Dateien das leider nicht ersehen   rougi

Danke nochmal

Grüße Jogge
Gespeichert

maverik
Gast
« Antworten #3 am: 17 April 2007, 21:38:18 »

nabend

schnappst dir winmerge von winmerge.org und vergleichst einfach die dateien. die änderungen überträgst du und es sollte funzen  thumbup

so long maverik
Gespeichert
exciting
weiss mehr
****
Offline Offline

Beiträge: 287


WWW
« Antworten #4 am: 17 April 2007, 23:04:37 »

geh auf die seite hier:

http://www.smfhacks.com/smf-package-parser.html

lade dort das zip-file vom ad-management hoch
und der spuckt dir die anweisungen übersetzt aus. Smiley

z.b. display.template.php

In file $themedir/Display.template.php
Find:

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



Add after:

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

   // Get all the messages...
   while ($message = $context['get_message']())
   {



Replace with:

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

Find:

   </td></tr>';
   }



Replace with:

   </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">&nbsp;</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>';            
         
      }
      
   }
Gespeichert
tuningcar
weiss mehr
****
Offline Offline

Geschlecht: Männlich
Beiträge: 363


WWW
« Antworten #5 am: 04 Mai 2007, 08:32:23 »

Danke nochmal   thumbup

funktioniert mit deinem Tipp wunderbar  Wink
Gespeichert

Seiten: [1]   Nach oben
Drucken
 
Gehe zu:  

Powered by SMF 1.1.16 | SMF © 2011, Simple Machines
design by hENNE, layout based on YAML