Integrate Topic Text Hover in Board 3 Portal (Update 1.0.4)
Forum rules
This forum is not for support requests.
Only post Modifications for Board3 Portal 1.0.x in this forum.
This forum is not for support requests.
Only post Modifications for Board3 Portal 1.0.x in this forum.
-
Topic author - Translator
- Posts: 55
- Joined: 18. December 2008 02:39
- phpBB.com User: wang5555
- Location: Taiwan
Integrate Topic Text Hover in Board 3 Portal (Update 1.0.4)
About this MOD:
Title: Topic Text in Mouse Over on Board3 Portal
Description: Activate a tooltip that will show either the first post of a topic, the last post of a topic (on the topic link icon) or both on portal. Includes Latest announcements, Latest news, and Recent topics.
Version: 1.0.4
Installation Level: Easy
Installation Time: ~10 minutes
Author Notes: This is not a official MOD.
Essential condition: Your forum already install two mods following:
1. Board3 Portal 1.0.5
viewtopic.php?f=40&t=3263
2. Topic Text in Mouse Over 1.0.6
http://www.phpbb.com/community/viewtopi ... &t=1257235
Support forum:
viewtopic.php?f=21&t=1562
http://phpbb-tw.net/phpbb/viewforum.php?f=134
Download:
topic_post_text_hover_on_Board3_Portal_104.zip
Demo:
Welcome to my forum!
Title: Topic Text in Mouse Over on Board3 Portal
Description: Activate a tooltip that will show either the first post of a topic, the last post of a topic (on the topic link icon) or both on portal. Includes Latest announcements, Latest news, and Recent topics.
Version: 1.0.4
Installation Level: Easy
Installation Time: ~10 minutes
Author Notes: This is not a official MOD.
Essential condition: Your forum already install two mods following:
1. Board3 Portal 1.0.5
viewtopic.php?f=40&t=3263
2. Topic Text in Mouse Over 1.0.6
http://www.phpbb.com/community/viewtopi ... &t=1257235
Support forum:
viewtopic.php?f=21&t=1562
http://phpbb-tw.net/phpbb/viewforum.php?f=134
Download:
topic_post_text_hover_on_Board3_Portal_104.zip
Demo:
Welcome to my forum!
Last edited by wang5555 on 11. June 2010 17:08, edited 7 times in total.
It is more blessed to give than to reveive, welcome to letter, thanks & good-bye!
Good luck ^_^
Welcome to visit my forum!!
https://wang5555.dnsfor.me/phpBB3/
p.s. Shut down computer before 11 clock night!!!
Good luck ^_^
Welcome to visit my forum!!
https://wang5555.dnsfor.me/phpBB3/
p.s. Shut down computer before 11 clock night!!!
-
- Site Admin
- Posts: 2989
- Joined: 7. January 2006 21:11
- phpBB.de User: Saint
- phpBB.com User: Saint_hh
- Location: Hamburg
Re: [SHARE] Integrate Topic Text Hover 1.0.4.a in Board 3 Portal
Thanks, Wang!
~~~ 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 - Translator
- Posts: 55
- Joined: 18. December 2008 02:39
- phpBB.com User: wang5555
- Location: Taiwan
Re: [SHARE] Integrate Topic Text Hover 1.0.4.a in Board 3 Portal
If you have chance, please help me test, thanks!Kevin wrote:Thanks, Wang!
It is more blessed to give than to reveive, welcome to letter, thanks & good-bye!
Good luck ^_^
Welcome to visit my forum!!
https://wang5555.dnsfor.me/phpBB3/
p.s. Shut down computer before 11 clock night!!!
Good luck ^_^
Welcome to visit my forum!!
https://wang5555.dnsfor.me/phpBB3/
p.s. Shut down computer before 11 clock night!!!
-
- Active Member
- Posts: 34
- Joined: 7. February 2009 18:34
- phpBB.com User: Greight
Re: [SHARE] Integrate Topic Text Hover 1.0.4.a in Board 3 Portal
The above link is dead
I found this link but it does not work !
http://phpbb-tw.net/phpbb/download/file.php?id=659
I found this link but it does not work !
http://phpbb-tw.net/phpbb/download/file.php?id=659
-
Topic author - Translator
- Posts: 55
- Joined: 18. December 2008 02:39
- phpBB.com User: wang5555
- Location: Taiwan
Re: [SHARE] Integrate Topic Text Hover 1.0.4.a in Board 3 Portal
Excuse me! Let you wait for long.Greight wrote:The above link is dead
I found this link but it does not work !
http://phpbb-tw.net/phpbb/download/file.php?id=659
Update to 1.0.2 Version, Please see first post.
It is more blessed to give than to reveive, welcome to letter, thanks & good-bye!
Good luck ^_^
Welcome to visit my forum!!
https://wang5555.dnsfor.me/phpBB3/
p.s. Shut down computer before 11 clock night!!!
Good luck ^_^
Welcome to visit my forum!!
https://wang5555.dnsfor.me/phpBB3/
p.s. Shut down computer before 11 clock night!!!
-
- Active Member
- Posts: 3
- Joined: 30. April 2009 13:01
- phpBB.com User: napus
- Location: Poland
Re: Integrate Topic Text Hover in Board 3 Portal (Update 1.0.2)
Hi, wang thx for mod
Text hover want show up in news block, could you check this for me please?
http://phpbb3-mods.pl
news_compact.html
news.php
Text hover want show up in news block, could you check this for me please?
http://phpbb3-mods.pl
news_compact.html
Code: Select all
<!--version $Id: news_compact.html 479 2009-03-15 11:19:27Z kevin74 $ //-->
<!-- BEGIN news_row -->
<!-- IF news_row.S_NO_TOPICS -->
{$C_BLOCK_H_L}<dl><dt>{L_LATEST_NEWS}</dt></dl>{$C_BLOCK_H_R}
<div class="post bg2" style="margin-bottom: 0px">
<div class="inner"><span class="portal-corners-top-inner"></span>
<span style="text-align: center;"><strong>{L_NO_NEWS}</strong></span>
<span class="portal-corners-bottom-inner"></span></div>
</div>
{$C_BLOCK_F_L}{$C_BLOCK_F_R}
<!-- ELSE -->
<!-- IF news_row.S_FIRST_ROW -->
<a name="n"></a>
{$C_BLOCK_H_L}
<dl class="icon">
<dt <!-- IF S_DISPLAY_NEWS_RVS -->style="width: 44%"<!-- ELSE -->style="width: 60%"<!-- ENDIF -->>{L_LATEST_NEWS}</dt>
<!-- IF S_DISPLAY_NEWS_RVS -->
<dd class="posts" style="width: 11%">{L_REPLIES}</dd>
<dd class="views" style="width: 11%">{L_VIEWS}</dd>
<!-- ENDIF -->
<dd class="lastpost" style="width: 25%"><span>{L_LAST_POST}</span></dd>
</dl>
{$C_BLOCK_H_R}
<ul class="topiclist topics">
<!-- ENDIF -->
<li class="row<!-- IF news_row.S_ROW_COUNT is even --> bg1<!-- ELSE --> bg2<!-- ENDIF -->">
<dl class="icon" style="background-image: url({news_row.TOPIC_FOLDER_IMG_SRC}); background-repeat: no-repeat;">
<dt style="<!-- IF S_DISPLAY_NEWS_RVS -->width: 44%;<!-- ELSE -->width: 60%;<!-- ENDIF --> <!-- IF news_row.TOPIC_ICON_IMG -->background-image: url({T_ICONS_PATH}{news_row.TOPIC_ICON_IMG}); background-repeat: no-repeat;<!-- ENDIF -->" title="{news_row.TOPIC_FOLDER_IMG_ALT}"><!-- IF news_row.S_UNREAD_TOPIC --><a href="{news_row.U_NEWEST_POST}">{NEWEST_POST_IMG}</a> <!-- ENDIF --><!-- IF news_row.ATTACH_ICON_IMG -->{news_row.ATTACH_ICON_IMG} <!-- ENDIF --><!-- IF news_row.S_POLL --><strong>{L_POLL}: </strong><!-- ENDIF --><a href="{news_row.U_VIEW_COMMENTS}" <!-- IF news_row.FIRST_TEXT_HOVER -->title="{news_row.FIRST_TEXT_HOVER}"<!-- ELSE -->title="{news_row.TITLE}"<!-- ENDIF --> class="topictitle">{news_row.TITLE}</a><!-- IF U_VIEW_UNREAD_POST and not S_IS_BOT --> • <a href="{U_VIEW_UNREAD_POST}">{L_VIEW_UNREAD_POST}</a> • <!-- ENDIF -->
<!-- IF news_row.PAGINATION --><strong class="pagination"><span>{news_row.PAGINATION}</span></strong><!-- ENDIF -->
<br />{L_POSTED} {L_POST_BY_AUTHOR} {news_row.POSTER_FULL} » {news_row.TIME}
<!-- IF news_row.FORUM_NAME -->
<br />{L_FORUM}: <a href="{news_row.U_VIEWFORUM}" style="font-weight: bold;">{news_row.FORUM_NAME}</a>
<!-- ENDIF -->
<!-- IF not S_DISPLAY_NEWS_RVS --><!-- IF news_row.FORUM_NAME -->• <!-- ENDIF -->{L_REPLIES}: <strong>{news_row.REPLIES}</strong> • {L_VIEWS}: <strong>{news_row.TOPIC_VIEWS}</strong><!-- ENDIF -->
</dt>
<!-- IF S_DISPLAY_NEWS_RVS -->
<dd class="posts" style="width: 11%">{news_row.REPLIES} <dfn>{L_REPLIES}</dfn></dd>
<dd class="views" style="width: 11%">{news_row.TOPIC_VIEWS} <dfn>{L_VIEWS}</dfn></dd>
<!-- ENDIF -->
<dd class="lastpost" style="width: 25%"><span><dfn>{L_LAST_POST}</dfn>{L_POST_BY_AUTHOR} {news_row.USERNAME_FULL_LAST} <!-- IF news_row.S_UNREAD_INFO --><a href="{news_row.U_VIEW_UNREAD}">{NEWEST_POST_IMG}</a><!-- ELSE --><a href="{news_row.U_LAST_COMMENTS}" <!-- IF news_row.LAST_TEXT_HOVER -->title="{news_row.LAST_TEXT_HOVER}"<!-- ENDIF -->><!-- IF news_row.LAST_TEXT_HOVER -->{news_row.LAST_POST_IMG}<!-- ELSE -->{READ_POST_IMG}<!-- ENDIF --></a><!-- ENDIF --><br />
{news_row.LAST_POST_TIME}</span>
</dd>
</dl>
</li>
<!-- IF news_row.S_LAST_ROW -->
<!-- IF NP_PAGINATION or TOTAL_NEWS -->
<li class="row<!-- IF news_row.S_ROW_COUNT is even --> bg2<!-- ELSE --> bg1<!-- ENDIF -->">
<div class="topic-actions">
<div class="pagination">
{TOTAL_NEWS}
<!-- IF NP_PAGE_NUMBER --><!-- IF NP_PAGINATION --> • {NP_PAGE_NUMBER} • <span>{NP_PAGINATION}</span><!-- ELSE --> • {NP_PAGE_NUMBER}<!-- ENDIF --><!-- ENDIF -->
</div>
</div>
</li>
<!-- ENDIF -->
</ul>
{$C_BLOCK_F_L}{$C_BLOCK_F_R}
<!-- ENDIF -->
<!-- ENDIF -->
<!-- END news_row -->
Code: Select all
<?php
/**
*
* @package - Board3portal
* @version $Id: news.php 454 2009-01-27 17:04:47Z kevin74 $
* @copyright (c) kevin / saint ( www.board3.de/ ), (c) Ice, (c) nickvergessen ( www.flying-bits.org/ ), (c) redbull254 ( www.digitalfotografie-foren.de ), (c) Christian_N ( www.phpbb-projekt.de )
* @based on: phpBB3 Portal by Sevdin Filiz, www.phpbb3portal.com
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
*/
if (!defined('IN_PHPBB'))
{
exit;
}
if (!defined('IN_PORTAL'))
{
exit;
}
$news = request_var('news', -1);
$news = ($news > $portal_config['portal_number_of_news'] -1) ? -1 : $news;
$user->add_lang('viewforum');
$start = request_var('np', 0);
$start = ($start < 0) ? 0 : $start;
// Fetch news from portal/includes/functions.php with check if "read full" is requested.
$portal_news_length = ($news < 0) ? $portal_config['portal_news_length'] : 0;
$fetch_news = phpbb_fetch_posts($portal_config['portal_news_forum'], $portal_config['portal_news_permissions'], $portal_config['portal_number_of_news'], $portal_news_length, 0, ($portal_config['portal_show_all_news']) ? 'news_all' : 'news', $start);
// Any news present? If not terminate it here.
if (sizeof($fetch_news) == 0)
{
// BEGIN Topic Text Hover MOD
if (!empty($fetch_news[$i]['first_text_hover']) || !empty($fetch_news[$i]['last_text_hover']))
{
// strip all bbcode
include($phpbb_root_path . 'includes/topic_text_hover.' . $phpEx);
if(!empty($fetch_news[$i]['first_text_hover']))
{
$first_text_hover = bbcode_strip($fetch_news[$i]['first_text_hover']);
if (utf8_strlen($first_text_hover) >= $config['hover_char_limit'])
{
$first_text_hover = (utf8_strlen($first_text_hover) > $config['hover_char_limit'] + 3) ? utf8_substr($first_text_hover, 0, $config['hover_char_limit']) . '...' : $first_text_hover;
}
}
if(!empty($fetch_news[$i]['last_text_hover']))
{
$last_text_hover = bbcode_strip($fetch_news[$i]['last_text_hover']);
if (utf8_strlen($last_text_hover) >= $config['hover_char_limit'])
{
$last_text_hover = (utf8_strlen($last_text_hover) > $config['hover_char_limit'] + 3) ? utf8_substr($last_text_hover, 0, $config['hover_char_limit']) . '...' : $last_text_hover;
}
}
}
// END Topic Text Hover Mod
$template->assign_block_vars('news_row', array(
'S_NO_TOPICS' => true,
'S_NOT_LAST' => false,
));
}
else
{
// Count number of posts for news archive, considering if permission check is dis- or enabled.
if ( $portal_config['portal_news_archive'] )
{
$permissions = $portal_config['portal_news_permissions'];
$forum_from = $portal_config['portal_news_forum'];
$forum_from = ( strpos($forum_from, ',') !== FALSE ) ? explode(',', $forum_from) : (($forum_from != '') ? array($forum_from) : array());
$str_where = '';
if( $permissions == TRUE )
{
$disallow_access = array_unique(array_keys($auth->acl_getf('!f_read', true)));
} else {
$disallow_access = array();
}
if( sizeof($forum_from) )
{
$disallow_access = array_diff($forum_from, $disallow_access);
if( !sizeof($disallow_access) )
{
return array();
}
foreach( $disallow_access as $acc_id)
{
$acc_id = (int) $acc_id;
$str_where .= "forum_id = $acc_id OR ";
}
}
else
{
foreach( $disallow_access as $acc_id )
{
$acc_id = (int) $acc_id;
$str_where .= "forum_id <> $acc_id AND ";
}
}
$str_where = ( strlen($str_where) > 0 ) ? 'AND (' . trim(substr($str_where, 0, -4)) . ')' : '';
$topic_type = ($portal_config['portal_show_all_news']) ? '( topic_type <> ' . POST_ANNOUNCE . ' ) AND ( topic_type <> ' . POST_GLOBAL . ')' : 'topic_type = ' . POST_NORMAL;
$sql = 'SELECT COUNT(topic_id) AS num_topics
FROM ' . TOPICS_TABLE . '
WHERE ' . $topic_type . '
AND topic_approved = 1
AND topic_moved_id = 0
' . $str_where;
$result = $db->sql_query($sql);
$total_news = (int) $db->sql_fetchfield('num_topics');
$db->sql_freeresult($result);
}
if($news < 0)
// Show the news overview
{
$count = $fetch_news['topic_count'];
for ($i = 0; $i < $count; $i++)
{
if( isset($fetch_news[$i]['striped']) && $fetch_news[$i]['striped'] == true )
{
$open_bracket = '[ ';
$close_bracket = ' ]';
$read_full = $user->lang['READ_FULL'];
}
else
{
$open_bracket = '';
$close_bracket = '';
$read_full = '';
}
// unread?
$forum_id = $fetch_news[$i]['forum_id'];
$topic_id = $fetch_news[$i]['topic_id'];
$topic_tracking_info = get_complete_topic_tracking($forum_id, $topic_id, $global_announce_list = false);
$unread_topic = (isset($topic_tracking_info[$topic_id]) && $fetch_news[$i]['topic_last_post_time'] > $topic_tracking_info[$topic_id]) ? true : false;
$read_full_url = (isset($_GET['np'])) ? 'np='. $start . '&news=' . $i . '#n' . $i : 'news=' . $i . '#n' . $i;
$view_topic_url = append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . (($fetch_news[$i]['forum_id']) ? $fetch_news[$i]['forum_id'] : $forum_id) . '&t=' . $topic_id);
if ( $portal_config['portal_news_archive'] )
{
$pagination = generate_portal_pagination(append_sid("{$phpbb_root_path}portal.$phpEx"), $total_news, $portal_config['portal_number_of_news'], $start, ($portal_config['portal_show_all_news']) ? 'news_all' : 'news');
}
$replies = ($auth->acl_get('m_approve', $forum_id)) ? $fetch_news[$i]['topic_replies_real'] : $fetch_news[$i]['topic_replies'];
$folder_img = $folder_alt = $topic_type = $folder = $folder_new = '';
switch ($fetch_news[$i]['topic_type'])
{
case POST_STICKY:
$folder = 'sticky_read';
$folder_new = 'sticky_unread';
break;
case POST_ANNOUNCE:
$folder = 'announce_read';
$folder_new = 'announce_unread';
break;
default:
$folder = 'topic_read';
$folder_new = 'topic_unread';
if ($config['hot_threshold'] && $replies >= $config['hot_threshold'] && $fetch_news[$i]['topic_status'] != ITEM_LOCKED)
{
$folder .= '_hot';
$folder_new .= '_hot';
}
break;
}
if ($fetch_news[$i]['topic_status'] == ITEM_LOCKED)
{
$folder .= '_locked';
$folder_new .= '_locked';
}
if ($fetch_news[$i]['topic_posted'])
{
$folder .= '_mine';
$folder_new .= '_mine';
}
$folder_img = ($unread_topic) ? $folder_new : $folder;
$folder_alt = ($unread_topic) ? 'NEW_POSTS' : (($fetch_news[$i]['topic_status'] == ITEM_LOCKED) ? 'TOPIC_LOCKED' : 'NO_NEW_POSTS');
// Grab icons
$icons = $cache->obtain_icons();
$template->assign_block_vars('news_row', array(
'ATTACH_ICON_IMG' => ($fetch_news[$i]['attachment'] && $config['allow_attachments']) ? $user->img('icon_topic_attach', $user->lang['TOTAL_ATTACHMENTS']) : '',
'FORUM_NAME' => ( $forum_id ) ? $fetch_news[$i]['forum_name'] : '',
'TITLE' => $fetch_news[$i]['topic_title'],
'POSTER' => $fetch_news[$i]['username'],
'POSTER_FULL' => $fetch_news[$i]['username_full'],
'USERNAME_FULL_LAST' => $fetch_news[$i]['username_full_last'],
'U_USER_PROFILE' => (($fetch_news[$i]['user_type'] == USER_NORMAL || $fetch_news[$i]['user_type'] == USER_FOUNDER) && $fetch_news[$i]['user_id'] != ANONYMOUS) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=viewprofile&u=' . $fetch_news[$i]['user_id']) : '',
'TIME' => $fetch_news[$i]['topic_time'],
'LAST_POST_TIME' => $user->format_date($fetch_news[$i]['topic_last_post_time']),
'TEXT' => $fetch_news[$i]['post_text'],
'REPLIES' => $fetch_news[$i]['topic_replies'],
'TOPIC_VIEWS' => $fetch_news[$i]['topic_views'],
'N_ID' => $i,
'TOPIC_FOLDER_IMG' => $user->img($folder_img, $folder_alt),
'TOPIC_FOLDER_IMG_SRC' => $user->img($folder_img, $folder_alt, false, '', 'src'),
#
//'TOPIC_FOLDER_IMG_ALT' => $user->lang[$folder_alt],
'TOPIC_FOLDER_IMG_ALT' => (!$config['hover_active']) ? $user->lang[$folder_alt] : '',
// BEGIN Topic Post Text Mod
'FIRST_TEXT_HOVER' => (isset($first_text_hover)) ? censor_text($first_text_hover) : '',
'LAST_TEXT_HOVER' => (isset($last_text_hover)) ? censor_text($last_text_hover) : '',
'LAST_POST_IMG' => $user->img('icon_topic_latest'),
// END Topic Post Text Mod
'TOPIC_ICON_IMG' => (!empty($icons[$fetch_news[$i]['icon_id']])) ? $icons[$fetch_news[$i]['icon_id']]['img'] : '',
'TOPIC_ICON_IMG_WIDTH' => (!empty($icons[$fetch_news[$i]['icon_id']])) ? $icons[$fetch_news[$i]['icon_id']]['width'] : '',
'TOPIC_ICON_IMG_HEIGHT' => (!empty($icons[$fetch_news[$i]['icon_id']])) ? $icons[$fetch_news[$i]['icon_id']]['height'] : '',
'FOLDER_IMG' => $user->img('topic_read', 'NO_NEW_POSTS'),
'U_VIEWFORUM' => append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $fetch_news[$i]['forum_id']),
'U_LAST_COMMENTS' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $fetch_news[$i]['forum_id'] . '&t=' . $fetch_news[$i]['topic_id'] . '&p=' . $fetch_news[$i]['topic_last_post_id'] . '#p' . $fetch_news[$i]['topic_last_post_id']),
'U_VIEW_COMMENTS' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $fetch_news[$i]['forum_id'] . '&t=' . $fetch_news[$i]['topic_id']),
'U_VIEW_UNREAD' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $fetch_news[$i]['forum_id'] . '&t=' . $fetch_news[$i]['topic_id'] . '&view=unread#unread'),
'U_POST_COMMENT' => append_sid("{$phpbb_root_path}posting.$phpEx", 'mode=reply&f=' . $fetch_news[$i]['forum_id'] . '&t=' . $fetch_news[$i]['topic_id']),
'U_READ_FULL' => append_sid("{$phpbb_root_path}portal.$phpEx", $read_full_url),
'L_READ_FULL' => $read_full,
'OPEN' => $open_bracket,
'CLOSE' => $close_bracket,
'S_NOT_LAST' => ($i < sizeof($fetch_news) - 1) ? true : false,
'S_POLL' => $fetch_news[$i]['poll'],
'S_UNREAD_INFO' => $unread_topic,
'PAGINATION' => topic_generate_pagination($fetch_news[$i]['topic_replies'], $view_topic_url),
'S_HAS_ATTACHMENTS' => (!empty($fetch_news[$i]['attachments'])) ? true : false,
));
if( !empty($fetch_news[$i]['attachments']) )
{
foreach ($fetch_news[$i]['attachments'] as $attachment)
{
$template->assign_block_vars('news_row.attachment', array(
'DISPLAY_ATTACHMENT' => $attachment)
);
}
}
if ($portal_config['portal_number_of_news'] <> 0 && $portal_config['portal_news_archive'])
{
$template->assign_vars(array(
'NP_PAGINATION' => $pagination,
'TOTAL_NEWS' => ($total_news == 1) ? $user->lang['VIEW_FORUM_TOPIC'] : sprintf($user->lang['VIEW_FORUM_TOPICS'], $total_news),
'NP_PAGE_NUMBER' => on_page($total_news, $portal_config['portal_number_of_news'], $start))
);
}
}
}
else
// Show "read full" page
{
$i = $news;
$forum_id = $fetch_news[$i]['forum_id'];
$topic_id = $fetch_news[$i]['topic_id'];
$topic_tracking_info = get_complete_topic_tracking($forum_id, $topic_id, $global_announce_list = false);
$unread_topic = (isset($topic_tracking_info[$topic_id]) && $fetch_news[$i]['topic_last_post_time'] > $topic_tracking_info[$topic_id]) ? true : false;
$open_bracket = '[ ';
$close_bracket = ' ]';
$read_full = $user->lang['BACK'];
$read_full_url = (isset($_GET['np'])) ? append_sid("{$phpbb_root_path}portal.$phpEx", "np=$start#n$i") : append_sid("{$phpbb_root_path}portal.$phpEx#n$i");
$view_topic_url = append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . (($fetch_news[$i]['forum_id']) ? $fetch_news[$i]['forum_id'] : $forum_id) . '&t=' . $topic_id);
if ( $portal_config['portal_news_archive'] )
{
$pagination = generate_portal_pagination(append_sid("{$phpbb_root_path}portal.$phpEx"), $total_news, $portal_config['portal_number_of_news'], $start, ($portal_config['portal_show_all_news']) ? 'news_all' : 'news');
}
$template->assign_block_vars('news_row', array(
'ATTACH_ICON_IMG' => ($fetch_news[$i]['attachment'] && $config['allow_attachments']) ? $user->img('icon_topic_attach', $user->lang['TOTAL_ATTACHMENTS']) : '',
'FORUM_NAME' => ( $forum_id ) ? $fetch_news[$i]['forum_name'] : '',
'TITLE' => $fetch_news[$i]['topic_title'],
'POSTER' => $fetch_news[$i]['username'],
'POSTER_FULL' => $fetch_news[$i]['username_full'],
'TIME' => $fetch_news[$i]['topic_time'],
'TEXT' => $fetch_news[$i]['post_text'],
'REPLIES' => $fetch_news[$i]['topic_replies'],
'TOPIC_VIEWS' => $fetch_news[$i]['topic_views'],
'N_ID' => $i,
'U_VIEWFORUM' => append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $fetch_news[$i]['forum_id']),
'U_LAST_COMMENTS' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'p=' . $fetch_news[$i]['topic_last_post_id'] . '#p' . $fetch_news[$i]['topic_last_post_id']),
'U_VIEW_COMMENTS' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $fetch_news[$i]['forum_id'] . '&t=' . $fetch_news[$i]['topic_id']),
'U_POST_COMMENT' => append_sid("{$phpbb_root_path}posting.$phpEx", 'mode=reply&f=' . $fetch_news[$i]['forum_id'] . '&t=' . $fetch_news[$i]['topic_id']),
'S_POLL' => $fetch_news[$i]['poll'],
'S_UNREAD_INFO' => $unread_topic,
'U_READ_FULL' => $read_full_url,
'L_READ_FULL' => $read_full,
'OPEN' => $open_bracket,
'CLOSE' => $close_bracket,
'PAGINATION' => topic_generate_pagination($fetch_news[$i]['topic_replies'], $view_topic_url),
'S_HAS_ATTACHMENTS' => (!empty($fetch_news[$i]['attachments'])) ? true : false,
));
if( !empty($fetch_news[$i]['attachments']) )
{
foreach ($fetch_news[$i]['attachments'] as $attachment)
{
$template->assign_block_vars('news_row.attachment', array(
'DISPLAY_ATTACHMENT' => $attachment)
);
}
}
if ($portal_config['portal_number_of_news'] <> 0 && $portal_config['portal_news_archive'])
{
$template->assign_vars(array(
'NP_PAGINATION' => $pagination,
'TOTAL_NEWS' => ($total_news == 1) ? $user->lang['VIEW_FORUM_TOPIC'] : sprintf($user->lang['VIEW_FORUM_TOPICS'], $total_news),
'NP_PAGE_NUMBER' => on_page($total_news, $portal_config['portal_number_of_news'], $start))
);
}
}
}
$topic_icons = false;
if( !empty($fetch_news['topic_icons']) )
{
$topic_icons = true;
}
$template->assign_vars(array(
'NEWEST_POST_IMG' => $user->img('icon_topic_newest', 'VIEW_NEWEST_POST'),
'READ_POST_IMG' => $user->img('icon_topic_latest', 'VIEW_LATEST_POST'),
'GOTO_PAGE_IMG' => $user->img('icon_post_target', 'GOTO_PAGE'),
'S_NEWEST_OR_FIRST' => ( $portal_config['portal_news_show_last'] ) ? $user->lang['JUMP_NEWEST'] : $user->lang['JUMP_FIRST'],
'POSTED_BY_TEXT' => ( $portal_config['portal_news_show_last'] ) ? $user->lang['LAST_POST'] : $user->lang['POSTED'],
'S_DISPLAY_NEWS' => true,
'S_DISPLAY_NEWS_RVS' => ( $portal_config['portal_show_news_replies_views'] ) ? true : false,
'S_TOPIC_ICONS' => $topic_icons,
));
?>
-
Topic author - Translator
- Posts: 55
- Joined: 18. December 2008 02:39
- phpBB.com User: wang5555
- Location: Taiwan
Re: Integrate Topic Text Hover in Board 3 Portal (Update 1.0.2)
The "news.php" need to fix following:napus wrote:Hi, wang thx for mod
Text hover want show up in news block, could you check this for me please?
FIND -> CUT:
Code: Select all
// BEGIN Topic Text Hover MOD
if (!empty($fetch_news[$i]['first_text_hover']) || !empty($fetch_news[$i]['last_text_hover']))
{
// strip all bbcode
include($phpbb_root_path . 'includes/topic_text_hover.' . $phpEx);
if(!empty($fetch_news[$i]['first_text_hover']))
{
$first_text_hover = bbcode_strip($fetch_news[$i]['first_text_hover']);
if (utf8_strlen($first_text_hover) >= $config['hover_char_limit'])
{
$first_text_hover = (utf8_strlen($first_text_hover) > $config['hover_char_limit'] + 3) ? utf8_substr($first_text_hover, 0, $config['hover_char_limit']) . '...' : $first_text_hover;
}
}
if(!empty($fetch_news[$i]['last_text_hover']))
{
$last_text_hover = bbcode_strip($fetch_news[$i]['last_text_hover']);
if (utf8_strlen($last_text_hover) >= $config['hover_char_limit'])
{
$last_text_hover = (utf8_strlen($last_text_hover) > $config['hover_char_limit'] + 3) ? utf8_substr($last_text_hover, 0, $config['hover_char_limit']) . '...' : $last_text_hover;
}
}
}
// END Topic Text Hover Mod
Code: Select all
$template->assign_block_vars('news_row', array(
Code: Select all
// BEGIN Topic Text Hover MOD
if (!empty($fetch_news[$i]['first_text_hover']) || !empty($fetch_news[$i]['last_text_hover']))
{
// strip all bbcode
include($phpbb_root_path . 'includes/topic_text_hover.' . $phpEx);
if(!empty($fetch_news[$i]['first_text_hover']))
{
$first_text_hover = bbcode_strip($fetch_news[$i]['first_text_hover']);
if (utf8_strlen($first_text_hover) >= $config['hover_char_limit'])
{
$first_text_hover = (utf8_strlen($first_text_hover) > $config['hover_char_limit'] + 3) ? utf8_substr($first_text_hover, 0, $config['hover_char_limit']) . '...' : $first_text_hover;
}
}
if(!empty($fetch_news[$i]['last_text_hover']))
{
$last_text_hover = bbcode_strip($fetch_news[$i]['last_text_hover']);
if (utf8_strlen($last_text_hover) >= $config['hover_char_limit'])
{
$last_text_hover = (utf8_strlen($last_text_hover) > $config['hover_char_limit'] + 3) ? utf8_substr($last_text_hover, 0, $config['hover_char_limit']) . '...' : $last_text_hover;
}
}
}
// END Topic Text Hover Mod
It is more blessed to give than to reveive, welcome to letter, thanks & good-bye!
Good luck ^_^
Welcome to visit my forum!!
https://wang5555.dnsfor.me/phpBB3/
p.s. Shut down computer before 11 clock night!!!
Good luck ^_^
Welcome to visit my forum!!
https://wang5555.dnsfor.me/phpBB3/
p.s. Shut down computer before 11 clock night!!!
-
- Active Member
- Posts: 3
- Joined: 30. April 2009 13:01
- phpBB.com User: napus
- Location: Poland
Re: Integrate Topic Text Hover in Board 3 Portal (Update 1.0.2)
It's works, Thank You
-
- Active Member
- Posts: 34
- Joined: 7. February 2009 18:34
- phpBB.com User: Greight
Re: Integrate Topic Text Hover in Board 3 Portal (Update 1.0.2)
First thanks for the MOD
Then I think there's some problems with permissions that do not let the MOD show the tooltips. In my board only logged in users can browse and see forum content but some forums are free to visit for everybody. Now the tooltips for free parts are shown on portal but for others not.
For example consider recent block on top. On its first column on right, you can see the text hover but on others not. (This is the only part you can see when you are visiting the portal as a guest. When you login other parts are shown too.( However I wish I could show others to guests too))
Log in info:
http://ENZ.ir
User: Testing
Pass : 123456
Please test this and if possible give me some instruction on how to resolve the issue.
Then I think there's some problems with permissions that do not let the MOD show the tooltips. In my board only logged in users can browse and see forum content but some forums are free to visit for everybody. Now the tooltips for free parts are shown on portal but for others not.
For example consider recent block on top. On its first column on right, you can see the text hover but on others not. (This is the only part you can see when you are visiting the portal as a guest. When you login other parts are shown too.( However I wish I could show others to guests too))
Log in info:
http://ENZ.ir
User: Testing
Pass : 123456
Please test this and if possible give me some instruction on how to resolve the issue.
-
Topic author - Translator
- Posts: 55
- Joined: 18. December 2008 02:39
- phpBB.com User: wang5555
- Location: Taiwan
Re: Integrate Topic Text Hover in Board 3 Portal (Update 1.0.2)
Compress your files followng then paste a download link.Greight wrote:First thanks for the MOD
Then I think there's some problems with permissions that do not let the MOD show the tooltips. In my board only logged in users can browse and see forum content but some forums are free to visit for everybody. Now the tooltips for free parts are shown on portal but for others not.
For example consider recent block on top. On its first column on right, you can see the text hover but on others not. (This is the only part you can see when you are visiting the portal as a guest. When you login other parts are shown too.( However I wish I could show others to guests too))
Log in info:
http://ENZ.ir
User: Testing
Pass : 123456
Please test this and if possible give me some instruction on how to resolve the issue.
- portal/block/recent.php
- styles/YOUR_STYLE/template/portal/block/recent.html
It is more blessed to give than to reveive, welcome to letter, thanks & good-bye!
Good luck ^_^
Welcome to visit my forum!!
https://wang5555.dnsfor.me/phpBB3/
p.s. Shut down computer before 11 clock night!!!
Good luck ^_^
Welcome to visit my forum!!
https://wang5555.dnsfor.me/phpBB3/
p.s. Shut down computer before 11 clock night!!!
-
- Active Member
- Posts: 34
- Joined: 7. February 2009 18:34
- phpBB.com User: Greight
Re: Integrate Topic Text Hover in Board 3 Portal (Update 1.0.2)
Here you are dear friend
http://enz.ir/recent.zip
http://enz.ir/recent.zip
-
Topic author - Translator
- Posts: 55
- Joined: 18. December 2008 02:39
- phpBB.com User: wang5555
- Location: Taiwan
Re: Integrate Topic Text Hover in Board 3 Portal (Update 1.0.2)
Dear friend try it:Greight wrote:Here you are dear friend
http://enz.ir/recent.zip
--OPEN--
portal/block/recent.php
--FIND--
P.S. About 141 lines.
Code: Select all
'TITLE' => character_limit($row['topic_title'], $portal_config['portal_recent_title_limit']),
Code: Select all
// BEGIN Topic Text Hover Mod
'FIRST_TEXT_HOVER' => (isset($hover_post)) ? censor_text($hover_post) : '',
// END Topic Text Hover Mod
P.S. About 187 lines.
Code: Select all
'TITLE' => character_limit($row['topic_title'], $portal_config['portal_recent_title_limit']),
Code: Select all
// BEGIN Topic Text Hover Mod
'FIRST_TEXT_HOVER' => (isset($hover_post)) ? censor_text($hover_post) : '',
// END Topic Text Hover Mod
It is more blessed to give than to reveive, welcome to letter, thanks & good-bye!
Good luck ^_^
Welcome to visit my forum!!
https://wang5555.dnsfor.me/phpBB3/
p.s. Shut down computer before 11 clock night!!!
Good luck ^_^
Welcome to visit my forum!!
https://wang5555.dnsfor.me/phpBB3/
p.s. Shut down computer before 11 clock night!!!
-
- Active Member
- Posts: 34
- Joined: 7. February 2009 18:34
- phpBB.com User: Greight
Re: Integrate Topic Text Hover in Board 3 Portal (Update 1.0.2)
Thx that did the trick
The same problem is with news and announcement parts. What can I do about them ?
I uploaded news and announcement files. Please take a look at them.
http://enz.ir/news-anouncement.zip
The same problem is with news and announcement parts. What can I do about them ?
I uploaded news and announcement files. Please take a look at them.
http://enz.ir/news-anouncement.zip
-
Topic author - Translator
- Posts: 55
- Joined: 18. December 2008 02:39
- phpBB.com User: wang5555
- Location: Taiwan
Re: Integrate Topic Text Hover in Board 3 Portal (Update 1.0.2)
Try it:Greight wrote:Thx that did the trick
The same problem is with news and announcement parts. What can I do about them ?
I uploaded news and announcement files. Please take a look at them.
http://enz.ir/news-anouncement.zip
--OPEN--
portal/block/announcement.php
--FIND--
P.S. About 30 lines.
Code: Select all
// Any announcements present? If not terminate it here.
if (sizeof($fetch_news) == 0)
{
// BEGIN Topic Text Hover MOD
if (!empty($fetch_news[$i]['first_text_hover']) || !empty($fetch_news[$i]['last_text_hover']))
{
// strip all bbcode
include($phpbb_root_path . 'includes/topic_text_hover.' . $phpEx);
if(!empty($fetch_news[$i]['first_text_hover']))
{
$first_text_hover = bbcode_strip($fetch_news[$i]['first_text_hover']);
if (utf8_strlen($first_text_hover) >= $config['hover_char_limit'])
{
$first_text_hover = (utf8_strlen($first_text_hover) > $config['hover_char_limit'] + 3) ? utf8_substr($first_text_hover, 0, $config['hover_char_limit']) . '...' : $first_text_hover;
}
}
if(!empty($fetch_news[$i]['last_text_hover']))
{
$last_text_hover = bbcode_strip($fetch_news[$i]['last_text_hover']);
if (utf8_strlen($last_text_hover) >= $config['hover_char_limit'])
{
$last_text_hover = (utf8_strlen($last_text_hover) > $config['hover_char_limit'] + 3) ? utf8_substr($last_text_hover, 0, $config['hover_char_limit']) . '...' : $last_text_hover;
}
}
}
// END Topic Text Hover Mod
$template->assign_block_vars('announcements_row', array(
'S_NO_TOPICS' => true,
'S_NOT_LAST' => false
));
Code: Select all
// Any announcements present? If not terminate it here.
if (sizeof($fetch_news) == 0)
{
$template->assign_block_vars('announcements_row', array(
'S_NO_TOPICS' => true,
'S_NOT_LAST' => false
));
P.S. About 207 lines.
Code: Select all
$template->assign_block_vars('announcements_row', array(
'ATTACH_ICON_IMG' => ($fetch_news[$i]['attachment'] && $config['allow_attachments']) ? $user->img('icon_topic_attach', $user->lang['TOTAL_ATTACHMENTS']) : '',
'FORUM_NAME' => ( $forum_id ) ? $fetch_news[$i]['forum_name'] : '',
Code: Select all
// BEGIN Topic Text Hover MOD
if (!empty($fetch_news[$i]['first_text_hover']) || !empty($fetch_news[$i]['last_text_hover']))
{
// strip all bbcode
include($phpbb_root_path . 'includes/topic_text_hover.' . $phpEx);
if(!empty($fetch_news[$i]['first_text_hover']))
{
$first_text_hover = bbcode_strip($fetch_news[$i]['first_text_hover']);
if (utf8_strlen($first_text_hover) >= $config['hover_char_limit'])
{
$first_text_hover = (utf8_strlen($first_text_hover) > $config['hover_char_limit'] + 3) ? utf8_substr($first_text_hover, 0, $config['hover_char_limit']) . '...' : $first_text_hover;
}
}
if(!empty($fetch_news[$i]['last_text_hover']))
{
$last_text_hover = bbcode_strip($fetch_news[$i]['last_text_hover']);
if (utf8_strlen($last_text_hover) >= $config['hover_char_limit'])
{
$last_text_hover = (utf8_strlen($last_text_hover) > $config['hover_char_limit'] + 3) ? utf8_substr($last_text_hover, 0, $config['hover_char_limit']) . '...' : $last_text_hover;
}
}
}
// END Topic Text Hover Mod
portal/block/news.php
--FIND--
P.S. About 34 lines.
Code: Select all
// Any news present? If not terminate it here.
if (sizeof($fetch_news) == 0)
{
// BEGIN Topic Text Hover MOD
if (!empty($fetch_news[$i]['first_text_hover']) || !empty($fetch_news[$i]['last_text_hover']))
{
// strip all bbcode
include($phpbb_root_path . 'includes/topic_text_hover.' . $phpEx);
if(!empty($fetch_news[$i]['first_text_hover']))
{
$first_text_hover = bbcode_strip($fetch_news[$i]['first_text_hover']);
if (utf8_strlen($first_text_hover) >= $config['hover_char_limit'])
{
$first_text_hover = (utf8_strlen($first_text_hover) > $config['hover_char_limit'] + 3) ? utf8_substr($first_text_hover, 0, $config['hover_char_limit']) . '...' : $first_text_hover;
}
}
if(!empty($fetch_news[$i]['last_text_hover']))
{
$last_text_hover = bbcode_strip($fetch_news[$i]['last_text_hover']);
if (utf8_strlen($last_text_hover) >= $config['hover_char_limit'])
{
$last_text_hover = (utf8_strlen($last_text_hover) > $config['hover_char_limit'] + 3) ? utf8_substr($last_text_hover, 0, $config['hover_char_limit']) . '...' : $last_text_hover;
}
}
}
// END Topic Text Hover Mod
$template->assign_block_vars('news_row', array(
'S_NO_TOPICS' => true,
'S_NOT_LAST' => false,
));
Code: Select all
// Any news present? If not terminate it here.
if (sizeof($fetch_news) == 0)
{
$template->assign_block_vars('news_row', array(
'S_NO_TOPICS' => true,
'S_NOT_LAST' => false,
));
P.S. About 193 lines.
Code: Select all
$template->assign_block_vars('news_row', array(
'ATTACH_ICON_IMG' => ($fetch_news[$i]['attachment'] && $config['allow_attachments']) ? $user->img('icon_topic_attach', $user->lang['TOTAL_ATTACHMENTS']) : '',
'FORUM_NAME' => ( $forum_id ) ? $fetch_news[$i]['forum_name'] : '',
'TITLE' => $fetch_news[$i]['topic_title'],
Code: Select all
// BEGIN Topic Text Hover MOD
if (!empty($fetch_news[$i]['first_text_hover']) || !empty($fetch_news[$i]['last_text_hover']))
{
// strip all bbcode
include($phpbb_root_path . 'includes/topic_text_hover.' . $phpEx);
if(!empty($fetch_news[$i]['first_text_hover']))
{
$first_text_hover = bbcode_strip($fetch_news[$i]['first_text_hover']);
if (utf8_strlen($first_text_hover) >= $config['hover_char_limit'])
{
$first_text_hover = (utf8_strlen($first_text_hover) > $config['hover_char_limit'] + 3) ? utf8_substr($first_text_hover, 0, $config['hover_char_limit']) . '...' : $first_text_hover;
}
}
if(!empty($fetch_news[$i]['last_text_hover']))
{
$last_text_hover = bbcode_strip($fetch_news[$i]['last_text_hover']);
if (utf8_strlen($last_text_hover) >= $config['hover_char_limit'])
{
$last_text_hover = (utf8_strlen($last_text_hover) > $config['hover_char_limit'] + 3) ? utf8_substr($last_text_hover, 0, $config['hover_char_limit']) . '...' : $last_text_hover;
}
}
}
// END Topic Text Hover Mod
It is more blessed to give than to reveive, welcome to letter, thanks & good-bye!
Good luck ^_^
Welcome to visit my forum!!
https://wang5555.dnsfor.me/phpBB3/
p.s. Shut down computer before 11 clock night!!!
Good luck ^_^
Welcome to visit my forum!!
https://wang5555.dnsfor.me/phpBB3/
p.s. Shut down computer before 11 clock night!!!
-
- Active Member
- Posts: 34
- Joined: 7. February 2009 18:34
- phpBB.com User: Greight
Re: Integrate Topic Text Hover in Board 3 Portal (Update 1.0.2)
Thx buddy
Well I did the edits but unfortuanately nothing changed
Well I did the edits but unfortuanately nothing changed