- Adres van je forum: http://www.endlessgaming.nl
Event. modificaties op je forum: Portal
Wanneer ontstond het probleem? Vandaag na een idee van mij
phpBB versie: 3.0.0
Heb je onlangs iets veranderd aan je forum? Ja
Wat is het probleem?
Onderwerpsymbolen voor Headlines
Forumregels
phpBB 3.0 is End of support per 1 januari 2017. Dit forum is hier enkel ter archief. Het wordt aangeraden te upgraden naar phpBB 3.2
phpBB 3.0 is End of support per 1 januari 2017. Dit forum is hier enkel ter archief. Het wordt aangeraden te upgraden naar phpBB 3.2
- Gamemaniak
- Berichten: 1747
- Lid geworden op: 14 nov 2005, 19:03
- Locatie: Westdorpe
- Contacteer:
Onderwerpsymbolen voor Headlines
Re: Onderwerpsymbolen voor Headlines
Ik denk dat het gewoon phpBB3Portal is maar zou ik de code van de headlines kunnen zien?
- Gamemaniak
- Berichten: 1747
- Lid geworden op: 14 nov 2005, 19:03
- Locatie: Westdorpe
- Contacteer:
Re: Onderwerpsymbolen voor Headlines
Het is inderdaad gebaseerd op phpBB3portal, ik denk niet dat de code er toe doet aangezien ik verder nog niks voor elkaar heb gekregen. Het is gekopierd van news en dan aangepast.
Re: Onderwerpsymbolen voor Headlines
Kan je de onderwerp symbolen ook uitschakelen?
- Gamemaniak
- Berichten: 1747
- Lid geworden op: 14 nov 2005, 19:03
- Locatie: Westdorpe
- Contacteer:
Re: Onderwerpsymbolen voor Headlines
Uitschakelenkareld schreef:Kan je de onderwerp symbolen ook uitschakelen?
Re: Onderwerpsymbolen voor Headlines
Open hier een nieuw onderwerp voor of gebruik de zoekfunctie want dit is "topic-hijacking".kareld schreef:Kan je de onderwerp symbolen ook uitschakelen?
- Gamemaniak
- Berichten: 1747
- Lid geworden op: 14 nov 2005, 19:03
- Locatie: Westdorpe
- Contacteer:
Re: Onderwerpsymbolen voor Headlines
Ok, aangezien Betadevil perse de code wilde zien, headlines.php word geinclude in mijn index.php:
headlines.html:
Code: Selecteer alles
<?php
if (!defined('IN_PHPBB'))
{
exit;
}
/**
*/
//
// Fetch Posts for headlines from portal/includes/functions.php
//
if( (!isset($HTTP_GET_VARS['article'])) && ($CFG['headlines'] == true) )
{
$fetch_headlines = phpbb_fetch_posts($CFG['headlines_forum'], $CFG['number_of_headlines'], $CFG['headlines_length'], 0, ($CFG['show_all_headlines']) ? 'headlines_all' : 'headlines');
if (count($fetch_headlines) == 0)
{
$template->assign_block_vars('headlines_row', array(
'S_NO_TOPICS' => true,
'S_NOT_LAST' => false
)
);
}
else
{
for ($i = 0; $i < count($fetch_headlines); $i++)
{
if( isset($fetch_headlines[$i]['striped']) && $fetch_headlines[$i]['striped'] == true )
{
$read_full = $user->lang['READ_FULL'];
}
else
{
$read_full = '';
}
$template->assign_block_vars('headlines_row', array(
'ATTACH_ICON_IMG' => ($fetch_headlines[$i]['attachment']) ? $user->img('icon_attach', $user->lang['TOTAL_ATTACHMENTS']) : '',
'TITLE' => $fetch_headlines[$i]['topic_title'],
'POSTER' => $fetch_headlines[$i]['username'],
'U_USER_PROFILE' => (($fetch_headlines[$i]['user_type'] == USER_NORMAL || $fetch_headlines[$i]['user_type'] == USER_FOUNDER) && $fetch_headlines[$i]['user_id'] != ANONYMOUS) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=viewprofile&u=' . $fetch_headlines[$i]['user_id']) : '',
'TIME' => $fetch_headlines[$i]['topic_time'],
'TEXT' => $fetch_headlines[$i]['post_text'],
'REPLIES' => $fetch_headlines[$i]['topic_replies'],
'U_VIEW_COMMENTS' => append_sid($phpbb_root_path . 'viewtopic.' . $phpEx . '?t=' . $fetch_headlines[$i]['topic_id'] . '&f=' . $fetch_headlines[$i]['forum_id']),
'U_POST_COMMENT' => append_sid($phpbb_root_path . 'posting.' . $phpEx . '?mode=reply&t=' . $fetch_headlines[$i]['topic_id'] . '&f=' . $fetch_headlines[$i]['forum_id']),
'U_READ_FULL' => append_sid($_SERVER['PHP_SELF'] . '?article=' . $i),
'L_READ_FULL' => $read_full,
'S_NOT_LAST' => ($i < count($fetch_headlines) - 1) ? true : false,
'S_POLL' => $fetch_headlines[$i]['poll'],
'MINI_POST_IMG' => $user->img('icon_post_target', 'POST'),
)
);
}
}
$template->assign_vars(array(
'S_DISPLAY_HEADLINES_LIST' => true
)
);
}
else if ($CFG['headlines'] == true)
{
$fetch_headlines = phpbb_fetch_posts($CFG['headlines_forum'], $CFG['number_of_headlines'], 0, 0, ($CFG['show_all_headlines']) ? 'headlines_all' : 'headlines');
$i = intval($HTTP_GET_VARS['article']);
$template->assign_block_vars('headlines_row', array(
'ATTACH_ICON_IMG' => ($fetch_headlines[$i]['attachment']) ? $user->img('icon_attach', $user->lang['TOTAL_ATTACHMENTS']) : '',
'TITLE' => $fetch_headlines[$i]['topic_title'],
'POSTER' => $fetch_headlines[$i]['username'],
'TIME' => $fetch_headlines[$i]['topic_time'],
'TEXT' => $fetch_headlines[$i]['post_text'],
'REPLIES' => $fetch_headlines[$i]['topic_replies'],
'U_VIEW_COMMENTS' => append_sid($phpbb_root_path . 'viewtopic.' . $phpEx . '?t=' . $fetch_headlines[$i]['topic_id']),
'U_POST_COMMENT' => append_sid($phpbb_root_path . 'posting.' . $phpEx . '?mode=reply&t=' . $fetch_headlines[$i]['topic_id'] . '&f=' . $fetch_headlines[$i]['forum_id']),
'S_POLL' => $fetch_headlines[$i]['poll']
)
);
$template->assign_vars(array(
'S_DISPLAY_HEADLINES_LIST' => true
)
);
}
// Assign specific vars
$template->assign_vars(array(
'L_HEADLINES' => $user->lang['HEADLINES'],
'L_NO_HEADLINES' => $user->lang['NO_HEADLINES'],
'L_POSTED_BY' => $user->lang['POSTED_BY'],
'L_COMMENTS' => $user->lang['COMMENTS'],
'L_VIEW_COMMENTS' => $user->lang['VIEW_COMMENTS'],
'L_POST_REPLY' => $user->lang['POST_REPLY']
)
);
?>Code: Selecteer alles
<div class="panel">
<div class="inner">
<span class="corners-top"><span></span></span>
<h3>{L_HEADLINES}</h3>
<!-- BEGIN headlines_row -->
<!-- IF headlines_row.S_NO_TOPICS -->
<span class="gensmall" style="text-align: center;"><strong>{L_NO_HEADLINES}</strong></span>
<!-- ELSE -->
<span style="float: right;">{headlines_row.TIME}</span>
<h4 class="first">{headlines_row.ATTACH_ICON_IMG}{forumrow.FORUM_IMAGE}<a href="{headlines_row.U_VIEW_COMMENTS}"><strong>{headlines_row.TITLE}</strong></a></h4>
<!-- ENDIF -->
<!-- IF headlines_row.S_NOT_LAST -->
<!-- ENDIF -->
<!-- END headlines_row -->
</div>
<span class="corners-bottom"><span></span></span>
</div>
</div>
<br />- Gamemaniak
- Berichten: 1747
- Lid geworden op: 14 nov 2005, 19:03
- Locatie: Westdorpe
- Contacteer:
- Gamemaniak
- Berichten: 1747
- Lid geworden op: 14 nov 2005, 19:03
- Locatie: Westdorpe
- Contacteer:
Re: Onderwerpsymbolen voor Headlines
En nog een schop/bump.
Re: Onderwerpsymbolen voor Headlines
Vervang
En dan kun je het oproepen in je template met
Succes
portal/includes/functions.php met deze codeportal includes
In je headlines.php doe je deze handelingenCode: Selecteer alles
// ZOEK
'TITLE' => $fetch_headlines[$i]['topic_title'],
// AFTER ADD
'ICON' => $fetch_headlines[$i]['post_icon'], {headlines_row.ICON}Succes
- Gamemaniak
- Berichten: 1747
- Lid geworden op: 14 nov 2005, 19:03
- Locatie: Westdorpe
- Contacteer:
Re: Onderwerpsymbolen voor Headlines
Dat zou geweldig zijn als het werkt, maar toen ik het probeerde kreeg ik
:
Code: Selecteer alles
Fatal error: Cannot redeclare get_user_rank() (previously declared in C:\xampp\htdocs\www\endlessgaming\forum\portal\includes\functions.php:239) in C:\xampp\htdocs\www\endlessgaming\forum\portal\block\user_menu.php on line 176Re: Onderwerpsymbolen voor Headlines
Raar, ik heb alleen dingen veranderd in phpbb_fetch_posts en dat ligt er 200 regels boven 
- Gamemaniak
- Berichten: 1747
- Lid geworden op: 14 nov 2005, 19:03
- Locatie: Westdorpe
- Contacteer:
Re: Onderwerpsymbolen voor Headlines
Ik denk dat ik al weet wat het probleem is, er komen 120 regels bij in functions, klopt niet echt denk ik
Hier heb je mijn functions.php:
functions.php
Re: Onderwerpsymbolen voor Headlines
Ah, ik had die van 1.1.0 gebruikt, je moet de eerste function (
phpbb_fetch_posts) vervangen.- Gamemaniak
- Berichten: 1747
- Lid geworden op: 14 nov 2005, 19:03
- Locatie: Westdorpe
- Contacteer:
Re: Onderwerpsymbolen voor Headlines
Ik krijg het niet voor elkaar, telkens als ik dat probeer aan te passen, dan krijg ik een sql error 
- Gamemaniak
- Berichten: 1747
- Lid geworden op: 14 nov 2005, 19:03
- Locatie: Westdorpe
- Contacteer:
Re: Onderwerpsymbolen voor Headlines
Welke SQL Error, en anders moet je je portal even updaten naar de nieuste versie (niet 2.0
) aangezien ik hem daarvoor maakte.
- Gamemaniak
- Berichten: 1747
- Lid geworden op: 14 nov 2005, 19:03
- Locatie: Westdorpe
- Contacteer:
Re: Onderwerpsymbolen voor Headlines
Dan gaan we dat een proberen heBetaDevil schreef:Welke SQL Error, en anders moet je je portal even updaten naar de nieuste versie (niet 2.0) aangezien ik hem daarvoor maakte.