phpBB SEO
Boards
Directory  
SEO  
Downloads
  phpBB SEO : Search Engine Optimization, Directory, Forums  
Index
Forums
Annuaire
Référencement
Télécharger
 
  Search Rechercher
    Register
Username :  Password :  Log me on automatically each visit  
S'enregistrer  
 
   
Stuck with this mod:

 
Post new topic   Reply to topic    phpBB SEO » SEO Forum  » phpBB Forum
::  
Author Message
euroman
PR0
PR0


Joined: 21 Oct 2006
Posts: 81

Stuck with this mod:Posted: Sat Feb 10, 2007 3:44 pm    Post subject: Stuck with this mod:

After installing Keep unread mod http://www.phpbb.com/phpBB/viewtopic.php?p=1677906#1677906 (also used http://www.detecties.com/phpbb2018/viewtopic.php?p=42#42) the variables in the bottom of the below code (last topics on index mod) in my index.php are empty.

The keep unread mod didnt affect the code on my test forum, so I am completely in the dark.

Could it have anything to do with simple mod rewrite or zero dupes?

Code:
//
// Get The Data
//
$template->assign_vars(array(
   'MARQUEE_TOPIC' => str_replace("%s",$board_config['topics_on_index'],$lang['marquee_topic']) )
);

$sql = "SELECT t.topic_id, t.topic_title, t.topic_last_post_id, t.forum_id, t.topic_type, t.topic_status, p.post_id, p.poster_id,
   p.post_time, u.user_id, u.username, u.user_lastvisit
   FROM " . TOPICS_TABLE . " t, " . FORUMS_TABLE . " f, " . POSTS_TABLE . " p, " . USERS_TABLE . " u
   WHERE t.forum_id IN " . $auth_view_forum_sql . " AND t.topic_id = p.topic_id
   AND f.forum_id = t.forum_id
   AND t.topic_status <> 2
   AND p.post_id = t.topic_last_post_id
   AND p.poster_id = u.user_id
   ORDER BY t.topic_last_post_id DESC";

if ( !($result = $db->sql_query($sql)) )
{
   message_die(GENERAL_ERROR, 'Could not query recent posts marquee information', '', __LINE__, __FILE__, $sql);
}

if ($row = $db->sql_fetchrowset($result))
{
   $db->sql_freeresult($result);
}

if( count($row) <= $board_config['topics_on_index'] )
{
   $topics = count($row);
}
else
{
   $topics = $board_config['topics_on_index'];
}

for($i = 0; $i < $topics; $i++)
{
   $mar_title = $row[$i]["topic_title"];
   $mar_url = $phpbb_root_path . 'viewtopic.'.$phpEx.'?'.POST_TOPIC_URL.'='.$row[$i]["topic_id"];
   $mar_user = $row[$i]["username"];
   if ( $row[$i]["topic_status"] == TOPIC_LOCKED )
   {
      if ( $row[$i]["post_time"] > $row[$i]["user_lastvisit"] )
      {
         $pic = $images['folder_locked_new'];
      }
      else
      {
         $pic = $images['folder_locked'];
      }
   }
   else
   {
      if ( $row[$i]["topic_type"] == POST_GLOBAL_ANNOUNCE )
      {
         if ( $row[$i]["post_time"] > $row[$i]["user_lastvisit"] )
         {
            $pic = $images['folder_global_announce_new'];
         }
         else
         {
            $pic = $images['folder_global_announce'];
         }
      }
      else if ( $row[$i]["topic_type"] == POST_ANNOUNCE )
      {
         if ( $row[$i]["post_time"] > $row[$i]["user_lastvisit"] )
         {
            $pic = $images['folder_announce_new'];
         }
         else
         {
            $pic = $images['folder_announce'];
         }
      }
      else if ( $row[$i]["topic_type"] == POST_STICKY )
      {
         if ( $row[$i]["post_time"] > $row[$i]["user_lastvisit"] )
         {
            $pic = $images['folder_sticky_new'];
         }
         else
         {
         $pic = $images['folder_sticky'];
         }
      }
      else { if ( $row[$i]["post_time"] > $userdata['user_lastvisit'] )
      {
         $pic = $images['folder_new']; }else{ $pic = $images['folder'];
      }
   }
}
$template->assign_block_vars('marqueerow', array(
   'FOLD_URL' => $pic,
   'TOPIC_TITLE' => $row[$i]["topic_title"],
   'TOPIC_URL' => append_sid($phpbb_root_path . 'viewtopic.'.$phpEx.'?'.POST_TOPIC_URL.'='.$row[$i]["topic_id"]),
   'USERNAME' => $row[$i]["username"],
   'USER_PROF' => append_sid($phpbb_root_path . 'profile.'.$phpEx.'?mode=viewprofile$amp;u='.$row[$i]["user_id"]),
   'POST_DATE' => create_date($board_config['default_dateformat'], $row[$i]["post_time"], $board_config['board_timezone']))
   );
}


Last edited by euroman on Sat Feb 10, 2007 4:09 pm; edited 2 times in total
Back to top
Visit poster's website
dcz
Administrateur - Site Admin
Administrateur - Site Admin


Joined: 28 Apr 2006
Posts: 15131

Stuck with this mod:Posted: Sat Feb 10, 2007 3:47 pm    Post subject: Re: Stuck with this mod:

Could be the zero dupe if the mod is adding some vars to phpBB scripts as mentioned in the release.

What's happening ?

Is it that when you try to load a link from the mod you get redirected to the topic ?

URL to release thread ?

++

_________________
Useful links :
SEO Forum || SEO Directory || SEO phpBB || SEO phpBB3 || Search
____________________

Liens Utiles :
Forum référencement || Annuaire référencement || Référencement phpBB || Référencement phpBB3 || Recherche
Back to top
Visit poster's website
euroman
PR0
PR0


Joined: 21 Oct 2006
Posts: 81

Stuck with this mod:Posted: Sat Feb 10, 2007 3:58 pm    Post subject: Re: Stuck with this mod:

dcz wrote:
Could be the zero dupe if the mod is adding some vars to phpBB scripts as mentioned in the release.

What's happening ?

Is it that when you try to load a link from the mod you get redirected to the topic ?

URL to release thread ?

++


Actully I have modded the last topics myself - but I pasted the original code back to make things simpler. The redirectet issue I have solved.

But heres the original body_index code that uses the variables - the strange thing is that it produces a totally empty table - see sorucecode: www.thegame-online.dk

Its like the variables are never definded....

Same code in index and body_index in testforum www.thegame-online.de where variables are not empty

index_body.tpl:

Quote:
<table width="100%" cellpadding="3" cellspacing="1" border="0" class="forumline" height="100%">
<tr>
<td class="catHead" height="28"><a name="login"></a><span class="cattitle">{MARQUEE_TOPIC}</span></td>
</tr>
<tr>
<td class="row1" valign="top"><span class="gen">
<marquee id="recent_topics" behavior="scroll" direction="up" height="100" scrolldelay="100" scrollamount="2">
<table cellpadding="4" cellSpacing="1" width="100%">
<!-- BEGIN marqueerow -->
<tr valign="top">
<td class="row2" vAlign="center" align="middle" width="20">
<img src="{marqueerow.FOLD_URL}">
</td>
<td class="row2" width="352">
<span class="forumlink"><a href="{marqueerow.TOPIC_URL}" onMouseOver="document.all.recent_topics.stop()" onMouseOut="document.all.recent_topics.start()">{marqueerow.TOPIC_TITLE}</a></span>
<span class="gensmall"><br /></span>
</td>
<td class="row2" vAlign="center" align="middle" width="78">
<span class="gensmall"><a href="{marqueerow.USER_PROF}" onMouseOver="document.all.recent_topics.stop()" onMouseOut="document.all.recent_topics.start()">{marqueerow.USERNAME}</a></span>
</td>
<td class="row2" vAlign="center" noWrap align="middle" width="100">
<span class="gensmall">{marqueerow.POST_DATE}</span>
</td>
</tr>
<!-- END marqueerow -->
</table>
</marquee>
</td>
</tr>
</table>
Back to top
Visit poster's website
dcz
Administrateur - Site Admin
Administrateur - Site Admin


Joined: 28 Apr 2006
Posts: 15131

Stuck with this mod:Posted: Sat Feb 10, 2007 4:17 pm    Post subject: Re: Stuck with this mod:

ho I see.

So your problem is not linked to the phpBB SEO mods, but rather to the last mods you installed.

If the last topic links variables are empty, it most likely means that you did something wrong while installing the last two mods you mentioned.

You should first check index.php, and make sure the topic on index mod is still there.

++

_________________
Useful links :
SEO Forum || SEO Directory || SEO phpBB || SEO phpBB3 || Search
____________________

Liens Utiles :
Forum référencement || Annuaire référencement || Référencement phpBB || Référencement phpBB3 || Recherche
Back to top
Visit poster's website
euroman
PR0
PR0


Joined: 21 Oct 2006
Posts: 81

Stuck with this mod:Posted: Sat Feb 10, 2007 4:19 pm    Post subject: Re: Stuck with this mod:

yep - its still there...

EDIT: Found error:

INSERT INTO phpbb_config ( config_name, config_value ) VALUES ('topics_on_index', '10');

Value had been reset to 0 somehow.....
Back to top
Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    phpBB SEO » SEO Forum  » phpBB Forum
Page 1 of 1

Navigation Similar Topics

Jump to: