Welcome to all phpBB2 Refugees!This site is intended to continue support for the legacy 2.x line of the phpBB2 bulletin board package. If you are a fan of phpBB2, please, by all means register, post, and help us out by offering your suggestions. We are primarily a community and support network. Our secondary goal is to provide a phpBB2 MOD Author and Styles area. |
|
Author |
Message |
taller3d Board Member
Joined: 18 Nov 2012
Posts: 15
|
Posted: Sun Nov 18, 2012 9:01 pm Post subject: Hello, Me New. Problem whit a MOD. |
|
|
hola, hello,
i have a forum phpBB2, v. 2.0.23
mi problem is:
i have installed the mod - LAST POST -
but... on this, to press over on USer ---> error 404
y want change this code:
Code: |
<style type="text/css">
<!--
.Estilo5 {
font-family: Georgia, "Times New Roman", Times, serif;
font-size: 12px;
color: #72a7dc;
}
.Estilo6 {font-family: "Trebuchet MS"}
-->
</style>
<table align="center" class="forumline" width="100%">
<tr align="right">
<td class="catHead" colspan="5" height="28"><span class="cattitle Estilo5"><span class="Estilo6">Últimos poemas en los foros :: El Rincón del Poeta</span></a></span></td>
</tr>
<tr>
<th colspan="2">
<span class="Estilo6">Título - Foro</span> </th>
<th>
<span class="Estilo6">Autor del Tema </span></th>
<th>
<span class="Estilo6">Último mensaje </span></th>
<th>
<span class="Estilo6">Respuestas </span></th>
</tr>
<!-- BEGIN ultimos -->
<tr>
<td class="row1" align="center" height="28">
<span class="gensmall">
<a href="{ultimos.LINK_TITULO}">
{ultimos.TITULO}
</a>
</span>
</td>
<td class="row1" align="center" height="28">
<span class="gensmall">
<a href="{ultimos.LINK_FORO}">
{ultimos.FORO}
</a></span>
</td>
<td class="row1" align="center" height="28">
<span class="gensmall">
<a href="{ultimos.LINK_CREADOR_TEMA}">
{ultimos.CREADOR_TEMA}
</a> </span>
<span class="gensmall" height="28">
el {ultimos.CREADOR_FECHA}</span>
</td>
<td class="row1" align="center" height="28">
<span class="gensmall">
<a href="{ultimos.LINK_AUTOR_ULTIMO}">
{ultimos.AUTOR_ULTIMO}
</a> </span>
<span class="gensmall">
el {ultimos.FECHA_ULTIMO}</span>
<td class="row1" align="center" height="28">
<span class="gensmall">
{ultimos.RESPUESTAS}</span>
</td>
</tr>
<!-- END ultimos -->
<tr>
<td class="row3" colspan="2" align="center">
<span class="gensmall Estilo6"><a href="{INDICE}">Todos los foros</a></span></td>
<td class="row3" colspan="3" align="center">
{JUMPBOX}</td>
</tr>
</table>
|
and... y change this:
Code: |
<a href="{ultimos.LINK_AUTOR_ULTIMO}">
{ultimos.AUTOR_ULTIMO} |
Code: | <a href="{ ...maybe here?....}">
{.... maybe here?....} |
maybe someone can help me please
thank you very much,
|
|
Back to top |
|
|
Holger Board Member
Joined: 19 Jan 2009
Posts: 509 Location: Hanover
|
Posted: Mon Nov 19, 2012 3:41 am Post subject: Re: Hello, Me New. |
|
|
Is this from the install-description?
(just an example)
ultimos.LINK_FORO
or did you translate the English text?
_________________ Love your data! Back it up! |
|
Back to top |
|
|
taller3d Board Member
Joined: 18 Nov 2012
Posts: 15
|
Posted: Mon Nov 19, 2012 4:05 am Post subject: Re: Hello, Me New. |
|
|
Well, this code is what I have installed on my forum,
my forum is in Spanish, and I post here, just as it is installed.
not only does the link I've written here ... I do not know why?
greetings. and thanks
|
|
Back to top |
|
|
Holger Board Member
Joined: 19 Jan 2009
Posts: 509 Location: Hanover
|
Posted: Mon Nov 19, 2012 4:13 am Post subject: Re: Hello, Me New. |
|
|
Could you please post a link to the mod-download?
_________________ Love your data! Back it up! |
|
Back to top |
|
|
taller3d Board Member
Joined: 18 Nov 2012
Posts: 15
|
Posted: Mon Nov 19, 2012 4:18 am Post subject: Re: Hello, Me New. |
|
|
that's the problem, the forum is now closed (tomatoma.ws) that I downloaded from support site, but no, that was about 3 years ago or so.
I have not the original mod, and I remember the edited files ... I have only this code I copied the file-ultimos.tpl - that the problem ... : (
|
|
Back to top |
|
|
Holger Board Member
Joined: 19 Jan 2009
Posts: 509 Location: Hanover
|
Posted: Mon Nov 19, 2012 4:20 am Post subject: Re: Hello, Me New. |
|
|
Hm, sorry. Hard to help.
_________________ Love your data! Back it up! |
|
Back to top |
|
|
taller3d Board Member
Joined: 18 Nov 2012
Posts: 15
|
Posted: Mon Nov 19, 2012 4:24 am Post subject: Re: Hello, Me New. |
|
|
if I understand .... is difficult ... maybe you can find the original mod,
all ways, thank you very much,
a greeting.
|
|
Back to top |
|
|
dogs and things Board Member
Joined: 18 Nov 2008
Posts: 628 Location: Spain
|
Posted: Mon Nov 19, 2012 5:40 am Post subject: Re: Hello, Me New. |
|
|
Hello Max,
Without the MOD install code it is very difficult to say anything.
I don't know the MOD and searching for a MOD I don't know is quite impossible.
I had a look at your forum and I believe the problem has to do with some kind of url rewrite you are doing.
Check out the difference in urls for members in the last post block and the same member-name somewhere else on the index.
Do you know if this forum is using some kind of url rewrite?
_________________ phpBB2 will never die, I hope! |
|
Back to top |
|
|
taller3d Board Member
Joined: 18 Nov 2012
Posts: 15
|
Posted: Mon Nov 19, 2012 3:08 pm Post subject: Re: Hello, Me New. |
|
|
Hi Will,
Yes, exactly, exactly
the problem starts when I installed a mod that makes the html type links become.
eg
before was:
miforo/forox/member520
now:
miforo/forox/mermber520 willymaster.html
(just an example)
but still, do I have the mod that makes factory convert url in url type html.
a greeting
Nice to see you,
|
|
Back to top |
|
|
Salvatos Board Member
Joined: 19 Feb 2009
Posts: 449 Location: Québec
|
Posted: Mon Nov 19, 2012 6:14 pm Post subject: Re: Hello, Me New. |
|
|
Do you have a file called ultimos.php somewhere? Probably in the root directory or in /includes.
If so, the link should be defined there (ultimos.LINK_AUTOR_ULTIMO is a variable defined elsewhere).
If not, it is probably defined in an existing file that the MOD edited, rather than created. On what page does this content appear? viewforum, viewtopic, index...? You should be able to find the variable there (it's part of an array) and change its value to account for your URL rewriting.
|
|
Back to top |
|
|
taller3d Board Member
Joined: 18 Nov 2012
Posts: 15
|
Posted: Mon Nov 19, 2012 6:45 pm Post subject: Re: Hello, Me New. |
|
|
Hello Salvatos , thank you very much for your help,
(I write with a translator because I do not understand English)
apologize for the errors on my post.
you're right.!
There is a file name
ultimos.php
/www/forox/ultimos.php
and there is also another file
/www/forox/templates/DustyGreen/ultimos.tpl
(this is a view on the board foro.
this is the code of ultimos.php
but I dont Know who make or change... ?
thaks very much. !
/ultimos.php
Code: |
<?
//iniciamos template
$template->set_filenames(array(
'ultimos' => 'ultimos.tpl')
);
// AVERIGUAMOS LOS FOROS A LOS QUE EL USUARIO NO TIENE ACCESO y A LOS QUE TIENE ACCESO. Tb adaptamos salida para concatenar a query
$auth_ary = auth(AUTH_READ, AUTH_LIST_ALL, $userdata);
foreach ( $auth_ary as $auth_forum_id=>$auth_level )
{
if (!$auth_level['auth_read'] )
{
$auth_view_forums = ($auth_view_forums . " p.forum_id<>" . $auth_forum_id . " AND ");
$auth_view_forums1 = ($auth_view_forums1 . " forum_id<>" . $auth_forum_id . " AND ");
$no_accesibles[]=$auth_forum_id;
}
else
{
$accesibles[]=$auth_forum_id;
}
}
$auth_view_forums="WHERE " . $auth_view_forums;
// si no se pasa f por query string -> TODOS LOS FOROS
// si se pasa f por query string :
// si no existe ese foro -> TODOS LOS FOROS
// si existe pero no tiene permisos el usuario -> TODOS LOS FOROS
$foro = ( ( is_array( $no_accesibles ) && in_array( $HTTP_GET_VARS['f'] , $no_accesibles ) ) || !in_array( $HTTP_GET_VARS['f'] , $accesibles ) ) ? "" : $HTTP_GET_VARS['f'];
// Pasamos a primera query el identificador de foro si procede y sino nada
$foro_query = ( $foro == "" ) ? "" : ( " p.forum_id=" . $HTTP_GET_VARS['f'] . " AND " );
// primera query que recoge distintos topic_id dados los últimos mensajes
$sql_ini=("SELECT distinct p.topic_id FROM ".POSTS_TABLE." p, ".TOPICS_TABLE." t $auth_view_forums $foro_query p.topic_id=t.topic_id ORDER BY t.topic_last_post_id DESC LIMIT 0,5");
if ( !($result_ini = $db->sql_query($sql_ini)) )
{
message_die(GENERAL_ERROR, 'No se pudo obtener últimos temas', '', __LINE__, __FILE__, $sql_ini);
}
while ( $assoc_ini=$db->sql_fetchrow($result_ini) )
// Para cada topic_id obtenido extraeremos datos necesarios en dos querys
{
// Segunda query todos los datos menos el ultimo usuario
$sql=("SELECT t.topic_last_post_id, t.topic_title, t.topic_id, t.topic_time, t.topic_replies, u.username,u.user_id, f.forum_name, f.forum_id, p.post_id, p.post_time FROM ".POSTS_TABLE." p, ".TOPICS_TABLE." t, ".USERS_TABLE." u, ".FORUMS_TABLE." f WHERE t.topic_poster=u.user_id AND t.topic_id=".$assoc_ini['topic_id']." AND p.post_id=t.topic_last_post_id AND t.forum_id=f.forum_id");
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'No se pudo obtener últimos temas', '', __LINE__, __FILE__, $sql);
}
while ( $assoc=$db->sql_fetchrow($result) )
{
// tercera query ultimo posteador
$sql_last=("SELECT u.username FROM ".POSTS_TABLE." p, ".USERS_TABLE." u WHERE p.post_id=".$assoc['topic_last_post_id']." AND p.poster_id=u.user_id");
if ( !($result_last = $db->sql_query($sql_last)) )
{
message_die(GENERAL_ERROR, 'No se pudo obtener últimos temas', '', __LINE__, __FILE__, $sql_last);
}
$ultimo_usuario=$db->sql_fetchrow($result_last);
$ultimo_usuario=$ultimo_usuario['username'];
$db->sql_freeresult($result_last);
$fecha_ultimo=getdate($assoc['post_time']);
$fecha_ultimo=$fecha_ultimo["mday"]."-".$fecha_ultimo["mon"]."-".$fecha_ultimo["year"];
$fecha_abierto=getdate($assoc['topic_time']);
$fecha_abierto=$fecha_abierto["mday"]."-".$fecha_abierto["mon"]."-".$fecha_abierto["year"];
$foro_nombre = $assoc['forum_name'];
$template->assign_block_vars('ultimos', array(
'LINK_TITULO' => append_sid( "viewtopic.$phpEx?p=".$assoc['post_id']."&highlight=#".$assoc['post_id'] ),
'TITULO' => ( ( strlen ( $assoc["topic_title"] ) > 19 ) ? ( substr ( $assoc["topic_title"] , 0 , 19 ) . "..." ) : $assoc["topic_title"] ),
'LINK_FORO' => append_sid( "viewforum.$phpEx?f=".$assoc["forum_id"] ),
'FORO' => ( ( strlen ( $assoc["forum_name"] ) > 19 ) ? ( substr ( $assoc["forum_name"] , 0 , 19 ) . "..." ) : $assoc["forum_name"] ),
'LINK_CREADOR_TEMA' => append_sid( "profile.$phpEx?mode=viewprofile&u=".$assoc["username"] ),
'CREADOR_TEMA' => $assoc["username"],
'CREADOR_FECHA' => $fecha_abierto,
'LINK_AUTOR_ULTIMO' => append_sid( "profile.$phpEx?mode=viewprofile&u=".$ultimo_usuario ),
'AUTOR_ULTIMO' => $ultimo_usuario,
'FECHA_ULTIMO' => $fecha_ultimo,
'RESPUESTAS' => $assoc["topic_replies"]));
}
$db->sql_freeresult($result);
}
$db->sql_freeresult($result_ini);
$template->assign_vars(array(
'FORO_NOMBRE' => ( ( $foro == "" ) ? "TODOS LOS FOROS" : $foro_nombre ),
'INDICE' => append_sid("index.$phpEx" ) ) );
make_jumpbox('index.'.$phpEx);
$template->pparse('ultimos');
?>
|
|
|
Back to top |
|
|
Salvatos Board Member
Joined: 19 Feb 2009
Posts: 449 Location: Québec
|
Posted: Tue Nov 20, 2012 12:17 am Post subject: Re: Hello, Me New. |
|
|
No problem
What you need to change is between the arrow and the comma in:
Code: | 'LINK_AUTOR_ULTIMO' => append_sid( "profile.$phpEx?mode=viewprofile&u=".$ultimo_usuario ), |
The actual change depends on your URL rewriting rules, I'm not sure if you need to/can keep the append_sid().
|
|
Back to top |
|
|
taller3d Board Member
Joined: 18 Nov 2012
Posts: 15
|
Posted: Tue Nov 20, 2012 12:19 am Post subject: Re: Hello, Me New. |
|
|
very thank... mi friend... !
I will try... make your indications...
very, very..very, very..very, very.. THANKS.! y TRI..
|
|
Back to top |
|
|
taller3d Board Member
Joined: 18 Nov 2012
Posts: 15
|
Posted: Tue Nov 20, 2012 12:21 am Post subject: Re: Hello, Me New. |
|
|
Salvatos wrote: | No problem
What you need to change is between the arrow and the comma in:
Code: | 'LINK_AUTOR_ULTIMO' => append_sid( "profile.$phpEx?mode=viewprofile&u=".$ultimo_usuario ), |
The actual change depends on your URL rewriting rules, I'm not sure if you need to/can keep the append_sid(). |
Code: | 'LINK_AUTOR_ULTIMO' => append_sid( "profile.$phpEx?mode=viewprofile&u=".$ultimo_usuario ), |
But... i change.. what,?
|
|
Back to top |
|
|
taller3d Board Member
Joined: 18 Nov 2012
Posts: 15
|
Posted: Tue Nov 20, 2012 1:42 am Post subject: Re: Hello, Me New. Problem whit a MOD. |
|
|
here is the file recent
ultimos.php
ultimos.tpl
Description: |
files: ultimos.php ultimos.tpl |
|
Download |
Filename: |
files.rar |
Filesize: |
2.35 KB |
Downloaded: |
1719 Time(s) |
|
|
Back to top |
|
|
|
Not affiliated with or endorsed by the phpBB Group
Powered by phpBB2 © phpBB Group
Generated in 0.0783 seconds using 18 queries. (SQL 0.0114 Parse 0.0112 Other 0.0557) |
phpBB Customizations by the phpBBDoctor.com
Template Design by DeLFlo and MomentsOfLight.com
|
|