• » webSPELL.org - Free Content Management System
  • Language switch: English German
  • login



    » lost password?   » register now
  • About webSPELL

    webSPELL is a free Content Management System which was especially developed for the needs of esport related communities. Since a short while we are also offering an optimized and enhanced webSPELL version for the special requirements of non-profit organisations. The purpose of both systems is to offer a professional and free opportunity to create and administrate your own website in an easy and optimized way.

    » Learn more about webSPELL     » Download webSPELL now!
  • Advertisement

    Follow us

  • Sort:     printview
    Author
    Message
    webSPELL user
    232 Posts
    28.12.2011, 12:49 email offline quote 

    //push finde keine Lösung unglücklich
    webSPELL user
    232 Posts
    26.12.2011, 19:27 email offline quote 

    Okay klappt alles wunderbar. Jetzt nimmt er aber alte "wichtige beiträge" die keine mehr sind immernoch in der liste auf.
    webSPELL lover
    1022 Posts
    25.12.2011, 22:02 offline quote 

    Dann setzt du vor dem include der importanttopics ein $maxlatesttopics = 3;

    Code:
    1.
    2.
    3.
    4.
    <?php
    include "latesttopics.php";
    $maxlatesttopics = 3;
    include "importanttopics.php";

    http://www.henningk.de | no support for addons etc. via PN or IM.
    webSPELL user
    232 Posts
    25.12.2011, 20:59 email offline quote 

    Lol gar nicht so dumm eigendlich, werds mal probieren lächeln

    Dann werden mir aber wie im Admin Menü eingestellt 10 Topics angezeigt, möchte aber nur 3
    webSPELL lover
    1022 Posts
    25.12.2011, 20:48 offline quote 

    Dann kopierst du dir die gesamte latesttopics.php am besten in eine neue Daten, nennst sie importanttopics, bindest sie auch in der index.php ein und fügst nach Zeile 79 ein: "AND sticky=1 "

    http://www.henningk.de | no support for addons etc. via PN or IM.
    webSPELL user
    232 Posts
    25.12.2011, 20:23 email offline quote 

    hallo HenningK, danke für deine Hilfe, leider funktioniert es nur bedingt. Er sortiert zwar, aber wenn ich das "wichtig" wieder entferne bleibt das Thema trotzdem dort wo es ist.

    Ich möchte eine weitere Spalte (über der $topiclink) im Lasttopic. Dort sollen dann nur neue als wichtig markierte Themen erscheinen.
    webSPELL lover
    1022 Posts
    25.12.2011, 19:40 offline quote 

    Ich weiß nicht, ob das immer klappt, aber versuch mal einfach in Zeile 80 nach dem "ORDER BY" ein "t.sticky DESC, " einzufügen.

    http://www.henningk.de | no support for addons etc. via PN or IM.
    webSPELL user
    232 Posts
    25.12.2011, 19:16 email offline quote 

    Hallo ich möchte gerne etwas anpassen. Unzwar:

    In meiner Lasttopic sollen "als wichtig markierte" Themen immer ganz oben fett stehen. Selbst wenn jemand irgendwo anders etwas neues schreibt soll das Wichtige Thema oben bleiben. Erst wenn ich das "als wichtig markieren" wieder entferne soll das Thema behandelt werden wie alle anderen. Ist das irgendwie möglch?

    Hier mal meine Lasttopic:
    Code:
    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.
    37.
    38.
    39.
    40.
    41.
    42.
    43.
    44.
    45.
    46.
    47.
    48.
    49.
    50.
    51.
    52.
    53.
    54.
    55.
    56.
    57.
    58.
    59.
    60.
    61.
    62.
    63.
    64.
    65.
    66.
    67.
    68.
    69.
    70.
    71.
    72.
    73.
    74.
    75.
    76.
    77.
    78.
    79.
    80.
    81.
    82.
    83.
    84.
    85.
    86.
    87.
    88.
    89.
    90.
    91.
    92.
    93.
    94.
    95.
    96.
    97.
    98.
    99.
    100.
    101.
    102.
    103.
    104.
    105.
    106.
    107.
    108.
    109.
    110.
    111.
    112.
    113.
    114.
    115.
    116.
    117.
    118.
    119.
    120.
    121.
    122.
    123.
    124.
    125.
    126.
    127.
    128.
    129.
    130.
    131.
    132.
    133.
    134.
    135.
    136.
    137.
    138.
    <?php
    /*
    ##########################################################################
    #                                                                        #
    #           Version 4       /                        /   /               #
    #          -----------__---/__---__------__----__---/---/-               #
    #           | /| /  /___) /   ) (_ `   /   ) /___) /   /                 #
    #          _|/_|/__(___ _(___/_(__)___/___/_(___ _/___/___               #
    #                       Free Content / Management System                 #
    #                                   /                                    #
    #                                                                        #
    #                                                                        #
    #   Copyright 2005-2010 by webspell.org                                  #
    #                                                                        #
    #   visit webSPELL.org, webspell.info to get webSPELL for free           #
    #   - Script runs under the GNU GENERAL PUBLIC LICENSE                   #
    #   - It's NOT allowed to remove this copyright-tag                      #
    #   -- http://www.fsf.org/licensing/licenses/gpl.html                    #
    #                                                                        #
    #   Code based on WebSPELL Clanpackage (Michael Gruber - webspell.at),   #
    #   Far Development by Development Team - webspell.org                   #
    #                                                                        #
    #   visit webspell.org                                                   #
    #                                                                        #
    ##########################################################################
    */
    if (isset($site)) $_language->read_module('latesttopics');
    $usergroups = array();
    if($loggedin){
         $usergroups[] = 'user';
         $get = safe_query("SELECT * FROM ".PREFIX."user_forum_groups WHERE userID='".$userID."'");
         $data = mysql_fetch_row($get);
         for($i=2; $i<count($data);$i++){
              if($data[$i] == 1){
                   $info = mysql_fetch_field($get,$i);
                   $usergroups[] = $info->name;
              }
         }
    }
    $userallowedreadgrps = array();
    $userallowedreadgrps['boardIDs'] = array();
    $userallowedreadgrps['catIDs'] = array();
    $get = safe_query("SELECT boardID FROM ".PREFIX."forum_boards WHERE readgrps = ''");
    while($ds = mysql_fetch_assoc($get)){
         $userallowedreadgrps['boardIDs'][] = $ds['boardID'];
    }
    $get = safe_query("SELECT catID FROM ".PREFIX."forum_categories WHERE readgrps = ''");
    while($ds = mysql_fetch_assoc($get)){
         $userallowedreadgrps['catIDs'][] = $ds['catID'];
    }
    if($loggedin){
         $get = safe_query("SELECT boardID, readgrps FROM ".PREFIX."forum_boards WHERE readgrps != ''");
         while($ds = mysql_fetch_assoc($get)){
              $groups = explode(";",$ds['readgrps']);
              $allowed = array_intersect($groups,$usergroups);
              if(!count($allowed)) continue;
              $userallowedreadgrps['boardIDs'][] = $ds['boardID'];
         }
         $get = safe_query("SELECT catID, readgrps FROM ".PREFIX."forum_categories WHERE readgrps != ''");
         while($ds = mysql_fetch_assoc($get)){
              $groups = explode(";",$ds['readgrps']);
              $allowed = array_intersect($groups,$usergroups);
              if(!count($allowed)) continue;
              $userallowedreadgrps['catIDs'][] = $ds['catID'];
         }
    }
    if(empty($userallowedreadgrps['catIDs'])){
         $userallowedreadgrps['catIDs'][] = 0;
    }
    if(empty($userallowedreadgrps['boardIDs'])){
         $userallowedreadgrps['boardIDs'][] = 0;
    }
    $ergebnis=safe_query("SELECT t.*, u.nickname, b.name
                                  FROM ".PREFIX."forum_topics t 
                           LEFT JOIN ".PREFIX."user u ON u.userID = t.lastposter
                           LEFT JOIN ".PREFIX."forum_boards b ON b.boardID = t.boardID
                                WHERE b.category IN (".implode(",",$userallowedreadgrps['catIDs']).") AND 
                                           t.boardID IN (".implode(",",$userallowedreadgrps['boardIDs']).") AND 
                                          t.moveID = '0'
                             ORDER BY t.lastdate DESC 
                                LIMIT 0,".$maxlatesttopics);
    $anz=mysql_num_rows($ergebnis);
    if($anz) {
         eval ("\$latesttopics_head = \"".gettemplate("latesttopics_head")."\";");
         echo $latesttopics_head;
         $n=1;
         while($ds=mysql_fetch_array($ergebnis)) {
              if($ds['readgrps'] != "") {
                   $usergrps = explode(";", $ds['readgrps']);
                   $usergrp = 0;
                   foreach($usergrps as $value) {
                        if(isinusergrp($value, $userID)) {
                             $usergrp = 1;
                             break;
                        }
                   }
                   if(!$usergrp and !ismoderator($userID, $ds['boardID'])) continue;
              }
              if($n%2) {
                   $bg1=BG_1;
                   $bg2=BG_2;
              }
              else {
                   $bg1=BG_3;
                   $bg2=BG_4;
              }
        
              $topictitle_full = clearfromtags($ds['topic']);
              $topictitle     = unhtmlspecialchars($topictitle_full);
              if(mb_strlen($topictitle)>$maxlatesttopicchars) {
                   $topictitle=mb_substr($topictitle, 0, $maxlatesttopicchars);
                   $topictitle.='...';
              }
              $topictitle = htmlspecialchars($topictitle);
        
              $last_poster = $ds['nickname'];
              $board = $ds['name'];
              $date = date('d.m.Y - H:i', $ds['lastdate']);
              $small_date     = date('d.m H:i', $ds['lastdate']);

              $latesticon     =     '<img src="images/icons/'.$ds['icon'].'" width="15" height="15" alt="" />';
              $boardlink     =     '<a href="index.php?site=forum&amp;board='.$ds['boardID'].'">'.$board.'</a>';
              $topiclink     =     '<a href="index.php?site=forum_topic&amp;topic='.$ds['topicID'].'&amp;type=ASC&amp;page='.ceil(($ds['replys']+1)/$maxposts).'" onmouseover="showWMTT(\'latesttopics_'.$n.'\')" onmouseout="hideWMTT()">'.$topictitle.'</a>';
              $replys               =     $ds['replys'];
              
              $replys_text = ($replys == 1) ? $_language->module['reply'] : $_language->module['replies'];
              
              eval ("\$latesttopics_content = \"".gettemplate("latesttopics_content")."\";");
              echo $latesttopics_content;
              $n++;
         }
         eval ("\$latesttopics_foot = \"".gettemplate("latesttopics_foot")."\";");
         echo $latesttopics_foot;
    }

    unset($board);

    ?>


    webspell 4.2.2a
    www.apb-clan.com
    Sort:     printview


    To start or to reply to a topic you have to be registered and logged in!

    register now
    login
  • » Support

    » Topics
    19.05.2013 - 10:48 - 2 Replies
    » [S] Tester für neuen Foru...
    [S] Tester für neuen ForumMod
    Last post: Argu
    Board: DE - Anfragen
    19.05.2013 - 10:48
    19.05.2013 - 03:55 - 8 Replies
    » Mein Forum
    Mein Forum
    Last post: Lordy4007
    Board: DE - Fragen zur Seite
    19.05.2013 - 03:55
    18.05.2013 - 19:58 - 36 Replies
    » Exklusiv Webseite zur Mie...
    Exklusiv Webseite zur Miete
    Last post: liQweb
    Board: DE - Biete
    18.05.2013 - 19:58
    18.05.2013 - 16:29 - 2 Replies
    » forum anzeige erweitern
    forum anzeige erweitern
    Last post: Swordfish3000
    Board: DE - Allgemeiner Support
    18.05.2013 - 16:29
    18.05.2013 - 12:21 - 1 Replies
    » Query failed
    Query failed
    Last post: LoRd
    Board: DE - Allgemeiner Support
    18.05.2013 - 12:21
    18.05.2013 - 09:36 - 3 Replies
    » benötige hilfe bei paar k...
    benötige hilfe bei paar kleinigkeiten
    Last post: immostar
    Board: DE - Technischer Support
    18.05.2013 - 09:36
    18.05.2013 - 03:33 - 4 Replies
    » [SELL] Gaming Website
    [SELL] Gaming Website
    Last post: hornyst
    Board: EN - Offers
    18.05.2013 - 03:33
    18.05.2013 - 00:32 - 6 Replies
    » Hide BBCODE Echo
    Hide BBCODE Echo
    Last post: dado2106
    Board: EN - Technical support
    18.05.2013 - 00:32
    17.05.2013 - 21:42 - 0 Replies
    » website help
    website help
    Last post: envy0024
    Board: EN - Technical support
    17.05.2013 - 21:42
    17.05.2013 - 21:03 - 1 Replies
    » Need Coder!
    Need Coder!
    Last post: iG.ShAdOw
    Board: EN - Requests
    17.05.2013 - 21:03
    17.05.2013 - 20:44 - 9 Replies
    » Query failed!
    Query failed!
    Last post: LoRd
    Board: DE - Allgemeiner Support
    17.05.2013 - 20:44
    17.05.2013 - 18:08 - 0 Replies
    » [4 SALE] Layouts (Gaming,...
    [4 SALE] Layouts (Gaming, Portfolio and more)
    Last post: Freestyler92
    Board: EN - Offers
    17.05.2013 - 18:08
    17.05.2013 - 18:06 - 0 Replies
    » Design Ausverkauf - alles...
    Design Ausverkauf - alles unter 70€
    Last post: Freestyler92
    Board: DE - Biete
    17.05.2013 - 18:06
    17.05.2013 - 10:56 - 6 Replies
    » [Biete] Template Designs
    [Biete] Template Designs
    Last post: Marceld
    Board: DE - Biete
    17.05.2013 - 10:56
    17.05.2013 - 10:41 - 7 Replies
    » register captcha
    register captcha
    Last post: nappel.ger
    Board: DE - Allgemeiner Support
    17.05.2013 - 10:41
    17.05.2013 - 09:56 - 3 Replies
    » Suche Designer GGL:Geld
    Suche Designer GGL:Geld
    Last post: Freestyler92
    Board: DE - Suche
    17.05.2013 - 09:56
    17.05.2013 - 00:13 - 0 Replies
    » News
    News
    Last post: dado2106
    Board: EN - Modifications
    17.05.2013 - 00:13
    16.05.2013 - 15:04 - 2 Replies
    » [V] mehrere Webspell Temp...
    [V] mehrere Webspell Templates und Designs
    Last post: Dynamic-Webmedia
    Board: DE - Biete
    16.05.2013 - 15:04
    16.05.2013 - 13:09 - 2 Replies
    » Content laden
    Content laden
    Last post: Helgon
    Board: DE - Anfragen
    16.05.2013 - 13:09
    16.05.2013 - 13:07 - 18 Replies
    » [B] Web, Print und Logode...
    [B] Web, Print und Logodesign
    Last post: Helgon
    Board: DE - Suche
    16.05.2013 - 13:07
    » Partners
    Bilderkiste.org Image Hosting
    k3rmit.org
    PascalMh.de


    » Blog
    28.03.2013 - derchris
    » Those damn spammers