Author Topic: Crear una nueva página en 4images  (Read 16021 times)

0 Members and 1 Guest are viewing this topic.

Offline excitex2

  • Addicted member
  • ******
  • Posts: 1.590
  • He desactivado la galería y el buscador
    • View Profile
Crear una nueva página en 4images
« on: March 22, 2005, 01:47:19 PM »
Saludos,,,

Este post debería estar más bien en las FAQ's,,, pero mientras no se vuelvan a crear las FAQ's, lo dejamos aquí.  :twisted:

crear una nueva plantilla , por ejemplo nueva_plantilla.html y subirla a templates/tu_plantilla/

Pongo el código de una plantilla, pero si no os sirve podeis pillar por ejemplo la de categories.html , borrar lo que no te sirva y en su lugar poner lo que tu deseis.

nueva_plantilla.html

Code: [Select]
{header}
<table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
  <tr>
    <td>
      <table width="100%" border="0" cellspacing="0" cellpadding="0" class="tablehead">
        <tr>
          <td colspan="4"><img src="{template_url}/images/header_top.gif" width="640" height="6" alt="" /></td>
        </tr>
        <tr>
          <td width="6"><img src="{template_url}/images/header_left.gif" width="6" height="60" alt="" /></td>
          <td width="405"><img src="{template_url}/images/header_logo.gif" width="405" height="60" alt="" /></td>
          <td width="225" align="right">
            <form method="post" action="{url_search}">
              <table border="0" cellspacing="0" cellpadding="1">
                <tr>
                  <td>
                    <input type="text" name="search_keywords" size="15" class="searchinput" />
                  </td>
                  <td>
                    <input type="submit" value="{lang_search}" class="button" name="submit" />
                  </td>
                </tr>
                <tr valign="top">
                  <td colspan="2"><a href="{url_search}" class="smalltext">{lang_advanced_search}</a></td>
                </tr>
              </table>
            </form>
          </td>
          <td align="right" width="6"><img src="{template_url}/images/header_right.gif" width="6" height="60" alt="" /></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
  <tr>
    <td class="bordercolor">
      <table width="100%" border="0" cellspacing="1" cellpadding="0">
        <tr>
          <td class="tablebgcolor">
            <table width="100%" border="0" cellspacing="0" cellpadding="0">
   <tr>
    <td class="navbar" height="23">
     <table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
       <td align="left" width="50%">
        <img src="{template_url}/images/spacer.gif" width="4" height="4" alt="" />{clickstream}
       </td>
       <td align="right" width="50%">
       
        <a href="{url_top_images}"><b>{lang_top_images}</b></a>&nbsp;
        <a href="{url_new_images}"><b>{lang_new_images}</b></a>&nbsp;&nbsp;
       </td>
      </tr>
     </table>
    </td>
   </tr>
  </table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="150" class="row2" valign="top">
<table width="150" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="head2" height="20"><img src="{template_url}/images/spacer.gif" alt="" width="4" height="4" />{lang_registered_user}</td>
</tr>
<tr>
<td class="tablebgcolor"><img src="{template_url}/images/spacer.gif" alt="" width="1" height="1" /></td>
</tr>
<tr>
<td align="center" class="row1">{user_box}
</td>
</tr>
<tr>
<td class="tablebgcolor"><img src="{template_url}/images/spacer.gif" alt="" width="1" height="1" /></td>
</tr>
</table>
{if random_image}
<table width="150" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="head2" height="20"> <img src="{template_url}/images/spacer.gif" alt="" width="4" height="4" />{lang_random_image}</td>
</tr>
<tr>
<td class="tablebgcolor"><img src="{template_url}/images/spacer.gif" alt="" width="1" height="1" /></td>
</tr>
<tr>
<td align="center" class="row2">
<br />
{random_image}
<br />
<br />
</td>
</tr>
<tr>
<td class="tablebgcolor"><img src="{template_url}/images/spacer.gif" alt="" width="1" height="1" /></td>
</tr>
</table>
{endif random_image}
</td>
<td width="1" class="bordercolor" valign="top"><img src="{template_url}/images/spacer.gif" alt="" width="1" height="1" /></td>
<td width="18" valign="top"><img src="{template_url}/images/spacer.gif" alt="" width="18" height="18" /></td>
<td width="100%" valign="top">
<br />
<span class="title">{site_name}</span>
<br />
<table width="100%" border="0" cellspacing="0" cellpadding="1">
<a name="comments"></a>
<td>
<div align="center">
  <u><font face="Verdana, Arial, Helvetica, sans-serif" size="1"><a id="top" name="top"></a></font></u>
</div>
<table cellSpacing="0" cellPadding="0" width="100%" align="center" border="0">
  <tbody>
    <tr>
      <td class="bordercolor">
        <p align="center"><b>Aquí es donde tienes que poner lo que tu desees</b>
      </td>
    </tr>
  </tbody>
</table>
<table width="100%" border="0" cellspacing="1" cellpadding="0" class="bordercolor">
<tr>
<td>
<table width="100%" border="0" cellspacing="0" cellpadding="3">
<tr>
<td class="row1" valign="middle">
<p align="right">{category_dropdown_form}
</td>
</tr>
</table>
</td>
</tr>
</table>
&nbsp;</table>
                <td width="19" valign="top"><img src="{template_url}/images/spacer.gif" alt="" width="19" height="19" /></td>
           
        </tr>
      </table>
    </td>
  </tr>
  <tr>
    <td>
     
    </td>
  </tr>
</table></table>
{footer}

A continuación copia este script, cambias donde pone MI_PLANTILLA por el nombre de la plantilla que has creado anteriormente pero sin el html, me explico si la plantilla la has nombrado como nueva_plantilla.html, solo tienes que poner nueva_plantilla.

Luego lo nombras por ejemplo nueva_plantilla.php y lo subes a tu servidor.

nueva_plantilla.php

Code: [Select]
<?php 
$main_template 
'MI_PLANTILLA'

define('GET_CACHES'1); 
define('ROOT_PATH''./'); 
define('GET_USER_ONLINE'1); 
include(
ROOT_PATH.'global.php'); 
require(
ROOT_PATH.'includes/sessions.php'); 
$user_access get_permission(); 

if (isset(
$HTTP_GET_VARS['template']) || isset($HTTP_POST_VARS['template'])) { 
  $template = (isset($HTTP_GET_VARS['template'])) ? stripslashes(trim($HTTP_GET_VARS['template'])) : stripslashes(trim($HTTP_POST_VARS['template'])); 
  if (!file_exists(TEMPLATE_PATH."/".$template.".".$site_template->template_extension)) { 
    $template ""
  
  else { 
    $main_template $template
  

else { 
  $template ""

include(
ROOT_PATH.'includes/page_header.php'); 

if (!empty(
$template)) { 
  $clickstream "<a href=\"".$site_sess->url(ROOT_PATH."index.php")."\">".$lang['home']."</a>".$config['category_separator'].str_replace("_"" "ucfirst($template)); 
  $site_template->register_vars("clickstream"$clickstream); 
  $site_template->print_template($site_template->parse_template($main_template)); 
  include(ROOT_PATH.'includes/page_footer.php'); 


$clickstream "<span class=\"clickstream\"><a href=\"".$site_sess->url(ROOT_PATH."index.php")."\" class=\"clickstream\">".$lang['home']."</a>".$config['category_separator']; 
$clickstream .= $main_template

//----------------------------------------------------- 
//--- Print Out --------------------------------------- 
//----------------------------------------------------- 
$site_template->register_vars(array( 
  "msg" => $msg
  "clickstream" => $clickstream 
)); 
  
  $site_template
->print_template($site_template->parse_template($main_template)); 
  include(ROOT_PATH.'includes/page_footer.php'); 

?>

espero que os sirva.

excitex2
Lo importante no es saber,,, lo importante es tener el E-Mail de quien sabe

Offline ascanio

  • Hero Member
  • *****
  • Posts: 569
    • View Profile
    • http://www.surfourspace.net
Re: Crear una nueva página en 4images
« Reply #1 on: May 06, 2005, 10:08:36 PM »
Quizas esto se un poco mas rapido
Usando un incorporado rasgo dentro de index.php, es posible añadir sus propias páginas de plantilla de 4images.

Por ejemplo, si usted quiere crear una página  de FAQ  para sus invitados:

    * Copiar una de las plantillas existentes como "error.html" a "FAQ.html"
    * Quitar {lang_error} {error_msg} de "FAQ.html"
    * Añadir su información FAQ a "FAQ.html"
    * Cargar "FAQ.html" al su directorio de plantilla donde usted guarda "error.html"


Usted puede unir para la nueva página FAQ usando un URL como el ejemplo siguiente:
http://www.example.com/4images/index.php?template=FAQ

¡Por favor note que URLs son CaSe seNSitIve!

Esta modificacion fue traducida de este topic: http://www.4homepages.de/forum/index.php?topic=4996.0

Offline WhiteRabbit

  • Newbie
  • *
  • Posts: 29
    • View Profile
Re: Crear una nueva página en 4images
« Reply #2 on: August 14, 2005, 07:18:45 PM »
Gracias por tu contribución! Me vino como anillo al dedo!

Slds.
WR.

Offline elcorazon

  • Jr. Member
  • **
  • Posts: 58
    • View Profile
Re: Crear una nueva página en 4images
« Reply #3 on: August 21, 2005, 04:53:48 PM »
Muchas gracias también para esta contribución !  :)


Offline mahs25c

  • Newbie
  • *
  • Posts: 32
  • Bueno Bueno.. . saludos a todos
    • View Profile
Re: Crear una nueva página en 4images
« Reply #4 on: November 06, 2006, 08:57:29 PM »
y si quisiera en lugar de usar "templates" que diga "go"   , se ve fea la url asi : http://www.mipagina.com/4images/index.php?template=hip-hop   
se ve mejor asi: http://www.mipagina.com/4images/index.php?go=hip-hop     
¿como le hago?   le modifique pero  no me queda.
Saludos desde Cancun MX

Offline mahs25c

  • Newbie
  • *
  • Posts: 32
  • Bueno Bueno.. . saludos a todos
    • View Profile
Re: Crear una nueva página en 4images
« Reply #5 on: November 06, 2006, 09:08:59 PM »
lo logre      cambie esto : [qcode]if (isset($HTTP_GET_VARS['template']) || isset($HTTP_POST_VARS['template'])) {
  $template = (isset($HTTP_GET_VARS['template'])) ? get_basefile(stripslashes($HTTP_GET_VARS['template'])) : get_basefile(stripslashes($HTTP_POST_VARS['template']));
  if (!file_exists(TEMPLATE_PATH."/".$template.".".$site_template->template_extension)) {
    $template = "";
  }
  else {
    $main_template = $template;
  }
}
else {
  $template = "";
}[/qcode]
 
por esto: [qcode]if (isset($HTTP_GET_VARS['go']) || isset($HTTP_POST_VARS['go'])) {
  $template = (isset($HTTP_GET_VARS['go'])) ? get_basefile(stripslashes($HTTP_GET_VARS['go'])) : get_basefile(stripslashes($HTTP_POST_VARS['go']));
  if (!file_exists(TEMPLATE_PATH."/".$template.".".$site_template->template_extension)) {
    $template = "";
  }
  else {
    $main_template = $template;
  }
}
else {
  $template = "";
}[/qcode]   en donde dice go lo podremos cambiar a "ir" "open" "go" "abrir"  etc. etc.[qcode][/qcode][qcode][/qcode]
Saludos desde Cancun MX