Pages: 1 [2] 3   Go Down
Print
Author Topic: thetownend reopens  (Read 11097 times)
Whits
Morphined Up

Offline Offline

Posts: 8136




« Reply #15 on: Sunday, August 7, 2005, 22:12:22 »

i want dazzza back to   Cheesy

and i don't like new labour  :?
Logged

Plays in midfield and his name is Tommy Miller,
signed him from Huddersfield his name is Tommy Miller,
first touch is average but his second is a killer,
heeeeeey Tommy Miller!
yeo

Offline Offline

Posts: 3651





Ignore
« Reply #16 on: Sunday, August 7, 2005, 22:14:16 »

Quote from: "dazzza"
Nahhhh

I was a lazy arsed monkey on a power trip Yeovil.

Whits is the New Labour to my Thatcher years.


Have you been reading my Pm's? Wink
Logged

/
W56196272
Whits
Morphined Up

Offline Offline

Posts: 8136




« Reply #17 on: Sunday, August 7, 2005, 22:54:08 »

dazzza this scrolling topics thing is a cunt  :x
Logged

Plays in midfield and his name is Tommy Miller,
signed him from Huddersfield his name is Tommy Miller,
first touch is average but his second is a killer,
heeeeeey Tommy Miller!
Dazzza

Offline Offline

Posts: 8265



WWW
« Reply #18 on: Sunday, August 7, 2005, 23:01:42 »

Quote from: "Whits"
dazzza this scrolling topics thing is a cunt  :x


Whats the prob?

I fucking hated doing a couple  of those mods.

That one was ok but it's so frustrating when you can't see what's stopping them from working.

I used Dreamweaver as it gives you an idea of the layout and stuff.
Logged

Whits
Morphined Up

Offline Offline

Posts: 8136




« Reply #19 on: Sunday, August 7, 2005, 23:07:14 »

well as you can see its on the main page but its not pulling in the topics but i'm not sure why
Logged

Plays in midfield and his name is Tommy Miller,
signed him from Huddersfield his name is Tommy Miller,
first touch is average but his second is a killer,
heeeeeey Tommy Miller!
Dazzza

Offline Offline

Posts: 8265



WWW
« Reply #20 on: Sunday, August 7, 2005, 23:21:37 »

Not sure if this is much help but this is the code from the old forum's index.php.  It sounds like the bit in bold is the problem.

Quote

//
// Obtain new post information for marquee
// of new posts
//
//
// Get Viewable Forums
//
if ( function_exists('get_auth_keys') ) {
   $keys = array();
   $keys = get_auth_keys('Root');
   $auth_view_forum_sql = '';
   for ($i=0; $i < count($keys['id']); $i++)
   {
      if ($tree['type'][ $keys['idx'][$i] ] == POST_FORUM_URL)
      {
         $auth_view_forum_sql .= (($auth_view_forum_sql != '') ? ', ' : '') . $tree['id'][ $keys['idx'][$i] ];
      }
   }
   $auth_view_forum_sql = ($auth_view_forum_sql == '' ? '(0)' : '(' . $auth_view_forum_sql . ')');
}
else
{
   $is_auth_ary = array();
   $is_auth_ary = auth(AUTH_VIEW, AUTH_LIST_ALL, $userdata, $forum_data);
   $auth_view_forum_sql = '';
   for($i = 0; $i < $total_categories; $i++)
   {
      $cat_id = $category_rows[$i]['cat_id'];
      $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;
            $auth_view_forum_sql .= ($auth_view_forum_sql == '' ? '' : ', ' ) . $forum_data[$j]['forum_id'];
         }
      }
   }
   $auth_view_forum_sql = ($auth_view_forum_sql == '' ? '(0)' : '(' . $auth_view_forum_sql . ')');
}

//
// 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.'?t='.$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.'?t='.$row[$i]["topic_id"]),
   'USERNAME' => $row[$i]["username"],
   'USER_PROF' => append_sid($phpbb_root_path . 'profile.'.$phpEx.'?mode=viewprofile&u='.$row[$i]["user_id"]),
   'POST_DATE' => create_date($board_config['default_dateformat'], $row[$i]["post_time"], $board_config['board_timezone']))
   );
}


Drop the index.php code down and I'll take a shufty if you like.
Logged

Whits
Morphined Up

Offline Offline

Posts: 8136




« Reply #21 on: Sunday, August 7, 2005, 23:30:02 »

Code:
// 
// Obtain new post information for marquee
// of new posts
//
//
// Get Viewable Forums
//
// function to merge two auth arrays to one
function array_merge_replace($array, $newValues)
{
foreach ($newValues as $key => $value)
{
if ( is_array($value) )
{
if ( !isset($array[$key]) )
{
$array[$key] = array();
}
$array[$key] = array_merge_replace($array[$key], $value);
}
else
{
if ( isset($array[$key]) && is_array($array[$key]) )
{
$array[$key][0] = $value;
}
else
{
if ( isset($array) && !is_array($array) )
{
$temp = $array;
$array = array();
$array[0] = $temp;
}
$array[$key] = $value;
}
}
}
return $array;
}
$ary = array();
$ary2 = array();
$ary = auth(AUTH_VIEW, AUTH_LIST_ALL, $userdata, $forum_data);
$ary2 = auth(AUTH_READ, AUTH_LIST_ALL, $userdata, $forum_data);
$is_auth_ary = array_merge_replace($ary, $ary2);
$auth_view_forum_sql = '';
for($i = 0; $i < $total_categories; $i++)
{
$cat_id = $category_rows[$i]['cat_id'];
$display_forums = false;
for($j = 0; $j < $total_forums; $j++)
{
if ( $is_auth_ary[$forum_data[$j]['forum_id']]['auth_view'] && $is_auth_ary[$forum_data[$j]['forum_id']]['auth_read'] && $forum_data[$j]['cat_id'] == $cat_id )
{
$display_forums = true;
$auth_view_forum_sql .= ($auth_view_forum_sql == '' ? '' : ', ' ) . $forum_data[$j]['forum_id'];
}
}
}
$auth_view_forum_sql = ($auth_view_forum_sql == '' ? '(0)' : '(' . $auth_view_forum_sql . ')');

//
// 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']))
);
}
Logged

Plays in midfield and his name is Tommy Miller,
signed him from Huddersfield his name is Tommy Miller,
first touch is average but his second is a killer,
heeeeeey Tommy Miller!
Whits
Morphined Up

Offline Offline

Posts: 8136




« Reply #22 on: Sunday, August 7, 2005, 23:38:33 »

i'm gonna have to look into it tomorrow, i gotta be up at 6.30  :x
Logged

Plays in midfield and his name is Tommy Miller,
signed him from Huddersfield his name is Tommy Miller,
first touch is average but his second is a killer,
heeeeeey Tommy Miller!
Dazzza

Offline Offline

Posts: 8265



WWW
« Reply #23 on: Monday, August 8, 2005, 00:17:41 »

Arse it's slightly different, looks like the mod has been changed/updated since I installed it.  :x

Quote

}
$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']))
   );
}


Check out the bold bit in the last block of code.

Just slightly different while the rest is identical.  May be worth a quick punt as a long shot.
Logged

Whits
Morphined Up

Offline Offline

Posts: 8136




« Reply #24 on: Monday, August 8, 2005, 13:07:26 »

about fookin time, i took a day off sick to fix it  Oops  Cheesy
Logged

Plays in midfield and his name is Tommy Miller,
signed him from Huddersfield his name is Tommy Miller,
first touch is average but his second is a killer,
heeeeeey Tommy Miller!
sonicyouth

Offline Offline

Posts: 22352





Ignore
« Reply #25 on: Monday, August 8, 2005, 13:08:00 »

you ponce
Logged
Bob's Orange
Has brain escape barriers

Offline Offline

Posts: 28569





Ignore
« Reply #26 on: Monday, August 8, 2005, 13:10:13 »

Quote from: "Whits"
about fookin time, i took a day off sick to fix it  Oops  Cheesy


Whits you are a website legend!

The scrolling is back! Cool
Logged

we've been to Aberdeen, we hate the Hibs, they make us spew up, so make some noise,
the gorgie boys, for Hearts in Europe.
Whits
Morphined Up

Offline Offline

Posts: 8136




« Reply #27 on: Monday, August 8, 2005, 13:10:54 »

well i was in a shit mood after the football and this was pissing me off something cronic!!

working on both themes now \o/
Logged

Plays in midfield and his name is Tommy Miller,
signed him from Huddersfield his name is Tommy Miller,
first touch is average but his second is a killer,
heeeeeey Tommy Miller!
McLovin

« Reply #28 on: Monday, August 8, 2005, 13:12:16 »

That's commitment!
Logged
Dazzza

Offline Offline

Posts: 8265



WWW
« Reply #29 on: Monday, August 8, 2005, 13:16:20 »

That's dedication, well done mate!

What was it?
Logged

Pages: 1 [2] 3   Go Up
Print
Jump to: