Sākumlapa › Forumi › Saites un Pamācības › Web un Programmu pamācības › phpbb uzlabosana, tabulas izveide..
Jaunākais forumā
un Jaunākie komentāri.
es te meginu, meginu bet neizdodas…. :/
Ja vajag tieši tikai izvilkt ārā vari meiģināt šos modus
Vai arī šeit vari izmeiģināt arī citus modus
Ja nesanāk raksti šeit. Palīdzēšu.
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in
idejas?
Š eit vari redzēt demo, kā izskatās. Tur tu pats vari uzģenerēt kā vajag.
Par to tavu problēmu nav ne jausmas, parasti visi modi strādā, kā vajag.
varbut vari pasviest to kodu, kas te ir? vismaz pateikt kur nemi?
runaju tiesi par to tabulu “Jaunākais forumā”
// START: Recent Topics-II
// ## — Configuration of Recent Topics — ##
// Number of Recent Topics (not Forum ID)
$CFG[’number_recenttopics’] = ‘7’;
// Exceptional Forums for Recent Topics, eg. ‘2,4,10’ (note: Smartor’s Recent Topics script has its own permission checking, so you can leave this variable blank)
$CFG[’exceptional_forums’] = ‘1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,61,62’; // this is set for my forum your ID’s will most likely be different
// ## — END: Configuration of Recent Topics — ##
$sql = “SELECT * FROM “. FORUMS_TABLE . ” ORDER BY forum_id”;
if (!$result = $db->sql_query($sql))
{
message_die(GENERAL_ERROR, ‘Could not query forums information’, ”, __LINE__, __FILE__, $sql);
}
$forum_data = array();
while( $row = $db->sql_fetchrow($result) )
{
$forum_data[] = $row;
}
$is_auth_ary = array();
$is_auth_ary = auth(AUTH_ALL, AUTH_LIST_ALL, $userdata, $forum_data);
if( $CFG[’exceptional_forums’] == ” )
{
$except_forum_id = ”start”;
}
else
{
$except_forum_id = $CFG[’exceptional_forums’];
}
for ($i = 0; $i
{
message_die(GENERAL_ERROR, ‘Could not query recent topics – II information’, ”, __LINE__, __FILE__, $sql);
}
$number_recenttopics = $db->sql_numrows($result);
$recent_topicrow = array();
while ($row = $db->sql_fetchrow($result))
{
$recent_topicrow[] = $row;
}
for ($i = 0; $i
‘U_TITLE’ => append_sid(”viewtopic.$phpEx?” . POST_POST_URL . ‘=’ . $recent_topicrow[$i][’post_id’]) . ‘#’ .$recent_topicrow[$i][’post_id’],
‘L_TITLE’ => $recent_topicrow[$i][’topic_title’],
‘U_FORUMS’ => append_sid(”viewforum.$phpEx?” . POST_FORUM_URL . ‘=’ . $recent_topicrow[$i][’forum_id’]) . ‘#’ .$recent_topicrow[$i][’forum_name’],
‘L_FORUMS’ => $recent_topicrow[$i][’forum_name’],
‘U_POSTER’ => append_sid(”profile.$phpEx?mode=viewprofile&” . POST_USERS_URL . “=” . $recent_topicrow[$i][’user_id’]),
‘S_POSTER’ => $recent_topicrow[$i][’username’],
‘S_REPLY’ => $recent_topicrow[$i][’topic_replies’],
‘S_POSTTIME’ => create_date($board_config[’default_dateformat’], $recent_topicrow[$i][’post_time’], $board_config[’board_timezone’])
)
);
}
// END: Recent Topics-II
Lai attēloto to:
Jaunākie komentāri |
|
Protams, attēlojam kodam jābūt ir tā templeita failam, kuram atbilst tas php kods. Š itais ir no ezportal ņemts. Nezinu vai tev sanāks uz standarta uzdabot virsū. Tabula mysql arī ir. Papēti, paeksperimentē.
Preses relīzes