Back to top

Autore Topic: _blank forum  (Letto 1641 volte)

Offline Epcentro

  • Nuovo arrivato
  • *
  • Post: 36
    • Mostra profilo
_blank forum
« il: 13 Gen 2008, 13:57:53 »
Non riesco proprio ad arrivarci!  :-\
Dato questo codice
Codice: [Seleziona]
echo "<ul>";
while ($row = mysql_fetch_array($result, MYSQL_ASSOC))
{
echo "<li><a href=\"".$urlPath."/viewtopic.php?p=".$row['post_id']."#".$row['post_id']."\">".$row["topic_title"]." </a> inserito da <a href=\"".$urlPath."/profile.php?mode=viewprofile&u=".$row['user_id']."\">".$row['username']."</li>";
}
echo "</ul>";
dove caxpita inserisco target=_blank per far si che si apra una nuova finestra?

Per precisione il codice del modulo è tutto questo
Codice: [Seleziona]
<?php
/**
* @version $Id: mod_latestphpbb2.php 0001 2007-03-01 23:30:55Z 
* @package filpi
* @copyright Copyright (C) 2007 filpi17. All rights reserved.
* @license http://www.filpi17.altervista.org GNU/GPL
* Joomla! is free software. This version may have been modified pursuant
* to the GNU General Public License, and as distributed it includes or
* is derivative of works licensed under the GNU General Public License or
* other free or open source software licenses.
* See COPYRIGHT.php for copyright notices and details.
*/

// no direct access
defined'_VALID_MOS' ) or die( 'Restricted access' );

global 
$mosConfig_offset$mosConfig_live_site$mainframe;

$type  intval$params->get'type') );
$count  intval$params->get'count') );
$catid  trim$params->get'catid' ) );
$secid  trim$params->get'secid' ) );
$show_front $params->get'show_front');

$urlPath "http://".$_SERVER['SERVER_NAME']."/forum";
$urlImg "http://".$_SERVER['SERVER_NAME']."/forum/templates/subSilver/images/folder_new_big.gif";
$phpbb_root_path 'forum/';

define('IN_PHPBB'true);

$table_prefix "phpbb_";
$table_topics $table_prefix"topics";
$table_forums $table_prefix"forums";
$table_posts $table_prefix"posts";
$table_users $table_prefix"users";

$query "SELECT t.topic_id, t.topic_title, t.topic_last_post_id, t.forum_id, p.post_id, p.poster_id, p.post_time, u.user_id, u.username
FROM 
$table_topics t, $table_forums f, $table_posts p, $table_users u
WHERE t.topic_id = p.topic_id AND
f.forum_id = t.forum_id AND
t.topic_status <> 2 AND
p.post_id = t.topic_last_post_id AND
p.poster_id = u.user_id
ORDER BY p.post_id DESC LIMIT 
$count";
$result mysql_query($query) or die($query);

echo 
"<ul>";
while (
$row mysql_fetch_array($resultMYSQL_ASSOC))
{
echo "<li><a href=\"".$urlPath."/viewtopic.php?p=".$row['post_id']."#".$row['post_id']."\">".$row["topic_title"]." </a> inserito da <a href=\"".$urlPath."/profile.php?mode=viewprofile&u=".$row['user_id']."\">".$row['username']."</li>";
}
echo 
"</ul>";

mysql_free_result($result);
?>



Offline ilbassa

  • Esploratore
  • **
  • Post: 53
  • Sesso: Maschio
    • Mostra profilo
Re: _blank forum
« Risposta #1 il: 13 Gen 2008, 14:43:44 »
Ciao,
di solito i link sono del tipo:
Codice: [Seleziona]
<a href="www.sito.it" target="_blank">testolink</a>quindi nel tuo caso

echo "<li>
<a href=\"".$urlPath."/viewtopic.php?p=".$row['post_id']."#".$row['post_id']."\"
target=\"_blank\">
".$row["topic_title"]." [/url] inserito da <a href=\"".$urlPath."/profile.php?mode=viewprofile&u=".$row['user_id']."\">".$row['username']."</li>";

Dovrebbe funzionare!

Offline Epcentro

  • Nuovo arrivato
  • *
  • Post: 36
    • Mostra profilo
Re: _blank forum
« Risposta #2 il: 13 Gen 2008, 18:08:26 »
funziona, grazie....
sbagliavo la collocazione del codice....
grazie ancora

Offline ilbassa

  • Esploratore
  • **
  • Post: 53
  • Sesso: Maschio
    • Mostra profilo
Re: _blank forum
« Risposta #3 il: 13 Gen 2008, 18:18:01 »
prego!

 



Web Design Bolzano Kreatif