Not logged in. · Lost password · Register
Forum: Support Ideas and suggestions RSS
Anzahl der Beiträge je Threadseite
Avatar
dieweltist #1
User title: Prediger des Irrsinns
Member since Sep 2006 · 291 posts · Location: Thüringen / Deutschland
Group memberships: Members
Show profile · Link to this post
Subject: Anzahl der Beiträge je Threadseite
Hiermit möchte ich fragen, wie man den Code verändern muss, damit Gästen, unabhängig von der gewählten Einstellung, nur jeweils ein Beitrag je Threadseite angezeigt wird.

Falls das nicht möglich ist, würde ich gern wissen, wie man den Code verändern muss, damit man bei der Suche, unabhängig von der gewählten Einstellung, eine bestimmte Anzahl von Beiträgen je Seite erhält.

Vielen Dank im voraus ! ! !
Eigenes Unterforum mit Moderationsrechten und eigene Homepage im Forum erstellen – www.forumtreff.de.tt
Avatar
Yves (Administrator) #2
User title: UNB developer & webmaster
Member since Jan 2004 · 3814 posts · Location: Erlangen, Germany
Group memberships: Administrators, Members
Show profile · Link to this post
Zum Einstieg: Die Einstellung, wie viele Beiträge pro Seite angezeigt werden, wird global in der config-Einstellung "threads_per_page" gespeichert. Diese wird dann im Code irgendwo ausgelesen und zur Darstellung verwendet. Du könntest den Quelltext nach dieser Zeichenkette durchsuchen und dort z.B. in Abhängigkeit von ($UNB['LoginUserID'] == 0) den Wert mit 1 überschreiben.

Da das erste möglich ist und ich für die zweite Frage länger suchen müsste, halte ich mich an die Logik deiner Frage und beantworte den zweiten Teil nicht. :D
♪ ...nanananah, all in all we’re just brilliant thieves, nanananah... ♪♬
Avatar
dieweltist #3
User title: Prediger des Irrsinns
Member since Sep 2006 · 291 posts · Location: Thüringen / Deutschland
Group memberships: Members
Show profile · Link to this post
Ich habe mal alle Dateien mit FileZilla gedownloadet und mit dem FileLocator Pro nach "threads_per_page" durchsucht. Fündig wurde ich in der Datei extra\import\import_phpbb2.php in der Zeile 707:

  1. $UNB['ConfigFile']['threads_per_page'] = $db0->FastQuery1st('config', 'config_value', 'config_name="topics_per_page"');
  2.     $UNB['ConfigFile']['posts_per_page'] = $db0->FastQuery1st('config', 'config_value', 'config_name="posts_per_page"');
  3.     $UNB['ConfigFile']['hot_thread_posts'] = $db0->FastQuery1st('config', 'config_value', 'config_name="hot_threshold"');
  4.  
  5.     $av_remote = $db0->FastQuery1st('config', 'config_value', 'config_name="allow_avatar_remote"');
  6.  
  7.     $av_upload = $db0->FastQuery1st('config', 'config_value', 'config_name="allow_avatar_upload"');
  8.     $av_size = $db0->FastQuery1st('config', 'config_value', 'config_name="avatar_filesize"');
  9.  
  10.     if (!$av_remote && (!$av_upload || !$av_size)) $avatars = 0;
  11.     else $avatars = 1;
  12.     $UNB['ConfigFile']['avatars_enabled'] = $avatars;
  13.     $UNB['ConfigFile']['avatar_x'] = $db0->FastQuery1st('config', 'config_value', 'config_name="avatar_max_width"');
  14.     $UNB['ConfigFile']['avatar_y'] =    $db0->FastQuery1st('config', 'config_value',

In der Datei extra\import\import_wbb1.php in der Zeile 693:

  1. if ($step == 5)
  2. {
  3.     // ------------------------------------------------------------ CONFIG
  4.  
  5.     $a = $db0->FastQuery('config');
  6.     $UNB['ConfigFile']['forum_title'] = $a['master_board_name'];
  7.     $UNB['ConfigFile']['home_url'] = $a['php_path'];
  8.     $UNB['ConfigFile']['smtp_server'] = 'localhost';
  9.     $UNB['ConfigFile']['smtp_sender'] = $a['master_email'];
  10.     $UNB['ConfigFile']['threads_per_page'] = $a['tproseite'];
  11.     $UNB['ConfigFile']['posts_per_page'] = $a['eproseite'];
  12.     $UNB['ConfigFile']['avatars_enabled'] = $a['avatars'];
  13.     $UNB['ConfigFile']['avatar_x'] = $a['avatar_width'];
  14.     $UNB['ConfigFile']['avatar_y'] =    $a['avatar_height'];
  15.     $UNB['ConfigFile']['avatar_bytes'] =    $a['avatar_size'];
  16.  
  17.     if (!UnbRebuildConffile()) die($UNB_T['error.write conffile']);
  18.  
  19.     UnbForwardHTML(UnbLink('@this', 'step=6'));
  20. }

6 mal in der Datei unb_lib\common_out.lib.php, und zwar 2mal in der Zeile 223:

  1. // List threads
  2. //
  3. // in where = (int) forum to list threads from
  4. //            (string) SQL restriction of threads to show
  5. // in page = (int) page number to display (-1: last page)
  6. // in editthread = (int) thread ID to edit
  7. // in get = (array) GET params to add to page links (i.e. search definition)
  8. // in order = (string) SQL ORDER parameter
  9. // in limit = (string) SQL LIMIT parameter
  10. // in write = (bool) enable "write access" at all? this means:
  11. //                   icons for thread editing. recommended to false on search queries etc
  12. // in showhidden = (bool) show all hidden threads this time
  13. //
  14. function UnbListThreads($where, $page = 1, $editthread = 0, $get = null, $order = '', $limit = '', $write = true, $showhidden = false)
  15. {
  16.     global $output, $toplevel, $UNB, $UNB_T;
  17.     $TP =& $UNB['TP'];
  18.  
  19.     // Clean parameters
  20.     $page = intval($page);
  21.     $editthread = intval($editthread);
  22.  
  23.     $threads_per_page = rc('threads_per_page');
  24.     $mark_own_posts = rc('own_posts_in_threadlist');
  25.     $advanced_counter = rc('advanced_thread_counter');
  26.     $show_view_count = rc('count_thread_views');
  27.     $TP['threadlistShowViewCount'] = $show_view_count;
  28.     $TP['threadlist'] = array();
  29.  
  30.     if (is_int($where) && !UnbCheckRights('viewforum', $where)) return false;
  31.  
  32.     UnbCountThreadPosts();
  33.  
  34.     $forum = new IForum;
  35.     $thread = new IThread;
  36.  
  37.     $user = new IUser;
  38.     $post = new IPost;
  39.  
  40.     if (is_int($where))
  41.     {
  42.         $forumid = $where;
  43.         $show_forum = false;
  44.     }
  45.     elseif (is_string($where))
  46.     {
  47.         $forumid = -1;
  48.         $show_forum = true;   // is a string -> is a WHERE definition (over all Forums) -> display Thread's Forum
  49.     }
  50.     else
  51.     {
  52.         return false;   // input type not supported
  53.     }
  54.     $TP['threadlistShowForum'] = $show_forum;

Einmal in der Zeile 264:

  1. // ---------- Page selection ----------
  2.     $thread_count = $thread->Count($where, $showhidden);
  3.     $params = array(
  4.         'id' => $forumid,
  5.         'showhidden_t' => ($showhidden ? 1 : null));
  6.     if (isset($get)) $params = array_merge($params, $get);
  7.     $params = array_merge($params, array('##' => 'threadlist'));
  8.     if ($limit == '')
  9.         $TP['threadlistPages'] = UnbPageSelection($thread_count, $threads_per_page, $page, $params);
  10.     else
  11.         $TP['threadlistPages'] = '';
  12.  
  13.     if ($forumid > 0)
  14.     {
  15.         UnbSetRelLink('up', UnbLink('@this', 'id=' . $forum->GetParent($forumid) . $url_sh . $get));
  16.     }

Fortsetzung siehe Antwort darunter !
Eigenes Unterforum mit Moderationsrechten und eigene Homepage im Forum erstellen – www.forumtreff.de.tt
Avatar
dieweltist #4
User title: Prediger des Irrsinns
Member since Sep 2006 · 291 posts · Location: Thüringen / Deutschland
Group memberships: Members
Show profile · Link to this post
Je einmal in den Zeilen 290, 292 und 293:

  1. // -------------------- Threads list --------------------
  2.     $output = '';
  3.  
  4.     if ($editthread)
  5.         $TP['threadlistEditformLink'] = UnbLink('@this', 'id=' . $toplevel, true);
  6.  
  7.     // ----- Look for threads on this page or accept $limit parameter -----
  8.     $legend_icon_new = false;
  9.     $legend_icon_hot = false;
  10.     $legend_icon_important = false;
  11.     $legend_icon_closed = false;
  12.     $legend_icon_own = false;
  13.     $legend_icon_moved = false;
  14.  
  15.     $start_num = 0;
  16.     if ($limit == '')
  17.     {
  18.         if ($threads_per_page)
  19.         {
  20.             $start_num = ($page - 1) * $threads_per_page;
  21.             $limit = $start_num . ',' . $threads_per_page;
  22.         }
  23.         else
  24.             $limit = '';
  25.     }
  26.     $defaultOrder = false;
  27.     if ($order == '')
  28.     {
  29.         $defaultOrder = true;
  30.         $order = ($get == '' ? '(Options & ' . UNB_THREAD_IMPORTANT . ') DESC, ' : '') . 'LastPostDate DESC';
  31.     }
  32.     $threads = $thread->FindArray($where, $order, $limit, $showhidden);
  33.  
  34.     // read all threads' first posts' users into the cache
  35.     $users = array();
  36.     foreach($threads as $record)
  37.         if (!in_array($record['User'], $users) && $record['User'] > 0 && !isset($UNB['UserCache'][$record['User']]))
  38.             array_push($users, $record['User']);
  39.     UnbBuildEntireUserCache($users);
  40.  
  41.     $a = array();
  42.     foreach($threads as $record) array_push($a, $record['ID']);
  43.     $user_reads = UnbReadUserReads($a);
  44.     $last_posts = UnbGetLastPost($a);
  45.     if ($mark_own_posts) $users_posts = UnbFindUsersPosts($a);
  46.     if ($advanced_counter && $show_view_count) $count_userviews = UnbCountUserViews($a);
  47.     if ($advanced_counter) $count_replyusers = UnbCountReplyUsers($a);
  48.  
  49.     $count = 0;                // number of displayed threads
  50.     $countNormal = 0;          // number of displayed threads that are not important
  51.     $prevIsOld = false;        // true from the first thread on that is older (LastPostDate) than the user's last login
  52.     $prevIsImportant = false// true from the first important thread on
  53.     $new_threads = 0;
  54.     foreach($threads as $record)
  55.     {
  56.         $tpitem = array();
  57.         $impclass = '';
  58.  
  59.         $thread->LoadFromRecord($record);   // load thread as if it came directly from the database record
  60.         $tpitem['id'] = $thread->GetID();
  61.         $tpitem['defaultOrder'] = $defaultOrder;
  62.         $tpitem['num'] = $count;
  63.         $tpitem['numAll'] = $start_num + $count;
  64.  
  65.         if (!UnbCheckRights('viewforum', $thread->GetForum(), $thread->GetID())) continue;
  66.  
  67.         // is this a 'moved' thread that expired?
  68.         if ($thread->IsMovedExpired())
  69.         {
  70.             $thread->RemoveAllPosts();
  71.             continue;
  72.         }
  73.  
  74.         if (!$count)
  75.         {
  76.             // If the first thread in the list is not important (and thus sorted out of date),
  77.             // remember we already have an 'old' thread from the beginning on
  78.             if (!$thread->IsImportant())
  79.                 $prevIsOld = $thread->GetLastPostDate() < $UNB['LoginUser']->GetLastLogout();
  80.  
  81.             // Remember if the first thread displayed is important
  82.             $firstIsImportant = $thread->IsImportant();
  83.         }
  84.  
  85.         if ($forumid != -1 &&
  86.             $prevIsImportant &&
  87.             !$thread->IsImportant() &&
  88.             $defaultOrder)
  89.         {
  90.             // This is the first thread that is not important
  91.             $prevIsImportant = false;
  92.             $tpitem['importantDelimiter'] = true;
  93.         }
  94.         elseif ($thread->IsImportant())
  95.         {
  96.             $prevIsImportant = true;
  97.             $impclass = 'important';
  98.         }
  99.  
  100.         if (($countNormal || $firstIsImportant) &&            // not the first normal (=not important) thread displayed
  101.                                                               // OR first thread displayed was important
  102.                                                               //    (we need a distance then, too)
  103.             !$prevIsOld &&                                    // previous isn't already old
  104.             (!$thread->IsImportant() || $forumid == -1) &&    // this is not important OR importants are sorted in
  105.             $thread->GetLastPostDate() < $UNB['LoginUser']->GetLastLogout() /*&&   // this is an old thread
  106.             $defaultOrder*/)
  107.         {
  108.             // This is the first post that is older (LastPostDate) than the user's last login
  109.             $prevIsOld = true;
  110.  
  111.             if (($countNormal || !$firstIsImportant) &&   // not the first normal thread displayed
  112.                                                           // OR first thread was not important
  113.                                                           // MEANS: if the first was important, we need a normal in between
  114.                 $forumid == -1 &&                         // only show this space for search results, not forums
  115.                 stristr($order, 'LastPostDate'))          // LastPostDate must play a role in sorting
  116.             {
  117.                 // Only show the message/space if there was a normal post already OR the first one wasn't important
  118.                 $tpitem['oldDelimiter'] = true;
  119.             }
  120.         }
  121.  
  122.         //$lastpost = UnbGetLastPost("Thread=" . $thread->GetID());
  123.         $lastpost = $last_posts[$thread->GetID()];
  124.         //$lastread = $thread->GetLastRead();
  125.         $lastread = $user_reads[$thread->GetID()]['LastRead'];
  126.  
  127.         $target = $thread->GetID();
  128.         if ($thread->IsMoved()) $target = intval($thread->GetQuestion());
  129.  
  130.         // ----- ICON -----
  131.         $img = 'thread';
  132.         $title = $UNB_T['topic'];
  133.         $jmp_new = '';
  134.  
  135.         $flag_moved = $thread->IsMoved();
  136.         $flag_new = $lastpost['Date'] > $lastread && $UNB['LoginUserID'];
  137.         $flag_own = $mark_own_posts && $UNB['LoginUserID'] > 0 && in_array($thread->GetID(), $users_posts);
  138.         $flag_closed = $thread->IsClosed();
  139.         $flag_imp = $thread->IsImportant();
  140.         $flag_hot = (rc('hot_thread_posts') && UnbGetPostsByThread($thread->GetID()) > rc('hot_thread_posts') ||
  141.                      rc('hot_thread_views') && $thread->GetViews() > rc('hot_thread_views'));
  142.  
  143.         if ($flag_moved) $flag_new = $flag_own = $flag_closed = $flag_imp = false;
  144.         #if ($flag_imp) $flag_own = false;
  145.         if ($flag_imp) $flag_hot = false;
  146.  
  147.         if ($flag_moved)
  148.         {
  149.             $img .= '_moved';
  150.             $title = $UNB_T['img.moved thread'];
  151.             $legend_icon_moved = true;
  152.         }
  153.  
  154.         if ($flag_imp)
  155.         {
  156.             $title = $UNB_T['img.important thread'];
  157.             $legend_icon_important = true;
  158.         }
  159.  
  160.         if ($flag_closed)
  161.         {
  162.             $title = $UNB_T['img.closed thread'];
  163.             $legend_icon_closed = true;
  164.         }
  165.  
  166.         if ($flag_new)
  167.         {
  168.             $img .= '_new';
  169.             $title .= ' (' . $UNB_T['img.new posts'] . ')';
  170.             $new_threads++;
  171.             $legend_icon_new = true;
  172.  
  173.             // direct link to 1st unread post, only if user has already read something there before
  174.             if ($lastread)
  175.             {
  176.                 $jmp_new = UnbMakePostLink($thread->FirstUnreadPost($lastread), 0, true) . '<img ' . $UNB['Image']['unread'] . ' title="' . $UNB_T['img.goto unread post'] . '" />&nbsp;';
  177.             }
  178.         }
  179.  
  180.         if ($flag_own)
  181.         {
  182.             $img .= '_own';
  183.             $title .= ' (' . $UNB_T['img.own posts'] . ')';
  184.             $legend_icon_own = true;
  185.         }
  186.  
  187.         if ($flag_closed)
  188.         {
  189.             $img .= '_closed';
  190.         }
  191.  
  192.         if ($flag_imp)
  193.         {
  194.             $img .= '_important';
  195.         }
  196.         else if ($flag_hot)
  197.         {
  198.             $img .= '_hot';
  199.             //$title = $UNB_T['hot_thread'];
  200.             $legend_icon_hot = true;
  201.         }
  202.  
  203.         $tpitem['impclass'] = $impclass;
  204.         $tpitem['editThis'] =
  205.             ($thread->GetID() == $editthread && UnbCheckRights('editpost', $thread->GetForum(), $thread->GetID(), 0));
  206.         $tpitem['linkThreadIcon'] = UnbLink('@thread', 'id=' . $target, true);
  207.         $tpitem['image'] = $UNB['Image'][$img];
  208.         $tpitem['imageTitle'] = $title;

Fortsetzung siehe Antwort darunter !
Eigenes Unterforum mit Moderationsrechten und eigene Homepage im Forum erstellen – www.forumtreff.de.tt
Avatar
dieweltist #5
User title: Prediger des Irrsinns
Member since Sep 2006 · 291 posts · Location: Thüringen / Deutschland
Group memberships: Members
Show profile · Link to this post
In der Datei unb_lib\cp.inc.php in der Zeile 1175:

  1. # ----- board appearance -----
  2.  
  3.     if (isset($_POST['Design']))
  4.         $UNB['ConfigFile']['design'] = $_POST['Design'];
  5.     if (isset($_POST['SmileSet']))
  6.         $UNB['ConfigFile']['smileset'] = $_POST['SmileSet'];
  7.  
  8.     if (isset($_POST['SetLoginTop']))
  9.         $UNB['ConfigFile']['login_top'] = $_POST['LoginTop'] ? 1 : 0;
  10.     if (isset($_POST['SetShowOnlineUsers']))
  11.         $UNB['ConfigFile']['show_online_users'] = $_POST['ShowOnlineUsers'] ? 1 : 0;
  12.     if (isset($_POST['SetFootDbTime']))
  13.         $UNB['ConfigFile']['foot_db_time'] = $_POST['FootDbTime'] ? 1 : 0;
  14.     if (isset($_POST['GZip']))
  15.         $UNB['ConfigFile']['gzip'] = $_POST['GZip'];
  16.     if (isset($_POST['SetModRewriteUrls']))
  17.         $UNB['ConfigFile']['mod_rewrite_urls'] = $_POST['ModRewriteUrls'] ? 1 : 0;
  18.     if (isset($_POST['SetShowGotoForum']))
  19.         $UNB['ConfigFile']['show_goto_forum'] = $_POST['ShowGotoForum'] ? 1 : 0;
  20.     if (isset($_POST['SetShowSearchForum']))
  21.         $UNB['ConfigFile']['show_search_forum'] = $_POST['ShowSearchForum'] ? 1 : 0;
  22.     if (isset($_POST['SetEnableTraceUsers']))
  23.         $UNB['ConfigFile']['enable_trace_users'] = $_POST['EnableTraceUsers'] ? 1 : 0;
  24.     if (isset($_POST['SetPostPreviewSendButton']))
  25.         $UNB['ConfigFile']['post_preview_send_button'] = $_POST['PostPreviewSendButton'] ? 1 : 0;
  26.     if (isset($_POST['SetShowLastVisitTime']))
  27.         $UNB['ConfigFile']['show_last_visit_time'] = $_POST['ShowLastVisitTime'] ? 1 : 0;
  28.     if (isset($_POST['ForumsTreeStyle']))
  29.         $UNB['ConfigFile']['forums_tree_style'] = $_POST['ForumsTreeStyle'];
  30.     if (isset($_POST['SetDisplayForumLastpostRe']))
  31.         $UNB['ConfigFile']['display_forum_lastpost_re'] = $_POST['DisplayForumLastpostRe'] ? 1 : 0;
  32.     if (isset($_POST['SetShowBirthdays']))
  33.         $UNB['ConfigFile']['show_birthdays'] = $_POST['ShowBirthdays'] ? 1 : 0;
  34.     if (isset($_POST['SetDisableSearchHighlighting']))
  35.         $UNB['ConfigFile']['disable_search_highlighting'] = $_POST['DisableSearchHighlighting'] ? 1 : 0;
  36.     if (isset($_POST['SetShowForumRssLink']))
  37.         $UNB['ConfigFile']['show_forum_rss_link'] = $_POST['ShowForumRssLink'] ? 1 : 0;
  38.     if (isset($_POST['LocationLink']))
  39.         $UNB['ConfigFile']['location_link'] = $_POST['LocationLink'];
  40.     if (isset($_POST['ExtraNames']))
  41.     {
  42.         $n = sizeof(explode('|', $_POST['ExtraNames']));
  43.         if ($n > 10)
  44.         {
  45.             $error .= $UNB_T['cp.error.too many extra fields'] . '<br />';
  46.         }
  47.         elseif (!UnbSetProfileExtraDBCols($n))
  48.         {
  49.             $error .= $UNB_T['cp.error.db setextracols'] . t2h($UNB['Db']->LastError()) . '<br />';
  50.         }
  51.         else
  52.         {
  53.             $l = array_map('trim', explode('|', $_POST['ExtraNames']));
  54.             $UNB['ConfigFile']['extra_names'] = join(' | ', $l);
  55.         }
  56.     }
  57.  
  58.     if (isset($_POST['ThreadsPerPage']))
  59.         $UNB['ConfigFile']['threads_per_page'] = intval($_POST['ThreadsPerPage']);
  60.     if (isset($_POST['PostsPerPage']))
  61.         $UNB['ConfigFile']['posts_per_page'] = intval($_POST['PostsPerPage']);
  62.     if (isset($_POST['UsersPerPage']))
  63.         $UNB['ConfigFile']['users_per_page'] = intval($_POST['UsersPerPage']);
  64.     if (isset($_POST['HotThreadsPosts']))
  65.         $UNB['ConfigFile']['hot_thread_posts'] = intval($_POST['HotThreadsPosts']);
  66.     if (isset($_POST['HotThreadsViews']))
  67.         $UNB['ConfigFile']['hot_thread_views'] = intval($_POST['HotThreadsViews']);
  68.  
  69.     if (isset($_POST['SetNewTopicLinkInThread']))
  70.         $UNB['ConfigFile']['new_topic_link_in_thread'] = $_POST['NewTopicLinkInThread'] ? 1 : 0;
  71.     if (isset($_POST['PostAttachInlineMaxsize']))
  72.         $UNB['ConfigFile']['post_attach_inline_maxsize'] = intval($_POST['PostAttachInlineMaxsize']);
  73.     if (isset($_POST['PostAttachInlineMaxwidth']))
  74.         $UNB['ConfigFile']['post_attach_inline_maxwidth'] = intval($_POST['PostAttachInlineMaxwidth']);
  75.     if (isset($_POST['PostAttachInlineMaxheight']))
  76.         $UNB['ConfigFile']['post_attach_inline_maxheight'] = intval($_POST['PostAttachInlineMaxheight']);
  77.     if (isset($_POST['SetPostShowTextlength']))
  78.         $UNB['ConfigFile']['post_show_textlength'] = $_POST['PostShowTextlength'] ? 1 : 0;
  79.     if (isset($_POST['MaxPollOptions']))
  80.         $UNB['ConfigFile']['max_poll_options'] = intval($_POST['MaxPollOptions']);
  81.  
  82.     if (isset($_POST['SetOwnPostsInThreadlist']))
  83.         $UNB['ConfigFile']['own_posts_in_threadlist'] = $_POST['OwnPostsInThreadlist'] ? 1 : 0;
  84.     if (isset($_POST['SetShowBookmarkedThread']))
  85.         $UNB['ConfigFile']['show_bookmarked_thread'] = $_POST['ShowBookmarkedThread'] ? 1 : 0;
  86.     if (isset($_POST['SetDisplayThreadStartdate']))
  87.         $UNB['ConfigFile']['display_thread_startdate'] = $_POST['DisplayThreadStartdate'] ? 1 : 0;
  88.     if (isset($_POST['SetAdvancedThreadCounter']))
  89.         $UNB['ConfigFile']['advanced_thread_counter'] = $_POST['AdvancedThreadCounter'] ? 1 : 0;
  90.     if (isset($_POST['SetCountThreadViews']))
  91.         $UNB['ConfigFile']['count_thread_views'] = $_POST['CountThreadViews'] ? 1 : 0;
  92.     if (isset($_POST['SetDisplayThreadLastposter']))
  93.         $UNB['ConfigFile']['display_thread_lastposter'] = $_POST['DisplayThreadLastposter'] ? 1 : 0;
  94.     if (isset($_POST['SetCountForumThreadsPosts']))
  95.         $UNB['ConfigFile']['count_forum_threads_posts'] = $_POST['CountForumThreadsPosts'] ? 1 : 0;
  96.     if (isset($_POST['SetDisplayForumLastpost']))
  97.         $UNB['ConfigFile']['display_forum_lastpost'] = $_POST['DisplayForumLastpost'] ? 1 : 0;
  98.  
  99.     if (isset($_POST['SetUlistRegdate']))
  100.         $UNB['ConfigFile']['ulist_regdate'] = $_POST['UlistRegdate'] ? 1 : 0;
  101.     if (isset($_POST['SetUlistLocation']))
  102.         $UNB['ConfigFile']['ulist_location'] = $_POST['UlistLocation'] ? 1 : 0;
  103.     if (isset($_POST['SetUlistPosts']))
  104.         $UNB['ConfigFile']['ulist_posts'] = $_POST['UlistPosts'] ? 1 : 0;
  105.     if (isset($_POST['SetUlistLastpost']))
  106.         $UNB['ConfigFile']['ulist_lastpost'] = $_POST['UlistLastpost'] ? 1 : 0;
  107.  
  108.     if (isset($_POST['PollCurrentDays']))
  109.         $UNB['ConfigFile']['poll_current_days'] = intval($_POST['PollCurrentDays']);
  110.     if (isset($_POST['QuoteWithDate']))
  111.         $UNB['ConfigFile']['quote_with_date'] = intval($_POST['QuoteWithDate']);
  112.     if (isset($_POST['NoEditNoteGraceTime']))
  113.         $UNB['ConfigFile']['no_edit_note_grace_time'] = intval($_POST['NoEditNoteGraceTime']);
  114.     if (isset($_POST['MovedThreadNoteTimeout']))
  115.         $UNB['ConfigFile']['moved_thread_note_timeout'] = intval($_POST['MovedThreadNoteTimeout']);
  116.     if (isset($_POST['OnlineUsersReloadInterval']))
  117.         $UNB['ConfigFile']['online_users_reload_interval'] = intval($_POST['OnlineUsersReloadInterval']);
  118.     if (isset($_POST['UserOnlineTimeout']))
  119.         $UNB['ConfigFile']['user_online_timeout'] = intval($_POST['UserOnlineTimeout']);

Fortsetzung siehe Beitrag darunter !
Eigenes Unterforum mit Moderationsrechten und eigene Homepage im Forum erstellen – www.forumtreff.de.tt
Avatar
dieweltist #6
User title: Prediger des Irrsinns
Member since Sep 2006 · 291 posts · Location: Thüringen / Deutschland
Group memberships: Members
Show profile · Link to this post
Und in der Zeile 2727:

  1. // -- general --
  2.         $TP['controlpanelLoginTop'] = $p ? t2i($_POST['LoginTop']) : t2i(rc('login_top'));
  3.         $TP['controlpanelShowOnlineUsers'] = $p ? t2i($_POST['ShowOnlineUsers']) : t2i(rc('show_online_users'));
  4.         $TP['controlpanelFootDbTime'] = $p ? t2i($_POST['FootDbTime']) : t2i(rc('foot_db_time'));
  5.         $TP['controlpanelGZip'] = $p ? t2i($_POST['GZip']) : t2i(rc('gzip'));   # on|off|auto
  6.         $TP['controlpanelModRewriteUrls'] = $p ? t2i($_POST['ModRewriteUrls']) : t2i(rc('mod_rewrite_urls'));
  7.         $TP['controlpanelShowGotoForum'] = $p ? t2i($_POST['ShowGotoForum']) : t2i(rc('show_goto_forum'));
  8.         $TP['controlpanelShowSearchForum'] = $p ? t2i($_POST['ShowSearchForum']) : t2i(rc('show_search_forum'));
  9.         $TP['controlpanelEnableTraceUsers'] = $p ? t2i($_POST['EnableTraceUsers']) : t2i(rc('enable_trace_users'));
  10.         $TP['controlpanelPostPreviewSendButton'] = $p ? t2i($_POST['PostPreviewSendButton']) : t2i(rc('post_preview_send_button'));
  11.         $TP['controlpanelShowLastVisitTime'] = $p ? t2i($_POST['ShowLastVisitTime']) : t2i(rc('show_last_visit_time'));
  12.         $TP['controlpanelDisplayForumLastpostRe'] = $p ? t2i($_POST['DisplayForumLastpostRe']) : t2i(rc('display_forum_lastpost_re'));
  13.         $TP['controlpanelShowBirthdays'] = $p ? t2i($_POST['ShowBirthdays']) : t2i(rc('show_birthdays'));
  14.         $TP['controlpanelDisableSearchHighlighting'] = $p ? t2i($_POST['DisableSearchHighlighting']) : t2i(rc('disable_search_highlighting'));
  15.         $TP['controlpanelShowForumRssLink'] = $p ? t2i($_POST['ShowForumRssLink']) : t2i(rc('show_forum_rss_link'));
  16.         $TP['controlpanelLocationLink'] = $p ? t2i($_POST['LocationLink']) : t2i(rc('location_link'));   # text
  17.  
  18.         $TP['controlpanelThreadsPerPage'] = $p ? t2i($_POST['ThreadsPerPage']) : t2i(rc('threads_per_page'));
  19.         $TP['controlpanelPostsPerPage'] = $p ? t2i($_POST['PostsPerPage']) : t2i(rc('posts_per_page'));
  20.         $TP['controlpanelUsersPerPage'] = $p ? t2i($_POST['UsersPerPage']) : t2i(rc('users_per_page'));
  21.         $TP['controlpanelHotThreadsPosts'] = $p ? t2i($_POST['HotThreadsPosts']) : t2i(rc('hot_thread_posts'));
  22.         $TP['controlpanelHotThreadsViews'] = $p ? t2i($_POST['HotThreadsViews']) : t2i(rc('hot_thread_views'));
  23.  
  24.         $TP['controlpanelExtraNames'] = $p ? t2i($_POST['ExtraNames']) : t2i(rc('extra_names'));   # text
  25.         $TP['controlpanelExtraCount'] = sizeof(explode('|', rc('extra_names')));
  26.  
  27.         $TP['controlpanelForumsTreeStyles'] = array();
  28.         $tpitem = array();
  29.         $tpitem['name'] = 'unicode';
  30.         $tpitem['title'] = $UNB_T['cp.forum tree style.unicode'];
  31.         $tpitem['selected'] = $p && $_POST['controlpanelForumsTreeStyle'] == $tpitem['name'] || !$p && rc('forums_tree_style') == $tpitem['name'];
  32.         $TP['controlpanelForumsTreeStyles'][] = $tpitem;
  33.         $tpitem = array();
  34.         $tpitem['name'] = 'nolines';
  35.         $tpitem['title'] = $UNB_T['cp.forum tree style.nolines'];
  36.         $tpitem['selected'] = $p && $_POST['controlpanelForumsTreeStyle'] == $tpitem['name'] || !$p && rc('forums_tree_style') == $tpitem['name'];
  37.         $TP['controlpanelForumsTreeStyles'][] = $tpitem;
  38.         $tpitem = array();
  39.         $tpitem['name'] = 'dots';
  40.         $tpitem['title'] = $UNB_T['cp.forum tree style.dots'];
  41.         $tpitem['selected'] = $p && $_POST['controlpanelForumsTreeStyle'] == $tpitem['name'] || !$p && rc('forums_tree_style') == $tpitem['name'];
  42.         $TP['controlpanelForumsTreeStyles'][] = $tpitem;
  43.         $tpitem = array();
  44.         $tpitem['name'] = 'hlines';
  45.         $tpitem['title'] = $UNB_T['cp.forum tree style.hlines'];
  46.         $tpitem['selected'] = $p && $_POST['controlpanelForumsTreeStyle'] == $tpitem['name'] || !$p && rc('forums_tree_style') == $tpitem['name'];
  47.         $TP['controlpanelForumsTreeStyles'][] = $tpitem;
  48.  
  49.         // -- posts display --
  50.         $TP['controlpanelNewTopicLinkInThread'] = $p ? t2i($_POST['NewTopicLinkInThread']) : t2i(rc('new_topic_link_in_thread'));
  51.         $TP['controlpanelPostAttachInlineMaxsize'] = $p ? t2i($_POST['PostAttachInlineMaxsize']) : t2i(rc('post_attach_inline_maxsize'));
  52.         $TP['controlpanelPostAttachInlineMaxwidth'] = $p ? t2i($_POST['PostAttachInlineMaxwidth']) : t2i(rc('post_attach_inline_maxwidth'));
  53.         $TP['controlpanelPostAttachInlineMaxheight'] = $p ? t2i($_POST['PostAttachInlineMaxheight']) : t2i(rc('post_attach_inline_maxheight'));
  54.         $TP['controlpanelPostShowTextlength'] = $p ? t2i($_POST['PostShowTextlength']) : t2i(rc('post_show_textlength'));
  55.         $TP['controlpanelMaxPollOptions'] = $p ? t2i($_POST['MaxPollOptions']) : t2i(rc('max_poll_options'));
  56.  
  57.         // -- threads/forums list --
  58.         $TP['controlpanelOwnPostsInThreadlist'] = $p ? t2i($_POST['OwnPostsInThreadlist']) : t2i(rc('own_posts_in_threadlist'));
  59.         $TP['controlpanelShowBookmarkedThread'] = $p ? t2i($_POST['ShowBookmarkedThread']) : t2i(rc('show_bookmarked_thread'));
  60.         $TP['controlpanelDisplayThreadStartdate'] = $p ? t2i($_POST['DisplayThreadStartdate']) : t2i(rc('display_thread_startdate'));
  61.         $TP['controlpanelAdvancedThreadCounter'] = $p ? t2i($_POST['AdvancedThreadCounter']) : t2i(rc('advanced_thread_counter'));
  62.         $TP['controlpanelCountThreadViews'] = $p ? t2i($_POST['CountThreadViews']) : t2i(rc('count_thread_views'));
  63.         $TP['controlpanelDisplayThreadLastposter'] = $p ? t2i($_POST['DisplayThreadLastposter']) : t2i(rc('display_thread_lastposter'));
  64.         $TP['controlpanelCountForumThreadsPosts'] = $p ? t2i($_POST['CountForumThreadsPosts']) : t2i(rc('count_forum_threads_posts'));
  65.         $TP['controlpanelDisplayForumLastpost'] = $p ? t2i($_POST['DisplayForumLastpost']) : t2i(rc('display_forum_lastpost'));

Jetzt weiß ich aber nicht weiter, weil ich an keiner Stelle einen Zusammenhang mit einem ($UNB['LoginUserID'] == 0) finden kann. Vielleicht könntest du mir bitte an dieser Stelle weiter helfen.
Eigenes Unterforum mit Moderationsrechten und eigene Homepage im Forum erstellen – www.forumtreff.de.tt
Avatar
dieweltist #7
User title: Prediger des Irrsinns
Member since Sep 2006 · 291 posts · Location: Thüringen / Deutschland
Group memberships: Members
Show profile · Link to this post
Ich habe eben bemerkt, dass meines Erachtens aber die Einstellung posts_per_page maßgebend ist. Diese Zeichenfolge findet man 2 mal in der Datei extra\import\import_phpbb2.php in der Zeile 708:

  1. if ($step == 5)
  2. {
  3.     // ------------------------------------------------------------ CONFIG
  4.  
  5.     $UNB['ConfigFile']['forum_title'] = $db0->FastQuery1st('config', 'config_value', 'config_name="sitename"');
  6.  
  7.     $server_name = $db0->FastQuery1st('config', 'config_value', 'config_name="server_name"');
  8.  
  9.     /*
  10.     $server_port = $db0->FastQuery1st('config', 'config_value', 'config_name="server_port"');
  11.     $script_path = $db0->FastQuery1st('config', 'config_value', 'config_name="script_path"');
  12.     $http = ($server_port == 443 ? 'https://' : 'http://');
  13.     if ($server_port != 80 && $server_port != 443)
  14.         $server_port = ':' . $server_port;
  15.     else
  16.         $server_port = '';
  17.     $home_url = $http . $server_name . $server_port . $script_path;
  18.     $UNB['ConfigFile']['home_url'] = $home_url;
  19.     */
  20.  
  21.     $UNB['ConfigFile']['smtp_server'] = $db0->FastQuery1st('config', 'config_value', 'config_name="smtp_host"');
  22.     $UNB['ConfigFile']['smtp_sender'] = $db0->FastQuery1st('config', 'config_value', 'config_name="board_email"');
  23.     $UNB['ConfigFile']['smtp_user'] = $db0->FastQuery1st('config', 'config_value', 'config_name="smtp_username"');
  24.     $UNB['ConfigFile']['smtp_pass'] = $db0->FastQuery1st('config', 'config_value', 'config_name="smtp_password"');
  25.  
  26.     $UNB['ConfigFile']['new_user_validation'] = intval($db0->FastQuery1st('config', 'config_value', 'config_name="require_activation"')) + 1;
  27.  
  28.     $UNB['ConfigFile']['threads_per_page'] = $db0->FastQuery1st('config', 'config_value', 'config_name="topics_per_page"');
  29.     $UNB['ConfigFile']['posts_per_page'] = $db0->FastQuery1st('config', 'config_value', 'config_name="posts_per_page"');
  30.     $UNB['ConfigFile']['hot_thread_posts'] = $db0->FastQuery1st('config', 'config_value', 'config_name="hot_threshold"');
  31.  
  32.     $av_remote = $db0->FastQuery1st('config', 'config_value', 'config_name="allow_avatar_remote"');
  33.  
  34.     $av_upload = $db0->FastQuery1st('config', 'config_value', 'config_name="allow_avatar_upload"');
  35.     $av_size = $db0->FastQuery1st('config', 'config_value', 'config_name="avatar_filesize"');
  36.  
  37.     if (!$av_remote && (!$av_upload || !$av_size)) $avatars = 0;
  38.     else $avatars = 1;
  39.     $UNB['ConfigFile']['avatars_enabled'] = $avatars;
  40.     $UNB['ConfigFile']['avatar_x'] = $db0->FastQuery1st('config', 'config_value', 'config_name="avatar_max_width"');
  41.     $UNB['ConfigFile']['avatar_y'] =    $db0->FastQuery1st('config', 'config_value', 'config_name="avatar_max_height"');
  42.     $UNB['ConfigFile']['avatar_bytes'] =    $av_size;
  43.  
  44.     if ($db0->FastQuery1st('config', 'config_value', 'config_name="allow_sig"'))
  45.         $UNB['ConfigFile']['max_sig_len'] = $db0->FastQuery1st('config', 'config_value', 'config_name="max_sig_chars"');
  46.     else
  47.         $UNB['ConfigFile']['max_sig_len'] = 0;
  48.  
  49.     $UNB['ConfigFile']['tz_offset'] = $db0->FastQuery1st('config', 'config_value', 'config_name="board_timezone"') * 4;
  50.     #$UNB['ConfigFile']['prog_id'] = $db0->FastQuery1st('config', 'config_value', 'config_name="cookie_name"');
  51.  
  52.     if (!UnbRebuildConffile()) die($UNB_T['error.write conffile']);
  53.  
  54.     UnbForwardHTML(UnbLink('@this', 'step=6'));
  55. }

In der Datei extra\import\import_wbb1.php in der Zeile 694:

  1. if ($step == 5)
  2. {
  3.     // ------------------------------------------------------------ CONFIG
  4.  
  5.     $a = $db0->FastQuery('config');
  6.     $UNB['ConfigFile']['forum_title'] = $a['master_board_name'];
  7.     $UNB['ConfigFile']['home_url'] = $a['php_path'];
  8.     $UNB['ConfigFile']['smtp_server'] = 'localhost';
  9.     $UNB['ConfigFile']['smtp_sender'] = $a['master_email'];
  10.     $UNB['ConfigFile']['threads_per_page'] = $a['tproseite'];
  11.     $UNB['ConfigFile']['posts_per_page'] = $a['eproseite'];
  12.     $UNB['ConfigFile']['avatars_enabled'] = $a['avatars'];
  13.     $UNB['ConfigFile']['avatar_x'] = $a['avatar_width'];
  14.     $UNB['ConfigFile']['avatar_y'] =    $a['avatar_height'];
  15.     $UNB['ConfigFile']['avatar_bytes'] =    $a['avatar_size'];
  16.  
  17.     if (!UnbRebuildConffile()) die($UNB_T['error.write conffile']);
  18.  
  19.     UnbForwardHTML(UnbLink('@this', 'step=6'));
  20. }

2 mal in der Datei unb_lib\common_out.lib.php, jeweils in der Zeile 906 und 907:

  1. function UnbLink($url, $params = null, $html = false, $sid = true, $derefer = false, $allowshort = true, $complete = false, $parse = true)
  2. {
  3.     global $UNB;
  4.  
  5.     // Clean parameters
  6.     $url = trim(strval($url));
  7.     if (!isset($params)) $params = array();
  8.     if (is_string($params))
  9.     {
  10.         // Handle anchor link in params
  11.         if ($pos = strpos($params, '#'))
  12.         {
  13.             $anchor = substr($params, $pos + 1);
  14.             $params = substr($params, 0, $pos);
  15.         }
  16.  
  17.         parse_str($params, $params2);
  18.         $params = $params2;
  19.     }
  20.  
  21.     // Handle anchor link in URL
  22.     if ($pos = strpos($url, '#'))
  23.     {
  24.         $anchor = substr($url, $pos + 1);
  25.         $url = substr($url, 0, $pos);
  26.     }
  27.  
  28.     // Rewrite certain links for search engines
  29.     if (!$UNB['Client']['is_browser'])
  30.     {
  31.         // Convert direct post links to thread[+page] links
  32.         if ($url == '@thread' && $params['postid'] > 0)
  33.         {
  34.             $post = new IPost(intval($params['postid']));
  35.             $params['id'] = $post->GetThread();
  36.             if (rc('posts_per_page') > 0)
  37.                 $params['page'] = ceil($post->Count('Thread=' . $post->GetThread() . ' AND Date<=' . $post->GetDate()) / rc('posts_per_page'));
  38.             $params['postid'] = null;
  39.         }
  40.     }
  41.  
  42.     do
  43.     {
  44.         // loop this parameter splitting as long as the URL was rewritten
  45.         // to allow URL parameters to be included in the basefile URL
  46.         $rewritten = false;
  47.  
  48.         // Scan URL and separate additional parameters
  49.         if ($parse && ($pos = strpos($url, '?')) !== false)
  50.         {
  51.             $qs = substr($url, $pos + 1);
  52.             $params2 = array();
  53.             $a = explode('&', $qs);
  54.             foreach ($a as $e)
  55.             {
  56.                 list($k, $v) = explode('=', $e, 2);
  57.                 if ($v === null) $v = false;
  58.                 $params2[$k] = $v;
  59.             }
  60.             //parse_str($qs, $params2);
  61.             $params = array_merge($params2, $params);
  62.             $url = substr($url, 0, $pos);
  63.         }
  64.  
  65.         // Replace shortcuts by our own pages
  66.         if ($url{0} === '@')
  67.         {
  68.             $baseurl = rc('baseurl');
  69.             if ($url === '@this') $url = $UNB['ThisPage'];
  70.             $req = null;
  71.             // REQUEST-NAME (see common.lib:UnbLink() for more details)
  72.             switch ($url)
  73.             {
  74.                 case '@cp': $url = $baseurl; $req = 'cp'; break;
  75.                 case '@derefer': $url = $baseurl; $req = 'derefer'; break;
  76.                 case '@main': $url = $baseurl; $req = 'main'; break;
  77.                 case '@post': $url = $baseurl; $req = 'post'; break;
  78.                 case '@register': $url = $baseurl; $req = 'register'; break;
  79.                 case '@rss': $url = $baseurl; $req = 'rss'; break;
  80.                 case '@search': $url = $baseurl; $req = 'search'; break;
  81.                 case '@setuser': $url = $baseurl; $req = 'setuser'; break;
  82.                 case '@showip': $url = $baseurl; $req = 'showip'; break;
  83.                 case '@stat': $url = $baseurl; $req = 'stat'; break;
  84.                 case '@thread': $url = $baseurl; $req = 'thread'; break;
  85.                 case '@users': $url = $baseurl; $req = 'users'; break;
  86.                 case '@veriword': $url = $baseurl; $req = 'veriword'; break;
  87.                 default:
  88.                     $data = array('url' => &$url, 'request' => &$req, 'params' => &$params);
  89.                     UnbCallHook('link.shortcut.custom', $data);
  90.             }
  91.             if ($url{0} === '@')
  92.             {
  93.                 UnbErrorLog('Invalid page reference in UnbLink: url=' . $url);
  94.                 $url = $baseurl; $req = '';
  95.             }
  96.             if (isset($req))
  97.             {
  98.                 // Prepend the req parameter rather than append it
  99.                 // REQUEST-PARAMETER (see common.lib:UnbLink() for more details)
  100.                 $params = array_merge(array('req' => $req), $params);
  101.             }
  102.             $rewritten = true;
  103.             $parse = true;   // the URL has changed and parameter parsing may be required now
  104.         }
  105.     }
  106.     while ($rewritten);

10 mal in der Datei unb_lib\common_out.lib.php, und zwar 2 mal in der Zeile 500 und 1 mal in der Zeile 504:

  1. // ----- SUBJECT -----
  2.         $data = array(
  3.             'thread' => &$thread,
  4.             'threadid' => $thread->GetID(),
  5.             'output' => '');
  6.         UnbCallHook('threadlist.presubject', $data);
  7.         $tpitem['addPreSubject'] = $data['output'];
  8.  
  9.         $tpitem['isMoved'] = $thread->IsMoved();
  10.         $tpitem['isClosed'] = $thread->IsClosed();
  11.         $tpitem['isImportant'] = $thread->IsImportant();
  12.         if ($jmp_new)
  13.             $tpitem['linkThread'] = $jmp_new;
  14.         else
  15.             $tpitem['linkThread'] = '<a href="' . UnbLink('@thread', 'id=' . $target, true) . '">';
  16.         $tpitem['flagNew'] = $flag_new;
  17.         $tpitem['subject'] = t2h($thread->GetSubject());
  18.  
  19.         if (rc('posts_per_page') > 0 && UnbGetPostsByThread($thread->GetID()) > rc('posts_per_page'))
  20.         {
  21.             $boundary = 3;
  22.  
  23.             $thread_page_count = ceil(UnbGetPostsByThread($thread->GetID()) / rc('posts_per_page'));
  24.             $pagesStr = ' &nbsp; <img ' . $UNB['Image']['page'] . ' title="' . $UNB_T['select page'] . '" />';
  25.             $state = 0;
  26.             for ($m = 1; $m <= $thread_page_count; $m++)
  27.             {
  28.                 // show pages if they were the only one replaced by '...'
  29.                 $med = ($m == $boundary + 1 && $m == $thread_page_count - ($boundary - 1) - 1);
  30.  
  31.                 if ($m <= $boundary || $med || $m > $thread_page_count - $boundary)
  32.                 {
  33.                     $pagesStr .= '<a href="' . UnbLink('@thread', 'id=' . $thread->GetID() . '&page=' . $m, true) . '"> ' . $m . '</a>';
  34.                 }
  35.                 else
  36.                 {
  37.                     if ($state < 1) { $pagesStr .= ' ...'; $state = 1; }
  38.                 }
  39.             }
  40.             $tpitem['pages'] = $pagesStr;

Fortsetzung siehe Beitrag darunter !
Eigenes Unterforum mit Moderationsrechten und eigene Homepage im Forum erstellen – www.forumtreff.de.tt
Avatar
dieweltist #8
User title: Prediger des Irrsinns
Member since Sep 2006 · 291 posts · Location: Thüringen / Deutschland
Group memberships: Members
Show profile · Link to this post
2 mal in der Zeile 879:

  1. // List postings (and poll, if available)
  2. //
  3. // in where = (int) thread to list posts from
  4. //            (string) SQL restriction of posts to show
  5. // in page = (int) page number to display
  6. // in get = (array) GET params to add to page links (i.e. search definition)
  7. // in write = (bool) enable "write access" at all? this means:
  8. //                   icons for thread editing. recommended to false on search queries etc.
  9. // in hightlight = array of words to highlight, from search i.e.
  10. // in post_count = (int) number of posts to display (optional; saves the count query,
  11. //                       good for search when we already have the count)
  12. //
  13. function UnbListPosts($where, $page = 1, $get = null, $order = 'Date ASC', $write = true, $highlight = false, $post_count = false)
  14. {
  15.     global $ABBC, $UNB, $UNB_T;
  16.     $TP =& $UNB['TP'];
  17.  
  18.     UnbRequireTxt('post');
  19.  
  20.     // Clean parameters
  21.     $page = intval($page);
  22.  
  23.     $posts_per_page = intval(rc('posts_per_page'));
  24.     $writeaccess = false;
  25.  
  26.     if (is_int($where))
  27.     {
  28.         $threadid = $where;
  29.         $where = 'Thread=' . $where;
  30.         $show_thread = false;
  31.     }
  32.     elseif (is_string($where))
  33.     {
  34.         $threadid = -1;
  35.         $show_thread = true;   // is a string -> is a WHERE definition (over all Threads) -> display Post's Thread
  36.     }
  37.     else
  38.     {
  39.         return false;   // input type not supported

1 mal in der Zeile 932:

  1. // ---------- Page selection ----------
  2.     if (!$post_count)
  3.         $post_count = $post->Count($where);
  4.     $params = array(
  5.         'id' => $threadid,
  6.         'nocount' => true);
  7.     if (isset($get)) $params = array_merge($params, $get);
  8.     $params = array_merge($params, array('##' => 'postlist'));
  9.     $TP['postlistPages'] = UnbPageSelection($post_count, $posts_per_page, $page, $params);
  10.  
  11.     if ($threadid > 0)
  12.     {
  13.         UnbSetRelLink('up', UnbLink('@main', 'id=' . $thread->GetForum()));
  14.     }

1 mal jeweils in den Zeilen 1115, 1117, 1118 und 1235:

  1.    // -------------------- POSTS --------------------
  2.     $count = 0;
  3.     $start_num = 0;
  4.     $lastdate = 0;
  5.     $lastread = 0;
  6.     $lastpostid = 0;
  7.     $show_edit_warning = 0;
  8.     if ($posts_per_page)
  9.     {
  10.         $start_num = ($page - 1) * $posts_per_page;
  11.         $limit = $start_num . ',' . ($posts_per_page + 1);
  12.     }
  13.     else
  14.         $limit = '';
  15.     $TP['postlist'] = array();
  16.     if ($post->Find($where, $order, $limit))
  17.     {
  18.         $show_readline = false;
  19.  
  20.         if ($UNB['LoginUserID'] > 0 && $threadid > 0)
  21.         {
  22.             // what have I read last?
  23.             $lastread = intval($UNB['Db']->FastQuery1st('ThreadWatch', 'LastRead', 'Thread=' . $threadid . ' AND User=' . $UNB['LoginUserID']));
  24.  
  25.             // have already read posts been edited after I read them?
  26.             $post2 = new IPost;
  27.             $show_edit_warning = $post2->Count('Thread = ' . $threadid . ' AND Date <= ' . $lastread . ' AND EditDate > ' . $lastread . ' AND EditUser <> ' . $UNB['LoginUserID']);
  28.         }
  29.  
  30.         $replyIdMap = array();
  31.  
  32.         do
  33.         {
  34.             if (!UnbCheckRights('viewforum', $thread->GetForum())) continue;
  35.  
  36.             $tpitem = array();
  37.             $tpitem['num'] = $count + 1;
  38.             $tpitem['numAll'] = $start_num + $count + 1;
  39.             $lastpostid = $post->GetID();
  40.  
  41.             // TODO,FIXME: This only works to reference posts on the same page
  42.             // Remember each post's count number in this thread
  43.             $replyIdMap[$post->GetID()] = $tpitem['numAll'];
  44.             // Map the current post's replyToId to the remembered count number
  45.             $replyToId = $post->GetReplyTo();
  46.             if ($replyToId)
  47.             {
  48.                 $tpitem['replyToNum'] = $replyIdMap[$replyToId];
  49.                 if (!$tpitem['replyToNum']) $tpitem['replyToNum'] = 'ID ' . $replyToId;
  50.             }
  51.             // Don't show the replyTo post number if it's the previous one
  52.             if ($tpitem['replyToNum'] == $tpitem['numAll'] - 1) $tpitem['replyToNum'] = 0;
  53.             if (is_numeric($tpitem['replyToNum']) && $tpitem['replyToNum'] > 0)
  54.                 $tpitem['replyToNum'] = '#' . $tpitem['replyToNum'];
  55.  
  56.             if ($show_thread)
  57.             {
  58.                 $thread->Load($post->GetThread());
  59.             }
  60.  
  61.             if ($count)
  62.             {
  63.                 if ($show_readline) $tpitem['readLine'] = true;
  64.                 if ($show_edit_warning && $show_readline) $tpitem['editWarning'] = $show_edit_warning;
  65.                 if ($show_readline) $show_edit_warning = 0;   // warning has been displayed
  66.             }
  67.             $show_readline = false;
  68.  
  69.             $lastdate = $post->GetDate();
  70.             UnbShowPost(
  71.                 $tpitem,
  72.                 $post,
  73.                 $thread,
  74.                 $count % 2,
  75.                 $page,
  76.                 $writeaccess && $write,
  77.                 false,
  78.                 $show_thread,
  79.                 $threadid > 0 &&                          // we are in a thread at all
  80.                     $post->GetDate() <= $lastread &&      // post is from before last read
  81.                     $post->GetEditDate() > $lastread && $post->GetEditUser() != $UNB['LoginUserID'],
  82.                                                           // post was edited after last read by another user
  83.                 $highlight);                              // words to highlight
  84.  
  85.             $thispostdate = $post->GetDate();
  86.             $found_next = $post->FindNext();
  87.             if ($found_next) $nextpostdate = $post->GetDate();
  88.             else             $nextpostdate = 0;
  89.  
  90.             if ($threadid > 0)
  91.             {
  92.                 // The following information is thread related, so don't show it for search results...
  93.  
  94.                 if (UnbCheckRights('is_admin') && $UNB['LoginUser']->GetFlags() & UNB_USER_USERREADPOST)
  95.                 {
  96.                     // who has read until here?
  97.                     $record = $UNB['Db']->FastQuery(
  98.                         /*table*/ array(
  99.                             array('', 'ThreadWatch', 'tw', ''),
  100.                             array('', 'Users', 'u', '')),
  101.                         /*fields*/ 'u.Name, tw.LastRead',
  102.                         /*where*/ 'tw.Thread = ' . $threadid . ' ' .
  103.                             'AND tw.LastRead >= ' . $thispostdate . ' ' .
  104.                             ($nextpostdate ? 'AND tw.LastRead < ' . $nextpostdate . ' ' : '') .
  105.                             'AND tw.User = u.ID',
  106.                         /*order*/ 'Name');
  107.  
  108.                     $i = 0;
  109.                     $tpitem['usersRead'] = '';
  110.                     if ($record) do
  111.                     {
  112.                         $tpitem['usersRead'] .= ($i ? ', ' : '') .
  113.                             '<span title="' . t2h(strip_tags(UnbFriendlyDate($record[1], 1, 3))) . '">' . t2h($record[0]) . '</span>';
  114.                         $i++;
  115.                     }
  116.                     while ($record = $UNB['Db']->GetRecord());
  117.                 }
  118.  
  119.                 if ($lastread)
  120.                 {
  121.                     // have I read until here?
  122.                     $show_readline = ($lastread >= $thispostdate) && ($lastread < $nextpostdate);
  123.                 }
  124.             }
  125.             $count++;
  126.             $TP['postlist'][] = $tpitem;
  127.         }
  128.         while ($found_next && $count < $posts_per_page);
  129.     }
  130.     if ($count > 0)
  131.     {
  132.         $TP['postlist'][0]['firstitem'] = true;
  133.         $TP['postlist'][$count - 1]['lastitem'] = true;
  134.     }
  135.  
  136.     if ($show_edit_warning)
  137.     {
  138.         // Recalculate this setting because we have to check it for an ending timespan now, too
  139.         // Change to above: (Date <= $lastdate) instead of (Date <= $lastread)
  140.         //                  The edited post must be on this page or before!
  141.         $show_edit_warning = $post2->Count('Thread = ' . $threadid . ' AND Date <= ' . $lastdate . ' AND EditDate > ' . $lastread . ' AND EditUser <> ' . $UNB['LoginUserID']);
  142.  
  143.         if /*still*/ ($show_edit_warning)
  144.         {
  145.             // previous post has been edited; and warning has not been displayed yet
  146.             $TP['postlistEditWarning'] = $show_edit_warning;
  147.         }
  148.     }

Fortsetzung siehe Beitrag darunter !
Eigenes Unterforum mit Moderationsrechten und eigene Homepage im Forum erstellen – www.forumtreff.de.tt
This post was edited on 2006-12-14, 12:04 by dieweltist.
Avatar
dieweltist #9
User title: Prediger des Irrsinns
Member since Sep 2006 · 291 posts · Location: Thüringen / Deutschland
Group memberships: Members
Show profile · Link to this post
In der Datei unb_lib\cp.inc.php in der Zeile 1177:

  1. # ----- board appearance -----
  2.  
  3.     if (isset($_POST['Design']))
  4.         $UNB['ConfigFile']['design'] = $_POST['Design'];
  5.     if (isset($_POST['SmileSet']))
  6.         $UNB['ConfigFile']['smileset'] = $_POST['SmileSet'];
  7.  
  8.     if (isset($_POST['SetLoginTop']))
  9.         $UNB['ConfigFile']['login_top'] = $_POST['LoginTop'] ? 1 : 0;
  10.     if (isset($_POST['SetShowOnlineUsers']))
  11.         $UNB['ConfigFile']['show_online_users'] = $_POST['ShowOnlineUsers'] ? 1 : 0;
  12.     if (isset($_POST['SetFootDbTime']))
  13.         $UNB['ConfigFile']['foot_db_time'] = $_POST['FootDbTime'] ? 1 : 0;
  14.     if (isset($_POST['GZip']))
  15.         $UNB['ConfigFile']['gzip'] = $_POST['GZip'];
  16.     if (isset($_POST['SetModRewriteUrls']))
  17.         $UNB['ConfigFile']['mod_rewrite_urls'] = $_POST['ModRewriteUrls'] ? 1 : 0;
  18.     if (isset($_POST['SetShowGotoForum']))
  19.         $UNB['ConfigFile']['show_goto_forum'] = $_POST['ShowGotoForum'] ? 1 : 0;
  20.     if (isset($_POST['SetShowSearchForum']))
  21.         $UNB['ConfigFile']['show_search_forum'] = $_POST['ShowSearchForum'] ? 1 : 0;
  22.     if (isset($_POST['SetEnableTraceUsers']))
  23.         $UNB['ConfigFile']['enable_trace_users'] = $_POST['EnableTraceUsers'] ? 1 : 0;
  24.     if (isset($_POST['SetPostPreviewSendButton']))
  25.         $UNB['ConfigFile']['post_preview_send_button'] = $_POST['PostPreviewSendButton'] ? 1 : 0;
  26.     if (isset($_POST['SetShowLastVisitTime']))
  27.         $UNB['ConfigFile']['show_last_visit_time'] = $_POST['ShowLastVisitTime'] ? 1 : 0;
  28.     if (isset($_POST['ForumsTreeStyle']))
  29.         $UNB['ConfigFile']['forums_tree_style'] = $_POST['ForumsTreeStyle'];
  30.     if (isset($_POST['SetDisplayForumLastpostRe']))
  31.         $UNB['ConfigFile']['display_forum_lastpost_re'] = $_POST['DisplayForumLastpostRe'] ? 1 : 0;
  32.     if (isset($_POST['SetShowBirthdays']))
  33.         $UNB['ConfigFile']['show_birthdays'] = $_POST['ShowBirthdays'] ? 1 : 0;
  34.     if (isset($_POST['SetDisableSearchHighlighting']))
  35.         $UNB['ConfigFile']['disable_search_highlighting'] = $_POST['DisableSearchHighlighting'] ? 1 : 0;
  36.     if (isset($_POST['SetShowForumRssLink']))
  37.         $UNB['ConfigFile']['show_forum_rss_link'] = $_POST['ShowForumRssLink'] ? 1 : 0;
  38.     if (isset($_POST['LocationLink']))
  39.         $UNB['ConfigFile']['location_link'] = $_POST['LocationLink'];
  40.     if (isset($_POST['ExtraNames']))
  41.     {
  42.         $n = sizeof(explode('|', $_POST['ExtraNames']));
  43.         if ($n > 10)
  44.         {
  45.             $error .= $UNB_T['cp.error.too many extra fields'] . '<br />';
  46.         }
  47.         elseif (!UnbSetProfileExtraDBCols($n))
  48.         {
  49.             $error .= $UNB_T['cp.error.db setextracols'] . t2h($UNB['Db']->LastError()) . '<br />';
  50.         }
  51.         else
  52.         {
  53.             $l = array_map('trim', explode('|', $_POST['ExtraNames']));
  54.             $UNB['ConfigFile']['extra_names'] = join(' | ', $l);
  55.         }
  56.     }
  57.  
  58.     if (isset($_POST['ThreadsPerPage']))
  59.         $UNB['ConfigFile']['threads_per_page'] = intval($_POST['ThreadsPerPage']);
  60.     if (isset($_POST['PostsPerPage']))
  61.         $UNB['ConfigFile']['posts_per_page'] = intval($_POST['PostsPerPage']);
  62.     if (isset($_POST['UsersPerPage']))
  63.         $UNB['ConfigFile']['users_per_page'] = intval($_POST['UsersPerPage']);
  64.     if (isset($_POST['HotThreadsPosts']))
  65.         $UNB['ConfigFile']['hot_thread_posts'] = intval($_POST['HotThreadsPosts']);
  66.     if (isset($_POST['HotThreadsViews']))
  67.         $UNB['ConfigFile']['hot_thread_views'] = intval($_POST['HotThreadsViews']);
  68.  
  69.     if (isset($_POST['SetNewTopicLinkInThread']))
  70.         $UNB['ConfigFile']['new_topic_link_in_thread'] = $_POST['NewTopicLinkInThread'] ? 1 : 0;
  71.     if (isset($_POST['PostAttachInlineMaxsize']))
  72.         $UNB['ConfigFile']['post_attach_inline_maxsize'] = intval($_POST['PostAttachInlineMaxsize']);
  73.     if (isset($_POST['PostAttachInlineMaxwidth']))
  74.         $UNB['ConfigFile']['post_attach_inline_maxwidth'] = intval($_POST['PostAttachInlineMaxwidth']);
  75.     if (isset($_POST['PostAttachInlineMaxheight']))
  76.         $UNB['ConfigFile']['post_attach_inline_maxheight'] = intval($_POST['PostAttachInlineMaxheight']);
  77.     if (isset($_POST['SetPostShowTextlength']))
  78.         $UNB['ConfigFile']['post_show_textlength'] = $_POST['PostShowTextlength'] ? 1 : 0;
  79.     if (isset($_POST['MaxPollOptions']))
  80.         $UNB['ConfigFile']['max_poll_options'] = intval($_POST['MaxPollOptions']);
  81.  
  82.     if (isset($_POST['SetOwnPostsInThreadlist']))
  83.         $UNB['ConfigFile']['own_posts_in_threadlist'] = $_POST['OwnPostsInThreadlist'] ? 1 : 0;
  84.     if (isset($_POST['SetShowBookmarkedThread']))
  85.         $UNB['ConfigFile']['show_bookmarked_thread'] = $_POST['ShowBookmarkedThread'] ? 1 : 0;
  86.     if (isset($_POST['SetDisplayThreadStartdate']))
  87.         $UNB['ConfigFile']['display_thread_startdate'] = $_POST['DisplayThreadStartdate'] ? 1 : 0;
  88.     if (isset($_POST['SetAdvancedThreadCounter']))
  89.         $UNB['ConfigFile']['advanced_thread_counter'] = $_POST['AdvancedThreadCounter'] ? 1 : 0;
  90.     if (isset($_POST['SetCountThreadViews']))
  91.         $UNB['ConfigFile']['count_thread_views'] = $_POST['CountThreadViews'] ? 1 : 0;
  92.     if (isset($_POST['SetDisplayThreadLastposter']))
  93.         $UNB['ConfigFile']['display_thread_lastposter'] = $_POST['DisplayThreadLastposter'] ? 1 : 0;
  94.     if (isset($_POST['SetCountForumThreadsPosts']))
  95.         $UNB['ConfigFile']['count_forum_threads_posts'] = $_POST['CountForumThreadsPosts'] ? 1 : 0;
  96.     if (isset($_POST['SetDisplayForumLastpost']))
  97.         $UNB['ConfigFile']['display_forum_lastpost'] = $_POST['DisplayForumLastpost'] ? 1 : 0;
  98.  
  99.     if (isset($_POST['SetUlistRegdate']))
  100.         $UNB['ConfigFile']['ulist_regdate'] = $_POST['UlistRegdate'] ? 1 : 0;
  101.     if (isset($_POST['SetUlistLocation']))
  102.         $UNB['ConfigFile']['ulist_location'] = $_POST['UlistLocation'] ? 1 : 0;
  103.     if (isset($_POST['SetUlistPosts']))
  104.         $UNB['ConfigFile']['ulist_posts'] = $_POST['UlistPosts'] ? 1 : 0;
  105.     if (isset($_POST['SetUlistLastpost']))
  106.         $UNB['ConfigFile']['ulist_lastpost'] = $_POST['UlistLastpost'] ? 1 : 0;
  107.  
  108.     if (isset($_POST['PollCurrentDays']))
  109.         $UNB['ConfigFile']['poll_current_days'] = intval($_POST['PollCurrentDays']);
  110.     if (isset($_POST['QuoteWithDate']))
  111.         $UNB['ConfigFile']['quote_with_date'] = intval($_POST['QuoteWithDate']);
  112.     if (isset($_POST['NoEditNoteGraceTime']))
  113.         $UNB['ConfigFile']['no_edit_note_grace_time'] = intval($_POST['NoEditNoteGraceTime']);
  114.     if (isset($_POST['MovedThreadNoteTimeout']))
  115.         $UNB['ConfigFile']['moved_thread_note_timeout'] = intval($_POST['MovedThreadNoteTimeout']);
  116.     if (isset($_POST['OnlineUsersReloadInterval']))
  117.         $UNB['ConfigFile']['online_users_reload_interval'] = intval($_POST['OnlineUsersReloadInterval']);
  118.     if (isset($_POST['UserOnlineTimeout']))
  119.         $UNB['ConfigFile']['user_online_timeout'] = intval($_POST['UserOnlineTimeout']);

Fortsetzung siehe Beitrag darunter !
Eigenes Unterforum mit Moderationsrechten und eigene Homepage im Forum erstellen – www.forumtreff.de.tt
Avatar
dieweltist #10
User title: Prediger des Irrsinns
Member since Sep 2006 · 291 posts · Location: Thüringen / Deutschland
Group memberships: Members
Show profile · Link to this post
Und in der Zeile 2728:

  1. // -- general --
  2.         $TP['controlpanelLoginTop'] = $p ? t2i($_POST['LoginTop']) : t2i(rc('login_top'));
  3.         $TP['controlpanelShowOnlineUsers'] = $p ? t2i($_POST['ShowOnlineUsers']) : t2i(rc('show_online_users'));
  4.         $TP['controlpanelFootDbTime'] = $p ? t2i($_POST['FootDbTime']) : t2i(rc('foot_db_time'));
  5.         $TP['controlpanelGZip'] = $p ? t2i($_POST['GZip']) : t2i(rc('gzip'));   # on|off|auto
  6.         $TP['controlpanelModRewriteUrls'] = $p ? t2i($_POST['ModRewriteUrls']) : t2i(rc('mod_rewrite_urls'));
  7.         $TP['controlpanelShowGotoForum'] = $p ? t2i($_POST['ShowGotoForum']) : t2i(rc('show_goto_forum'));
  8.         $TP['controlpanelShowSearchForum'] = $p ? t2i($_POST['ShowSearchForum']) : t2i(rc('show_search_forum'));
  9.         $TP['controlpanelEnableTraceUsers'] = $p ? t2i($_POST['EnableTraceUsers']) : t2i(rc('enable_trace_users'));
  10.         $TP['controlpanelPostPreviewSendButton'] = $p ? t2i($_POST['PostPreviewSendButton']) : t2i(rc('post_preview_send_button'));
  11.         $TP['controlpanelShowLastVisitTime'] = $p ? t2i($_POST['ShowLastVisitTime']) : t2i(rc('show_last_visit_time'));
  12.         $TP['controlpanelDisplayForumLastpostRe'] = $p ? t2i($_POST['DisplayForumLastpostRe']) : t2i(rc('display_forum_lastpost_re'));
  13.         $TP['controlpanelShowBirthdays'] = $p ? t2i($_POST['ShowBirthdays']) : t2i(rc('show_birthdays'));
  14.         $TP['controlpanelDisableSearchHighlighting'] = $p ? t2i($_POST['DisableSearchHighlighting']) : t2i(rc('disable_search_highlighting'));
  15.         $TP['controlpanelShowForumRssLink'] = $p ? t2i($_POST['ShowForumRssLink']) : t2i(rc('show_forum_rss_link'));
  16.         $TP['controlpanelLocationLink'] = $p ? t2i($_POST['LocationLink']) : t2i(rc('location_link'));   # text
  17.  
  18.         $TP['controlpanelThreadsPerPage'] = $p ? t2i($_POST['ThreadsPerPage']) : t2i(rc('threads_per_page'));
  19.         $TP['controlpanelPostsPerPage'] = $p ? t2i($_POST['PostsPerPage']) : t2i(rc('posts_per_page'));
  20.         $TP['controlpanelUsersPerPage'] = $p ? t2i($_POST['UsersPerPage']) : t2i(rc('users_per_page'));
  21.         $TP['controlpanelHotThreadsPosts'] = $p ? t2i($_POST['HotThreadsPosts']) : t2i(rc('hot_thread_posts'));
  22.         $TP['controlpanelHotThreadsViews'] = $p ? t2i($_POST['HotThreadsViews']) : t2i(rc('hot_thread_views'));
  23.  
  24.         $TP['controlpanelExtraNames'] = $p ? t2i($_POST['ExtraNames']) : t2i(rc('extra_names'));   # text
  25.         $TP['controlpanelExtraCount'] = sizeof(explode('|', rc('extra_names')));
  26.  
  27.         $TP['controlpanelForumsTreeStyles'] = array();
  28.         $tpitem = array();
  29.         $tpitem['name'] = 'unicode';
  30.         $tpitem['title'] = $UNB_T['cp.forum tree style.unicode'];
  31.         $tpitem['selected'] = $p && $_POST['controlpanelForumsTreeStyle'] == $tpitem['name'] || !$p && rc('forums_tree_style') == $tpitem['name'];
  32.         $TP['controlpanelForumsTreeStyles'][] = $tpitem;
  33.         $tpitem = array();
  34.         $tpitem['name'] = 'nolines';
  35.         $tpitem['title'] = $UNB_T['cp.forum tree style.nolines'];
  36.         $tpitem['selected'] = $p && $_POST['controlpanelForumsTreeStyle'] == $tpitem['name'] || !$p && rc('forums_tree_style') == $tpitem['name'];
  37.         $TP['controlpanelForumsTreeStyles'][] = $tpitem;
  38.         $tpitem = array();
  39.         $tpitem['name'] = 'dots';
  40.         $tpitem['title'] = $UNB_T['cp.forum tree style.dots'];
  41.         $tpitem['selected'] = $p && $_POST['controlpanelForumsTreeStyle'] == $tpitem['name'] || !$p && rc('forums_tree_style') == $tpitem['name'];
  42.         $TP['controlpanelForumsTreeStyles'][] = $tpitem;
  43.         $tpitem = array();
  44.         $tpitem['name'] = 'hlines';
  45.         $tpitem['title'] = $UNB_T['cp.forum tree style.hlines'];
  46.         $tpitem['selected'] = $p && $_POST['controlpanelForumsTreeStyle'] == $tpitem['name'] || !$p && rc('forums_tree_style') == $tpitem['name'];
  47.         $TP['controlpanelForumsTreeStyles'][] = $tpitem;
  48.  
  49.         // -- posts display --
  50.         $TP['controlpanelNewTopicLinkInThread'] = $p ? t2i($_POST['NewTopicLinkInThread']) : t2i(rc('new_topic_link_in_thread'));
  51.         $TP['controlpanelPostAttachInlineMaxsize'] = $p ? t2i($_POST['PostAttachInlineMaxsize']) : t2i(rc('post_attach_inline_maxsize'));
  52.         $TP['controlpanelPostAttachInlineMaxwidth'] = $p ? t2i($_POST['PostAttachInlineMaxwidth']) : t2i(rc('post_attach_inline_maxwidth'));
  53.         $TP['controlpanelPostAttachInlineMaxheight'] = $p ? t2i($_POST['PostAttachInlineMaxheight']) : t2i(rc('post_attach_inline_maxheight'));
  54.         $TP['controlpanelPostShowTextlength'] = $p ? t2i($_POST['PostShowTextlength']) : t2i(rc('post_show_textlength'));
  55.         $TP['controlpanelMaxPollOptions'] = $p ? t2i($_POST['MaxPollOptions']) : t2i(rc('max_poll_options'));
  56.  
  57.         // -- threads/forums list --
  58.         $TP['controlpanelOwnPostsInThreadlist'] = $p ? t2i($_POST['OwnPostsInThreadlist']) : t2i(rc('own_posts_in_threadlist'));
  59.         $TP['controlpanelShowBookmarkedThread'] = $p ? t2i($_POST['ShowBookmarkedThread']) : t2i(rc('show_bookmarked_thread'));
  60.         $TP['controlpanelDisplayThreadStartdate'] = $p ? t2i($_POST['DisplayThreadStartdate']) : t2i(rc('display_thread_startdate'));
  61.         $TP['controlpanelAdvancedThreadCounter'] = $p ? t2i($_POST['AdvancedThreadCounter']) : t2i(rc('advanced_thread_counter'));
  62.         $TP['controlpanelCountThreadViews'] = $p ? t2i($_POST['CountThreadViews']) : t2i(rc('count_thread_views'));
  63.         $TP['controlpanelDisplayThreadLastposter'] = $p ? t2i($_POST['DisplayThreadLastposter']) : t2i(rc('display_thread_lastposter'));
  64.         $TP['controlpanelCountForumThreadsPosts'] = $p ? t2i($_POST['CountForumThreadsPosts']) : t2i(rc('count_forum_threads_posts'));
  65.         $TP['controlpanelDisplayForumLastpost'] = $p ? t2i($_POST['DisplayForumLastpost']) : t2i(rc('display_forum_lastpost'));

In der Datei unb_lib\post.inc.php in der Zeile 584:

  1. if ($error)
  2.             {
  3.                 // obviously, the poll couldn't be created. try to roll back things...
  4.                 if (!$post->Remove())
  5.                     $error .= $UNB_T['post.error.post not deleted2'] . '<br />';
  6.             }
  7.             else
  8.             {
  9.                 // get the page our new post is on inside its thread
  10.                 $page = ceil($post->Count('Thread=' . $threadid) / rc('posts_per_page'));
  11.  
  12.                 // now is a good time to send out notifications
  13.                 if (!$newthread)
  14.                     SendWatchNotification($forum, $thread, $post, $page, trim($_POST['UserName']));
  15.                 else
  16.                 {
  17.                     $forum->Load($forumid);
  18.                     SendWatchNotification($forum, $thread, $post, $page, trim($_POST['UserName']));
  19.                 }
  20.  
  21.                 // add ThreadWatch if selected
  22.                 if (in_array(UNB_GROUP_MEMBERS, $UNB['LoginUserGroups']))   // only to validated mail addresses
  23.                 {
  24.                     $mode = $thread->IsWatched();
  25.                     if ($_POST['SetNotify'])
  26.                     {
  27.                         $mode = ($mode & ~UNB_NOTIFY_EMAIL) | ($_POST['NotifyEMail'] ? 1 : 0) * UNB_NOTIFY_EMAIL;
  28.                         if (rc('enable_jabber'))
  29.                             $mode = ($mode & ~UNB_NOTIFY_JABBER) | ($_POST['NotifyJabber'] ? 1 : 0) * UNB_NOTIFY_JABBER;
  30.                     }
  31.                     else   // use default notification if the web form said nothing about it
  32.                     {
  33.                         if (($mode & UNB_NOTIFY_MASK) == 0)
  34.                         {
  35.                             $mode |= $UNB['LoginUser']->GetDefaultNotify();
  36.                         }
  37.                     }
  38.                     $thread->SetWatched($mode, $threadid);
  39.                 }

Insgesamt 4 mal der Datei unb_lib\thread.inc.php, in den Zeilen 32, 33 und 38:

  1. // -------------------- Import request variables --------------------
  2.  
  3. $threadid = intval($_REQUEST['id']);
  4. if (isset($_GET['threadid'])) $threadid = intval($_GET['threadid']);   // for WBB1 compatibility
  5. if ($threadid < 0) $threadid = 0;
  6.  
  7. $page = intval($_REQUEST['page']);
  8. if ($page < -1 || $page == 0) $page = 1;
  9.  
  10. if (isset($_REQUEST['postid']) && $_REQUEST['postid'] > 0)
  11. {
  12.     // We only have a post ID as parameter:
  13.     // Find the right thread and page to display
  14.  
  15.     $postid = intval($_REQUEST['postid']);
  16.     $post = new IPost($postid);
  17.     $threadid = $post->GetThread();
  18.  
  19.     $posts_per_page = rc('posts_per_page');
  20.     if (!$posts_per_page)
  21.         $page = 1;
  22.     else
  23.     {
  24.         $date = $post->GetDate();
  25.         $page = ceil($post->Count('Thread=' . $threadid . ' AND Date<=' . $date) / $posts_per_page);
  26.     }
  27. }
  28.  
  29. $error = '';

Jetzt weiß ich aber auch wieder nicht weiter, weil ich an keiner Stelle einen Zusammenhang mit einem ($UNB['LoginUserID'] == 0) finden kann, bzw., wie ich da irgendwas ändern müsste. Vielleicht könntest du mir bitte an dieser Stelle weiter helfen. Die ersten Beiträge sind meines Erachtens alle falsch, weil ich nach einer falschen Zeichenfolge suchte. Die kannst Du alle diese Beiträge löschen.
Eigenes Unterforum mit Moderationsrechten und eigene Homepage im Forum erstellen – www.forumtreff.de.tt
Avatar
Yves (Administrator) #11
User title: UNB developer & webmaster
Member since Jan 2004 · 3814 posts · Location: Erlangen, Germany
Group memberships: Administrators, Members
Show profile · Link to this post
Sag mal, wie dumm muss man eigentlich sein, den gesamten Quelltext des Boards hier zu posten?! Soll ich das wieder löschen? Und wenn du keine Ahnung vom Programmieren hast, dann lass es besser bleiben.

Letzter Tipp: Die Funktion UnbListThreads sieht ganz gut aus, wieter hab ich in deinem Source Dump dann nicht mehr gelesen. Außerdem hab ich doch noch dir Funktion rc erwähnt, oder etwa nicht? Naja egal. Und das mit LoginUserID sollst du da EINFÜGEN, nicht SUCHEN. Mann mann...
♪ ...nanananah, all in all we’re just brilliant thieves, nanananah... ♪♬
Avatar
dieweltist #12
User title: Prediger des Irrsinns
Member since Sep 2006 · 291 posts · Location: Thüringen / Deutschland
Group memberships: Members
Show profile · Link to this post
Bist Du Dir sicher, dass die Funktion 'UnbListThreads' gut aussieht; weil es doch um die Auflistung von Beiträgen (Posts) je Threadseite geht ?
Eigenes Unterforum mit Moderationsrechten und eigene Homepage im Forum erstellen – www.forumtreff.de.tt
Avatar
dieweltist #13
User title: Prediger des Irrsinns
Member since Sep 2006 · 291 posts · Location: Thüringen / Deutschland
Group memberships: Members
Show profile · Link to this post
In reply to post #11
Quote by Yves on 2006-12-14, 12:56:
Soll ich das wieder löschen?

Falls es sich um die Zeichenfolge "posts_per_page" handeln sollte; und nicht, wie Du schriebst, um die Zeichenfolge "threads_per_page"; so kannst Du die Beiträge von #3 bis #6 löschen. Die anderen würde ich lassen; da können sich ggf. andere User daran orientieren, falls jemand Ähnliches vor hat.
Eigenes Unterforum mit Moderationsrechten und eigene Homepage im Forum erstellen – www.forumtreff.de.tt
Avatar
dieweltist #14
User title: Prediger des Irrsinns
Member since Sep 2006 · 291 posts · Location: Thüringen / Deutschland
Group memberships: Members
Show profile · Link to this post
Für dieses Problem habe ich inzwischen eine viel bessere Lösung gefunden, ohne dass ich den Code ändern muss.

Nach stundenlangem vor mich hingrübeln während des Spazierengehens, hatte ich die (hoffentlich) grandiose Idee, einfach das Forum mehrmals zu installieren. Danach ändere ich dann den Präfix für die Datenbank von allen Installationen, sodass alle Installationen die selben Datenbanktabellen benutzen.

Dann kann ich die Foren mit unterschiedlicher Anzahl von Beiträgen je Threadseite einstellen. Durch Änderung der Url kann dann jeder User selbst wählen, wie viele Beiträge je Seite er angezeigt bekommen will.

In Wirklichkeit werde ich dann aber noch in der .htaccess einstellen, dass wenn man auf den #nnn-Link eines Beitrages klickt, dass man dann zum anderen System wechselt. Ein System mit 16 Beiträgen je Threadseite, und das andere mit einem je Threadseite, sodass auf diese Weise auch ein einzelner Beitrag quasi als Webseite verlinkt werden kann.

Oder wer lieber auf "nächten Beitrag" klickt, anstatt zu scrollen. Auf diese Weise kann ich auch wählbar machen, welche Schriftgröße jemand haben möchte.

In meinem Fall werde ich das UNB 5 mal installieren, zwei Möglichkeiten, um die Anzahl der Beiträge zu wählen (1 oder 16) und je 2 Schriftgrößen. Die 5. Installation ist dann für Threads mit bis zu 256 Beiträgen je Threadseite mit kleiner Schrift; geignet zum Abspeichern von ganzen Threadseiten in einem Zug (quasi Datensicherung).
Eigenes Unterforum mit Moderationsrechten und eigene Homepage im Forum erstellen – www.forumtreff.de.tt
Avatar
dieweltist #15
User title: Prediger des Irrsinns
Member since Sep 2006 · 291 posts · Location: Thüringen / Deutschland
Group memberships: Members
Show profile · Link to this post
Um zu erreichen, dass man von der Installation mit den eingestellten 16 Beiträgen je Threadseite zu der mit einem Beitrag je Threadseite kommt, wäre es auch eine (bessere) Möglichkeit, dass man den Code in der Datei unb_lib/common.lib.php ändert, sodass das Forum selbst gleich die Kurzurl beim Link #nnn anzeigt, der zur anderen Installation führt. In der .htaccess bräuchte man dann natürlich nichts verändern. Siehe dazu diesen Beitrag:

Url-Shema - Unclassified NewsBoard

Falls es nicht hinscrollt zu diesem Beitrag, weil der Internet Explorer verwendet wird; die Verknüpfung mit Rechtsmausklick kopieren und in die Adresszeile des Browsers einfügen und die Eingabetaste drücken!
Eigenes Unterforum mit Moderationsrechten und eigene Homepage im Forum erstellen – www.forumtreff.de.tt
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please enter the word from the image into the text field below. (Type the letters only, lower case is okay.)
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters:
Go to forum
This board is powered by the Unclassified NewsBoard software, 20110527-dev, © 2003-2011 by Yves Goergen
Page created in 1.8 s (1.7 s) · 134 database queries in 148.7 ms
Current time: 2012-02-07, 19:14:30 (UTC +01:00)