• » 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 newbie
    69 Posts
    26.04.2012, 01:35 email offline quote 

    Folgendes, ich brauche diesen code in 2 verschiendene sc_ datein, so das ich diese includen kann.

    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.
    function top5() {
         $pagebg=PAGEBG;
         $border=BORDER;
         $bghead=BGHEAD;
         $bgcat=BGCAT;

         global $_language;

         $_language->read_module('articles');

         echo'<table cellspacing="0" cellpadding="0" width="100%"><tr><td align="center"><div class="top_5"><table border="0" cellspacing="0" cellpadding="0" width="100%">
        <tr>
          <td width="49%" valign="top">';
     if(empty($_GET['rubricID']))     $rub=""; else $rub="and rubricID='".$_GET['rubricID']."'";
         // RATING
         $ergebnis=safe_query("SELECT * FROM ".PREFIX."articles WHERE saved='1' $rub  ORDER BY rating DESC LIMIT 0,5");
         $top=$_language->module['top5_rating'];
         
      eval ("\$top5_head = \"".gettemplate("top5_head")."\";");
      echo $top5_head;
         
      $n=1;
         while($ds=mysql_fetch_array($ergebnis)) {
              if($n%2) {
                   $bg1=BG_1;
                   $bg2=BG_2;
              }
              else {
                   $bg1=BG_3;
                   $bg2=BG_4;
              }

              $title='<a href="index.php?site=articles&amp;action=show&amp;articlesID='.$ds['articlesID'].'">'.clearfromtags($ds['title']).'</a>';
              $poster='<a href="index.php?site=profile&amp;id='.$ds['poster'].'">'.getnickname($ds['poster']).'</a>';
              $viewed='('.$ds['viewed'].')';
              $ratings=array(0,0,0,0,0,0,0,0,0,0);
              for($i=0; $i<$ds['rating']; $i++) {
                   $ratings[$i]=1;
              }
              $ratingpic='<img src="images/icons/rating_'.$ratings[0].'_start.gif" width="1" height="5" alt="" />';
              foreach($ratings as $pic) {
                   $ratingpic.='<img src="images/icons/rating_'.$pic.'.gif" width="4" height="5" alt="" />';
              }
              
        echo'<tr>
            <td align="center"><b>'.$n.'.</b></td>
            <td align="center" style="white-space:nowrap;">'.$ratingpic.'</td>
            <td>'.$title.'</td>
          </tr>';

              unset($ratingpic);
              $n++;
         }
         
      echo'</table>';
         echo'</td><td width="49%" valign="top">';
      
         // POINTS
         $ergebnis=safe_query("SELECT * FROM ".PREFIX."articles WHERE saved='1' $rub ORDER BY points DESC LIMIT 0,5");
         $top=$_language->module['top5_points'];
         
      eval ("\$top5_head = \"".gettemplate("top5_head")."\";");
         echo $top5_head;
      
         $n=1;
         while($ds=mysql_fetch_array($ergebnis)) {
        if($n%2) {
                   $bg1=BG_1;
                   $bg2=BG_2;
              }
              else {
                   $bg1=BG_3;
                   $bg2=BG_4;
              }
        
              $title='<a href="index.php?site=articles&amp;action=show&amp;articlesID='.$ds['articlesID'].'">'.clearfromtags($ds['title']).'</a>';
              $viewed='('.$ds['viewed'].')';
              echo'<tr>
            <td align="center"><b>'.$n.'.</b></td>
            <td align="center">'.$ds['points'].'</td>
            <td>'.$title.'</td>
          </tr>';
          
              $n++;
         }
         echo'</table></td></tr></table></div></td></tr></table>';
    }



    Einmal sc_top5_rating.php und sc_top5_points.php

    so das ich den code der aktuell in der articles.php ist, entfernen kann.

    Ich selbst habs schon versucht, nur haut es irgendwie nicht hin mit der datenbank.

    website: www.sr-esports.de/
    version: 4.2.3
    Sort:     printview


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

    register now
    login
  • » Support

    » Topics
    21.05.2013 - 21:06 - 0 Replies
    » msql datenbank transfer
    msql datenbank transfer
    Last post: nappel.ger
    Board: DE - Technischer Support
    21.05.2013 - 21:06
    21.05.2013 - 20:12 - 3 Replies
    » When the update?
    When the update?
    Last post: Argu
    Board: EN - General
    21.05.2013 - 20:12
    21.05.2013 - 19:43 - 9 Replies
    » login startseite
    login startseite
    Last post: Argu
    Board: DE - Technischer Support
    21.05.2013 - 19:43
    21.05.2013 - 13:18 - 7 Replies
    » [Biete] Template Designs
    [Biete] Template Designs
    Last post: Marceld
    Board: DE - Biete
    21.05.2013 - 13:18
    21.05.2013 - 12:33 - 4 Replies
    » forum anzeige erweitern
    forum anzeige erweitern
    Last post: [Fabian]
    Board: DE - Allgemeiner Support
    21.05.2013 - 12:33
    21.05.2013 - 05:15 - 0 Replies
    » Need Designer for Logo/Te...
    Need Designer for Logo/Template
    Last post: Kody
    Board: EN - General
    21.05.2013 - 05:15
    21.05.2013 - 05:13 - 0 Replies
    » Looking for Designers/Cod...
    Looking for Designers/Coders (paid)
    Last post: Kody
    Board: EN - Requests
    21.05.2013 - 05:13
    20.05.2013 - 21:11 - 12 Replies
    » High Quality Website
    High Quality Website
    Last post: Dansjostedt
    Board: EN - Offers
    20.05.2013 - 21:11
    20.05.2013 - 18:27 - 4 Replies
    » [S] Tester für neuen Foru...
    [S] Tester für neuen ForumMod
    Last post: Argu
    Board: DE - Anfragen
    20.05.2013 - 18:27
    20.05.2013 - 11:47 - 5 Replies
    » Suche Designer GGL:Geld
    Suche Designer GGL:Geld
    Last post: Dynamic-Webmedia
    Board: DE - Suche
    20.05.2013 - 11:47
    20.05.2013 - 00:07 - 0 Replies
    » [S] Suche Programmierer
    [S] Suche Programmierer
    Last post: phoenix762
    Board: DE - Suche
    20.05.2013 - 00:07
    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 - 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
    » Partners
    Bilderkiste.org Image Hosting
    k3rmit.org
    PascalMh.de


    » Blog
    28.03.2013 - derchris
    » Those damn spammers