Recent Topics Scrolling
Forum rules
Before creating a new support thread, please take a look in the board3 Portal FAQ and use the search!
Many questions have already been answered.
Before creating a new support thread, please take a look in the board3 Portal FAQ and use the search!
Many questions have already been answered.
-
Topic author - Active Member
- Posts: 29
- Joined: 14. February 2009 00:22
- phpBB.com User: DragonMaster1
- Location: U.S.A.
- Contact:
Recent Topics Scrolling
Your Portal Version: 1.0.0RC3
Your phpBB Type: Standard phpBB3
MODs installed: No
Your knowledge: Beginner
What have you done before the problem was there?
What have you already tryed to solve the problem?
Description and Message
I see that there is a Recent Topics small block that is scrolling here:
http://www.livewiremods.com/mods/viewforum.php?f=2
Anyone know where to get that block code?
Thanx In Advance!!!
Your phpBB Type: Standard phpBB3
MODs installed: No
Your knowledge: Beginner
What have you done before the problem was there?
What have you already tryed to solve the problem?
Description and Message
I see that there is a Recent Topics small block that is scrolling here:
http://www.livewiremods.com/mods/viewforum.php?f=2
Anyone know where to get that block code?
Thanx In Advance!!!
-
- Site Admin
- Posts: 2989
- Joined: 7. January 2006 20:11
- phpBB.de User: Saint
- phpBB.com User: Saint_hh
- Location: Hamburg
- Contact:
Re: Recent Topics Scrolling
I think this is part of the stargate portal code. You might have a look on it.
~~~ They say the definition of madness is doing the same thing and expecting a different result ~~~
Kein Support per PN / No support via PM!
Kein Support per PN / No support via PM!
-
Topic author - Active Member
- Posts: 29
- Joined: 14. February 2009 00:22
- phpBB.com User: DragonMaster1
- Location: U.S.A.
- Contact:
Re: Recent Topics Scrolling
I have that as it was one I was thinking of using, but it was still not as nice as this one. I’ll take a look at the blocks but so far I had not had any luck getting them to work on this board
-
- Site Admin
- Posts: 2989
- Joined: 7. January 2006 20:11
- phpBB.de User: Saint
- phpBB.com User: Saint_hh
- Location: Hamburg
- Contact:
Re: Recent Topics Scrolling
It should be possible.DragonMaster wrote:but so far I had not had any luck getting them to work on this board
If you have it downloaded yet, please show me the content of the belonging files. We might offer an adaption with respect to their work and credits.
~~~ They say the definition of madness is doing the same thing and expecting a different result ~~~
Kein Support per PN / No support via PM!
Kein Support per PN / No support via PM!
-
Topic author - Active Member
- Posts: 29
- Joined: 14. February 2009 00:22
- phpBB.com User: DragonMaster1
- Location: U.S.A.
- Contact:
Re: Recent Topics Scrolling
Here is my base test board I made for it:
http://www.ronnie-james-dio.com/PORTALT ... 5d8b6c9465
Here is the Recent Topic code
http://www.ronnie-james-dio.com/PORTALT ... 5d8b6c9465
Here is the Recent Topic code
Code: Select all
<?php
/***************************************************************************
* block_recents_topics.php
* ------------------------
* begin : Sunday, 20th May, 2007
* copyright : (C) 2005 Michaelo - Michael O'Toole
* website : http://www.phpbbireland.com
* email : admin@phpbbireland.com
* last update : 21 February 2008
* licence : GPL vs2.0 [ see /docs/COPYING ]
*
* Note: Do not remove this copyright for the top of this page. Just
* append yours if you have modified it. Do not remove copyright...
***************************************************************************/
if ( !defined('IN_PHPBB') )
{
die("Hacking attempt");
}
$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './';
$phpEx = substr(strrchr(__FILE__, '.'), 1);
$auth->acl($user->data);
// URL PARAMETERS
define('POST_TOPIC_URL', 't');
define('POST_CAT_URL', 'c');
define('POST_FORUM_URL', 'f');
define('POST_USERS_URL', 'u');
define('POST_POST_URL', 'p');
define('POST_GROUPS_URL', 'g');
global $user, $forum_id, $phpbb_root_path, $phpEx, $SID, $config , $template, $portal_config, $userdata, $config, $db, $phpEx;
// set up variables used //
$display_this_many = $k_config['number_of_recent_topics_to_display'];
$forum_count = $row_count = 0;
$except_forum_id = '';
$forum_data = array();
$recent_topic_row = array();
// get all forums //
$sql = "SELECT * FROM ". FORUMS_TABLE . " ORDER BY forum_id";
if (!$result = $db->sql_query($sql))
{
trigger_error('Error! Could not query forums information: ' . basename(dirname(__FILE__)) . '/' . basename(__FILE__) . ', line ' . __LINE__);
}
while( $row = $db->sql_fetchrow($result) )
{
$forum_data[] = $row;
$forum_count++;
}
$db->sql_freeresult($result);
for ($i = 1; $i < $forum_count; $i++)
{
if (!$auth->acl_gets('f_list', 'f_read', $forum_data[$i]['forum_id']))
{
$except_forum_id .= "'" . $forum_data[$i]['forum_id'] . "'";
$except_forum_id .= ",";
}
}
$except_forum_id = rtrim($except_forum_id,",");
if($except_forum_id == '')
$except_forum_id = '0';
$sql = "SELECT t.topic_id, t.topic_title, t.topic_last_post_id, t.forum_id, p.post_id, p.poster_id, p.post_time, u.user_id, u.username, u.user_colour
FROM " . TOPICS_TABLE . " AS t, " . POSTS_TABLE . " AS p, " . USERS_TABLE . " AS u
WHERE t.forum_id NOT IN (" . $except_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 p.post_id DESC
LIMIT " . $display_this_many;
if (!$result = $db->sql_query($sql, 300))
{
trigger_error("Could not query recent topics data");
}
while ($row = $db->sql_fetchrow($result))
{
$recent_topic_row[] = $row;
if( $row['forum_id'] > 0)
{
// Get forum name for this postid
$sql2 = "SELECT forum_name
FROM " . FORUMS_TABLE . "
WHERE forum_id = " . $row['forum_id'] . "
LIMIT " . 1;
if (!$my_result = $db->sql_query($sql2, 300))
{
trigger_error("Could not get forum name");
}
$my_row = $db->sql_fetchrow($my_result);
$recent_topic_row['forum_name'][$row_count] = $my_row['forum_name'];
$row_count ++;
}
}
$db->sql_freeresult($result);
$db->sql_freeresult($my_result);
$sql = "SELECT scroll, position
FROM " . K_BLOCKS_TABLE . "
WHERE title = 'Recent Topics' ";
if( $result = $db->sql_query($sql, 300) )
{
$rowx = $db->sql_fetchrow($result);
$scroll = $rowx['scroll'];
$display_center = $rowx['position'];
}
else
trigger_error("Could not query <strong>" . $recent_topics . "</strong> information");
$db->sql_freeresult($result);
($scroll) ? $style_row = 'scroll' : $style_row = 'static';
//$template->assign_block_vars($style_row, array());
// change topics to display count if there are less topics that set in ACP
if($display_this_many > $row_count)
$display_this_many = $row_count;
if($scroll)
{
$display_this_many = $row_count;
if($row_count <= 6)
{
$style_row = 'static';
$template->assign_vars(array(
'PROCESS' => false,
));
}
else
{
$template->assign_vars(array(
'PROCESS' => true,
));
}
}
for ( $i = 0; $i < $display_this_many; $i++ )
{
if ($recent_topic_row[$i]['user_id'] != -1)
{
if($display_center != 'C')
$recent_topic_row[$i]['topic_title'] = sgp_checksize ($recent_topic_row[$i]['topic_title'],20); // Michaelo's function to stop page from stretching due to long names in form select options... Names are truncated//
$view_topic_url = append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . (($recent_topic_row[$i]['forum_id']) ? $recent_topic_row[$i]['forum_id'] : $forum_id) );
// add spaces for nice scrolling
$my_title = smilies_pass($recent_topic_row[$i]['topic_title']);
$length = strlen($my_title);
// padd if too long
if($length > 25)
{
sgp_checksize ($my_title, 25);
}
// do same for forum name
$my_forum = smilies_pass($recent_topic_row['forum_name'][$i]);
$length = strlen($my_forum);
// padd if too long
if($length > 25)
sgp_checksize ($my_forum, 25);
$template->assign_block_vars($style_row . '.recent_topic_row', array(
'U_FORUM' => append_sid("viewforum.$phpEx?" . POST_FORUM_URL . '=' . $recent_topic_row[$i]['forum_id']),
'U_LAST_POST' => $view_topic_url . '&p=' . $recent_topic_row[$i]['topic_last_post_id'] . '#p' . $recent_topic_row[$i]['topic_last_post_id'],
'U_TITLE' => append_sid("viewtopic.$phpEx?" . POST_POST_URL . '=' . $recent_topic_row[$i]['post_id']),
'S_FORUM' => $my_forum,
'S_POSTER' => get_username_string('full', $recent_topic_row[$i]['user_id'], $recent_topic_row[$i]['username'], $recent_topic_row[$i]['user_colour']),
'S_POSTTIME' => $user->format_date($recent_topic_row[$i]['post_time']),
'S_ROW_COUNT' => $i,
'S_TITLE' => $my_title,
'LAST_POST_IMG' => $user->img('icon_topic_newest', 'VIEW_LATEST_POST'),
)
);
}
}
$template->assign_vars(array(
'S_RECENT_TOPICS_COUNT_ASKED' => $display_this_many,
'S_RECENT_TOPICS_COUNT_RETURNED' => $row_count,
'S_ALIGN_IT' => 'center',
'S_DISPLAY_CENTRE' => $display_center,
'S_COUNT' => $display_this_many,
)
);
?>
-
- Site Admin
- Posts: 2989
- Joined: 7. January 2006 20:11
- phpBB.de User: Saint
- phpBB.com User: Saint_hh
- Location: Hamburg
- Contact:
Re: Recent Topics Scrolling
And the template code would be nice.
~~~ They say the definition of madness is doing the same thing and expecting a different result ~~~
Kein Support per PN / No support via PM!
Kein Support per PN / No support via PM!
-
Topic author - Active Member
- Posts: 29
- Joined: 14. February 2009 00:22
- phpBB.com User: DragonMaster1
- Location: U.S.A.
- Contact:
Re: Recent Topics Scrolling
Kevin wrote:And the template code would be nice.
That base I have is just basic prosilver....but I normally use Divine Black based on subsilver
-
- Site Admin
- Posts: 2989
- Joined: 7. January 2006 20:11
- phpBB.de User: Saint
- phpBB.com User: Saint_hh
- Location: Hamburg
- Contact:
Re: Recent Topics Scrolling
However - i need a template.
prosilver is fine - for other people, wanting to use it.
But please note: we are currently working on the next release of B3P. So it might be that i only get to have a look on it next week.
prosilver is fine - for other people, wanting to use it.
But please note: we are currently working on the next release of B3P. So it might be that i only get to have a look on it next week.
~~~ They say the definition of madness is doing the same thing and expecting a different result ~~~
Kein Support per PN / No support via PM!
Kein Support per PN / No support via PM!
-
Topic author - Active Member
- Posts: 29
- Joined: 14. February 2009 00:22
- phpBB.com User: DragonMaster1
- Location: U.S.A.
- Contact:
Re: Recent Topics Scrolling
Do you want my Divine Black?
If so, a base copy or the modded one I use?
Which files?
If so, a base copy or the modded one I use?
Which files?
-
- Former Team Member
- Posts: 246
- Joined: 15. January 2008 08:41
- phpBB.de User: PeterS
- phpBB.com User: PeterS
Re: Recent Topics Scrolling
Hi Kevin,
here the block_recent_topics.html
and
block_recent_topic_wide.html
Peter
here the block_recent_topics.html
Code: Select all
<!-- IDTAG starts block_recent_topics.html 30th June 2008 copyright 2007 phpbbireland.com -->
<span class="block_data">
<!-- IF S_COUNT_RECENT -->
<div style="width:100%; overflow:visible;" >
<!-- BEGIN scrollwide -->
<!-- BEGIN recent_topic_row -->
<strong>{staticwide.recent_topic_row.ORI_LAST_POST_IMG} <a href="{scrollwide.recent_topic_row.U_TITLE}" > {scrollwide.recent_topic_row.S_TITLE}</a></strong>
<br /> by: {scrollwide.recent_topic_row.S_POSTER} <br />
<span class="tiny">{scrollwide.recent_topic_row.S_POSTTIME}</span><br />
<!--<a href="{scrollwide.recent_topic_row.U_TITLE}" >{L_RECENT_REPLY}{scrollwide.recent_topic_row.ORI_LAST_POST_IMG}</a><br /><br />-->
<!-- END recent_topic_row -->
<!-- END scrollwide -->
<!-- BEGIN staticwide -->
<!-- BEGIN recent_topic_row -->
<strong>{staticwide.recent_topic_row.ORI_LAST_POST_IMG} <a href="{staticwide.recent_topic_row.U_TITLE}" > {staticwide.recent_topic_row.S_TITLE}</a></strong>
<br /> by: {staticwide.recent_topic_row.S_POSTER} <br />
<span class="tiny">{staticwide.recent_topic_row.S_POSTTIME}</span> <br />
<!-<a href="{staticwide.recent_topic_row.U_TITLE}" >{L_RECENT_REPLY}{staticwide.recent_topic_row.ORI_LAST_POST_IMG}</a><br /><br />-->
<!-- END recent_topic_row -->
<!-- END staticwide -->
</div>
<!-- ELSE -->
<div><center><span class="genmed"><strong>{L_NO_RECENT_TOPICS}</strong></span></center></div>
<!-- ENDIF -->
</span>
<!-- IDTAG ends block_recent_topics -->
block_recent_topic_wide.html
Code: Select all
<!-- IDTAG starts block_recent_topics.html 30th June 2008 copyright 2007 phpbbireland.com -->
<span class="block_data">
<!-- IF S_COUNT_RECENT -->
<div style="width:100%; overflow:visible;">
<table width="100%" cellpadding="1" cellspacing="1">
<!-- BEGIN scrollwide -->
<!-- BEGIN recent_topic_row -->
<!-- IF scrollwide.recent_topic_row.S_ROW_COUNT == 0 -->
<tr>
<td width="auto">{L_TITLE}</td>
<td width="auto">{L_POSTER}</td>
<td align="right" width="auto">{L_POSTED}/{L_EDITED}</td>
</tr>
<tr><td colspan="3"><hr /></td></tr>
<!-- ENDIF -->
<!-- IF scrollwide.recent_topic_row.S_UNIQUE -->
<tr class="bg3"><td colspan="3" width="auto" style="text-align:left;"><strong><a href="{scrollwide.recent_topic_row.U_FORUM}">{scrollwide.recent_topic_row.S_FORUM}</a></strong></td><!--<td style="text-align:right;">{L_FORUM}</td>--></tr>
<!-- ENDIF -->
<!-- IF scrollwide.recent_topic_row.S_ROW_COUNT is even --><tr class="bg2"><!-- ELSE --><tr class="bg1"><!-- ENDIF -->
<td width="auto">{scrollwide.recent_topic_row.LAST_POST_IMG} <a href="{scrollwide.recent_topic_row.U_TITLE}" >
<span class="<!-- IF scrollwide.recent_topic_row.S_TYPE == 2 or scrollwide.recent_topic_row.S_TYPE == 3 -->red<!-- ELSEIF scrollwide.recent_topic_row.S_TYPE == 4 or scrollwide.recent_topic_row.S_TYPE == 5 -->orange<!-- ELSEIF scrollwide.recent_topic_row.S_TYPE == 1 -->green<!-- ELSE --><!-- ENDIF -->">{scrollwide.recent_topic_row.S_TITLE}</span></a>:
</td>
<td width="auto">{scrollwide.recent_topic_row.S_POSTER} </td>
<td align="right" width="auto">{scrollwide.recent_topic_row.S_POSTTIME}</td>
</tr>
<!-- END recent_topic_row -->
<tr><td colspan="3">
<table width="100%" cellpadding="0" cellspacing="0">
<td class="bg3" style="padding:3px;" align="left" width="auto"><b>Legend:</b><span class="red"> Announcements</span>, <span class="green"> Sticky</span>, <span class="orange"> News</span> and <b> Normal</b> posts.</td>
<td class="bg3" style="padding:3px;" align="right" width="auto"><b>{SEARCH_TYPE}, {SEARCH_LIMIT}</b></td>
</table>
</td></tr>
<!-- END scrollwide -->
<!-- BEGIN staticwide -->
<!-- BEGIN recent_topic_row -->
<!-- IF staticwide.recent_topic_row.S_ROW_COUNT == 0 -->
<tr>
<td width="auto">{L_TITLE}</td>
<td width="auto">{L_POSTER}</td>
<td align="right" width="auto">{L_POSTED}/{L_EDITED}</td>
</tr>
<tr><td colspan="3"><hr /></td></tr>
<!-- ENDIF -->
<!-- IF staticwide.recent_topic_row.S_UNIQUE -->
<tr class="bg3"><td colspan="3" width="auto" style="text-align:left;"><strong><a href="{staticwide.recent_topic_row.U_FORUM}">{staticwide.recent_topic_row.S_FORUM}</a></strong></td><!--<td style="text-align:right;">{L_FORUM}</td>--></tr>
<!-- ENDIF -->
<!-- IF staticwide.recent_topic_row.S_ROW_COUNT is even --><tr class="bg2"><!-- ELSE --><tr class="bg1"><!-- ENDIF -->
<td width="auto">{staticwide.recent_topic_row.LAST_POST_IMG} <a href="{staticwide.recent_topic_row.U_TITLE}" >
<span class="<!-- IF staticwide.recent_topic_row.S_TYPE == 2 or staticwide.recent_topic_row.S_TYPE == 3 -->red<!-- ELSEIF staticwide.recent_topic_row.S_TYPE == 4 or staticwide.recent_topic_row.S_TYPE == 5 -->orange<!-- ELSEIF staticwide.recent_topic_row.S_TYPE == 1 -->green<!-- ELSE --><!-- ENDIF -->">{staticwide.recent_topic_row.S_TITLE}</span></a>:
</td>
<td width="auto">{staticwide.recent_topic_row.S_POSTER} </td>
<td align="right" width="auto">{staticwide.recent_topic_row.S_POSTTIME}</td>
</tr>
<!-- END recent_topic_row -->
<tr><td colspan="3">
<table width="100%" cellpadding="0" cellspacing="0">
<td class="bg3" style="padding:3px;" align="left" width="auto"><b>{SEARCH_TYPE}, {SEARCH_LIMIT}</b></td>
<td class="bg3" style="padding:3px;" align="right" width="auto"><b>Title Legend:</b><span class="red"> Announcements</span>, <span class="green"> Sticky</span>, <span class="orange"> News</span><b> Normal</b></td>
</table>
</td></tr>
<!-- END staticwide -->
</table>
</div>
<!-- ELSE -->
<div><center><span class="genmed"><strong>{L_NO_RECENT_TOPICS}</strong></span></center></div>
<!-- ENDIF -->
</span>
<!-- IDTAG ends block_recent_topics -->
Last edited by PeterS on 28. March 2009 10:21, edited 1 time in total.
-
Topic author - Active Member
- Posts: 29
- Joined: 14. February 2009 00:22
- phpBB.com User: DragonMaster1
- Location: U.S.A.
- Contact:
Re: Recent Topics Scrolling
Thank you MUCH!!!
I will install that as soon as I have a few minutes and advise here
Again...THANK YOU!!!
I will install that as soon as I have a few minutes and advise here
Again...THANK YOU!!!
Re: Recent Topics Scrolling
Is it possible for Board3 Portal users to add a scrolling recent topics block?
Kind regards,
Hans
Kind regards,
Hans
Re: Recent Topics Scrolling
I'm interested in this as well. How do you add that code into a prosilver based theme?
helwoe
helwoe
-
- Active Member
- Posts: 22
- Joined: 19. April 2012 02:45
- phpBB.com User: sp0k
- Location: las vegas
- Contact:
Re: Recent Topics Scrolling
hello any new news on this one.....i would like to use this