Menú

Mostrar Mensajes

Esta sección te permite ver todos los mensajes escritos por este usuario. Ten en cuenta que sólo puedes ver los mensajes escritos en zonas a las que tienes acceso en este momento.

Mostrar Mensajes Menú

Mensajes - [Case]

#251
PHP / Re: Header Aleatorio
8 Diciembre 2007, 20:49 PM
Problema resuelto, si alguien quiere saber cual es el condigo con exactitud, yo los publico si quieren.
Este codigo es especial, para los foros que estan hechos con PHPBB2

PD: Saludos
#252
PHP / Re: Header Aleatorio
7 Diciembre 2007, 14:50 PM
Yeah!!!
Ya he logrado hacer el archivo php, que genera los header aleatorios.
http://kne-fansub.org/foro/templates/xand/images/aleatorias.php

Pero ahora, como lo inserto en mi pagina? :huh:
Yo lo meti haci, y no da!!:
Citar<td align="center" width="100%" valign="middle"><img src="templates/xand/aleatorias.php">

¨PD: Saludos
#253
PHP / Re: Header Aleatorio
7 Diciembre 2007, 06:52 AM
Creo que ya casi logro hacer que funciones.
Lo que hice fue crear un codigo en php llamado aleatorias.php
Citar<?php
$total = "3"; // Numero total de imagenes
$extension = ".png";// Definimos la extension, puede ser .jpg, gif, bmp, etc.
$carpeta = "templates/xand/images/header";//Carpeta con las imagenes
// De aqui para abajo no es necesario modificar nada
$start = "1";
$random = mt_rand($start, $total);
$image_name = $random . $extension;
echo "<img src="$carpeta/$image_name" border="0">";
?>

Y en el archivo tpl, le puse:
Citar<td align="center" width="100%" valign="middle"><img src="templates/xand/aleatorias.php">
            <table width="100%" border="0" cellpadding="2" cellspacing="0" background="templates/xand/images/menu.gif">
               <tr>
                  <td height="34" align="center" valign="middle" nowrap="nowrap"><span class="mainmenu">&nbsp;<a href="{U_FAQ}" class="mainmenu">{L_FAQ}</a>&nbsp; &nbsp;<a href="{U_SEARCH}" class="mainmenu">{L_SEARCH}</a>&nbsp; &nbsp;<a href="{U_MEMBERLIST}" class="mainmenu">{L_MEMBERLIST}</a>&nbsp; &nbsp;<a href="{U_GROUP_CP}" class="mainmenu">{L_USERGROUPS}</a>&nbsp;
                  <!-- BEGIN switch_user_logged_out -->
                  &nbsp;<a href="{U_REGISTER}" class="mainmenu">{L_REGISTER}</a>&nbsp;
                  <!-- END switch_user_logged_out -->
                  </span>
                  <td height="34" align="center" valign="middle" nowrap="nowrap"><span class="mainmenu">&nbsp;<a href="{U_PROFILE}" class="mainmenu">{L_PROFILE}</a>&nbsp; &nbsp;<a href="{U_PRIVATEMSGS}" class="mainmenu">{PRIVATE_MESSAGE_INFO}</a>&nbsp; &nbsp;<a href="{U_LOGIN_LOGOUT}" class="mainmenu">{L_LOGIN_LOGOUT}</a>&nbsp;</span></td>
               </tr>
            </table></td>
         </tr>
      </table>

      <br />

Pero no me salen, ya hize todo, meti los archivos en foro/templates/xand/images/header, todos renombramos a 1.png 2.png 3.png.

Pero al momento de ponerle "ver imagen" en firefox, me aparece este error:
Citar
Parse error: syntax error, unexpected T_VARIABLE, expecting ',' or ';' in /home/knefans/public_html/foro/templates/xand/aleatorias.php on line 9

Que estoys haciendo mal?

PD: Saludos
#254
PHP / Re: Header Aleatorio
6 Diciembre 2007, 15:54 PM
Perdon si es que me vi muy demandante. Yo no se nada de programacion en PHP, por eso es que pido ayuda.

Como debo de insertar el codigo?
Citar$var = rand(1, 2)

Asi?
Citar$var = rand(1, 2)<td align="center" width="100%" valign="middle"><img src="templates/xand/images/top.gif">

PD: Saludos
#255
PHP / Header Aleatorio
6 Diciembre 2007, 05:51 AM
Que tal amigos, necesito, hacer que cuando la pagina carge el header se haga aleatorio, por que tengo varios header que quiero que este, pero para eso necesito programar la pagina.

Este es el codigo, de un archivo en tpl, solo la parte que indica lo del header. La imagen se llama top.gif

Citar<body bgcolor="{T_BODY_BGCOLOR}" text="{T_BODY_TEXT}" link="#444444" vlink="#5F5F5F">

<a name="top"></a>

<table width="780px" cellspacing="0" cellpadding="10" border="0" align="center">
   <tr>
      <td class="bodyline"><table width="100%" cellspacing="0" cellpadding="0" border="0">
         <tr>            
            <td align="center" width="100%" valign="middle"><img src="templates/xand/images/top.gif">
            <table width="100%" border="0" cellpadding="2" cellspacing="0" background="templates/xand/images/menu.gif">
               <tr>
                  <td height="34" align="center" valign="middle" nowrap="nowrap"><span class="mainmenu">&nbsp;<a href="{U_FAQ}" class="mainmenu">{L_FAQ}</a>&nbsp; &nbsp;<a href="{U_SEARCH}" class="mainmenu">{L_SEARCH}</a>&nbsp; &nbsp;<a href="{U_MEMBERLIST}" class="mainmenu">{L_MEMBERLIST}</a>&nbsp; &nbsp;<a href="{U_GROUP_CP}" class="mainmenu">{L_USERGROUPS}</a>&nbsp;
                  <!-- BEGIN switch_user_logged_out -->
                  &nbsp;<a href="{U_REGISTER}" class="mainmenu">{L_REGISTER}</a>&nbsp;
                  <!-- END switch_user_logged_out -->
                  </span>
                  <td height="34" align="center" valign="middle" nowrap="nowrap"><span class="mainmenu">&nbsp;<a href="{U_PROFILE}" class="mainmenu">{L_PROFILE}</a>&nbsp; &nbsp;<a href="{U_PRIVATEMSGS}" class="mainmenu">{PRIVATE_MESSAGE_INFO}</a>&nbsp; &nbsp;<a href="{U_LOGIN_LOGOUT}" class="mainmenu">{L_LOGIN_LOGOUT}</a>&nbsp;</span></td>
               </tr>
            </table></td>
         </tr>
      </table>

      <br />
#256
PHP / Re: Alineacion del header.gif
4 Diciembre 2007, 20:47 PM
La verdad es que yo no se mucho de programacion PHP, se un poco de HTML, este codigo me lo ha creado un programa y yo solo lo he ido modificando para mi web.
La ruta, donde indica la direccion de la pagina esta en config.php pero ahi no esta, creo que esta en el Header.
En esta parte:
Citar<body>

<table border="0" width="100%" cellspacing="0" cellpadding="0">
  <tr>
    <td width="1%" align="left"><a href="playing.php"><img border="0" src="<? echo $logo; ?>"></a><br>

Por que si modifico la parte del img border="0", y cambio el cero por cualquier otro numnero, me saldra un borde en el header.
Creo que lo que tengo que hacer es insertar un codigo que indique la alineacion de la imagen.

PD: Saludos
#257
PHP / Alineacion del header.gif
4 Diciembre 2007, 18:46 PM
Wenas chicos. En mi pagina http://www.rockeando.net/sistema Si se fijan la imagen principal, esta a lineado a la izquierda, yo lo que quiero hacer es ponerlo en el centro, pero no se como:
El Index al abrise manda a un php llamado playing.php y a header.php, pero no se en cual de los dos me da para centrar la imagen aqui les dejo el codigo de ambos.

HEADER.PHP:
Citar<html>

<head>
<title>Rockola Rockeando.net</title>
<? require("style.css"); ?>
<script language="JavaScript1.2"><? require("songinfo.js"); ?></script>
<script language='JavaScript1.2' src='http://www.audiorealm.com/player/player.js.html?srefID=1&subscription=no'></script>
<? require("req/request.java.php"); ?>
<script language="JavaScript1.2">
function PictureFail(picname) {
    if (document.images)
    {
        document.images[picname].width   = 1;
      document.images[picname].height  = 1;
    }
}
</script>
</head>

<body>

<table border="0" width="100%" cellspacing="0" cellpadding="0">
  <tr>
    <td width="1%" align="left"><a href="playing.php"><img border="0" src="<? echo $logo; ?>"></a><br>
      <img border="0" src="images/spacer.gif" width="15" height="13"></td>
    <td width="99%" valign="middle" align="left"><b><font size="5"> &nbsp; <? echo $station; ?></font></b></td>
  </tr>
  <tr>
    <td width="100%" colspan="2" bgcolor="#000080"><img border="0" src="images/spacer.gif" width="1" height="1"></td>
  </tr>
</table>

<br>

<table border=0 cellspacing=5 cellpadding=5>
<tr>
<td align="center" valign="top" width="1%">
<? require("nav.php"); ?>
<br>
<br>
<? require("partners.php"); ?>

</td>
<td align="center" valign="top" width="99%">

PLAYING.PHP

Citar<?
require("config.php");

$db->open("SELECT songlist.*, historylist.listeners as listeners, historylist.requestID as requestID, historylist.date_played as starttime FROM historylist,songlist WHERE (historylist.songID = songlist.ID) AND (songlist.songtype='S') ORDER BY historylist.date_played DESC",6);
$history = $db->rows();
reset($history);

$db->open("SELECT songlist.*, queuelist.requestID as requestID FROM queuelist, songlist WHERE (queuelist.songID = songlist.ID)  AND (songlist.songtype='S') AND (songlist.artist <> '') ORDER BY queuelist.sortID ASC",2);
$queue = $db->rows();
reset($queue);


//### Calculate the bezt time to refresh the webpage in order to show new updated song information
//==================================================================================================
list($key, $song) = each($history);
$listeners = $song["listeners"];

$starttime = strtotime($song["date_played"]);
$curtime = time();
$timeleft = $starttime+round($song["duration"]/1000)-$curtime;

  //Set refesh interval
if($timeleft>0) # 30 second minimum wait
   { $timeout = $timeleft;}      # if timeleft is valid, refresh on timeleft (should be end of song)
else
   { $timeout = 90; }         # otherwise, fall back on 90 second refresh
   
if(($timeout>180) or ($timeout==0)) $timeout = 180;
if($timeout<30) $timeout  = 30;
   
$refreshURL = "playing.php?buster=".date('dhis').rand(1,1000);
//==================================================================================================


$pic_cnt = 0;
function PicName()
{
global $pic_cnt;
echo "Picture".$pic_cnt;
}

function NextPicName()
{
global $pic_cnt;
$pic_cnt += 1;
PicName();
}

function PutSongRow(&$song)
{
global $rc, $showpic, $darkrow, $lightrow;
PrepareSong($song);

$rc++;
$bgcolor = $darkrow;
if(($rc % 2)==0) $bgcolor = $lightrow;

?>
  <tr bgcolor="<? echo $bgcolor; ?>">
 
<?if($showpic){?>
    <td valign="middle" width="1%">
<? if($song["haspicture"]) {?>   
       <a href="<? echo $song["buycd"]; ?>" target="_blank"><img id="<? NextPicName(); ?>" onError="PictureFail('<? PicName(); ?>')" width="60" height="60" src="<? echo $song["picture"]; ?>" alt="" border=0></a>
<?};?>       
   </td>
<?}?>   


    <td <?if(!$showpic) echo "colspan=2"?>><font size="2" color="#003366"><small><?
     echo $song["combine"];
     if($song["requestid"]!=0) { echo " ~requested~ "; }
     ?></small></font></td>
    <td nowrap width="1%">
      <p align="center"><font size="2" color="#003366"><a href="<? echo $song["buycd"]; ?>" target="_blank"><img
    src="images/buy.gif" alt="Buy this CD now!" border="0"></a></font>
    </td>
    <td nowrap width="1%">
      <p align="center"><font size="2" color="#003366"><a href="<? echo $song["website"]; ?>" target="_blank"><img
    src="images/home.gif" alt="Artist homepage" border="0"></a></font>
    </td>
   
   <td nowrap align="center" nowrap width="1%">
      <font size="2" color="#003366"><a href="javascript:songinfo(<? echo $song["songid"]; ?>)"><img
    src="images/info.gif" alt="Song information" border="0"></a></font>
    </td>
   
    <td nowrap><font color="#003366" size="2"><small><? echo $song["album"]; ?></small></font></td>
    <td nowrap>
      <p align="right"><font color="#003366" size="2"><small><strong><? echo $song["mmss"]; ?></strong></small></font>
    </td>
  </tr>
<?
}//PutSongRow

/* ## ===================================================================== ## */
?>

<? require("header.php"); ?>

<SCRIPT LANGUAGE="javascript">
<!---
var refreshID = "";
refreshID = setTimeout("DoRefresh()", <? echo ($timeout*1000); ?>);

function DoRefresh()
{
  document.location.href = '<? echo $refreshURL; ?>';
}
//--->
</SCRIPT>

<?if($listeners>0)
echo "Actualmente hay $listeners radioescuchas difrutando de la radio!<br><br>";
?>
<table border="0" width="98%" cellspacing="0" cellpadding="4">
  <tr bgcolor="#002E5B">
    <td colspan="2" nowrap align="left">
      <p><font face="Verdana, Arial, Helvetica, sans-serif" size="1" color="#FFFFFF"><b>En Reproduccion</b></font>
   </td>
   <td colspan="3" nowrap align="center">
      <p><font face="Verdana, Arial, Helvetica, sans-serif" size="1" color="#FFFFFF"><b>Links</b></font>
    </td>
    <td nowrap align="left">
      <p><font face="Verdana, Arial, Helvetica, sans-serif" size="1" color="#FFFFFF"><b>Album</b></font>
    </td>
   <td nowrap align="Right">
      <p><font face="Verdana, Arial, Helvetica, sans-serif" size="1" color="#FFFFFF"><b>Tiempo</b></font>
    </td>
  </tr>

<?
  $rc=0;
  PutSongRow($song);
  $mainsong = $song;
?>
 

<?
if(count($queue)>0){?>
<tr bgcolor="<? echo $lightrow; ?>"><td colspan="7">
<b><font size="2" color="#777777">A continuacion!:</font></b>

<font size="2" color="003366"><b>
<?
$i=0;
while(list($key, $song) = each($queue))
{
  if(empty($song["artist"]))
   $song["artist"] = 'Unknown';
 
   if($i>0) echo ", ";
   echo $song["artist"];
   if($song["requestid"]!=0)
   { echo " ~requested~"; }
   $i++;
 
}
?>
</b></font></td></tr>
<?}?>

  <tr bgcolor="#002E5B">
    <td colspan="7" nowrap>
      <p align="left"><b><font size="1" face="Verdana, Arial, Helvetica, sans-serif" color="#FFFFFF">Canciones Recientes
        </font></b>
    </td>
  </tr>
 
<?
  $rc=0;
  while(list($key, $song) = each($history))
    PutSongRow($song);
?>
</table>

</td><td valign='top' align='center'>

<?
####################
# Pide una Dedicacion
require("dedication.php");
#===================   
?> 

<?
####################
#    
if($mainsong["haspicture"])
require("buycd.php");
#===================
?>

 
<?
##################
# Las 10 mas pedidas!
if($showtoprequests)
  require("top10requests.php");
#===================
?>   
   
   
</td>   
 
<? require("footer.php"); ?>


Haber quien me puede dar una pequeña orientacion, si tienen alguna duda haganmelo saber por favor!.

PD: Saludos
#258
Diseño Gráfico / Se busca diseñador grafico
23 Diciembre 2006, 03:56 AM
Que tal, estoy creando un nuevo team, para poder crear una nueva pagina, pero necesitamos a un diseñador, que tenga algo de experiencia, por que necesitamos un logo, si estas interesado por favor enviame un privado para poder hablar del tema. ;) ;) ;) ;) ;)