Thetownend.com

thetownend.com => thetownend.com => Topic started by: Whits on Sunday, August 7, 2005, 13:04:59



Title: thetownend reopens
Post by: Whits on Sunday, August 7, 2005, 13:04:59
Afternoon all,

The townend has now re-opened. I will be working on a few things over the next couple of hours so if it looks a bit weird dont' worry.

If you do find anything isn't working please let me know.

You may also notice that the forum is hosted at thetownend.co.uk instead of .com so you may need to update your bookmarks.

Cheers
Whits


Title: thetownend reopens
Post by: Dazzza on Sunday, August 7, 2005, 13:30:02
Nice one chief!

Well played need any help give us a shout!

PS can we have the active topics link back at the bottom of the page, saves scrolling back up.

Cheers guv


Title: thetownend reopens
Post by: Whits on Sunday, August 7, 2005, 13:31:42
Quote

PS can we have the active topics link back at the bottom of the page, saves scrolling back up.


done

Quote

Well played need any help give us a shout!


Struggling to find the mod for the scrolling active topics?

(i found a mod that will list the post from the last 24/48 hours, its kind of what you wanted but it showing twice, trying to get that sorted now!)


Title: thetownend reopens
Post by: Dazzza on Sunday, August 7, 2005, 13:56:16
Here you go...

http://www.phpbb.com/phpBB/viewtopic.php?t=145150&postdays=0&postorder=asc&highlight=active+topics&start=0

You may have to play around with it to speed it up and get it at the top of the page.

Found this as well maybe worth a squint...


Categories heirarchy looks quite good although rather a big job...

http://www.phpbb.com/phpBB/viewtopic.php?t=265040


Title: thetownend reopens
Post by: sonicyouth on Sunday, August 7, 2005, 15:15:26
nice job old boy, I'll sort out the new avatars over the next few days 8)


Title: thetownend reopens
Post by: Reg Smeeton on Sunday, August 7, 2005, 19:08:28
I haven't got the scrolling index thing....should I or isn't it working yet.


Title: thetownend reopens
Post by: unclemark on Sunday, August 7, 2005, 19:10:52
I haven't got it either :|


Title: thetownend reopens
Post by: magicroundabout on Sunday, August 7, 2005, 20:44:48
nor me. :(


Title: thetownend reopens
Post by: Whits on Sunday, August 7, 2005, 21:40:00
Its coming back soon don't worry


Title: thetownend reopens
Post by: Bob's Orange on Sunday, August 7, 2005, 21:54:53
I miss the scrolling index thing! :cry:


Title: thetownend reopens
Post by: Whits on Sunday, August 7, 2005, 22:00:06
Quote from: "Whits"
Its coming back soon don't worry


Title: thetownend reopens
Post by: Bob's Orange on Sunday, August 7, 2005, 22:04:17
I know! I'm just kidding! :soapy tit wank:


Title: thetownend reopens
Post by: Whits on Sunday, August 7, 2005, 22:07:34
if the forum gets fucked up in the next 10 mins don't panic, i'm going in  :?  :D


Title: thetownend reopens
Post by: yeo on Sunday, August 7, 2005, 22:08:39
Its gone down hill hasnt it :D

I prefered dazzzzzzzzzza :D


Title: thetownend reopens
Post by: Dazzza on Sunday, August 7, 2005, 22:09:59
Nahhhh

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

Whits is the New Labour to my Thatcher years.


Title: thetownend reopens
Post by: Whits on Sunday, August 7, 2005, 22:12:22
i want dazzza back to   :D

and i don't like new labour  :?


Title: thetownend reopens
Post by: yeo 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:


Title: thetownend reopens
Post by: Whits on Sunday, August 7, 2005, 22:54:08
dazzza this scrolling topics thing is a cunt  :x


Title: thetownend reopens
Post by: Dazzza 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.


Title: thetownend reopens
Post by: Whits 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


Title: thetownend reopens
Post by: Dazzza 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.


Title: thetownend reopens
Post by: Whits 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']))
);
}


Title: thetownend reopens
Post by: Whits 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


Title: thetownend reopens
Post by: Dazzza 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.


Title: thetownend reopens
Post by: Whits on Monday, August 8, 2005, 13:07:26
about fookin time, i took a day off sick to fix it  :oops:  :D


Title: thetownend reopens
Post by: sonicyouth on Monday, August 8, 2005, 13:08:00
you ponce :Ride On Fatbury's Lovestick:


Title: thetownend reopens
Post by: Bob's Orange on Monday, August 8, 2005, 13:10:13
Quote from: "Whits"
about fookin time, i took a day off sick to fix it  :oops:  :D


Whits you are a website legend!

The scrolling is back! 8)


Title: thetownend reopens
Post by: Whits 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/


Title: thetownend reopens
Post by: McLovin on Monday, August 8, 2005, 13:12:16
That's commitment!


Title: thetownend reopens
Post by: Dazzza on Monday, August 8, 2005, 13:16:20
That's dedication, well done mate!

What was it?


Title: thetownend reopens
Post by: Whits on Monday, August 8, 2005, 13:18:41
that i don;t honestly know. I fully uninstalled it and download Mod Center from phpbb, its does an auto install of most mods, just needed to change the template after, it will make things a lot easier in the future i hope!

(you can see mod center in the admin panel)


Title: thetownend reopens
Post by: Dazzza on Monday, August 8, 2005, 13:23:36
Superb chief.  Good to see the first page of the Admin panel is fully restored.


Title: thetownend reopens
Post by: sonicyouth on Monday, August 8, 2005, 13:29:00
good work old boy 8)


Title: thetownend reopens
Post by: Reg Smeeton on Monday, August 8, 2005, 14:34:57
:\/


Title: thetownend reopens
Post by: Bob's Orange on Monday, August 8, 2005, 14:36:52
Quote from: "Reg Smeeton"
:\/


I love that!!