Inserimento adsense in un blocco per mkportal

tuttohtml.it

Nuovo Utente
17 Mag 2009
8
0
0
Salve

Nel mio sito TUTTO HTML.it è presente un blocco in homepage dove visualizza le news, io vorrei far comparire nella parte contrassegnata di rosso in questa immagine

esample.png



Un banner 300x250 al posto della news singola.


Ho agito nelle giuste stringhe del file php, ma poi mi cade l'intera pagina...forse taglio qualche richiamo bho...

Il sito è stato inserito nel post, qui di seguito il file php del blocco.

PHP:
<?
/*
+--------------------------------------------------------------------------
|   MkPortal
|   ========================================
|   by Meo aka Luponero <Amedeo de longis>
|
|   (c) 2004 mkportal.it
|   http://www.mkportal.it
|   Email: [email protected]
|
+---------------------------------------------------------------------------
|
|   > MKPortal
|   > Written By Amedeo de longis
|   > Date started: 9.2.2004
|
+--------------------------------------------------------------------------
*/


$limit = $this->config['news_block'];
if (!$limit) {
	$limit = 5;
}

$cont = "";
$content = "";
$link_user = $mklib_board->forum_link("profile");



	$query = $DB->query( "SELECT n.id, n.idcategoria, n.idautore, n.titolo, n.autore, n.testo, n.data, n.totalcomm, s.id AS idcat, s.titolo AS titcat, s.icona 
	FROM mkp_news AS n
	LEFT JOIN mkp_news_sections AS s ON(s.id = n.idcategoria)
	WHERE validate = '1' ORDER BY `id` DESC LIMIT $limit");
	while( $row = $DB->fetch_row($query) ) {
		$idnt = $row['id'];
		$totcomments = $row['totalcomm'];
		$id_orig_name = $row['idautore'];
		$idcategoria = $row['idcategoria'];
		$titolo = stripslashes($row['titolo']);
		$name = $row['autore'];
		$testo = stripslashes($row['testo']);
		if ($this->mkeditor == "BBCODE") {
			$testo = $this->decode_bb($testo);
			$testo = $mklib_board->decode_smilies($testo);
		}
		$sezione = $row['titcat'];
		$icona = $row['icona'];
		switch($icona) {
			case '1':
				$image = "$this->images/icona_news.gif";
    		break;
			case '2':
    			$image = "$this->images/icona_help.gif";
    			break;
			case '3':
				$image = "$this->images/icona_star.gif";
    		break;
			case '4':
				$image = "$this->images/icona_pc.gif";
    		break;
			case '5':
				$image = "$this->images/icona_world.gif";
    		break;
    		default:
    			$image = $icona;
    		break;
    		}
		
		$cdata = $this->create_date($row['data']);
		$news_words= $this->config['news_words'];
		if ($this->config['news_html']) {
			$testo = str_replace ("<br />", " ", $testo);
			$testo = strip_tags ($testo);
   		}
		if ($news_words) {
			$testo = substr ($testo, 0, $news_words);
			$testo .= " ...";
   		}

		$cont .= "
					  <table class=\"tabnews\" cellspacing=\"2\" cellpadding=\"2\" width=\"100%\">
					    <tbody>
					    <tr>
					      <td class=\"tdblock\" align=\"center\" width=\"5%\">
					      <img hspace=\"0\" src=\"$image\" align=\"bottom\" border=\"0\" alt=\"\" />
					      </td>
					      <td class=\"tdblock\" valign=\"top\" width=\"95%\">
					      <b>$sezione<br /><a href=\"index.php?ind=news&amp;op=news_show_single&amp;ide={$row['id']}\">$titolo</a></b>
					      </td>
					    </tr>
					    </tbody>
					  </table>
		";
	}
	$query = $DB->query( "SELECT n.id, n.idcategoria, n.idautore, n.titolo, n.autore, n.testo, n.data, n.totalcomm, s.id AS idcat, s.titolo AS titcat, s.icona 
	FROM mkp_news AS n
	LEFT JOIN mkp_news_sections AS s ON(s.id = n.idcategoria)
	WHERE validate = '1' ORDER BY `id` DESC");
	$row = $DB->fetch_row($query);
	$idnt = $row['id'];
		$totcomments = $row['totalcomm'];
		$id_orig_name = $row['idautore'];
		$idcategoria = $row['idcategoria'];
		$titolo = stripslashes($row['titolo']);
		$name = $row['autore'];
		$testo = stripslashes($row['testo']);
		if ($this->mkeditor == "BBCODE") {
			$testo = $this->decode_bb($testo);
			$testo = $mklib_board->decode_smilies($testo);
		}
		$sezione = $row['titcat'];
		$icona = $row['icona'];
		switch($icona) {
			case '1':
				$image = "$this->images/icona_news.gif";
    		break;
			case '2':
    			$image = "$this->images/icona_help.gif";
    			break;
			case '3':
				$image = "$this->images/icona_star.gif";
    		break;
			case '4':
				$image = "$this->images/icona_pc.gif";
    		break;
			case '5':
				$image = "$this->images/icona_world.gif";
    		break;
    		default:
    			$image = $icona;
    		break;
    		}
		
		$cdata = $this->create_date($row['data']);
		
		if ($news_words) {
			$testo = substr ($testo, 0, $news_words);
			$testo .= " ...";
   		}	
		
	$cont2 = "
					<table class=\"tabnews\" cellspacing=\"2\" cellpadding=\"2\" width=\"100%\">
					    <tbody>
					    <tr>
					      <td>
						  <b><a href=\"index.php?ind=news&amp;op=news_show_single&amp;ide={$row['id']}\">$titolo</a></b>
						  <br />
					      $testo
					      </td>
					    </tr>
					    <tr>
					      <td align=\"right\">
					      <br /><i>{$this->lang['from']}<b> <a href=\"$link_user=$id_orig_name\">$name</a></b>, $cdata <a href=\"index.php?ind=news&amp;op=submit_comment&amp;idnews={$row['id']}\">{$this->lang['comments']}</a>($totcomments), <a href=\"index.php?ind=news&amp;op=news_show_single&amp;ide={$row['id']}\">{$this->lang['readall']}</a></i>
					      </td>
					    </tr>
					    </tbody>
					  </table>
			";
			
	$content = "
				<tr>
				  <td class=\"contents\">
				  <div class=\"taburlo\">
				    <table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"2\">
				      <tr>
					<td width=\"50%\" class=\"taburlo\" valign=\"top\">
					{$cont}
					</td>
					<td width=\"50%\" class=\"taburlo\" valign=\"top\">
					{$cont2}
					</td>
				      </tr>
				    </table>
				  </div>
				  </td>
			      	</tr>
				  ";

		unset($cont);
		unset($row);
		unset($idcat);
		unset($categoria);
		unset($idnt);
		unset($query);
		unset($query2);
		unset($totcomments);
		unset($id_orig_name);
		unset($idcategoria);
		unset($titolo);
		unset($name);
		unset($testo);
		unset($sezione);
		unset($icona);
		unset($cdata);
		unset($news_words);




?>



Grazie per il sicuro aiuto.
:)
 
Discussioni simili
Autore Titolo Forum Risposte Data
K Inserimento query Errore 1366 PHP 4
K form Inserimento record mysql PHP 2
Lino80 [Retribuito] Cerco programmatore php per modifica/inserimento funzione/valori da un plugin importer wordpress Offerte e Richieste di Lavoro e/o Collaborazione 0
C inserimento gestionale sotto Word Press WordPress 0
D Inserimento video mp4 HTML e CSS 0
L inserimento form dati multipli ? PHP 0
G Appicazione HTML per inserimento dai in Database Access Microsoft HTML e CSS 0
J Form inserimento dati in database Ajax 1
D modificare questo codice per inserimento in text e non in tabella jQuery 1
R [C#] Automatizzare un inserimento di un Post su un Gruppo Facebook .NET Framework 0
M Aiuto con inserimento immagini WordPress 6
elpirata Impedire inserimento data di oggi e date passate jQuery 39
A Inserimento dati nel database tramite form + altre operazioni PHP 18
W Email conferma inserimento Classic ASP 0
S Inserimento multiplo non richiesto PHP 2
P inserimento icone social tramite html HTML e CSS 1
L form multipla php sql,errore in inserimento MySQL 0
Alex_70 Inserimento dati a cascata PHP 204
T Da xsd a xml ed inserimento dati in excel XML 0
M Problema inserimento parole con apostrofo nel db PHP 5
C [RISOLTO]Inserimento variabile php in input html PHP 20
P Access Inserimento data. MS Access 4
L Inserimento dettagli in una maglia Photoshop 2
S [PHP] email con inserimento dati nel database PHP 23
beatle [Photoshop] problema inserimento immagini Photoshop 1
G [Javascript] Errore inserimento dati Backend Node.js e workbench Javascript 1
B [PHP] Creare PDF dopo inserimento dati form PHP 4
C [PHP] Form con Inserimento dati dalla maschera e un menù a discesa che prende i dati dal db PHP 1
C [PHP] Form inserimento più menù a discesa PHP 9
M [PHP] Problemi su inserimento array nel db PHP 7
gandalf1959 [PHP] Inserimento di più righe non funziona come mi aspetto... PHP 2
E Inserimento dati da PHP in tabella MySQL PHP 5
E Form inserimento dati con JavaScript Javascript 0
D [MS Access] problemi con inserimento campo in una maschera MS Access 6
G inserimento csv in tabella mysql; problema con struttura PHP 11
M [Joomla] Inserimento wow.js in template Joomla 4
K [PHP] Inserimento dati database con postgres PHP 2
K [PHP + MYSQL ] Inserimento dati in database da form dinamico PHP 13
A [PHP] Inserimento url dinamici in pagina html PHP 3
spider81man [PHP] Alert Box per confermare Inserimento o Cancellazione dato. PHP 4
gandalf1959 [MySQL] Inserimento multiplo da form multirighe MySQL 22
A [RISOLTO]Inserimento Immagini da pc a MySql PHP 15
M Inserimento dati checkbox multipli in db da ajax a php PHP 1
S [PHP] inserimento su DB da tabella PHP 29
P [PHP] Problema inserimento nuove chiavi in array PHP 2
paloppa Inserimento data su database MYSQL PHP 2
webimage [PHP] Non inserimento in tabella PHP 19
N [Java] codice per inserimento sql Java 0
T [HTML] inserimento nav HTML e CSS 8
G [HTML] Problemi con inserimento immagini HTML e CSS 7

Discussioni simili