Jetzt kostenlos Anmelden!

reddevil82 Männlich

BFM Stream Cheffe

Beiträge: 1 672

Geschlecht: Männlich

PHPKIT Version: 1.6.5

1

Freitag, 9. April 2010, 11:56

Userinfo Thread Anzahl Anzeige ändern

Mit dieser kleiner Änderung wird in der Userinfo die Anzeige der letzten Beiträge beliebig erweiterbar.

ersetze alles in pkinc/publictpl/userinfo_foruminfo_lastthread.htm mit:

HTML

1
2
3
4
<b><a href="$link_thread">$forumthread[forumthread_title]</a></b>
<br />
<font class="small">Im Forum: <a href="$link_category">$forumcat[forumcat_name]</a></font>
<br />


suche in pkinc/publictpl/userinfo_foruminfo.htm:

HTML

1
	  <td class="left">Letzter Beitrag</td>


und ersetze mit:

HTML

1
	  <td class="left">$showlastposts</td>


suche in pkinc/public/userinfo.php:

PHP-Quelltext

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
        $lastpost=$DB->fetch_array($DB->query("SELECT 
                ".$db_tab['forumpost'].".forumpost_threadid, 
                ".$db_tab['forumpost'].".forumpost_id
            FROM ".$db_tab['forumpost']." 
                LEFT JOIN ".$db_tab['forumthread']." ON ".$db_tab['forumthread'].".forumthread_id=".$db_tab['forumpost'].".forumpost_threadid 
                LEFT JOIN ".$db_tab['forumcat']." ON ".$db_tab['forumcat'].".forumcat_id=".$db_tab['forumthread'].".forumthread_catid
            WHERE (".sqlrights($db_tab['forumcat'].".forumcat_rrights")." OR 
                ".$db_tab['forumcat'].".forumcat_mods LIKE '%-".pkGetUservalue('id')."-%' OR 
                ".$db_tab['forumcat'].".forumcat_user LIKE '%-".pkGetUservalue('id')."-%') AND 
                ".$db_tab['forumpost'].".forumpost_autorid=".$userinfo['user_id']." 
            ORDER BY ".$db_tab['forumpost'].".forumpost_time DESC 
            LIMIT 1"));
        
        
        if(!empty($lastpost[0]))
            {
            $forumthread=$DB->fetch_array($DB->query("SELECT forumthread_id, forumthread_title, forumthread_catid FROM ".$db_tab['forumthread']." WHERE forumthread_id='".$lastpost['forumpost_threadid']."'"));
            $forumcat=$DB->fetch_array($DB->query("SELECT forumcat_id, forumcat_name FROM ".$db_tab['forumcat']." WHERE forumcat_id='".$forumthread['forumthread_catid']."'"));
            
            $forumthread['forumthread_title']=pkEntities($forumthread['forumthread_title']);
            $forumcat['forumcat_name']=pkEntities($forumcat['forumcat_name']);
            
            $link_thread=pkLink('forumsthread','','threadid='.$forumthread['forumthread_id'].'&postid='.$lastpost['forumpost_id']);
            $link_category=pkLink('forumscategory','','catid='.$forumcat['forumcat_id']);

            eval("\$forumpost_info= \"".pkTpl("userinfo_foruminfo_lastthread")."\";");
            }
        else
            {
            $forumpost_info='-';
            }


und ersetze mit:

PHP-Quelltext

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
        ##### Anzahl Lastposts ändern by burnerfm.de || pimpyourkit.de #####
        $lastposts 3;    //--> Anzahl angezeigter Lastpost ( Standard: 3 )
        $getlastpost=$SQL->query("SELECT 
                ".pkSQLTAB_FORUM_POST.".forumpost_threadid, 
                ".pkSQLTAB_FORUM_POST.".forumpost_id
            FROM ".pkSQLTAB_FORUM_POST." 
                LEFT JOIN ".pkSQLTAB_FORUM_THREAD." ON ".pkSQLTAB_FORUM_THREAD.".forumthread_id=".pkSQLTAB_FORUM_POST.".forumpost_threadid 
                LEFT JOIN ".pkSQLTAB_FORUM_CATEGORY." ON ".pkSQLTAB_FORUM_CATEGORY.".forumcat_id=".pkSQLTAB_FORUM_THREAD.".forumthread_catid
            WHERE (".sqlrights(pkSQLTAB_FORUM_CATEGORY.".forumcat_rrights")." OR 
                ".pkSQLTAB_FORUM_CATEGORY.".forumcat_mods LIKE '%-".pkGetUservalue('id')."-%' OR 
                ".pkSQLTAB_FORUM_CATEGORY.".forumcat_user LIKE '%-".pkGetUservalue('id')."-%') AND 
                ".pkSQLTAB_FORUM_POST.".forumpost_autorid=".$userinfo['user_id']." 
            ORDER BY ".pkSQLTAB_FORUM_POST.".forumpost_time DESC 
            LIMIT ".$lastposts);
                while($lastpost=$SQL->fetch_array($getlastpost))
                    {    
                        if(!empty($lastpost[0]))
                            {
                                $showlastposts = ($lastposts 1) ? 'Die letzten '.$lastposts.' Beitr&auml;ge''Letzter Beitrag';
                                $getforumthread=$SQL->query("SELECT forumthread_id, forumthread_title, forumthread_catid FROM ".pkSQLTAB_FORUM_THREAD." WHERE forumthread_id='".$lastpost['forumpost_threadid']."'");
                                    while($forumthread=$SQL->fetch_array($getforumthread))
                                        {
                                            $forumcat=$SQL->fetch_array($SQL->query("SELECT forumcat_id, forumcat_name FROM ".pkSQLTAB_FORUM_CATEGORY." WHERE forumcat_id='".$forumthread['forumthread_catid']."'"));
            
                                            $forumthread['forumthread_title']=pkEntities($forumthread['forumthread_title']);
                                            $forumcat['forumcat_name']=pkEntities($forumcat['forumcat_name']);
                                            
                                            $link_thread=pkLink('forumsthread','','threadid='.$forumthread['forumthread_id'].'&postid='.$lastpost['forumpost_id']);
                                            $link_category=pkLink('forumscategory','','catid='.$forumcat['forumcat_id']);

                                            eval("\$forumpost_info.= \"".pkTpl("userinfo_foruminfo_lastthread")."\";");
                                        }
                            }
                        else
                            {
                                $forumpost_info='-';
                            }
                    }
        ##### Anzahl Lastposts ändern by burnerfm.de || pimpyourkit.de #####
»reddevil82« hat folgende Datei angehängt:
Seit 02.07.2010 Papa einer süssen Tocher !!!!

http://www.burnerfm.de

Mit den besten Hits der 80´s, 90´s und von heute. Plus einigen PHPKit Addons... uvm.
  • Zum Seitenanfang
  • Zum Seitenende

Muetze Männlich

Ein Pazifist mit der Waffe in der Hand

Beiträge: 681

Geschlecht: Männlich

Wohnort: zu Hause

PHPKIT Version: 1.6.5

2

Freitag, 9. April 2010, 13:56

Irgendwie ist suche in der userinfo.php noch für die 1.6.4, in der 1.6.5 ist die Stelle folgende:

PHP-Quelltext

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
        $lastpost=$SQL->fetch_array($SQL->query("SELECT 
                ".pkSQLTAB_FORUM_POST.".forumpost_threadid, 
                ".pkSQLTAB_FORUM_POST.".forumpost_id
            FROM ".pkSQLTAB_FORUM_POST." 
                LEFT JOIN ".pkSQLTAB_FORUM_THREAD." ON ".pkSQLTAB_FORUM_THREAD.".forumthread_id=".pkSQLTAB_FORUM_POST.".forumpost_threadid 
                LEFT JOIN ".pkSQLTAB_FORUM_CATEGORY." ON ".pkSQLTAB_FORUM_CATEGORY.".forumcat_id=".pkSQLTAB_FORUM_THREAD.".forumthread_catid
            WHERE (".sqlrights(pkSQLTAB_FORUM_CATEGORY.".forumcat_rrights")." OR 
                ".pkSQLTAB_FORUM_CATEGORY.".forumcat_mods LIKE '%-".pkGetUservalue('id')."-%' OR 
                ".pkSQLTAB_FORUM_CATEGORY.".forumcat_user LIKE '%-".pkGetUservalue('id')."-%') AND 
                ".pkSQLTAB_FORUM_POST.".forumpost_autorid=".$userinfo['user_id']." 
            ORDER BY ".pkSQLTAB_FORUM_POST.".forumpost_time DESC 
            LIMIT 1"));
        
        
        if(!empty($lastpost[0]))
            {
            $forumthread=$SQL->fetch_array($SQL->query("SELECT forumthread_id, forumthread_title, forumthread_catid FROM ".pkSQLTAB_FORUM_THREAD." WHERE forumthread_id='".$lastpost['forumpost_threadid']."'"));
            $forumcat=$SQL->fetch_array($SQL->query("SELECT forumcat_id, forumcat_name FROM ".pkSQLTAB_FORUM_CATEGORY." WHERE forumcat_id='".$forumthread['forumthread_catid']."'"));
            
            $forumthread['forumthread_title']=pkEntities($forumthread['forumthread_title']);
            $forumcat['forumcat_name']=pkEntities($forumcat['forumcat_name']);
            
            $link_thread=pkLink('forumsthread','','threadid='.$forumthread['forumthread_id'].'&postid='.$lastpost['forumpost_id']);
            $link_category=pkLink('forumscategory','','catid='.$forumcat['forumcat_id']);

            eval("\$forumpost_info= \"".pkTpl("userinfo_foruminfo_lastthread")."\";");
            }
        else
            {
            $forumpost_info='-';
            }



Wieder mal eine coole Idee. :thumbup:


MfG
Es geht nicht darum zu haben was man will, sondern zu schätzen was man hat!
Blutrausch HP

Mauern sind auch nur Steine & Wassertropen können auch mal Wassermengen werden!

Dieser Beitrag wurde bereits 3 mal editiert, zuletzt von »Muetze« (9. April 2010, 14:14)

  • Zum Seitenanfang
  • Zum Seitenende