Página 3 de 4

Re: Quiero saber cual es este mod y como modificarlo

Publicado: 12 Ago 2010, 23:48
por victor5atodogas
En el index he puesto lo que me has dicho, pero he tenido que quitar la linea de cerrar la conexion porque sino tiraba error.

En el index_body.html de mi plantilla tengo el siguiente codigo, pero no hace nada (no funciona)

Código: Seleccionar todo

<!-- INCLUDE overall_header.html -->

<p class="{S_CONTENT_FLOW_END}<!-- IF S_USER_LOGGED_IN --> rightside<!-- ENDIF -->"><!-- IF S_USER_LOGGED_IN -->{LAST_VISIT_DATE}<!-- ELSE -->{CURRENT_TIME}<!-- ENDIF --></p>
<!-- IF U_MCP --><p>{CURRENT_TIME}<br />[&nbsp;<a href="{U_MCP}">{L_MCP}</a>&nbsp;]</p><!-- ELSEIF S_USER_LOGGED_IN --><p>{CURRENT_TIME}</p><!-- ENDIF -->


<!-- IF MARQUEE -->
<div class="forabg">
    <div class="inner"><span><span></span></span>
        <div style="padding: 5px 5px 2px 5px; font-size: 1.1em; background-color: #ECF1F3; margin: 0px auto; text-align: center;">
            <marquee direction="left" scrolldelay="100" onmouseover="this.scrollDelay=10000000" onmouseout="this.scrollDelay=100">{MARQUEE}</marquee>
        </div>
    <span class="corners-bottom"><span></span></span></div>
</div>
<!-- ENDIF --> 




<!-- IF RECENT_TOPICS_DISPLAY --><!-- INCLUDE recent_topics_body.html --><!-- ENDIF -->
<!-- IF S_DISPLAY_SEARCH or (S_USER_LOGGED_IN and not S_IS_BOT) -->

<ul class="linklist">
	<!-- IF S_DISPLAY_SEARCH -->
		<li><a href="{U_SEARCH_UNANSWERED}">{L_SEARCH_UNANSWERED}</a><!-- IF S_USER_LOGGED_IN --> &bull; <a href="{U_SEARCH_UNREAD}">{L_SEARCH_UNREAD}</a> &bull; <a href="{U_SEARCH_NEW}">{L_SEARCH_NEW}</a><!-- ENDIF --> &bull; <a href="{U_SEARCH_ACTIVE_TOPICS}">{L_SEARCH_ACTIVE_TOPICS}</a></li>
	<!-- ENDIF -->

	<!-- IF not S_IS_BOT and U_MARK_FORUMS --><li class="rightside"><a href="{U_MARK_FORUMS}" accesskey="m">{L_MARK_FORUMS_READ}</a></li><!-- ENDIF -->
</ul>
<!-- ENDIF -->

<!-- INCLUDE forumlist_body.html -->

<!-- IF not S_USER_LOGGED_IN and not S_IS_BOT -->
	<form method="post" action="{S_LOGIN_ACTION}" class="headerspace">
		<div class="forabg2">
			<div class="inner"><span class="corners-top"><span></span></span>
				<ul class="topiclist">
				<li class="header">
					<dl class="icon">
						<dt>&nbsp;&nbsp;<a href="{U_LOGIN_LOGOUT}">{L_LOGIN_LOGOUT}</a><!-- IF S_REGISTER_ENABLED -->&nbsp; &bull; &nbsp;<a href="{U_REGISTER}">{L_REGISTER}</a><!-- ENDIF --></dt>
					</dl>
				</li>
			</ul>
		<fieldset class="quick-login">
			<label for="username">{L_USERNAME}:</label>&nbsp;<input type="text" name="username" id="username" size="10" class="inputbox" title="{L_USERNAME}" />  
			<label for="password">{L_PASSWORD}:</label>&nbsp;<input type="password" name="password" id="password" size="10" class="inputbox" title="{L_PASSWORD}" />
			<!-- IF S_AUTOLOGIN_ENABLED -->
				| <label for="autologin">{L_LOG_ME_IN} <input type="checkbox" name="autologin" id="autologin" /></label>
			<!-- ENDIF -->
			<input type="submit" name="login" value="{L_LOGIN}" class="button2" />
			{S_LOGIN_REDIRECT}
		</fieldset>
			<span class="corners-bottom"><span></span></span></div>
		</div>
	</form>
<!-- ENDIF -->

<!-- IF S_DISPLAY_ONLINE_LIST -->
		<div class="forabg2">
			<div class="inner"><span class="corners-top"><span></span></span>
			<ul class="topiclist">
				<li class="header">
					<dl class="icon">
						<dt>&nbsp;&nbsp; <!-- IF U_VIEWONLINE --><a href="{U_VIEWONLINE}">{L_WHO_IS_ONLINE}</a><!-- ELSE -->{L_WHO_IS_ONLINE}<!-- ENDIF --></dt>
					</dl>
				</li>
			</ul>
			<ul class="topiclist forums">
		<li class="row4">
			<dl class="icon whois">
				<dt style="width:800px;">
	{TOTAL_USERS_ONLINE} ({L_ONLINE_EXPLAIN})<br />{RECORD_USERS}<br /> <br />{LOGGED_IN_USER_LIST}
	<!-- IF LEGEND --><br /><em>{L_LEGEND}: {LEGEND}</em><!-- ENDIF --><br />&nbsp;
				</dt>
			</dl>
		</li>
			</ul>
			<span class="corners-bottom"><span></span></span></div>
		</div>
<!-- ENDIF -->

<!-- IF S_DISPLAY_BIRTHDAY_LIST and BIRTHDAY_LIST  or BIRTHDAYS_AHEAD_LIST-->
			<div class="forabg2">
			<div class="inner"><span class="corners-top"><span></span></span>
			<ul class="topiclist">
				<li class="header">
					<dl class="icon">
						<dt>&nbsp;&nbsp;{L_BIRTHDAYS}</dt>
					</dl>
				</li>
			</ul>
			<ul class="topiclist forums">
		<li class="row5">
			<dl class="icon birthday">
				<dt style="width:800px; padding-top: 1.0em;">
	<p><!-- IF BIRTHDAY_LIST -->{L_CONGRATULATIONS}: <strong>{BIRTHDAY_LIST}</strong><!-- ELSE -->{L_NO_BIRTHDAYS}<!-- ENDIF --><br /><!-- IF BIRTHDAYS_AHEAD_LIST -->{L_BIRTHDAYS_AHEAD}: <strong>{BIRTHDAYS_AHEAD_LIST}</strong><!-- ENDIF --><br />&nbsp;
				</p></dt>
			</dl>
		</li>
			</ul>
			<span class="corners-bottom"><span></span></span></div>
		</div>
<!-- ENDIF -->

<!-- IF NEWEST_USER -->
				<div class="forabg2">
			<div class="inner"><span class="corners-top"><span></span></span>
			<ul class="topiclist">
				<li class="header">
					<dl class="icon">
						<dt>&nbsp;&nbsp;{L_STATISTICS}</dt>
					</dl>
				</li>
			</ul>
			<ul class="topiclist forums">
		<li class="row6">
			<dl class="icon stats">
				<dt style="width:800px; padding-top: 1.0em;">
	{POSTS_PER_DAY} &bull; {TOTAL_POSTS} &bull; {TOTAL_TOPICS} &bull; {TOTAL_USERS} &bull; {NEWEST_USER}<br />&nbsp;
				</dt>
			</dl>
		</li>
			</ul>
			<span class="corners-bottom"><span></span></span></div>
		</div>
<!-- ENDIF -->

<!-- INCLUDE overall_footer.html -->
O MARQUEE no recoge bien los datos, o se pierden por el camino.

Al final lo conseguiremos, ya que estamos realizando la consulta en otra bbdd diferente y no da problemas.

Re: Quiero saber cual es este mod y como modificarlo

Publicado: 12 Ago 2010, 23:50
por leviatan21
Ahora tengo que salir por varias horas, cuando vuelva seguiré, no me quiero dar por vencido...

Re: Quiero saber cual es este mod y como modificarlo

Publicado: 12 Ago 2010, 23:53
por victor5atodogas
Acabo de realizar una prueba en la sentencia SQL, si la hace bien, te escribe lo que lleva la variable $marquee_html;
y si ahora entras en el foro, veras que la consulta la ha realizado bien, asi que esta claro, que el problema esta en que no enviamos bien la variable o no la recogemos correctamente.

Re: Quiero saber cual es este mod y como modificarlo

Publicado: 12 Ago 2010, 23:57
por engendro666
victor usa el bbcode code en vez de quote para poner mucho codigo:

Código: Seleccionar todo

[code]
[/code]

Re: Quiero saber cual es este mod y como modificarlo

Publicado: 13 Ago 2010, 00:01
por victor5atodogas
Ok, perdon, no em he dado cuenta, estoy haciendo muchas cosas a la vez y no puede ser! :)

Re: Quiero saber cual es este mod y como modificarlo

Publicado: 13 Ago 2010, 00:42
por Makoto
bueno no se pero no esta mal esta parte?

Código: Seleccionar todo

$template->assign_vars('MARQUEE', $marquee_html);
no seria asi?

Código: Seleccionar todo

$template->assign_vars('MARQUEE' => $marquee_html);

Re: Quiero saber cual es este mod y como modificarlo

Publicado: 13 Ago 2010, 05:53
por leviatan21
Bueno hice unas pruebas y me resultó funcionando este :

Index.php

Código: Seleccionar todo

$marquee_html = '';

$src_dbhost = '';
$src_dbport = '';
$src_dbname = 'NOMBRE_DE_LA_BASE';
$src_dbuser = 'USUARIO_DE_LA_BASE';
$src_dbpasswd = 'CLAVE_DE_LA_BASE';

$src_db = new $sql_db();
$src_db->sql_connect($src_dbhost, $src_dbuser, htmlspecialchars_decode($src_dbpasswd), $src_dbname, $src_dbport, false, true);
$result = $src_db->sql_query_limit('SELECT * FROM mascotas WHERE Disponible = 1 AND Foto <> "' . mysql_real_escape_string("http://www.eluniversodelperro.com/imagenesanimales/0.jpg") . '" ORDER BY RAND()', 20);

if ($result)
{
    while ($row = $src_db->sql_fetchrow())
    {
        $marquee_html .= '<a onclick="window.open(this.href); return false;" href="http://www.eluniversodelperro.com/busqueda.php?mascota_id=' . $row['mascota_id'] . '" title="' . $row['nombre'] . '"><img border="0" src="' . $row['Foto'] . '" width="113" height="163"></a>&nbsp;';
    }
    // Assign index specific vars
    $template->assign_var('MARQUEE_IMGS', $marquee_html);
}
$src_db->sql_freeresult($result);
 
index_body.html

Código: Seleccionar todo

        <div class="forabg">
            <div class="inner"><span><span></span></span>
                <div style="padding: 5px 5px 2px 5px; font-size: 1.1em; background-color: #ECF1F3; margin: 0px auto; text-align: center; height:170px;">
                    <marquee direction="left" scrolldelay="100" onmouseover="this.scrollDelay=10000000" onmouseout="this.scrollDelay=100">{MARQUEE_IMGS}</marquee>
                </div>
            <span class="corners-bottom"><span></span></span></div>
        </div> 

Re: Quiero saber cual es este mod y como modificarlo

Publicado: 13 Ago 2010, 13:32
por victor5atodogas
:ok: :bravo: Perfecto, ya esta funcionando en el Foro, ahora voy a mirar para quitarle el fondo blanco que le pone, y que me ponga las fotos sobre el fondo del foro.

¿Sabes como consigo que me aparezcan esas imagenes cuando le de click a una categoria, o a un tema, o a una respuesta?

Muchas gracias, en cuanto sepa como colocar esto en esas paginas, ya se podra dar el tema por cerrado por mi parte.

Re: Quiero saber cual es este mod y como modificarlo

Publicado: 13 Ago 2010, 15:37
por jakk
ahh72 escribió:makoto, si sabes como implementar el efecto del crawler pues porque no haces una guia y la pones en el foro? :wink:

saludos
esos scripts son de uso libre, incluso para proyectos comerciales, pero nose pueden publicar

Re: Quiero saber cual es este mod y como modificarlo

Publicado: 13 Ago 2010, 17:37
por ahh72
jakk escribió:
ahh72 escribió:makoto, si sabes como implementar el efecto del crawler pues porque no haces una guia y la pones en el foro? :wink:

saludos
esos scripts son de uso libre, incluso para proyectos comerciales, pero nose pueden publicar
no podemos publicar una guia de como configurar ese script en un foro, te refieres a eso :?: :?: :?:

Re: Quiero saber cual es este mod y como modificarlo

Publicado: 13 Ago 2010, 18:22
por leviatan21
victor5atodogas escribió::ok: :bravo: Perfecto, ya esta funcionando en el Foro, ahora voy a mirar para quitarle el fondo blanco que le pone, y que me ponga las fotos sobre el fondo del foro.

¿Sabes como consigo que me aparezcan esas imagenes cuando le de click a una categoria, o a un tema, o a una respuesta?

Muchas gracias, en cuanto sepa como colocar esto en esas paginas, ya se podra dar el tema por cerrado por mi parte.
En ese caso hay que mover el código que agregamos en el index.php e index_body.html
Abrir :
raíz/includes/functions.php

Buscar :

Código: Seleccionar todo

    // application/xhtml+xml not used because of IE  
Antes, agregar :

Código: Seleccionar todo

    $on_page = str_replace('.' . $phpEx, '', $user->page['page_name']);
    if ($on_page == 'index' || $on_page == 'viewforum' || $on_page == 'viewtopic')
    {
        AQUI EL CODIGO DEL INDEX.PHP
    }
 
Abrir :
raíz/styles/TU_ESTILO/template/index_body.html

Buscar :

Código: Seleccionar todo

        <!-- IF S_BOARD_DISABLED and S_USER_LOGGED_IN and (U_MCP or U_ACP) -->

        <div id="information" class="rules">
            <div class="inner"><span class="corners-top"><span></span></span>
                <strong>{L_INFORMATION}:</strong> {L_BOARD_DISABLED}
            <span class="corners-bottom"><span></span></span></div>
        </div>
        <!-- ENDIF -->
 
Después, agregar :

Código: Seleccionar todo

        AQUI EL CODIGO DEL INDEX_BODY.HTML

Re: Quiero saber cual es este mod y como modificarlo

Publicado: 13 Ago 2010, 19:41
por victor5atodogas
No funciona, el error que me tira al entrar en mi foro es:

"Fatal error: Class name must be a valid object or a string in /home/elunive1/public_html/Foro/includes/functions.php on line 4439"

Este es el contenido de raiz/includes/functions.php (parte porque sino no me cabe en el mensaje)

Código: Seleccionar todo

       $marquee_html = '';

$src_dbhost = '';
$src_dbport = '';
$src_dbname = 'NOMBRE_DE_LA_BASE';
$src_dbuser = 'USUARIO_DE_LA_BASE';
$src_dbpasswd = 'CLAVE_DE_LA_BASE';

$src_db = new $sql_db();
$src_db->sql_connect($src_dbhost, $src_dbuser, htmlspecialchars_decode($src_dbpasswd), $src_dbname, $src_dbport, false, true);
$result = $src_db->sql_query_limit('SELECT * FROM mascotas WHERE Disponible <> 1 AND Foto <> "' . mysql_real_escape_string("http://www.eluniversodelperro.com/imagenesanimales/0.jpg") . '" ORDER BY RAND()', 20);

if ($result)
{
    while ($row = $src_db->sql_fetchrow())
    {
        $marquee_html .= '<a onclick="window.open(this.href); return false;" href="http://www.eluniversodelperro.com/busqueda.php?mascota_id=' . $row['mascota_id'] . '" title="' . $row['nombre'] . '"><img border="0" src="' . $row['Foto'] . '" width="113" height="163"></a>&nbsp;';
    }
    // Assign index specific vars
    $template->assign_var('MARQUEE_IMGS', $marquee_html);
}
$src_db->sql_freeresult($result);
    }

	// application/xhtml+xml not used because of IE
	header('Content-type: text/html; charset=UTF-8');

	header('Cache-Control: private, no-cache="set-cookie"');
	header('Expires: 0');
	header('Pragma: no-cache');

if ($user->data['user_accept_rules'] == 0 && $user->data['is_registered'] && !$user->data['is_bot'] && (request_var('mode', '') != 'terms'))
	{
		if (confirm_box(true))
		{
			$sql = 'UPDATE ' . USERS_TABLE . '
				SET user_accept_rules = 1
				WHERE user_id = ' . $user->data['user_id'];
			$db->sql_query($sql);
		}
		else
		{
			confirm_box(false, sprintf($user->lang['NEW_RULES'], '<a href="' . append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=terms') . '">', '</a>'));
			header("Location: " . append_sid("{$phpbb_root_path}ucp.$phpEx?mode=logout&sid=" . $user->session_id));
		}
	}

	return;
}

/**
* Generate page footer
*/
function page_footer($run_cron = true)
{
	global $db, $config, $template, $user, $auth, $cache, $starttime, $phpbb_root_path, $phpEx;
// www.phpBB-SEO.com SEO TOOLKIT BEGIN
	global $phpbb_seo;
	if (!empty($phpbb_seo)) {
		$phpbb_seo->seo_end();
	}
	// www.phpBB-SEO.com SEO TOOLKIT END

	// Output page creation time
	if (defined('DEBUG'))
	{
		$mtime = explode(' ', microtime());
		$totaltime = $mtime[0] + $mtime[1] - $starttime;

		if (!empty($_REQUEST['explain']) && $auth->acl_get('a_') && defined('DEBUG_EXTRA') && method_exists($db, 'sql_report'))
		{
			$db->sql_report('display');
		}

		$debug_output = sprintf('Time : %.3fs | ' . $db->sql_num_queries() . ' Queries | GZIP : ' . (($config['gzip_compress'] && @extension_loaded('zlib')) ? 'On' : 'Off') . (($user->load) ? ' | Load : ' . $user->load : ''), $totaltime);

		if ($auth->acl_get('a_') && defined('DEBUG_EXTRA'))
		{
			if (function_exists('memory_get_usage'))
			{
				if ($memory_usage = memory_get_usage())
				{
					global $base_memory_usage;
					$memory_usage -= $base_memory_usage;
					$memory_usage = get_formatted_filesize($memory_usage);

					$debug_output .= ' | Memory Usage: ' . $memory_usage;
				}
			}

			$debug_output .= ' | <a href="' . build_url() . '&explain=1">Explain</a>';
		}
	}

	$template->assign_vars(array(
		'DEBUG_OUTPUT'			=> (defined('DEBUG')) ? $debug_output : '',
		'TRANSLATION_INFO'		=> (!empty($user->lang['TRANSLATION_INFO'])) ? $user->lang['TRANSLATION_INFO'] : '',

		'U_ACP' => ($auth->acl_get('a_') && !empty($user->data['is_registered'])) ? append_sid("{$phpbb_root_path}adm/index.$phpEx", false, true, $user->session_id) : '')
	);

	// Call cron-type script
	$call_cron = false;
	if (!defined('IN_CRON') && $run_cron && !$config['board_disable'])
	{
		$call_cron = true;
		$time_now = (!empty($user->time_now) && is_int($user->time_now)) ? $user->time_now : time();

		// Any old lock present?
		if (!empty($config['cron_lock']))
		{
			$cron_time = explode(' ', $config['cron_lock']);

			// If 1 hour lock is present we do not call cron.php
			if ($cron_time[0] + 3600 >= $time_now)
			{
				$call_cron = false;
			}
		}
	}

	// Call cron job?
	if ($call_cron)
	{
		$cron_type = '';

		if ($time_now - $config['queue_interval'] > $config['last_queue_run'] && !defined('IN_ADMIN') && file_exists($phpbb_root_path . 'cache/queue.' . $phpEx))
		{
			// Process email queue
			$cron_type = 'queue';
		}
		else if (method_exists($cache, 'tidy') && $time_now - $config['cache_gc'] > $config['cache_last_gc'])
		{
			// Tidy the cache
			$cron_type = 'tidy_cache';
		}
		else if ($config['warnings_expire_days'] && ($time_now - $config['warnings_gc'] > $config['warnings_last_gc']))
		{
			$cron_type = 'tidy_warnings';
		}
		else if ($time_now - $config['database_gc'] > $config['database_last_gc'])
		{
			// Tidy the database
			$cron_type = 'tidy_database';
		}
		else if ($time_now - $config['search_gc'] > $config['search_last_gc'])
		{
			// Tidy the search
			$cron_type = 'tidy_search';
		}
		else if ($time_now - $config['session_gc'] > $config['session_last_gc'])
		{
			$cron_type = 'tidy_sessions';
		}

		if ($cron_type)
		{
			$template->assign_var('RUN_CRON_TASK', '<img src="' . append_sid($phpbb_root_path . 'cron.' . $phpEx, 'cron_type=' . $cron_type) . '" width="1" height="1" alt="cron" />');
		}
	}
	$template->display('body');

	garbage_collection();
	exit_handler();
}

/**
* Closing the cache object and the database
* Cool function name, eh? We might want to add operations to it later
*/
function garbage_collection()
{
	global $cache, $db;

	// Unload cache, must be done before the DB connection if closed
	if (!empty($cache))
	{
		$cache->unload();
	}

	// Close our DB connection.
	if (!empty($db))
	{
		$db->sql_close();
	}
}

/**
* Handler for exit calls in phpBB.
* This function supports hooks.
*
* Note: This function is called after the template has been outputted.
*/
function exit_handler()
{
	global $phpbb_hook, $config;

	if (!empty($phpbb_hook) && $phpbb_hook->call_hook(__FUNCTION__))
	{
		if ($phpbb_hook->hook_return(__FUNCTION__))
		{
			return $phpbb_hook->hook_return_result(__FUNCTION__);
		}
	}

	// As a pre-caution... some setups display a blank page if the flush() is not there.
	(empty($config['gzip_compress'])) ? @flush() : @ob_flush();

	exit;
}

/**
* Handler for init calls in phpBB. This function is called in user::setup();
* This function supports hooks.
*/
function phpbb_user_session_handler()
{
	global $phpbb_hook;

	if (!empty($phpbb_hook) && $phpbb_hook->call_hook(__FUNCTION__))
	{
		if ($phpbb_hook->hook_return(__FUNCTION__))
		{
			return $phpbb_hook->hook_return_result(__FUNCTION__);
		}
	}

	return;
}


/**
* Get the applicable image properties
*/
function reimg_properties()
{
	return 'class="reimg" onload="reimg(this);" onerror="reimg(this);" ';
}
?>
y por otro lado este es el codigo raiz/styles/DirtyBoard2.0/template/index_body.html

Código: Seleccionar todo

<!-- INCLUDE overall_header.html -->

<p class="{S_CONTENT_FLOW_END}<!-- IF S_USER_LOGGED_IN --> rightside<!-- ENDIF -->"><!-- IF S_USER_LOGGED_IN -->{LAST_VISIT_DATE}<!-- ELSE -->{CURRENT_TIME}<!-- ENDIF --></p>
<!-- IF U_MCP --><p>{CURRENT_TIME}<br />[&nbsp;<a href="{U_MCP}">{L_MCP}</a>&nbsp;]</p><!-- ELSEIF S_USER_LOGGED_IN --><p>{CURRENT_TIME}</p><!-- ENDIF -->


<!-- IF RECENT_TOPICS_DISPLAY --><!-- INCLUDE recent_topics_body.html --><!-- ENDIF -->
<!-- IF S_DISPLAY_SEARCH or (S_USER_LOGGED_IN and not S_IS_BOT) -->

<ul class="linklist">
	<!-- IF S_DISPLAY_SEARCH -->
		<li><a href="{U_SEARCH_UNANSWERED}">{L_SEARCH_UNANSWERED}</a><!-- IF S_USER_LOGGED_IN --> &bull; <a href="{U_SEARCH_UNREAD}">{L_SEARCH_UNREAD}</a> &bull; <a href="{U_SEARCH_NEW}">{L_SEARCH_NEW}</a><!-- ENDIF --> &bull; <a href="{U_SEARCH_ACTIVE_TOPICS}">{L_SEARCH_ACTIVE_TOPICS}</a></li>
	<!-- ENDIF -->

	<!-- IF not S_IS_BOT and U_MARK_FORUMS --><li class="rightside"><a href="{U_MARK_FORUMS}" accesskey="m">{L_MARK_FORUMS_READ}</a></li><!-- ENDIF -->
</ul>
<!-- ENDIF -->

<!-- INCLUDE forumlist_body.html -->

<!-- IF not S_USER_LOGGED_IN and not S_IS_BOT -->
	<form method="post" action="{S_LOGIN_ACTION}" class="headerspace">
		<div class="forabg2">
			<div class="inner"><span class="corners-top"><span></span></span>
				<ul class="topiclist">
				<li class="header">
					<dl class="icon">
						<dt>&nbsp;&nbsp;<a href="{U_LOGIN_LOGOUT}">{L_LOGIN_LOGOUT}</a><!-- IF S_REGISTER_ENABLED -->&nbsp; &bull; &nbsp;<a href="{U_REGISTER}">{L_REGISTER}</a><!-- ENDIF --></dt>
					</dl>
				</li>
			</ul>
		<fieldset class="quick-login">
			<label for="username">{L_USERNAME}:</label>&nbsp;<input type="text" name="username" id="username" size="10" class="inputbox" title="{L_USERNAME}" />  
			<label for="password">{L_PASSWORD}:</label>&nbsp;<input type="password" name="password" id="password" size="10" class="inputbox" title="{L_PASSWORD}" />
			<!-- IF S_AUTOLOGIN_ENABLED -->
				| <label for="autologin">{L_LOG_ME_IN} <input type="checkbox" name="autologin" id="autologin" /></label>
			<!-- ENDIF -->
			<input type="submit" name="login" value="{L_LOGIN}" class="button2" />
			{S_LOGIN_REDIRECT}
		</fieldset>
			<span class="corners-bottom"><span></span></span></div>
		</div>
	</form>
<!-- ENDIF -->

<div class="forabg">
            <div class="inner"><span><span></span></span>
<br>
<br>
<left>
<font size=2px><b>Perros en adopcion</b></font> 
</left>
                <div style="padding: 5px 5px 2px 5px; font-size: 1.1em; margin: 0px auto; text-align: center; height:170px;">
<br>
                    <marquee direction="left" scrolldelay="100" onmouseover="this.scrollDelay=10000000" onmouseout="this.scrollDelay=100">{MARQUEE_IMGS}</marquee>

                </div>
            <span class="corners-bottom"><span></span></span>
           </div>
</div> 

<br>

<!-- IF S_DISPLAY_ONLINE_LIST -->
		<div class="forabg2">
			<div class="inner"><span class="corners-top"><span></span></span>
			<ul class="topiclist">
				<li class="header">
					<dl class="icon">
						<dt>&nbsp;&nbsp; <!-- IF U_VIEWONLINE --><a href="{U_VIEWONLINE}">{L_WHO_IS_ONLINE}</a><!-- ELSE -->{L_WHO_IS_ONLINE}<!-- ENDIF --></dt>
					</dl>
				</li>
			</ul>
			<ul class="topiclist forums">
		<li class="row4">
			<dl class="icon whois">
				<dt style="width:800px;">
	{TOTAL_USERS_ONLINE} ({L_ONLINE_EXPLAIN})<br />{RECORD_USERS}<br /> <br />{LOGGED_IN_USER_LIST}
	<!-- IF LEGEND --><br /><em>{L_LEGEND}: {LEGEND}</em><!-- ENDIF --><br />&nbsp;
				</dt>
			</dl>
		</li>
			</ul>
			<span class="corners-bottom"><span></span></span></div>
		</div>
<!-- ENDIF -->

<!-- IF S_DISPLAY_BIRTHDAY_LIST and BIRTHDAY_LIST  or BIRTHDAYS_AHEAD_LIST-->
			<div class="forabg2">
			<div class="inner"><span class="corners-top"><span></span></span>
			<ul class="topiclist">
				<li class="header">
					<dl class="icon">
						<dt>&nbsp;&nbsp;{L_BIRTHDAYS}</dt>
					</dl>
				</li>
			</ul>
			<ul class="topiclist forums">
		<li class="row5">
			<dl class="icon birthday">
				<dt style="width:800px; padding-top: 1.0em;">
	<p><!-- IF BIRTHDAY_LIST -->{L_CONGRATULATIONS}: <strong>{BIRTHDAY_LIST}</strong><!-- ELSE -->{L_NO_BIRTHDAYS}<!-- ENDIF --><br /><!-- IF BIRTHDAYS_AHEAD_LIST -->{L_BIRTHDAYS_AHEAD}: <strong>{BIRTHDAYS_AHEAD_LIST}</strong><!-- ENDIF --><br />&nbsp;
				</p></dt>
			</dl>
		</li>
			</ul>
			<span class="corners-bottom"><span></span></span></div>
		</div>
<!-- ENDIF -->

<!-- IF NEWEST_USER -->
				<div class="forabg2">
			<div class="inner"><span class="corners-top"><span></span></span>
			<ul class="topiclist">
				<li class="header">
					<dl class="icon">
						<dt>&nbsp;&nbsp;{L_STATISTICS}</dt>
					</dl>
				</li>
			</ul>
			<ul class="topiclist forums">
		<li class="row6">
			<dl class="icon stats">
				<dt style="width:800px; padding-top: 1.0em;">
	{POSTS_PER_DAY} &bull; {TOTAL_POSTS} &bull; {TOTAL_TOPICS} &bull; {TOTAL_USERS} &bull; {NEWEST_USER}<br />&nbsp;
				</dt>
			</dl>
		</li>
			</ul>
			<span class="corners-bottom"><span></span></span></div>
		</div>
<!-- ENDIF -->

<!-- INCLUDE overall_footer.html -->
¿Se te ocurre cual es el problema?

Si intentas entrar en el Foro saldra como antes, porque los archivos los he dejado como estaban, cuando funcionen, los cambiare.

Mucha gracias

Re: Quiero saber cual es este mod y como modificarlo

Publicado: 13 Ago 2010, 20:18
por leviatan21
victor5atodogas escribió:No funciona, el error que me tira al entrar en mi foro es:
Es cierto, en ese momento hay una variable que no existe :
Buscar :

Código: Seleccionar todo

        $marquee_html = ''; 
Antes, agregar :

Código: Seleccionar todo

        global $dbms;

 
Buscar :

Código: Seleccionar todo

        $src_db = new $sql_db(); 
Antes, agregar :

Código: Seleccionar todo

        $sql_db = 'dbal_' . $dbms; 
Todo junto quedaría asi :

Código: Seleccionar todo

    $on_page = str_replace('.' . $phpEx, '', $user->page['page_name']);
    if ($on_page == 'index' || $on_page == 'viewforum' || $on_page == 'viewtopic')
    {
        global $dbms;

        $marquee_html = '';

        $src_dbhost = '';
        $src_dbport = '';
        $src_dbname = 'NOMBRE_DE_LA_BASE';
        $src_dbuser = 'USUARIO_DE_LA_BASE';
        $src_dbpasswd = 'CLAVE_DE_LA_BASE';

        $sql_db = 'dbal_' . $dbms;
        $src_db = new $sql_db();
        $src_db->sql_connect($src_dbhost, $src_dbuser, htmlspecialchars_decode($src_dbpasswd), $src_dbname, $src_dbport, false, true);
        $result = $src_db->sql_query_limit('SELECT * FROM mascotas WHERE Disponible = 1 AND Foto <> "' . mysql_real_escape_string("http://www.eluniversodelperro.com/imagenesanimales/0.jpg") . '" ORDER BY RAND()', 20);

        if ($result)
        {
            while ($row = $src_db->sql_fetchrow())
            {
                $marquee_html .= '<a onclick="window.open(this.href); return false;" href="http://www.eluniversodelperro.com/busqueda.php?mascota_id=' . $row['mascota_id'] . '" title="' . $row['nombre'] . '"><img border="0" src="' . $row['Foto'] . '" width="113" height="163"></a>&nbsp;';
            }
            // Assign index specific vars
            $template->assign_var('MARQUEE_IMGS', $marquee_html);
        }
    }
 

Re: Quiero saber cual es este mod y como modificarlo

Publicado: 13 Ago 2010, 20:36
por victor5atodogas
Nada mas entrar en el Foro, te tira (siempre) este erro:
"[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4445: mysql_real_escape_string() [function.mysql-real-escape-string]: Access denied for user 'NOMBREDEUSUARIO'@'NOMBREDELSERVIDOR' (using password: NO)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4445: mysql_real_escape_string() [function.mysql-real-escape-string]: A link to the server could not be established
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4465: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3570)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4467: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3570)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4468: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3570)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4469: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3570)"

Te puedo asegurar que la contraseña es la misma, copiar, pegar, y ademas la he revisado.

Ahora tengo en el codigo /includes/functions.php esto:

Código: Seleccionar todo

 $on_page = str_replace('.' . $phpEx, '', $user->page['page_name']);
    if ($on_page == 'index' || $on_page == 'viewforum' || $on_page == 'viewtopic')
    {



global $dbms;

$marquee_html = '';

$src_dbhost = '';
$src_dbport = '';
$src_dbname = 'elunive1_eup';
$src_dbuser = 'elunive1';
$src_dbpasswd = 'BawWoGMe';

$sql_db = 'dbal_' . $dbms; 
$src_db = new $sql_db();
$src_db->sql_connect($src_dbhost, $src_dbuser, htmlspecialchars_decode($src_dbpasswd), $src_dbname, $src_dbport, false, true);
$result = $src_db->sql_query_limit('SELECT * FROM mascotas WHERE Disponible <> 1 AND Foto <> "' . mysql_real_escape_string("http://www.eluniversodelperro.com/imagenesanimales/0.jpg") . '" ORDER BY RAND()', 20);

if ($result)
{
    while ($row = $src_db->sql_fetchrow())
    {
        $marquee_html .= '<a onclick="window.open(this.href); return false;" href="http://www.eluniversodelperro.com/busqueda.php?mascota_id=' . $row['mascota_id'] . '" title="' . $row['nombre'] . '"><img border="0" src="' . $row['Foto'] . '" width="113" height="163"></a>&nbsp;';
    }
    // Assign index specific vars
    $template->assign_var('MARQUEE_IMGS', $marquee_html);
}
$src_db->sql_freeresult($result);
      
    }





	// application/xhtml+xml not used because of IE
	header('Content-type: text/html; charset=UTF-8');

	header('Cache-Control: private, no-cache="set-cookie"');
	header('Expires: 0');
	header('Pragma: no-cache');

if ($user->data['user_accept_rules'] == 0 && $user->data['is_registered'] && !$user->data['is_bot'] && (request_var('mode', '') != 'terms'))
	{
		if (confirm_box(true))
		{
			$sql = 'UPDATE ' . USERS_TABLE . '
				SET user_accept_rules = 1
				WHERE user_id = ' . $user->data['user_id'];
			$db->sql_query($sql);
		}
		else
		{
			confirm_box(false, sprintf($user->lang['NEW_RULES'], '<a href="' . append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=terms') . '">', '</a>'));
			header("Location: " . append_sid("{$phpbb_root_path}ucp.$phpEx?mode=logout&sid=" . $user->session_id));
		}
	}

	return;
}

/**
* Generate page footer
*/
function page_footer($run_cron = true)
{
	global $db, $config, $template, $user, $auth, $cache, $starttime, $phpbb_root_path, $phpEx;
// www.phpBB-SEO.com SEO TOOLKIT BEGIN
	global $phpbb_seo;
	if (!empty($phpbb_seo)) {
		$phpbb_seo->seo_end();
	}
	// www.phpBB-SEO.com SEO TOOLKIT END

	// Output page creation time
	if (defined('DEBUG'))
	{
		$mtime = explode(' ', microtime());
		$totaltime = $mtime[0] + $mtime[1] - $starttime;

		if (!empty($_REQUEST['explain']) && $auth->acl_get('a_') && defined('DEBUG_EXTRA') && method_exists($db, 'sql_report'))
		{
			$db->sql_report('display');
		}

		$debug_output = sprintf('Time : %.3fs | ' . $db->sql_num_queries() . ' Queries | GZIP : ' . (($config['gzip_compress'] && @extension_loaded('zlib')) ? 'On' : 'Off') . (($user->load) ? ' | Load : ' . $user->load : ''), $totaltime);

		if ($auth->acl_get('a_') && defined('DEBUG_EXTRA'))
		{
			if (function_exists('memory_get_usage'))
			{
				if ($memory_usage = memory_get_usage())
				{
...............................ETC

y el archivo /DirtyBoard2.0/template/index_body.html no lo he modificado porque primero quiero que funcione bien lo del include, y despues ya lo cambiare para que no aparezca donde no nos interesa.

¿Cual crees que es el problema?

Muchas gracias.

Re: Quiero saber cual es este mod y como modificarlo

Publicado: 13 Ago 2010, 20:52
por leviatan21
victor5atodogas escribió:¿Cual crees que es el problema?
Realmente no lo se, no entiendo por que si funcionaba en el index.php, no lo hace en el functions.php