Seite 19 von 45
Verfasst: 19.11.2003 18:40
von green.dot
also jetzt bin ich mit meinem latein echt am ende...
siehe hier:
www.e-clowns.com/test2.php
alles drin, alles funzt :O
www.e-clowns.com/test3.php
alles drin, bloß grafiksch*** drumrum und bitte was???
ich kapier hier nix mehr

Verfasst: 19.11.2003 22:47
von Acid
"test2.php" is ja ok so... und die Fehlermeldung bei "test3.php" stammt von dem Newsscript.
Verfasst: 20.11.2003 14:11
von green.dot
ja klar is die von dem newsscript, aber dann müsste sie auch auf test2.php erscheinen...
dann da sind haargenau die selben scripte includet, bloß das html und grafiken drumherum fehlen!
alles höchst unlogisch :/
Tach
Verfasst: 29.11.2003 17:01
von beerbox
also bei mir läuft es !!
aber ich würde es von der optik her gerne so haben wie:
http://www.jackass.de
könntet ihr mir mal sagen wie es funztz?
meine seite ist beerbox.de
Verfasst: 01.12.2003 09:27
von Acid
..welche Version/Variante benutzt du denn?
Und dir würde es dann auch ausreichen, wenn nur der Thementitel und der Autor aufgelistet werden !?
ja
Verfasst: 01.12.2003 12:10
von beerbox
ich benutze variante 1 und es soll nur klein am rand stehen sonst nimmt es zuviel platz weg ich habe zwar ahnung von mysql aber irgendwie kommt immer ne Fehlermeldung wenn ich in der recent rumspiele

das mit nur thementitel und author reicht schon ja.......
Verfasst: 01.12.2003 12:35
von Acid
Kann es sein, das du es mittlerweile alleine geregelt hast.. "jackass" is doch deine Seite oder?

Verfasst: 01.12.2003 15:20
von dabba
Hallo Acid (?),
ich hab noch ne Frage zu deinem Mod:
Kann man den auch so umbauen, dass ich auf einer beliebigen Seite (z.B. einem Portal -ich habe das von AWSW) nicht die x letzten Beiträge insgesamt aufgelistet bekomme, sondern die x letzten Beiträge pro Kategorie?
Vielleicht sogar noch so, dass man die Kategorien, die einen nicht interessieren, per Mausklick oder per Eingabe im Profil oder so, gar nicht erst sehen kann?
Ich bin für jede Idee dankbar,
lieben Gruß,
Dabba
nene
Verfasst: 01.12.2003 18:01
von beerbox
das ist nicht meine seite!! meine ist
www.beerbox.de
blos das bei jackass.de hat mir gut gefallen das nur thema und name angezeigt wird!
ich bekomme es blos nicht so hin kannst du mir sagen wie es funzt?
Verfasst: 02.12.2003 09:28
von Acid
@beerbox
Ersetze mal die recent.php mit folgendem..
Code: Alles auswählen
<?php
// ############ Edit below ###############################
$length = '25'; // length of topic title
$limit = '15'; // how many topics?
$l_recent = 'recent topics';
$l_by = 'by';
$special_forums = '0'; // 0 = no; 1 = yes
$forums = '1,2,3'; // ID of forums; separate them with a comma
$css = 'http://www.deine_domain.de/forum/templates/name/name.css'; //path and name to your css_sheet - optional
// ############ Edit above ###############################
define('IN_PHPBB', true);
$phpbb_root_path = 'forum/'; // board folder with! ending mark (if in same folder just './')
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);
@$userdata = session_pagestart($user_ip, PAGE_INDEX);
@init_userprefs($userdata);
// #### html output ####
echo "<link rel=\"stylesheet\" href=\"$css\" type=\"text/css\">"; // - optional
echo "<table width=\"20%\" cellpadding=\"1\" cellspacing=\"1\" border=\"0\" align=\"center\" class=\"forumline\">";
echo "<tr><th>$limit $l_recent</th></tr>";
// #### html output ####
$sql = "SELECT post_id FROM ". POSTS_TABLE;
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not obtain matched posts list.', '', __LINE__, __FILE__, $sql);
}
$recent_ids = array();
while( $row = $db->sql_fetchrow($result) )
{
$recent_ids[] = $row['post_id'];
}
$db->sql_freeresult($result);
$recent_forum = ( isset($HTTP_POST_VARS['forum']) ) ? intval($HTTP_POST_VARS['forum']) : -1;
if ( $recent_forum == -1 )
{
$is_auth_ary = auth(AUTH_READ, AUTH_LIST_ALL, $userdata);
$ignore_forum_sql = '';
while( list($key, $value) = each($is_auth_ary) )
{
if ( !$value['auth_read'] )
{
$ignore_forum_sql .= ( ( $ignore_forum_sql != '' ) ? ', ' : '' ) . $key;
}
}
if ( $ignore_forum_sql != '' )
{
$auth_sql .= ( $auth_sql != '' ) ? " AND f.forum_id NOT IN ($ignore_forum_sql) " : "f.forum_id NOT IN ($ignore_forum_sql) ";
}
}
if ( $recent_author == '' && $auth_sql == '' )
{
$sql = "SELECT topic_id FROM ". POSTS_TABLE ."
WHERE post_id IN (" . implode(", ", $recent_ids) . ")
$where_sql GROUP BY topic_id";
}
else
{
$from_sql = POSTS_TABLE ." p";
if ( $auth_sql != '' )
{
$from_sql .= ", ". FORUMS_TABLE ." f";
$where_sql .= " AND f.forum_id = p.forum_id AND $auth_sql";
}
$sql = "SELECT p.topic_id FROM $from_sql
WHERE p.post_id IN (" . implode(", ", $recent_ids) . ")
$where_sql GROUP BY p.topic_id";
}
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not obtain topic ids', '', __LINE__, __FILE__, $sql);
}
$recent_ids = array();
while( $row = $db->sql_fetchrow($result) )
{
$recent_ids[] = $row['topic_id'];
}
$db->sql_freeresult($result);
$auth_results = implode(', ', $recent_ids);
$where_part1 = ( $special_forums == '0' ) ? 't.topic_id IN ('.$auth_results.')' : 'f.forum_id IN ('.$forums.')';
$sql = "SELECT t.*, f.forum_id, f.forum_name, u.username, u.user_id, u2.username as user2, u2.user_id as id2, p.post_username, p2.post_username AS post_username2, p2.post_time
FROM ". TOPICS_TABLE ." t, ". FORUMS_TABLE ." f, ". USERS_TABLE ." u, ". POSTS_TABLE ." p, ". POSTS_TABLE ." p2, ". USERS_TABLE ." u2
WHERE $where_part1
AND t.topic_poster = u.user_id
AND f.forum_id = t.forum_id
AND p.post_id = t.topic_first_post_id
AND p2.post_id = t.topic_last_post_id
AND u2.user_id = p2.poster_id
ORDER BY t.topic_last_post_id DESC LIMIT $limit";
if ( !$result = $db->sql_query($sql) )
{
message_die(GENERAL_ERROR, 'Could not obtain main information', '', __LINE__, __FILE__, $sql);
}
$line = array();
while( $row = $db->sql_fetchrow($result) )
{
$line[] = $row;
}
$db->sql_freeresult($result);
for($i = 0; $i < count($line); $i++)
{
$forum_url = append_sid("viewforum.$phpEx?" . POST_FORUM_URL . '=' . $line[$i]['forum_id']);
$forum_id = $line[$i]['forum_id'];
$topic_url = append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . '=' . $line[$i]['topic_id']);
$topic_id = $line[$i]['topic_id'];
$orig_word = array();
$replacement_word = array();
obtain_word_list($orig_word, $replacement_word);
$word_censor = ( count($orig_word) ) ? preg_replace($orig_word, $replacement_word, $line[$i]['topic_title']) : $line[$i]['topic_title'];
$topic_title = ( strlen($line[$i]['topic_title']) < $length ) ? $word_censor : substr(stripslashes($word_censor), 0, $length) . "...";
$last_time = create_date($board_config['default_dateformat'], $line[$i]['post_time'], $board_config['board_timezone']);
$last_author = ( $line[$i]['id2'] == ANONYMOUS ) ? ( ($line[$i]['post_username2'] != '' ) ? $line[$i]['post_username2'] . ' ' : $lang['Guest'] . ' ' ) : '<a href="' . append_sid("".$phpbb_root_path."profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . '=' . $line[$i]['id2']) . '" class="gensmall">' . $line[$i]['user2'] . '</a>';
$last_url = '<a href="'. append_sid("".$phpbb_root_path."viewtopic.$phpEx?" . POST_POST_URL . '=' . $line[$i]['topic_last_post_id']) . '#' . $line[$i]['topic_last_post_id'].'" class="genmed">'. $topic_title .'</a>';
$row_class = ( !($i % 2) ) ? $theme['td_class1'] : $theme['td_class2'];
// #### html output ####
echo "<tr><td class=\"$row_class\"><span class=\"topictitle\">- $last_url</span> <span class=\"gensmall\">( $last_author )</span></td></tr>";
// #### html output ####
}
// #### html output ####
echo "</table>";
// #### html output ####
?>
@dabba
Nun, man kann bei den Varianten 1 und 2 des Recent Hacks auch spezielle Foren angeben, wenn nur diese ausgelesen werden sollen... du könntest dann alle Foren einer speziellen Kategorie angeben.