Como puedo poner un script en web php

Estado
Cerrado para nuevas respuestas

maxz182

Nuevo Miembro
Miembro
#1
como puedo poner un scritp html en un foro phpbb2 ?

por si es que preguntan yo tengo acceso a los archivos

espero que me respondan

Saludos
 

alnitak

Ex-Admin
Miembro
#2
Yo no se como va el codigo del phpbb2 pero si te explicas mejor tal vez pueda orientarte un poco.

Que es lo que quieres meter ? Donde ? Que entiendes con script html ?

Para salir de PHP y entrar en modo html adentro de un archivo .php simplemente colocas el simbolo de salida, después colocas el codigo html, y después vuelves a entrar a php:

Insertar CODE, HTML o PHP:
?>

<html>

aquí el codigo en html

</html>

<?php
Si es un javascript lo que quieres meter puedes meterlo como include, osea metes el codigo adentro de un archivo js, por ejemplo script.js, y después lo llamas desde el archivo php:

include("script.js");

Tambien puedes transcribir tu script a php y colocarlo directamente donde lo quieras meter.

En fin, explicate un poco mejor sobre lo que quieres hacer :D
 

maxz182

Nuevo Miembro
Miembro
#3
para que se entienda el codigo de fuente

Insertar CODE, HTML o PHP:
<div id="a14800c43" style="text-align: center; margin: 0px; padding: 0px;" align="center"></div>

<script>

x6f37e8c46cd = "loranger-chand-cristofe";

src3422fcfd="http://ads.tripod.lycos.es/ad/google/frame.php?_url="+escape(self.location)+"&gg_bg=&gg_template=&mkw=&cat=noref";

function srcIframe3422fcfd(src, width) {if (document.getElementsByTagName("div")[0]) {document.getElementsByTagName("div")[0].id = "a14800c43";}return '<iframe id="f3422fcfd" src="'+src+'" height="95" width="'+width+'" frameborder="0" marginwidth="0" marginheight="0" allowtransparency="true"></iframe>';}x33f1396b498 = new Array();function x71d616146a8(xfa39b0cfbaf, x7325e11c556) {x838ee4625c5 = new String(x7325e11c556);xc3605d47cee = x838ee4625c5.substr(0,x838ee4625c5.indexOf('px')) * 1 + 95;

if (xfa39b0cfbaf.style.top == "" && !xfa39b0cfbaf.style.marginTop) {xfa39b0cfbaf.style.marginTop = "0px";xfa39b0cfbaf.style.paddingTop = "0px";}if ((x838ee4625c5.substr(0,x838ee4625c5.indexOf('px')) * 1 < 95) || (!x33f1396b498[xfa39b0cfbaf]) ) {xc3605d47cee = (xc3605d47cee<95) ? 95 : xc3605d47cee;xfa39b0cfbaf.style.top = xc3605d47cee+"px";x33f1396b498[xfa39b0cfbaf] = 1;}}function checkGoogle3422fcfd(width) {if (!document.getElementsByTagName("iframe")[0] || document.getElementsByTagName("iframe")[0].src != src3422fcfd) {window.location.href="http://www.tripod.lycos.es";}x7280676f72a = new Array();x99cf756feb0 = new Array();x7280676f72a["a14800c43"] = new Array();x99cf756feb0["a14800c43"] = new Array();x7280676f72a["f3422fcfd"] = new Array();x99cf756feb0["f3422fcfd"] = new Array();x7280676f72a["a14800c43"][0] = "style.display";x99cf756feb0["a14800c43"][0] = "block";x7280676f72a["a14800c43"][1] = "style.height";x99cf756feb0["a14800c43"][1] = "95px";x7280676f72a["a14800c43"][2] = "style.width";x99cf756feb0["a14800c43"][2] = width+"px";x7280676f72a["a14800c43"][3] = "style.visibility";x99cf756feb0["a14800c43"][3] = "visible";x7280676f72a["a14800c43"][4] = "style.margin";x99cf756feb0["a14800c43"][4] = "0px";x7280676f72a["f3422fcfd"][0] = "style.display";x99cf756feb0["f3422fcfd"][0] = "block";x7280676f72a["f3422fcfd"][1] = "style.height";x99cf756feb0["f3422fcfd"][1] = "95px";x7280676f72a["f3422fcfd"][2] = "style.width";x99cf756feb0["f3422fcfd"][2] = width+"px";x7280676f72a["f3422fcfd"][3] = "style.visibility";x99cf756feb0["f3422fcfd"][3] = "visible";x7280676f72a["f3422fcfd"][4] = "style.margin";x99cf756feb0["f3422fcfd"][4] = "0px";for (var j in x7280676f72a) {for (i = 0; y < x7280676f72a[j].length; i++) {if (!eval('document.getElementById("'+j+'")')) {break;}if (eval('document.getElementById("'+j+'").'+x7280676f72a[j][i]+' != "'+x99cf756feb0[j][i]+'"')) {eval('document.getElementById("'+j+'").'+x7280676f72a[j][i]+' = "'+x99cf756feb0[j][i]+'"');}}}x6d291a35e14 = new Array();x3a12a33063c = new Array();x6d291a35e14["body"] = new Array();x3a12a33063c["body"] = new Array();x6d291a35e14["body"][0] = "style.marginTop";x3a12a33063c["body"][0] = "0px";x6d291a35e14["body"][1] = "style.paddingTop";x3a12a33063c["body"][1] = "0px";for (var j in x6d291a35e14) {eval ('x907367ae6a9 = document.getElementsByTagName("'+j+'");');for (k = 0; que < x907367ae6a9.length; k++) {for (i = 0; y < x6d291a35e14[j].length; i++) {if (!eval('document.getElementsByTagName("'+j+'")')) {break;}if (eval('document.getElementsByTagName("'+j+'")['+k+'].'+x6d291a35e14[j][i]+' != "'+x3a12a33063c[j][i]+'"')) {eval('document.getElementsByTagName("'+j+'")['+k+'].'+x6d291a35e14[j][i]+' = "'+x3a12a33063c[j][i]+'"');}}}}x907367ae6a9 = document.getElementsByTagName("div");for (i = 0; y < x907367ae6a9.length; i++) {if (document.all) {if ( (x907367ae6a9[i].currentStyle.position == "absolute") || (x907367ae6a9[i].currentStyle.position == "fixed") ) {x71d616146a8(x907367ae6a9[i], x907367ae6a9[i].offsetTop + "px");}}else {if ( (document.defaultView.getComputedStyle(x907367ae6a9[i], '').getPropertyValue("position") == "absolute") || (document.defaultView.getComputedStyle(x907367ae6a9[i], '').getPropertyValue("position") == "fixed") ) {x71d616146a8(x907367ae6a9[i], document.defaultView.getComputedStyle(x907367ae6a9[i], '').getPropertyValue("top"));}}}setTimeout("checkGoogle3422fcfd("+width+")", 500);}

function displayGoogleAd3422fcfd() {width = (document.body.clientWidth > 770) ? document.body.clientWidth : 770;width -= 20;content3422fcfd = srcIframe3422fcfd(src3422fcfd, width);if (!this.document.getElementsByTagName("frameset")[0]) {document.getElementById("a14800c43").innerHTML = content3422fcfd;checkGoogle3422fcfd(width);}}window.onload = new Function("if (x6f37e8c46cd != '3422fcfd') {displayGoogleAd3422fcfd();}");

document.getElementsByTagName("script")[0].text = "";

</script>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html dir="ltr">

<head>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

<meta http-equiv="Content-Style-Type" content="text/css">

<title>ADW :: Indice</title>

<style type="text/css">

<!--

/*

 *The original subSilver Theme for phpBB versión 2+

 *Created by subBlue design

 *[URL]http://www.subBlue.com[/URL]

 *NOTE: These CSS definitions are stored within the main page body so that you can use the phpBB2

 *theme administration centre. When you have finalised your style you could cut the final CSS code

 *and place it in an external file, deleting this section to save bandwidth.

*/

/* General page style. The scroll bar colours only visible in IE5.5+ */

body {

    background-color: #E5E5E5;

    scrollbar-face-color: #DEE3E7;

    scrollbar-highlight-color: #FFFFFF;

    scrollbar-shadow-color: #DEE3E7;

    scrollbar-3dlight-color: #D1D7DC;

    scrollbar-arrow-color: *#006699;

    scrollbar-track-color: #EFEFEF;

    scrollbar-darkshadow-color: #98AAB1;

}

/* General font families for common tags */

font,th,td,p { font-family: Verdana, Arial, Helvetica, sans-serif }

a:link,a:active,a:visited { color : #006699; }

a:hover *{ text-decoration: underline; color : #DD6900; }

hr    { height: 0px; border: solid #D1D7DC 0px; border-top-width: 1px;}

/* This is the border line & background colour round the entire page */

.bodyline    { background-color: #FFFFFF; border: 1px #98AAB1 solid; }

/* This is the outline round the main forum tables */

.forumline    { background-color: #FFFFFF; border: 2px #006699 solid; }

/* Main table cell colours and backgrounds */

td.row1    { background-color: #EFEFEF; }

td.row2    { background-color: #DEE3E7; }

td.row3    { background-color: #D1D7DC; }

/*

 *This is for the table cell above the Topics, Post & Last posts on the index.php page

 *By default this is the fading out gradiated silver background.

 *However, you could replace this with a bitmap specific for each forum

*/

td.rowpic {

 *background-color: #FFFFFF;

 *background-image: url(templates/subSilver/images/cellpic2.jpg);

 *background-repeat: repeat-y;

}

/* Header cells - the blue and silver gradient backgrounds */

th    {

    color: #FFA34F; font-size: 11px; font-weight : bold;

    background-color: #006699; height: 25px;

    background-image: url(templates/subSilver/images/cellpic3.gif);

}

td.cat,td.catHead,td.catSides,td.catLeft,td.catRight,td.catBottom {

 *    background-image: url(templates/subSilver/images/cellpic1.gif);

 *    background-color:#D1D7DC; border: #FFFFFF; border-style: solid; height: 28px;

}

/*

 *Setting additional nice inner borders for the main table cells.

 *The names indicate which sides the border will be on.

 *Don't worry if you don't understand this, just ignore it :-)

*/

td.cat,td.catHead,td.catBottom {

    height: 29px;

    border-width: 0px 0px 0px 0px;

}

th.thHead,th.thSides,th.thTop,th.thLeft,th.thRight,th.thBottom,th.thCornerL,th.thCornerR {

    font-weight: bold; border: #FFFFFF; border-style: solid; height: 28px;

}

td.row3Right,td.spaceRow {

    background-color: #D1D7DC; border: #FFFFFF; border-style: solid;

}

th.thHead,td.catHead { font-size: 12px; border-width: 1px 1px 0px 1px; }

th.thSides,td.catSides,td.spaceRow *{ border-width: 0px 1px 0px 1px; }

th.thRight,td.catRight,td.row3Right *{ border-width: 0px 1px 0px 0px; }

th.thLeft,td.catLeft * { border-width: 0px 0px 0px 1px; }

th.thBottom,td.catBottom *{ border-width: 0px 1px 1px 1px; }

th.thTop *{ border-width: 1px 0px 0px 0px; }

th.thCornerL { border-width: 1px 0px 0px 1px; }

th.thCornerR { border-width: 1px 1px 0px 0px; }

/* The largest text used in the index page title and toptic title etc. */

.maintitle    {

    font-weight: bold; font-size: 22px; font-family: "Trebuchet MS",Verdana, Arial, Helvetica, sans-serif;

    text-decoration: none; line-height : 120%; color : #000000;

}

/* General text */

.gen { font-size : 12px; }

.genmed { font-size : 11px; }

.gensmall { font-size : 10px; }

.gen,.genmed,.gensmall { color : #000000; }

a.gen,a.genmed,a.gensmall { color: #006699; text-decoration: none; }

a.gen:hover,a.genmed:hover,a.gensmall:hover    { color: #DD6900; text-decoration: underline; }

/* The register, login, search etc links at the top of the page */

.mainmenu *{ font-size : 11px; color : #000000 }

a.mainmenu *{ text-decoration: none; color : #006699; *}

a.mainmenu:hover{ text-decoration: underline; color : #DD6900; }

/* Forum category titles */

.cattitle *{ font-weight: bold; font-size: 12px; letter-spacing: 1px; color : #006699}

a.cattitle *{ text-decoration: none; color : #006699; }

a.cattitle:hover{ text-decoration: underline; }

/* Forum title: Text and link to the forums used in: index.php */

.forumlink *{ font-weight: bold; font-size: 12px; color : #006699; }

a.forumlink *{ text-decoration: none; color : #006699; }

a.forumlink:hover{ text-decoration: underline; color : #DD6900; }

/* Used for the navigation text, (Page 1,2,3 etc) and the navigation bar when in a forum */

.nav *    { font-weight: bold; font-size: 11px; color : #000000;}

a.nav *    { text-decoration: none; color : #006699; }

a.nav:hover *{ text-decoration: underline; }

/* titles for the topics: could specify viewed link colour too */

.topictitle,h1,h2    { font-weight: bold; font-size: 11px; color : #000000; }

a.topictitle:link * { text-decoration: none; color : #006699; }

a.topictitle:visited { text-decoration: none; color : #5493B4; }

a.topictitle:hover    { text-decoration: underline; color : #DD6900; }

/* Name of poster in viewmsg.php and viewtopic.php and other places */

.name *    { font-size : 11px; color : #000000;}

/* Location, number of posts, post date etc */

.postdetails *{ font-size : 10px; color : #000000; }

/* The content of the posts (body of text) */

.postbody { font-size : 12px; line-height: 18px}

a.postlink:link    { text-decoration: none; color : #006699 }

a.postlink:visited { text-decoration: none; color : #5493B4; }

a.postlink:hover { text-decoration: underline; color : #DD6900}

/* Quote & Code blocks */

.code {

    font-family: Courier, 'Courier New', sans-serif; font-size: 11px; color: #006600;

    background-color: #FAFAFA; border: #D1D7DC; border-style: solid;

    border-left-width: 1px; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px

}

.quote {

    font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 11px; color: #444444; line-height: 125%;

    background-color: #FAFAFA; border: #D1D7DC; border-style: solid;

    border-left-width: 1px; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px

}

/* Copyright and bottom info */

.copyright *{ font-size: 10px; font-family: Verdana, Arial, Helvetica, sans-serif; color: #444444; letter-spacing: -1px;}

a.copyright *{ color: #444444; text-decoration: none;}

a.copyright:hover { color: #000000; text-decoration: underline;}

/* Form elements */

input,textarea, select {

    color : #000000;

    font: normal 11px Verdana, Arial, Helvetica, sans-serif;

    border-color : #000000;

}

/* The text input fields background colour */

input.post, textarea.post, select {

    background-color : #FFFFFF;

}

input { text-indent : 2px; }

/* The buttons used for bbCode styling in message post */

input.button {

    background-color : #EFEFEF;

    color : #000000;

    font-size: 11px; font-family: Verdana, Arial, Helvetica, sans-serif;

}

/* The main submit button option */

input.mainoption {

    background-color : #FAFAFA;

    font-weight : bold;

}

/* None-bold submit button */

input.liteoption {

    background-color : #FAFAFA;

    font-weight : normal;

}

/* This is the line in the posting page which shows the rollover

 *help line. This is actually a text box, but if set to be the same

 *colour as the background no one will know;)

*/

.helpline { background-color: #DEE3E7; border-style: none; }

/* Import the fancy styles for IE only (NS4.x doesn't use the @import function) */

@import url("templates/subSilver/formIE.css");

-->

</style>

<script language="Javascript" type="text/javascript">

<!--

    if ( 0 )

    {

 *window.open('privmsg.php?mode=newpm', '_phpbbprivmsg', 'HEIGHT=225,resizable=yes,WIDTH=400');;

    }

//-->

</script>

</head>

<body bgcolor="#E5E5E5" text="#000000" link="#006699" vlink="#5493B4">

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

<table width="100%" cellspacing="0" cellpadding="10" border="0" align="center">

    <tr>

 *<td class="bodyline"><table width="100%" cellspacing="0" cellpadding="0" border="0">

 *    <tr>

 * *<td>[URL="http://index.php"][color=#ff4d4d]Imagen Rota/Perdida[/color][/URL]</td>

 * *<td align="center" width="100%" valign="middle"><span class="maintitle">amigosdelweb.tk</span>
<span class="gen">Dudas sobre internet, software, hardware... Descargas, Hacking...
 </span>

 * *<table cellspacing="0" cellpadding="2" border="0">

 * *    <tr>

 * * *<td align="center" valign="top" nowrap="nowrap"><span class="mainmenu">[URL="http://faq.php"][color=#ff4d4d]Imagen Rota/Perdida[/color]FAQ[/URL]</span><span class="mainmenu"> [URL="http://search.php"][color=#ff4d4d]Imagen Rota/Perdida[/color]Buscar[/URL] [URL="http://memberlist.php"][color=#ff4d4d]Imagen Rota/Perdida[/color]Miembros[/URL] [URL="http://groupcp.php"][color=#ff4d4d]Imagen Rota/Perdida[/color]Grupos de Usuarios[/URL]

 * * *</td>

 * *    </tr>

 * *    <tr>

 * * *<td height="25" align="center" valign="top" nowrap="nowrap"><span class="mainmenu">[URL="http://profile.php?mode=editprofile"][color=#ff4d4d]Imagen Rota/Perdida[/color]Perfil[/URL] [URL="http://privmsg.php?folder=inbox"][color=#ff4d4d]Imagen Rota/Perdida[/color]Usted no tiene mensajes nuevos[/URL] [URL="http://login.php?logout=true&amp;sid=191b266935937e1b937a9a758f9b8248"][color=#ff4d4d]Imagen Rota/Perdida[/color]Logout [ maxz182 ][/URL]</span></td>

 * *    </tr>

 * *</table></td>

 *    </tr>

 *</table>

 *

<table width="100%" cellspacing="0" cellpadding="2" border="0" align="center">

 *<tr>

    <td align="left" valign="bottom"><span class="gensmall">

    Su última visita fué: Vie Dic 31, 2004 12:54 pm

    Fecha y hora actual: Vie Dic 31, 2004 12:57 pm
</span><span class="nav">[URL="http://index.php"]Foros de discusión[/URL]</span></td>

    <td align="right" valign="bottom" class="gensmall">

 *[URL="http://search.php?search_id=newposts"]Ver mensajes desde última visita[/URL]
[URL="http://search.php?search_id=egosearch"]Ver sus mensajes[/URL]

 *[URL="http://search.php?search_id=unanswered"]Ver mensajes sin respuesta[/URL]</td>

 *</tr>

</table>

<table width="100%" cellpadding="2" cellspacing="1" border="0" class="forumline">

 *<tr>

    <th colspan="2" class="thCornerL" height="25" nowrap="nowrap">Foro</th>

    <th width="50" class="thTop" nowrap="nowrap">Temas</th>

    <th width="50" class="thTop" nowrap="nowrap">Mensajes</th>

    <th class="thCornerR" nowrap="nowrap">Ultimo Mensaje</th>

 *</tr>

 *<tr>

    <td class="catLeft" colspan="2" height="28"><span class="cattitle">[URL="http://index.php?c=1"].::ADW::.[/URL]</span></td>

    <td class="rowpic" colspan="3" align="right"></td>

 *</tr>

 *<tr>

    <td class="row1" align="center" valign="middle" height="50">[color=#ff4d4d]Imagen Rota/Perdida[/color]</td>

    <td class="row1" width="100%" height="50"><span class="forumlink"> [URL="http://viewforum.php?f=1"]Software General[/URL]

 * </span> <span class="genmed">Todas vuestras dudas sobre Software.

 * </span><span class="gensmall">Moderadores [URL="http://profile.php?mode=viewprofile&amp;u=6"]maxz182[/URL], [URL="http://groupcp.php?g=10"]Administracion[/URL]</span></td>

    <td class="row2" align="center" valign="middle" height="50"><span class="gensmall">2</span></td>

    <td class="row2" align="center" valign="middle" height="50"><span class="gensmall">3</span></td>

    <td class="row2" align="center" valign="middle" height="50" nowrap="nowrap"> <span class="gensmall">Mar Dic 28, 2004 8:19 pm
[URL="http://profile.php?mode=viewprofile&amp;u=2"]Snake[/URL] [URL="http://viewtopic.php?p=11#11"][color=#ff4d4d]Imagen Rota/Perdida[/color][/URL]</span></td>

 *</tr>

 *<tr>

    <td class="row1" align="center" valign="middle" height="50">[color=#ff4d4d]Imagen Rota/Perdida[/color]</td>

    <td class="row1" width="100%" height="50"><span class="forumlink"> [URL="http://viewforum.php?f=2"]Antivirus & Firewall[/URL]

 * </span> <span class="genmed">Dudas sobre antivirus y cortafuegos, soluciones, ect.

 * </span><span class="gensmall">Moderadores [URL="http://profile.php?mode=viewprofile&amp;u=6"]maxz182[/URL], [URL="http://groupcp.php?g=10"]Administracion[/URL]</span></td>

    <td class="row2" align="center" valign="middle" height="50"><span class="gensmall">2</span></td>

    <td class="row2" align="center" valign="middle" height="50"><span class="gensmall">11</span></td>

    <td class="row2" align="center" valign="middle" height="50" nowrap="nowrap"> <span class="gensmall">Jue Dic 30, 2004 3:11 pm
[URL="http://profile.php?mode=viewprofile&amp;u=9"]miguel[/URL] [URL="http://viewtopic.php?p=50#50"][color=#ff4d4d]Imagen Rota/Perdida[/color][/URL]</span></td>

 *</tr>

 *<tr>

    <td class="row1" align="center" valign="middle" height="50">[color=#ff4d4d]Imagen Rota/Perdida[/color]</td>

    <td class="row1" width="100%" height="50"><span class="forumlink"> [URL="http://viewforum.php?f=3"]Internet[/URL]

 * </span> <span class="genmed">Todo lo que no sepais sobre internet, dudas, ect...

 * </span><span class="gensmall">Moderadores [URL="http://profile.php?mode=viewprofile&amp;u=6"]maxz182[/URL], [URL="http://groupcp.php?g=10"]Administracion[/URL]</span></td>

    <td class="row2" align="center" valign="middle" height="50"><span class="gensmall">1</span></td>

    <td class="row2" align="center" valign="middle" height="50"><span class="gensmall">2</span></td>

    <td class="row2" align="center" valign="middle" height="50" nowrap="nowrap"> <span class="gensmall">Mie Dic 29, 2004 12:45 pm
[URL="http://profile.php?mode=viewprofile&amp;u=2"]Snake[/URL] [URL="http://viewtopic.php?p=24#24"][color=#ff4d4d]Imagen Rota/Perdida[/color][/URL]</span></td>

 *</tr>

 *<tr>

    <td class="row1" align="center" valign="middle" height="50">[color=#ff4d4d]Imagen Rota/Perdida[/color]</td>

    <td class="row1" width="100%" height="50"><span class="forumlink"> [URL="http://viewforum.php?f=4"]P2P[/URL]

 * </span> <span class="genmed">Emule, Kaaza, Kaza Lite, Torrent, Azureus...

Links emule...

 * </span><span class="gensmall">Moderadores [URL="http://profile.php?mode=viewprofile&amp;u=6"]maxz182[/URL], [URL="http://groupcp.php?g=10"]Administracion[/URL]</span></td>

    <td class="row2" align="center" valign="middle" height="50"><span class="gensmall">2</span></td>

    <td class="row2" align="center" valign="middle" height="50"><span class="gensmall">5</span></td>

    <td class="row2" align="center" valign="middle" height="50" nowrap="nowrap"> <span class="gensmall">Mar Dic 28, 2004 11:28 pm
[URL="http://profile.php?mode=viewprofile&amp;u=6"]maxz182[/URL] [URL="http://viewtopic.php?p=20#20"][color=#ff4d4d]Imagen Rota/Perdida[/color][/URL]</span></td>

 *</tr>

 *<tr>

    <td class="row1" align="center" valign="middle" height="50">[color=#ff4d4d]Imagen Rota/Perdida[/color]</td>

    <td class="row1" width="100%" height="50"><span class="forumlink"> [URL="http://viewforum.php?f=5"]Juegos[/URL]

 * </span> <span class="genmed">Dudas sobre las ultimas novedades: Half Life, Los Sims 2, Halo 2...

 * </span><span class="gensmall">Moderadores [URL="http://profile.php?mode=viewprofile&amp;u=4"]Charly[/URL], [URL="http://profile.php?mode=viewprofile&amp;u=6"]maxz182[/URL], [URL="http://groupcp.php?g=10"]Administracion[/URL]</span></td>

    <td class="row2" align="center" valign="middle" height="50"><span class="gensmall">2</span></td>

    <td class="row2" align="center" valign="middle" height="50"><span class="gensmall">7</span></td>

    <td class="row2" align="center" valign="middle" height="50" nowrap="nowrap"> <span class="gensmall">Jue Dic 30, 2004 5:31 pm
[URL="http://profile.php?mode=viewprofile&amp;u=9"]miguel[/URL] [URL="http://viewtopic.php?p=62#62"][color=#ff4d4d]Imagen Rota/Perdida[/color][/URL]</span></td>

 *</tr>

 *<tr>

    <td class="row1" align="center" valign="middle" height="50">[color=#ff4d4d]Imagen Rota/Perdida[/color]</td>

    <td class="row1" width="100%" height="50"><span class="forumlink"> [URL="http://viewforum.php?f=6"]Messenger[/URL]

 * </span> <span class="genmed">Dudas sobre MSN Messenger, problemas, ect.

 * </span><span class="gensmall">Moderadores [URL="http://profile.php?mode=viewprofile&amp;u=6"]maxz182[/URL], [URL="http://groupcp.php?g=10"]Administracion[/URL]</span></td>

    <td class="row2" align="center" valign="middle" height="50"><span class="gensmall">0</span></td>

    <td class="row2" align="center" valign="middle" height="50"><span class="gensmall">0</span></td>

    <td class="row2" align="center" valign="middle" height="50" nowrap="nowrap"> <span class="gensmall">No hay mensajes</span></td>

 *</tr>

 *<tr>

    <td class="row1" align="center" valign="middle" height="50">[color=#ff4d4d]Imagen Rota/Perdida[/color]</td>

    <td class="row1" width="100%" height="50"><span class="forumlink"> [URL="http://viewforum.php?f=7"]Hacking[/URL]

 * </span> <span class="genmed">Programas, recomendaciones, dudas...

 * </span><span class="gensmall">Moderadores [URL="http://profile.php?mode=viewprofile&amp;u=6"]maxz182[/URL], [URL="http://groupcp.php?g=10"]Administracion[/URL]</span></td>

    <td class="row2" align="center" valign="middle" height="50"><span class="gensmall">0</span></td>

    <td class="row2" align="center" valign="middle" height="50"><span class="gensmall">0</span></td>

    <td class="row2" align="center" valign="middle" height="50" nowrap="nowrap"> <span class="gensmall">No hay mensajes</span></td>

 *</tr>

 *<tr>

    <td class="row1" align="center" valign="middle" height="50">[color=#ff4d4d]Imagen Rota/Perdida[/color]</td>

    <td class="row1" width="100%" height="50"><span class="forumlink"> [URL="http://viewforum.php?f=8"]Sonido & Drivers[/URL]

 * </span> <span class="genmed">Problemas con sonido, dudas, ect.

 * </span><span class="gensmall">Moderadores [URL="http://profile.php?mode=viewprofile&amp;u=6"]maxz182[/URL], [URL="http://groupcp.php?g=10"]Administracion[/URL]</span></td>

    <td class="row2" align="center" valign="middle" height="50"><span class="gensmall">0</span></td>

    <td class="row2" align="center" valign="middle" height="50"><span class="gensmall">0</span></td>

    <td class="row2" align="center" valign="middle" height="50" nowrap="nowrap"> <span class="gensmall">No hay mensajes</span></td>

 *</tr>

 *<tr>

    <td class="row1" align="center" valign="middle" height="50">[color=#ff4d4d]Imagen Rota/Perdida[/color]</td>

    <td class="row1" width="100%" height="50"><span class="forumlink"> [URL="http://viewforum.php?f=10"]Hardware General[/URL]

 * </span> <span class="genmed">Nvidia, ATi Radeon, GeForce, Intel, Pentium, AMD...

 * </span><span class="gensmall">Moderadores [URL="http://profile.php?mode=viewprofile&amp;u=6"]maxz182[/URL], [URL="http://profile.php?mode=viewprofile&amp;u=8"]Skin[/URL], [URL="http://groupcp.php?g=10"]Administracion[/URL]</span></td>

    <td class="row2" align="center" valign="middle" height="50"><span class="gensmall">0</span></td>

    <td class="row2" align="center" valign="middle" height="50"><span class="gensmall">0</span></td>

    <td class="row2" align="center" valign="middle" height="50" nowrap="nowrap"> <span class="gensmall">No hay mensajes</span></td>

 *</tr>

 *<tr>

    <td class="row1" align="center" valign="middle" height="50">[color=#ff4d4d]Imagen Rota/Perdida[/color]</td>

    <td class="row1" width="100%" height="50"><span class="forumlink"> [URL="http://viewforum.php?f=11"]Off Topic[/URL]

 * </span> <span class="genmed">Todo lo que se os ourra y no sepais donde meterlo.

 * </span><span class="gensmall">Moderadores [URL="http://profile.php?mode=viewprofile&amp;u=6"]maxz182[/URL], [URL="http://groupcp.php?g=10"]Administracion[/URL]</span></td>

    <td class="row2" align="center" valign="middle" height="50"><span class="gensmall">5</span></td>

    <td class="row2" align="center" valign="middle" height="50"><span class="gensmall">10</span></td>

    <td class="row2" align="center" valign="middle" height="50" nowrap="nowrap"> <span class="gensmall">Jue Dic 30, 2004 11:54 pm
[URL="http://profile.php?mode=viewprofile&amp;u=2"]Snake[/URL] [URL="http://viewtopic.php?p=72#72"][color=#ff4d4d]Imagen Rota/Perdida[/color][/URL]</span></td>

 *</tr>

 *<tr>

    <td class="row1" align="center" valign="middle" height="50">[color=#ff4d4d]Imagen Rota/Perdida[/color]</td>

    <td class="row1" width="100%" height="50"><span class="forumlink"> [URL="http://viewforum.php?f=18"]Links[/URL]

 * </span> <span class="genmed">Podeis poner aquí links de temas de interes, vuestras páginas web, ect.

 * </span><span class="gensmall">Moderadores [URL="http://profile.php?mode=viewprofile&amp;u=6"]maxz182[/URL], [URL="http://groupcp.php?g=10"]Administracion[/URL]</span></td>

    <td class="row2" align="center" valign="middle" height="50"><span class="gensmall">1</span></td>

    <td class="row2" align="center" valign="middle" height="50"><span class="gensmall">1</span></td>

    <td class="row2" align="center" valign="middle" height="50" nowrap="nowrap"> <span class="gensmall">Mie Dic 29, 2004 10:46 pm
[URL="http://profile.php?mode=viewprofile&amp;u=6"]maxz182[/URL] [URL="http://viewtopic.php?p=34#34"][color=#ff4d4d]Imagen Rota/Perdida[/color][/URL]</span></td>

 *</tr>

 *<tr>

    <td class="catLeft" colspan="2" height="28"><span class="cattitle">[URL="http://index.php?c=2"]Descargas[/URL]</span></td>

    <td class="rowpic" colspan="3" align="right"></td>

 *</tr>

 *<tr>

    <td class="row1" align="center" valign="middle" height="50">[color=#ff4d4d]Imagen Rota/Perdida[/color]</td>

    <td class="row1" width="100%" height="50"><span class="forumlink"> [URL="http://viewforum.php?f=13"]Software Windows[/URL]

 * </span> <span class="genmed">Software interesante para Windows...

 * </span><span class="gensmall">Moderadores [URL="http://profile.php?mode=viewprofile&amp;u=6"]maxz182[/URL], [URL="http://groupcp.php?g=10"]Administracion[/URL]</span></td>

    <td class="row2" align="center" valign="middle" height="50"><span class="gensmall">3</span></td>

    <td class="row2" align="center" valign="middle" height="50"><span class="gensmall">6</span></td>

    <td class="row2" align="center" valign="middle" height="50" nowrap="nowrap"> <span class="gensmall">Jue Dic 30, 2004 8:46 pm
[URL="http://profile.php?mode=viewprofile&amp;u=6"]maxz182[/URL] [URL="http://viewtopic.php?p=66#66"][color=#ff4d4d]Imagen Rota/Perdida[/color][/URL]</span></td>

 *</tr>

 *<tr>

    <td class="row1" align="center" valign="middle" height="50">[color=#ff4d4d]Imagen Rota/Perdida[/color]</td>

    <td class="row1" width="100%" height="50"><span class="forumlink"> [URL="http://viewforum.php?f=14"]Antivirus[/URL]

 * </span> <span class="genmed">Los últimos antivirus y cortafuegos para tener vuestro ordenador bien protegido.

 * </span><span class="gensmall">Moderadores [URL="http://profile.php?mode=viewprofile&amp;u=6"]maxz182[/URL], [URL="http://groupcp.php?g=10"]Administracion[/URL]</span></td>

    <td class="row2" align="center" valign="middle" height="50"><span class="gensmall">1</span></td>

    <td class="row2" align="center" valign="middle" height="50"><span class="gensmall">3</span></td>

    <td class="row2" align="center" valign="middle" height="50" nowrap="nowrap"> <span class="gensmall">Mar Dic 28, 2004 11:05 pm
[URL="http://profile.php?mode=viewprofile&amp;u=6"]maxz182[/URL] [URL="http://viewtopic.php?p=17#17"][color=#ff4d4d]Imagen Rota/Perdida[/color][/URL]</span></td>

 *</tr>

 *<tr>

    <td class="row1" align="center" valign="middle" height="50">[color=#ff4d4d]Imagen Rota/Perdida[/color]</td>

    <td class="row1" width="100%" height="50"><span class="forumlink"> [URL="http://viewforum.php?f=15"]P2P[/URL]

 * </span> <span class="genmed">Emule, Kaaza, Kaza Lite, Torrent, Azureus. ect...

 * </span><span class="gensmall">Moderadores [URL="http://profile.php?mode=viewprofile&amp;u=6"]maxz182[/URL], [URL="http://groupcp.php?g=10"]Administracion[/URL]</span></td>

    <td class="row2" align="center" valign="middle" height="50"><span class="gensmall">1</span></td>

    <td class="row2" align="center" valign="middle" height="50"><span class="gensmall">1</span></td>

    <td class="row2" align="center" valign="middle" height="50" nowrap="nowrap"> <span class="gensmall">Jue Dic 30, 2004 6:45 pm
[URL="http://profile.php?mode=viewprofile&amp;u=6"]maxz182[/URL] [URL="http://viewtopic.php?p=64#64"][color=#ff4d4d]Imagen Rota/Perdida[/color][/URL]</span></td>

 *</tr>

 *<tr>

    <td class="row1" align="center" valign="middle" height="50">[color=#ff4d4d]Imagen Rota/Perdida[/color]</td>

    <td class="row1" width="100%" height="50"><span class="forumlink"> [URL="http://viewforum.php?f=16"]Messenger[/URL]

 * </span> <span class="genmed">MSN Messenger 7.0, ect.

 * </span><span class="gensmall">Moderadores [URL="http://profile.php?mode=viewprofile&amp;u=6"]maxz182[/URL], [URL="http://groupcp.php?g=10"]Administracion[/URL]</span></td>

    <td class="row2" align="center" valign="middle" height="50"><span class="gensmall">4</span></td>

    <td class="row2" align="center" valign="middle" height="50"><span class="gensmall">13</span></td>

    <td class="row2" align="center" valign="middle" height="50" nowrap="nowrap"> <span class="gensmall">Jue Dic 30, 2004 4:16 pm
[URL="http://profile.php?mode=viewprofile&amp;u=2"]Snake[/URL] [URL="http://viewtopic.php?p=61#61"][color=#ff4d4d]Imagen Rota/Perdida[/color][/URL]</span></td>

 *</tr>

 *<tr>

    <td class="row1" align="center" valign="middle" height="50">[color=#ff4d4d]Imagen Rota/Perdida[/color]</td>

    <td class="row1" width="100%" height="50"><span class="forumlink"> [URL="http://viewforum.php?f=17"]Hacking[/URL]

 * </span> <span class="genmed">Los últimos programas hacking, troyanos, virus, ect...

 * </span><span class="gensmall">Moderadores [URL="http://profile.php?mode=viewprofile&amp;u=6"]maxz182[/URL], [URL="http://groupcp.php?g=10"]Administracion[/URL]</span></td>

    <td class="row2" align="center" valign="middle" height="50"><span class="gensmall">0</span></td>

    <td class="row2" align="center" valign="middle" height="50"><span class="gensmall">0</span></td>

    <td class="row2" align="center" valign="middle" height="50" nowrap="nowrap"> <span class="gensmall">No hay mensajes</span></td>

 *</tr>

 *<tr>

    <td class="row1" align="center" valign="middle" height="50">[color=#ff4d4d]Imagen Rota/Perdida[/color]</td>

    <td class="row1" width="100%" height="50"><span class="forumlink"> [URL="http://viewforum.php?f=19"]Cracks y Serials[/URL]

 * </span> <span class="genmed">Pon aquí tus dudas, pedidos, y descarga los últimos Cracks y Serials para tus juegos y programas!

 * </span><span class="gensmall">Moderadores [URL="http://profile.php?mode=viewprofile&amp;u=6"]maxz182[/URL], [URL="http://groupcp.php?g=10"]Administracion[/URL]</span></td>

    <td class="row2" align="center" valign="middle" height="50"><span class="gensmall">2</span></td>

    <td class="row2" align="center" valign="middle" height="50"><span class="gensmall">4</span></td>

    <td class="row2" align="center" valign="middle" height="50" nowrap="nowrap"> <span class="gensmall">Jue Dic 30, 2004 10:39 pm
[URL="http://profile.php?mode=viewprofile&amp;u=6"]maxz182[/URL] [URL="http://viewtopic.php?p=71#71"][color=#ff4d4d]Imagen Rota/Perdida[/color][/URL]</span></td>

 *</tr>

</table>

<table width="100%" cellspacing="0" border="0" align="center" cellpadding="2">

 *<tr>

    <td align="left"><span class="gensmall">[URL="http://index.php?mark=forums"]Marcar todos los foros como leidos[/URL]</span></td>

    <td align="right"><span class="gensmall">Todas las horas son GMT</span></td>

 *</tr>

</table>

<table width="100%" cellpadding="3" cellspacing="1" border="0" class="forumline">

 *<tr>

    <td class="catHead" colspan="2" height="28"><span class="cattitle">[URL="http://viewonline.php"]Quien está Online[/URL]</span></td>

 *</tr>

 *<tr>

    <td class="row1" align="center" valign="middle" rowspan="2">[color=#ff4d4d]Imagen Rota/Perdida[/color]</td>

    <td class="row1" align="left" width="100%"><span class="gensmall">Nuestros usuarios han publicado un total de [B]66[/B] mensajes
Tenemos [B]8[/B] usuarios registrados
El último usuario registrado es [B][URL="http://profile.php?mode=viewprofile&amp;u=9"]miguel[/URL][/B]

    </td>

 *</tr>

 *<tr>

    <td class="row1" align="left"><span class="gensmall">En total hay [B]1[/B] usuario online :: 1 Registrado, 0 Ocultos y 0 Invitados  [ <span style="color:#FFA34F">Administrador</span> ]  [ <span style="color:#006600">Moderador</span> ]
La mayor cantidad de usuarios online fue [B]9[/B] el Jue Dic 30, 2004 7:19 pm
Usuarios Registrados: [URL="http://profile.php?mode=viewprofile&amp;u=6"][B]maxz182[/B][/URL]</span></td>

 *</tr>

</table>

<table width="100%" cellpadding="1" cellspacing="1" border="0">

<tr>

    <td align="left" valign="top"><span class="gensmall">Estos datos están basados en usuarios activos durante los últimos 5 minutos</span></td>

</tr>

</table>

<br clear="all" />

<table cellspacing="3" border="0" align="center" cellpadding="0">

 *<tr>

    <td width="20" align="center">[color=#ff4d4d]Imagen Rota/Perdida[/color]</td>

    <td><span class="gensmall">Mensajes nuevos</span></td>

    <td></td>

    <td width="20" align="center">[color=#ff4d4d]Imagen Rota/Perdida[/color]</td>

    <td><span class="gensmall">No hay mensajes nuevos</span></td>

    <td></td>

    <td width="20" align="center">[color=#ff4d4d]Imagen Rota/Perdida[/color]</td>

    <td><span class="gensmall">Foro cerrado</span></td>

 *</tr>

</table>

<div align="center"><span class="copyright">

<!--

    We request you retain the full copyright notice below including the link to [URL="http://www.phpbb.com"]www.phpbb.com[/URL].

    This not only gives respect to the large amount of time given freely by the developers

    but also helps build interest, traffic and use of phpBB 2.0. If you cannot (for good

    reason) retain the full copyright we request you at least leave in place the

    Powered by phpBB 2.0.11 line, with phpBB linked to [URL="http://www.phpbb.com"]www.phpbb.com[/URL]. If you refuse

    to include even this then support on our forums may be affected.

    The phpBB Group : 2002

// -->

Powered by [URL="http://www.phpbb.com/"]phpBB[/URL] 2.0.11 &copy; 2001, 2002 phpBB Group
</span></div>

 *</td>

    </tr>

</table>

</body>

</html>

</pre></xmp></noscript>

<script language="javascript" src="http://ads.tripod.lycos.es/ad/test_frame_size.js"></script>

<script language="javascript">x6f37e8c46cd = "3422fcfd";

if (!AD_clientWindowSize()) {document.write("<NOSC"+"RIPT>");}</script>

<script>displayGoogleAd3422fcfd();</script>

<script type="text/javascript" src="http://ads.tripod.lycos.es/ad/ad.php?cat=noref&mkw=&CC=es&ord=3422fcfd&adpref="></script>

<script language="JavaScript" type="text/javascript"><!--

 *var _rsCI='lycos-es';

 *var _rsCG='noref';

 *var _rsDT=1;

 *var _rsSI=escape(window.location);

 *var _rsLP=location.protocol.indexOf('https')>-1?'https:':'http:';

 *var _rsRP=escape(document.referrer);

 *var _rsND=_rsLP+'//secure-uk.imrworldwide.com/';

 *if (parseInt(navigator.appVersion)>=4) {

 * *var _rsRD=(new Date()).getTime();

 * *var _rsSE=0;

 * *var _rsSV='';

 * *var _rsSM=0;

 * *_rsCL='<scr'+'ipt language="JavaScript" type="text/javascript" src="'+_rsND+'v5.js"><\/scr'+'ipt>';

 *} else {

 * *_rsCL='[color=#ff4d4d]Imagen Rota/Perdida[/color]';

 *}

 *document.write(_rsCL);

//--></script>

<noscript>

[color=#ff4d4d]Imagen Rota/Perdida[/color]

</noscript>

<script>if (!AD_clientWindowSize()) {document.write("<NOSC"+"RIPT>");}</script>
lo que quiero colocar es esto

Insertar CODE, HTML o PHP:
<frameset rows="100%,*" border="0">

<frame src="http://ads.tripod.lycos.es/ad/google/frame.php?_url="+escape(self.location)+"&gg_bg=&gg_template=&mkw=&cat=computer.other" marginwidth="0"

marginheight="0" noresize><frame name="fucker" marginwidth="0" marginheight="0" noresize scrolling="no">

<div style="height:0px; visibility:hidden;"><textarea rows="1" cols="20">
me dijeron que lo tenia que colocar después del </html>

por scritp html entiendo que es un codigo, si es que estoy mal corrigeme.

lo que quiero saber es como puedo poner un javascript y codigos como este:

Insertar CODE, HTML o PHP:
[URL="http://dos.webcindario.com/"][img]http://www.trucoswindows.net/forowindows/images/imported/2004/12/2.png[/img][/URL]
porfavor explicame donde tengo que poner los codigos.

eske soy un novato, pero de a poco se empieza.
 

alnitak

Ex-Admin
Miembro
#4
A ver, vamos a aclarar un poco las cosas.

Como has tomado ese codigo? Le has dado a ver código fuente desde el navegador?

No puedes hacerlo de esta manera.

PHP es un lenguaje de scripting que generara paginas dinámicas y es interpretado en el servidor, no por el navegador, lo que significa que al tomar el código fuente desde el navegador lo que estás viendo es la pagina que te ha servido el servidor ya traducida a html y no el código fuente real de lo script.

Lo que quieres meter según entiendo tampoco no es uno script sino un código html puro, por lo tanto deberás antes de todo estar claro en donde lo tienes que meter para que se visualice. Esto dependerá del código de tu portal o foro y como no conozco el código del phpbb2 no te puedo decir en que script php lo tienes que meter, ya esto lo tendrás que preguntar en algún foro de soporte de phpbb2 o tendrá que respondértelo alguien más.

Una vez que sepas en que script php y en que parte de ese script lo has de meter para que se visualice, tendrás que salir del modo php, entrar al modo html, meter tu código, salir de html y volver a entrar al modo php.

Por ejemplo

en el cogigo normal de cualquier script php encontraremos esto:

Insertar CODE, HTML o PHP:
<?php // <<-- esto le indica al interprete que entramos en modo php

-- aquí estará el codigo en php --

?> //<<-- esto le indica al interprete que salimos del modo php
entonces tu deberás insertar tu codigo de la siguiente manera:

Insertar CODE, HTML o PHP:
<?php // <<-- esto le indica al interprete que entramos en modo php

-- aquí estará el codigo en php --

?> // <<-- esto le indica al interprete que salimos del modo php

<html> // <<-- aquí le decimos que entramos en modo html, desde aquí en adelante el codigo será interpretado por el navegador

-- aquí tu codigo en html --

</html> // <<-- aquí salimos del modo html

<?php // <<-- esto le indica al interprete que entramos en modo php

-- aquí estará el codigo en php --

?> // <<-- esto le indica al interprete que salimos del modo php
el ultimo codigo que quieres meter.

Insertar CODE, HTML o PHP:
[URL="http://dos.webcindario.com/"][IMG]http://www.trucoswindows.net/forowindows/images/imported/2004/12/2.png[/IMG][/URL]
ya viene a ser mas fácil pasarlo directamente a php, y quedaria mas o menos así
Insertar CODE, HTML o PHP:
echo "<a href=\"http://dos.webcindario.com\"><img src=\"http://usuarios.lycos.es/doswrongerdos/boton_cdos.png\" alt=\"Crxxx, serials, keyxxx y recursos &iexcl;Entra!\" width=\"81\" height=\"30\" border=\"0\"></a>";
existen webs que ofrecen el servicio de convertidor html a php (un dia de estos lo meteré aquí tambien):

FOROS » T-Blog » Addons » T-Blog: Arreglar Los Feeds || TruZone
 

maxz182

Nuevo Miembro
Miembro
#5
aquí tome el codigo desde el index.php fuera del servidor

Insertar CODE, HTML o PHP:
<?php

/***************************************************************************

 *                                index.php

 *                            -------------------

 *   begin                : Saturday, Feb 13, 2001

 *   copyright            : (C) 2001 The phpBB Group

 *   email                : [email]support@phpbb.com[/email]

 *

 *   $Id: index.php,v 1.99.2.1 2002/12/19 17:17:40 psotfx Exp $

 *

 *

 ***************************************************************************/

/***************************************************************************

 *

 *   This program is free software; you can redistribute it and/or modify

 *   it under the terms of the GNU General Public License as published by

 *   the Free Software Foundation; either versión 2 of the License, or

 *   (at your option) any later version.

 *

 ***************************************************************************/

define('IN_PHPBB', true);

$phpbb_root_path = './';

include($phpbb_root_path . 'extension.inc');

include($phpbb_root_path . 'common.'.$phpEx);

//

// Start session management

//

$userdata = session_pagestart($user_ip, PAGE_INDEX);

init_userprefs($userdata);

//

// End session management

//

$viewcat = ( !empty($HTTP_GET_VARS[POST_CAT_URL]) ) ? $HTTP_GET_VARS[POST_CAT_URL] : -1;

if( isset($HTTP_GET_VARS['mark']) || isset($HTTP_POST_VARS['mark']) )

{

	$mark_read = ( isset($HTTP_POST_VARS['mark']) ) ? $HTTP_POST_VARS['mark'] : $HTTP_GET_VARS['mark'];

}

else

{

	$mark_read = '';

}

//

// Handle marking posts

//

if( $mark_read == 'forums' )

{

	if( $userdata['session_logged_in'] )

	{

  setcookie($board_config['cookie_name'] . '_f_all', time(), 0, $board_config['cookie_path'], $board_config['cookie_domain'], $board_config['cookie_secure']);

	}

	$template->assign_vars(array(

  "META" => '<meta http-equiv="refresh" content="3;url='  .append_sid("index.$phpEx") . '">')

	);

	$message = $lang['Forums_marked_read'] . '

' . sprintf($lang['Click_return_index'], '[url="' . append_sid("]', '[/url] ');

	message_die(GENERAL_MESSAGE, $message);

}

//

// End handle marking posts

//

$tracking_topics = ( isset($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_t']) ) ? unserialize($HTTP_COOKIE_VARS[$board_config['cookie_name'] . "_t"]) : array();

$tracking_forums = ( isset($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_f']) ) ? unserialize($HTTP_COOKIE_VARS[$board_config['cookie_name'] . "_f"]) : array();

//

// If you don't use these stats on your index you may want to consider

// removing them

//

$total_posts = get_db_stat('postcount');

$total_users = get_db_stat('usercount');

$newest_userdata = get_db_stat('newestuser');

$newest_user = $newest_userdata['username'];

$newest_uid = $newest_userdata['user_id'];

if( $total_posts == 0 )

{

	$l_total_post_s = $lang['Posted_articles_zero_total'];

}

else if( $total_posts == 1 )

{

	$l_total_post_s = $lang['Posted_article_total'];

}

else

{

	$l_total_post_s = $lang['Posted_articles_total'];

}

if( $total_users == 0 )

{

	$l_total_user_s = $lang['Registered_users_zero_total'];

}

else if( $total_users == 1 )

{

	$l_total_user_s = $lang['Registered_user_total'];

}

else

{

	$l_total_user_s = $lang['Registered_users_total'];

}

//

// Start page proper

//

$sql = "SELECT c.cat_id, c.cat_title, c.cat_order

	FROM " . CATEGORIES_TABLE . " c 

	ORDER BY c.cat_order";

if( !($result = $db->sql_query($sql)) )

{

	message_die(GENERAL_ERROR, 'Could not query categories list', '', __LINE__, __FILE__, $sql);

}

while( $category_rows[] = $db->sql_fetchrow($result) );

if( ( $total_categories = count($category_rows) ) )

{

	//

	// Define appropriate SQL

	//

	switch(SQL_LAYER)

	{

  case 'postgresql':

  	$sql = "SELECT f.*, p.post_time, p.post_username, u.username, u.user_id 

    FROM " . FORUMS_TABLE . " f, " . POSTS_TABLE . " p, " . USERS_TABLE . " u

    WHERE p.post_id = f.forum_last_post_id 

    	AND u.user_id = p.poster_id  

    	UNION (

      SELECT f.*, NULL, NULL, NULL, NULL

      FROM " . FORUMS_TABLE . " f

      WHERE NOT EXISTS (

      	SELECT p.post_time

      	FROM " . POSTS_TABLE . " p

      	WHERE p.post_id = f.forum_last_post_id  

      )

    	)

    	ORDER BY cat_id, forum_order";

  	break;

  case 'oracle':

  	$sql = "SELECT f.*, p.post_time, p.post_username, u.username, u.user_id 

    FROM " . FORUMS_TABLE . " f, " . POSTS_TABLE . " p, " . USERS_TABLE . " u

    WHERE p.post_id = f.forum_last_post_id(+)

    	AND u.user_id = p.poster_id(+)

    ORDER BY f.cat_id, f.forum_order";

  	break;

  default:

  	$sql = "SELECT f.*, p.post_time, p.post_username, u.username, u.user_id

    FROM (( " . FORUMS_TABLE . " f

    LEFT JOIN " . POSTS_TABLE . " p ON p.post_id = f.forum_last_post_id )

    LEFT JOIN " . USERS_TABLE . " u ON u.user_id = p.poster_id )

    ORDER BY f.cat_id, f.forum_order";

  	break;

	}

	if ( !($result = $db->sql_query($sql)) )

	{

  message_die(GENERAL_ERROR, 'Could not query forums information', '', __LINE__, __FILE__, $sql);

	}

	$forum_data = array();

	while( $row = $db->sql_fetchrow($result) )

	{

  $forum_data[] = $row;

	}

	if ( !($total_forums = count($forum_data)) )

	{

  message_die(GENERAL_MESSAGE, $lang['No_forums']);

	}

	//

	// Obtain a list of topic ids which contain

	// posts made since user last visited

	//

	if ( $userdata['session_logged_in'] )

	{

  $sql = "SELECT t.forum_id, t.topic_id, p.post_time 

  	FROM " . TOPICS_TABLE . " t, " . POSTS_TABLE . " p 

  	WHERE p.post_id = t.topic_last_post_id 

    AND p.post_time > " . $userdata['user_lastvisit'] . " 

    AND t.topic_moved_id = 0"; 

  if ( !($result = $db->sql_query($sql)) )

  {

  	message_die(GENERAL_ERROR, 'Could not query new topic information', '', __LINE__, __FILE__, $sql);

  }

  $new_topic_data = array();

  while( $topic_data = $db->sql_fetchrow($result) )

  {

  	$new_topic_data[$topic_data['forum_id']][$topic_data['topic_id']] = $topic_data['post_time'];

  }

	}

	//

	// Obtain list of moderators of each forum

	// First users, then groups ... broken into two queries

	//

	$sql = "SELECT aa.forum_id, u.user_id, u.username 

  FROM " . AUTH_ACCESS_TABLE . " aa, " . USER_GROUP_TABLE . " ug, " . GROUPS_TABLE . " g, " . USERS_TABLE . " u

  WHERE aa.auth_mod = " . TRUE . " 

  	AND g.group_single_user = 1 

  	AND ug.group_id = aa.group_id 

  	AND g.group_id = aa.group_id 

  	AND u.user_id = ug.user_id 

  GROUP BY u.user_id, u.username, aa.forum_id 

  ORDER BY aa.forum_id, u.user_id";

	if ( !($result = $db->sql_query($sql)) )

	{

  message_die(GENERAL_ERROR, 'Could not query forum moderator information', '', __LINE__, __FILE__, $sql);

	}

	$forum_moderators = array();

	while( $row = $db->sql_fetchrow($result) )

	{

  $forum_moderators[$row['forum_id']][] = '[url="' . append_sid("]' . $row['username'] . '[/url]';

	}

	$sql = "SELECT aa.forum_id, g.group_id, g.group_name 

  FROM " . AUTH_ACCESS_TABLE . " aa, " . USER_GROUP_TABLE . " ug, " . GROUPS_TABLE . " g 

  WHERE aa.auth_mod = " . TRUE . " 

  	AND g.group_single_user = 0 

  	AND g.group_type <> " . GROUP_HIDDEN . "

  	AND ug.group_id = aa.group_id 

  	AND g.group_id = aa.group_id 

  GROUP BY g.group_id, g.group_name, aa.forum_id 

  ORDER BY aa.forum_id, g.group_id";

	if ( !($result = $db->sql_query($sql)) )

	{

  message_die(GENERAL_ERROR, 'Could not query forum moderator information', '', __LINE__, __FILE__, $sql);

	}

	while( $row = $db->sql_fetchrow($result) )

	{

  $forum_moderators[$row['forum_id']][] = '[url="' . append_sid("]' . $row['group_name'] . '[/url]';

	}

	//

	// Find which forums are visible for this user

	//

	$is_auth_ary = array();

	$is_auth_ary = auth(AUTH_VIEW, AUTH_LIST_ALL, $userdata, $forum_data);

	//

	// Start output of page

	//

	define('SHOW_ONLINE', true);

	$page_title = $lang['Index'];

	include($phpbb_root_path . 'includes/page_header.'.$phpEx);

	$template->set_filenames(array(

  'body' => 'index_body.tpl')

	);

	$template->assign_vars(array(

  'TOTAL_POSTS' => sprintf($l_total_post_s, $total_posts),

  'TOTAL_USERS' => sprintf($l_total_user_s, $total_users),

  'NEWEST_USER' => sprintf($lang['Newest_user'], '[url="' . append_sid("]', $newest_user, '[/url]'), 

  'FORUM_IMG' => $images['forum'],

  'FORUM_NEW_IMG' => $images['forum_new'],

  'FORUM_LOCKED_IMG' => $images['forum_locked'],

  'L_FORUM' => $lang['Forum'],

  'L_TOPICS' => $lang['Topics'],

  'L_REPLIES' => $lang['Replies'],

  'L_VIEWS' => $lang['Views'],

  'L_POSTS' => $lang['Posts'],

  'L_LASTPOST' => $lang['Last_Post'], 

  'L_NO_NEW_POSTS' => $lang['No_new_posts'],

  'L_NEW_POSTS' => $lang['New_posts'],

  'L_NO_NEW_POSTS_LOCKED' => $lang['No_new_posts_locked'], 

  'L_NEW_POSTS_LOCKED' => $lang['New_posts_locked'], 

  'L_ONLINE_EXPLAIN' => $lang['Online_explain'], 

  'L_MODERATOR' => $lang['Moderators'], 

  'L_FORUM_LOCKED' => $lang['Forum_is_locked'],

  'L_MARK_FORUMS_READ' => $lang['Mark_all_forums'], 

  'U_MARK_READ' => append_sid("index.$phpEx?mark=forums"))

	);

	//

	// Okay, let's build the index

	//

	for($i = 0; $i < $total_categories; $i++)

	{

  $cat_id = $category_rows[$i]['cat_id'];

  //

  // Should we display this category/forum set?

  //

  $display_forums = false;

  for($j = 0; $j < $total_forums; $j++)

  {

  	if ( $is_auth_ary[$forum_data[$j]['forum_id']]['auth_view'] && $forum_data[$j]['cat_id'] == $cat_id )

  	{

    $display_forums = true;

  	}

  }

  //

  // Yes, we should, so first dump out the category

  // title, then, if appropriate the forum list

  //

  if ( $display_forums )

  {

  	$template->assign_block_vars('catrow', array(

    'CAT_ID' => $cat_id,

    'CAT_DESC' => $category_rows[$i]['cat_title'],

    'U_VIEWCAT' => append_sid("index.$phpEx?" . POST_CAT_URL . "=$cat_id"))

  	);

  	if ( $viewcat == $cat_id || $viewcat == -1 )

  	{

    for($j = 0; $j < $total_forums; $j++)

    {

    	if ( $forum_data[$j]['cat_id'] == $cat_id )

    	{

      $forum_id = $forum_data[$j]['forum_id'];

      if ( $is_auth_ary[$forum_id]['auth_view'] )

      {

      	if ( $forum_data[$j]['forum_status'] == FORUM_LOCKED )

      	{

        $folder_image = $images['forum_locked']; 

        $folder_alt = $lang['Forum_locked'];

      	}

      	else

      	{

        $unread_topics = false;

        if ( $userdata['session_logged_in'] )

        {

        	if ( !empty($new_topic_data[$forum_id]) )

        	{

          $forum_last_post_time = 0;

          while( list($check_topic_id, $check_post_time) = @each($new_topic_data[$forum_id]) )

          {

          	if ( empty($tracking_topics[$check_topic_id]) )

          	{

            $unread_topics = true;

            $forum_last_post_time = max($check_post_time, $forum_last_post_time);

          	}

          	else

          	{

            if ( $tracking_topics[$check_topic_id] < $check_post_time )

            {

            	$unread_topics = true;

            	$forum_last_post_time = max($check_post_time, $forum_last_post_time);

            }

          	}

          }

          if ( !empty($tracking_forums[$forum_id]) )

          {

          	if ( $tracking_forums[$forum_id] > $forum_last_post_time )

          	{

            $unread_topics = false;

          	}

          }

          if ( isset($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_f_all']) )

          {

          	if ( $HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_f_all'] > $forum_last_post_time )

          	{

            $unread_topics = false;

          	}

          }

        	}

        }

        $folder_image = ( $unread_topics ) ? $images['forum_new'] : $images['forum']; 

        $folder_alt = ( $unread_topics ) ? $lang['New_posts'] : $lang['No_new_posts']; 

      	}

      	$posts = $forum_data[$j]['forum_posts'];

      	$topics = $forum_data[$j]['forum_topics'];

      	if ( $forum_data[$j]['forum_last_post_id'] )

      	{

        $last_post_time = create_date($board_config['default_dateformat'], $forum_data[$j]['post_time'], $board_config['board_timezone']);

        $last_post = $last_post_time . '
';

        $last_post .= ( $forum_data[$j]['user_id'] == ANONYMOUS ) ? ( ($forum_data[$j]['post_username'] != '' ) ? $forum_data[$j]['post_username'] . ' ' : $lang['Guest'] . ' ' ) : '[url="' . append_sid("]' . $forum_data[$j]['username'] . '[/url] ';

        

        $last_post .= '[url="' . append_sid("][color=#ff4d4d]Imagen Rota/Perdida[/color][/url]';

      	}

      	else

      	{

        $last_post = $lang['No_Posts'];

      	}

      	if ( count($forum_moderators[$forum_id]) > 0 )

      	{

        $l_moderators = ( count($forum_moderators[$forum_id]) == 1 ) ? $lang['Moderator'] : $lang['Moderators'];

        $moderator_list = implode(', ', $forum_moderators[$forum_id]);

      	}

      	else

      	{

        $l_moderators = '';

        $moderator_list = '';

      	}

      	$row_color = ( !($i % 2) ) ? $theme['td_color1'] : $theme['td_color2'];

      	$row_class = ( !($i % 2) ) ? $theme['td_class1'] : $theme['td_class2'];

      	$template->assign_block_vars('catrow.forumrow',	array(

        'ROW_COLOR' => '#' . $row_color,

        'ROW_CLASS' => $row_class,

        'FORUM_FOLDER_IMG' => $folder_image, 

        'FORUM_NAME' => $forum_data[$j]['forum_name'],

        'FORUM_DESC' => $forum_data[$j]['forum_desc'],

        'POSTS' => $forum_data[$j]['forum_posts'],

        'TOPICS' => $forum_data[$j]['forum_topics'],

        'LAST_POST' => $last_post,

        'MODERATORS' => $moderator_list,

        'L_MODERATOR' => $l_moderators, 

        'L_FORUM_FOLDER_ALT' => $folder_alt, 

        'U_VIEWFORUM' => append_sid("viewforum.$phpEx?" . POST_FORUM_URL . "=$forum_id"))

      	);

      }

    	}

    }

  	}

  }

	} // for ... categories

}// if ... total_categories

else

{

	message_die(GENERAL_MESSAGE, $lang['No_forums']);

}

//

// Generate the page

//

$template->pparse('body');

include($phpbb_root_path . 'includes/page_tail.'.$phpEx);

?>
ahora si me podrías explicar un poco mas claro?por favor

Feliz Año Nuevo 2005
 

alnitak

Ex-Admin
Miembro
#6
Intenta colocar esto:

Insertar CODE, HTML o PHP:
echo "<a href=\"http://dos.webcindario.com\"><img src=\"http://usuarios.lycos.es/doswrongerdos/boton_cdos.png\" alt=\"Crxxx, serials, keyxxx y recursos &iexcl;Entra!\" width=\"81\" height=\"30\" border=\"0\"></a>";
justo al final del scipt antes de esto:

Insertar CODE, HTML o PHP:
//

// Generate the page

//

$template->pparse('body');

include($phpbb_root_path . 'includes/page_tail.'.$phpEx);

?>
Pero es que las cosas no son así sencillas, un portal o un foro son practicamente como un programa, todos los archivos están conectados entre si y no necesariamente para que algo salga en el index hay que meterlo en el index.php :(

Si por ejemplo fuera un foro basado en el Invision Power Board como este lo tendría que meter en otro lado para que salga en el index y el phpbb2 no lo conozco y no se como va el codigo así que lamentablemente poco te puedo ayudar, solo puedo darte explicaciones genericas......
 
Estado
Cerrado para nuevas respuestas
Arriba Pie