Hi,
suche ne Mod / Snippet mit der ich auf dem index einen zufälligen User
(mit Avatar!) im Bereich "Wer ist online?" anzeigen lassen kann.
MfG
Chris
Zufälliges Profil auf index anzeigen
Forumsregeln
phpBB 2.0 hat das Ende seiner Lebenszeit überschritten
phpBB 2.0 wird nicht mehr aktiv unterstützt. Insbesondere werden - auch bei Sicherheitslücken - keine Patches mehr bereitgestellt. Der Einsatz von phpBB 2.0 erfolgt daher auf eigene Gefahr. Wir empfehlen einen Umstieg auf phpBB 3.0, welches aktiv weiterentwickelt wird und für welches regelmäßig Updates zur Verfügung gestellt werden.
phpBB 2.0 hat das Ende seiner Lebenszeit überschritten
phpBB 2.0 wird nicht mehr aktiv unterstützt. Insbesondere werden - auch bei Sicherheitslücken - keine Patches mehr bereitgestellt. Der Einsatz von phpBB 2.0 erfolgt daher auf eigene Gefahr. Wir empfehlen einen Umstieg auf phpBB 3.0, welches aktiv weiterentwickelt wird und für welches regelmäßig Updates zur Verfügung gestellt werden.
- Firestarter
- Mitglied
- Beiträge: 1162
- Registriert: 09.06.2003 15:21
Code: Alles auswählen
########################################################################################################
## MOD Title: Random User (On Forum Index)
## MOD Author: AbelaJohnB < abela@johnabela.com > (John B. Abela) http://www.johnabela.com/
## MOD Description: This MOD will add a random user to your forum index, directly below
## the 'newest member section.
## MOD Version: 1.0.3
##
## Installation Level: Easy
## Installation Time: ~5 Minutes
## Files To Edit:
## index.php
## templates/subSilver/index_body.tpl
## langauge/lang_english/lang_main.php
## Included Files:
## N/A
########################################################################################################
## Author Notes:
## Copyright © John B. Abela, < abela@johnabela.com >
##
## I do not support my MOD's anywhere except at http://www.johnabela.com/mods/ so please
## visit there for support. If you intend to take my work and modify it, you must retain my above
## Copyright within any install file. This does not mean you have to ask me to -use- this MOD,
## but that does mean you cannot -distribute- this MOD, in modified or non-modified format,
## without my copyright left intact. Contact me at: abela@johnabela.com - www.JohnAbela.Com
##
## This MOD, like all phpBB MOD's, is released under the GNU/GPL License. A copy of this license
## should have been included with the distribution package that included this install.txt file.
## If it was not, chances are you are using a version of this MOD that very likely has been edited
## by someone other than myself, and thus, perhaps, a greater security risk to you.
##
## Possible Future Plans: None
##
## ~ John B. Abela - (aka: AbelaJohnB) http://www.johnabela.com/mods/ - abela@johnabela.com
## Stop By And Say Hello If You Feel Like It :)
## I maintain a "Mailing Group" for email notification of any new/updated MOD's. Just stop by my
## forum, register, than join the Group within the Usersgroup section of my MOD Forums!
########################################################################################################
## MOD History:
##
## 2005-01-04 - Version 1.0.3
## - Updated For phpBB 2.0.11
##
## 2003-06-17 - Version 1.0.2
## - Updated for phpBB 2.0.5
##
## 2003-01-01 - Version 1.0.1
## - Rewrote for phpBB2.0.4+
##
## 2002-12-01 - Version 1.0.0
## - Initial Release
########################################################################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
########################################################################################################
#
#-----[ OPEN ]-------------------------------------
#
index.php
#
#-----[ FIND ]-------------------------------------
#
$is_auth_ary = auth(AUTH_VIEW, AUTH_LIST_ALL, $userdata, $forum_data);
#
#-----[ AFTER, ADD ]-------------------------------------
#
//
// MOD START- RANDOM USER MOD - AbelaJohnB
//
function random_user()
{
global $db;
//
$sql = "SELECT user_id, username
FROM " . USERS_TABLE . "
WHERE user_active = '1'
AND user_id <> " . ANONYMOUS . "
ORDER BY RAND() LIMIT 1";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not query random user data.', '', __LINE__, __FILE__, $sql);
}
return ( $row = $db->sql_fetchrow($result) ) ? $row : false;
}
$profiledata = random_user();
$random_link = '<a href="' . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=".$profiledata['user_id']."") . '">'. $profiledata['username']. '</a>';
//
// MOD END - RANDOM USER MOD - AbelaJohnB
//
#
#-----[ FIND ]-------------------------------------
#
'TOTAL_POSTS' => sprintf($l_total_post_s, $total_posts),
#
#-----[ BEFORE, ADD ]-------------------------------------
#
//
// MOD START - RANDOM USER MOD - AbelaJohnB
//
'L_RANDOM_USER' => $lang['Random_user'],
'RANDOM_USER_LINK' => $random_link,
//
// MOD END - RANDOM USER MOD - AbelaJohnB
//
#
#-----[ OPEN ]-------------------------------------
#
templates/subSilver/index_body.tpl
#
#-----[ FIND ]-------------------------------------
#
<td class="row1" align="left" width="100%">
#
#-----[ IN-LINE FIND ]-------------------------------------
#
{NEWEST_USER}
#
#-----[ IN-LINE AFTER, ADD ]-------------------------------------
#
<br />{L_RANDOM_USER} {RANDOM_USER_LINK}<BR />
#
#-----[ OPEN ]------------------------------------------
#
language/lang_english/lang_main.php
#
#-----[ FIND ]------------------------------------------
#
$lang['Newest_user'] = 'The newest registered user is <b>%s%s%s</b>'; // a href, username, /a
#
#-----[ AFTER, ADD ]------------------------------------------
#
//
// MOD START- RANDOM USER MOD - AbelaJohnB
//
$lang['Random_user'] = 'A random user is: ';
//
// MOD END - RANDOM USER MOD - AbelaJohnB
//
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM
Code: Alles auswählen
##############################################################
## MOD Title: Random User Portal Block
## MOD Version: 1.0
## Author: oc5iD
## Email: admin@on-irc.net
## Support: http://www.on-irc.net
## Demo: http://www.on-irc.net/portal.php
##
## Description: Places a block on your portal, that displays a random
## user each time the page is loaded, with users info
## including, Name, Birthday, Posts, Location, Last Visit,
## Avatar & Flag.
##
## Installation Level: easy
## Installation Time: 5 - 10 minutes
## Files To Edit (3): portal.php
## /language/lang_english/lang_main.php
## /templates/xxx/portal_body.tpl
##
##
## Included Files (2) /random_user_install.txt
## /templates/xxx/images/lang_english/default_avatar.gif
##
##############################################################
MfG
Firestarter
Auch ich versuche mein Glück und möchte ein schönes Forum haben, dafür muss ich wohl erstmal leiden. *fg*
Firestarter
Auch ich versuche mein Glück und möchte ein schönes Forum haben, dafür muss ich wohl erstmal leiden. *fg*
- Firestarter
- Mitglied
- Beiträge: 1162
- Registriert: 09.06.2003 15:21