inserire i blocchi anche su in alto..


Supporto, segnalazione e discussione di temi, moduli, blocchi, addons..ecc. di Phpnuke e derivati.

Moderatore: queen_live78

Avatar utente

Fondatore
Fondatore

Messaggi: 256

Iscritto il: sab ott 11, 2008 11:00 pm

Località: Torremaggiore(Foggia),Italia

Conoscenze Informatiche: Ottime conoscenze del mondo phpnuke, dell'html, php, mysql, css, javascript(Tutto del web!),
discrete conoscenze grafiche, infarinatura di c ++

Messaggio lun ott 12, 2009 5:05 pm

Re: inserire i blocchi anche su in alto..

  Codice:
/* Function themeheader()                                   */
/************************************************************/
$boxContent = 'Qui inserisci il contenuto html o testuale del blocco';
$titleblock="Titolo Blocco";
function themeheader() {
  global $nv, $mt, $user, $admin, $banners, $sitename, $slogan, $cookie, $prefix, $user_prefix, $db, $NameOfTheme, $bgcolor1, $bgcolor2, $bgcolor3, $bgcolor4, $bgcolor5, $bgcolor6, $bgcolor7, $textcolor1, $textcolor2, $textcolor3, $textcolor4, $boxContent, $titleblock;
  cookiedecode($user);
  $username = $cookie[1];
  if($username == "") {
    $username = "Anonymous";
  }
  echo "<body text='$textcolor1' topmargin='0' leftmargin='0' marginwidth='0' marginheight='0'>\n";
  include("themes/$NameOfTheme/style.php");
  if($banners == 1) {
    include("includes/babanners1.php");
  }
  $uresult = $db->sql_query("select `user_id` from `".$user_prefix."_users` where `username`='$username'");
  list($uid) = $db->sql_fetchrow($uresult);
  $presult = $db->sql_query("select * from `".$prefix."_bbprivmsgs` where `privmsgs_to_userid`='$uid' AND (`privmsgs_type`='0' OR `privmsgs_type`='1' OR `privmsgs_type`='3' OR `privmsgs_type`='5')");
  $pnumrow = $db->sql_numrows($presult);
  if($username == "Anonymous") {
    $priv_msgs = "<font class='content'>"._TNOINFOFOR." $username</font>";
  } else {
    $priv_msgs = "<font class='content'>"._TYOUHAVE." <a href='modules.php?name=Private_Messages'>$pnumrow</a> "._TPRIVATEMSG."</font>";
  }
  $mresult = $db->sql_query("select * from `".$user_prefix."_users`");
  $mnumrow = $db->sql_numrows($mresult);
  $members = "<font class='content'>"._TREGUSERS." $mnumrow</font>";
  if($username == "Anonymous") {
    $theuser = "<a href='modules.php?name=Your_Account&op=new_user'>"._TNEWUSER."</a> / <a href='modules.php?name=Your_Account'>"._TUSERLOGIN."</a>";
  } else {
    $theuser = ""._THELLO." $username: <a href='modules.php?name=Your_Account&op=logout'>"._TLOGOUT."</a>";
  }
  include("themes/$NameOfTheme/navbar.php");
  echo "<!-- START HEADER.HTML -->\n";
  echo "<center><table cellpadding='0' cellspacing='0' width='100%' border='0' align='center'><tr bgcolor='$textcolor4'><td align='center'>\n";
  echo "<table cellpadding='0' cellspacing='0' width='100%' border='0' align='center'>\n";
  echo "<tr bgcolor='$bgcolor5'><td width='10%'><img src='themes/$NameOfTheme/images/logo.gif' height='61' width='468' alt=''._TWELCOMETO.' $sitename' border='0'></td>\n";
  echo "<td align='right' width='90%'>$babanners1</td></tr>\n";
  echo "</table>\n";
  echo "<table cellpadding='0' cellspacing='0' width='100%' border='0' align='center'>\n";
  echo "<tr bgcolor='$textcolor1'><td><IMG src='themes/$NameOfTheme/images/pixel.gif' width='1' height='1' alt='' border='0' hspace='0'></td></tr>\n";
  echo "</table>\n";
  echo "<table cellpadding='0' cellspacing='0' width='100%' border='0' align='center'>\n";
  echo "<tr bgcolor='$bgcolor6' valign='middle'><td align='center' height='20'>";
  $public_msg = public_message();
  if($public_msg > "") { echo "$public_msg"; } else { echo "$navbar[$nv]"; }
  echo "</td></tr>\n";
  echo "</table>\n";
  echo "<table cellpadding='0' cellspacing='0' width='100%' border='0' align='center'>\n";
  echo "<tr bgcolor='$textcolor1'><td><IMG src='themes/$NameOfTheme/images/pixel.gif' width='1' height='1' alt='' border='0' hspace='0'></td></tr>\n";
  echo "</table>\n";
  echo "<table cellpadding='0' cellspacing='0' width='100%' border='0' align='center'>\n";
  echo "<tr valign='middle' bgcolor='$bgcolor5'>\n";
  echo "<td width='20%' nowrap><font class='content' color='$textcolor1'>&nbsp;&nbsp;$theuser</font></td>\n";
  echo "<td align='center' height='20' width='60%'><font class='content'>$priv_msgs</font></td>\n";
  echo "<td align='right' width='20%'><font class='content'>$members&nbsp;&nbsp;</font></td>\n";
  echo "</tr>\n";
  echo "</table>\n";
  echo "<table cellpadding='0' cellspacing='0' width='100%' border='0' align='center'>\n";
  echo "<tr bgcolor='$textcolor1'><td><IMG src='themes/$NameOfTheme/images/pixel.gif' width='1' height='1' alt='' border='0' hspace='0'></td></tr>\n";
  echo "</table>\n";
  echo "<table width='100%' cellpadding='0' cellspacing='0' border='0' align='center'>\n";
  echo "<tr bgcolor='$textcolor4'><td height='20' align='center'>";
  include($mt);
  echo "</td></tr>\n";
  echo "</table>\n";
themesidebox($titleblock, $boxContent);
  echo "<table width='100%' cellpadding='0' cellspacing='0' border='0' align='center'><tr bgcolor='$textcolor4' valign='top'>\n";
  echo "<td bgcolor='$textcolor4' width='180' valign='top'>\n";
  echo "<!-- END HEADER.HTML -->\n";
  blocks(left);
  echo "<!-- START CENTER_LEFT.HTML -->\n";
  echo "</td>\n";
  echo "<td><img src='themes/$NameOfTheme/images/pixel.gif' width='5' height='1' border='0' alt=''></td>\n";
  echo "<td valign='top' width='100%'>\n";
  echo "<!-- END CENTER_LEFT.HTML -->\n";
}


Modifica le variabili $titleblock e $blockcontent
Avatar utente

Affezionato
Affezionato

Messaggi: 15

Iscritto il: mar apr 21, 2009 11:00 pm

Messaggio mer ott 14, 2009 8:29 pm

Re: inserire i blocchi anche su in alto..

ummm come mai detto te non funzionava c'e apposizione era un altra ma sono riuscito a posizionalo giusto... ora rimane un altra cosa come faccio a meterlo centratto? o provato a metere cosi align="center"> e il codice che mi hai dato ma mi da errori... come si fa?grazie...
Avatar utente

Fondatore
Fondatore

Messaggi: 256

Iscritto il: sab ott 11, 2008 11:00 pm

Località: Torremaggiore(Foggia),Italia

Conoscenze Informatiche: Ottime conoscenze del mondo phpnuke, dell'html, php, mysql, css, javascript(Tutto del web!),
discrete conoscenze grafiche, infarinatura di c ++

Messaggio gio ott 15, 2009 2:14 pm

Re: inserire i blocchi anche su in alto..

Ecco a te il codice completo già centrato:



  Codice:
/* Function themeheader()                                   */
/************************************************************/
$boxContent = 'Qui inserisci il contenuto html o testuale del blocco';
$titleblock="Titolo Blocco";
function themeheader() {
  global $nv, $mt, $user, $admin, $banners, $sitename, $slogan, $cookie, $prefix, $user_prefix, $db, $NameOfTheme, $bgcolor1, $bgcolor2, $bgcolor3, $bgcolor4, $bgcolor5, $bgcolor6, $bgcolor7, $textcolor1, $textcolor2, $textcolor3, $textcolor4, $boxContent, $titleblock;
  cookiedecode($user);
  $username = $cookie[1];
  if($username == "") {
    $username = "Anonymous";
  }
  echo "<body text='$textcolor1' topmargin='0' leftmargin='0' marginwidth='0' marginheight='0'>\n";
  include("themes/$NameOfTheme/style.php");
  if($banners == 1) {
    include("includes/babanners1.php");
  }
  $uresult = $db->sql_query("select `user_id` from `".$user_prefix."_users` where `username`='$username'");
  list($uid) = $db->sql_fetchrow($uresult);
  $presult = $db->sql_query("select * from `".$prefix."_bbprivmsgs` where `privmsgs_to_userid`='$uid' AND (`privmsgs_type`='0' OR `privmsgs_type`='1' OR `privmsgs_type`='3' OR `privmsgs_type`='5')");
  $pnumrow = $db->sql_numrows($presult);
  if($username == "Anonymous") {
    $priv_msgs = "<font class='content'>"._TNOINFOFOR." $username</font>";
  } else {
    $priv_msgs = "<font class='content'>"._TYOUHAVE." <a href='modules.php?name=Private_Messages'>$pnumrow</a> "._TPRIVATEMSG."</font>";
  }
  $mresult = $db->sql_query("select * from `".$user_prefix."_users`");
  $mnumrow = $db->sql_numrows($mresult);
  $members = "<font class='content'>"._TREGUSERS." $mnumrow</font>";
  if($username == "Anonymous") {
    $theuser = "<a href='modules.php?name=Your_Account&op=new_user'>"._TNEWUSER."</a> / <a href='modules.php?name=Your_Account'>"._TUSERLOGIN."</a>";
  } else {
    $theuser = ""._THELLO." $username: <a href='modules.php?name=Your_Account&op=logout'>"._TLOGOUT."</a>";
  }
  include("themes/$NameOfTheme/navbar.php");
  echo "<!-- START HEADER.HTML -->\n";
  echo "<center><table cellpadding='0' cellspacing='0' width='100%' border='0' align='center'><tr bgcolor='$textcolor4'><td align='center'>\n";
  echo "<table cellpadding='0' cellspacing='0' width='100%' border='0' align='center'>\n";
  echo "<tr bgcolor='$bgcolor5'><td width='10%'><img src='themes/$NameOfTheme/images/logo.gif' height='61' width='468' alt=''._TWELCOMETO.' $sitename' border='0'></td>\n";
  echo "<td align='right' width='90%'>$babanners1</td></tr>\n";
  echo "</table>\n";
  echo "<table cellpadding='0' cellspacing='0' width='100%' border='0' align='center'>\n";
  echo "<tr bgcolor='$textcolor1'><td><IMG src='themes/$NameOfTheme/images/pixel.gif' width='1' height='1' alt='' border='0' hspace='0'></td></tr>\n";
  echo "</table>\n";
  echo "<table cellpadding='0' cellspacing='0' width='100%' border='0' align='center'>\n";
  echo "<tr bgcolor='$bgcolor6' valign='middle'><td align='center' height='20'>";
  $public_msg = public_message();
  if($public_msg > "") { echo "$public_msg"; } else { echo "$navbar[$nv]"; }
  echo "</td></tr>\n";
  echo "</table>\n";
  echo "<table cellpadding='0' cellspacing='0' width='100%' border='0' align='center'>\n";
  echo "<tr bgcolor='$textcolor1'><td><IMG src='themes/$NameOfTheme/images/pixel.gif' width='1' height='1' alt='' border='0' hspace='0'></td></tr>\n";
  echo "</table>\n";
  echo "<table cellpadding='0' cellspacing='0' width='100%' border='0' align='center'>\n";
  echo "<tr valign='middle' bgcolor='$bgcolor5'>\n";
  echo "<td width='20%' nowrap><font class='content' color='$textcolor1'>&nbsp;&nbsp;$theuser</font></td>\n";
  echo "<td align='center' height='20' width='60%'><font class='content'>$priv_msgs</font></td>\n";
  echo "<td align='right' width='20%'><font class='content'>$members&nbsp;&nbsp;</font></td>\n";
  echo "</tr>\n";
  echo "</table>\n";
  echo "<table cellpadding='0' cellspacing='0' width='100%' border='0' align='center'>\n";
  echo "<tr bgcolor='$textcolor1'><td><IMG src='themes/$NameOfTheme/images/pixel.gif' width='1' height='1' alt='' border='0' hspace='0'></td></tr>\n";
  echo "</table>\n";
  echo "<table width='100%' cellpadding='0' cellspacing='0' border='0' align='center'>\n";
  echo "<tr bgcolor='$textcolor4'><td height='20' align='center'>";
  include($mt);
  echo "</td></tr>\n";
  echo "</table>\n";
echo "<center>";
themesidebox($titleblock, $boxContent);
echo "</center>";
  echo "<table width='100%' cellpadding='0' cellspacing='0' border='0' align='center'><tr bgcolor='$textcolor4' valign='top'>\n";
  echo "<td bgcolor='$textcolor4' width='180' valign='top'>\n";
  echo "<!-- END HEADER.HTML -->\n";
  blocks(left);
  echo "<!-- START CENTER_LEFT.HTML -->\n";
  echo "</td>\n";
  echo "<td><img src='themes/$NameOfTheme/images/pixel.gif' width='5' height='1' border='0' alt=''></td>\n";
  echo "<td valign='top' width='100%'>\n";
  echo "<!-- END CENTER_LEFT.HTML -->\n";
}
Precedente

Torna a Php Nuke

Chi c’è in linea

Visitano il forum: Nessuno e 0 ospiti

cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.
Traduzione Italiana phpBB.it
Time : 1.219s | 13 Queries | GZIP : Off