Author Topic: [MOD] Uploader Topliste/Unsere Fotografen (Uploader Toplist/Our Photographers)  (Read 4538 times)

0 Members and 1 Guest are viewing this topic.

Offline Scarala

  • Jr. Member
  • **
  • Posts: 87
    • View Profile
    • www.MPS-Fotos.de - Die MPS-Fotocommunity
//--------------------- english below ----------------------
Ich habe hier eine kleine MOD zum anzeigen einer Toplist incl. Kategorieübersicht der Uploader für euch.
Es werden nur User angezeigt, die auch Bilder hochgeladen haben.

Beispiel: http://www.mps-fotos.de/4images/toplist.php

Step 1:
Lade dir als erstes die ZIP-Datei hier aus dem Tread runter und entpacke sie ins 4images-Stammverzeichnis.
Enthalten in dieser ZIP-Datei ist die php-Datei und die Templatedateien für die Toplist.

Step 2:
Öffne die Datei 'includes/page_header.php' und suche nach
$site_template->register_vars(array(
  
"lang_site_stats" => $lang['site_stats'],
  
"lang_registered_user" => $lang['registered_user'],
  
"lang_random_image" => $lang['random_image'],
  
"lang_categories" => $lang['categories'],
  
"lang_sub_categories" => $lang['sub_categories'],
  
"lang_new_images" => $lang['new_images'],
  
"lang_top_images" => $lang['top_images'],
  
"lang_search" => $lang['search'],
  
"lang_advanced_search" => $lang['advanced_search'],
  
"lang_lightbox" => $lang['lightbox'],
  
"lang_register" => $lang['register'],
  
"lang_control_panel" => $lang['control_panel'],
  
"lang_login" => $lang['login'],
  
"lang_auto_login" => $lang['lang_auto_login'],
  
"lang_logout" => $lang['logout'],
  
"lang_lost_password" => $lang['lost_password'],
  
"lang_user_name" => $lang['user_name'],
  
"lang_password" => $lang['password'],
  
"lang_go" => $lang['go'],
  
"lang_images_per_page" => $lang['images_per_page'],
  
"charset" => $lang['charset'],
  
"direction" => $lang['direction']
));


Ersetze dies durch
$site_template->register_vars(array(
  
"lang_site_stats" => $lang['site_stats'],
  
"lang_registered_user" => $lang['registered_user'],
  
"lang_random_image" => $lang['random_image'],
  
"lang_categories" => $lang['categories'],
  
"lang_sub_categories" => $lang['sub_categories'],
  
"lang_new_images" => $lang['new_images'],
  
"lang_top_images" => $lang['top_images'],
  
"lang_search" => $lang['search'],
  
"lang_advanced_search" => $lang['advanced_search'],
  
"lang_lightbox" => $lang['lightbox'],
  
"lang_register" => $lang['register'],
  
"lang_control_panel" => $lang['control_panel'],
  
"lang_login" => $lang['login'],
  
"lang_auto_login" => $lang['lang_auto_login'],
  
"lang_logout" => $lang['logout'],
  
"lang_lost_password" => $lang['lost_password'],
  
"lang_user_name" => $lang['user_name'],
  
"lang_password" => $lang['password'],
  
"lang_go" => $lang['go'],
  
"lang_images_per_page" => $lang['images_per_page'],
  
"charset" => $lang['charset'],
  
"direction" => $lang['direction'],
  
"lang_toplist" => $lang['toplist']
));


Step 4:
Öffne die Date 'lang/deutsch/main.php', Scrolle ganz nach unten und füge vor
?>

folgenden Code ein
//-----------------------------------------------------
//--- Toplist -----------------------------------------
//-----------------------------------------------------
$lang['toplist'] = "Unsere Fotografen";
$lang['toplist_head1'] = "Übersicht aller Kategorien, in denen ";
$lang['toplist_head2'] = " Bilder hochgeladen hat.";
$lang['toplist_head3'] = "Unsere Fotografen";
$lang['toplist_user'] = "Benutzername";
$lang['toplist_date'] = "Beitrittsdatum";
$lang['toplist_pictures'] = "Bilderanzahl";
$lang['toplist_cat'] = "Kategorie";
$lang['toplist_topcat'] = "Übergeordnete Kategorie";
$lang['toplist_user_link1'] = "Profil von ";
$lang['toplist_user_link2'] = " anzeigen";
$lang['toplist_cat_link1'] = "Alle Bilder von ";
$lang['toplist_show'] = "Alle Bilder dieses Benutzers in dieser Kategorie anzeigen.";
$lang['toplist_back'] = "Zurück zur Übersicht";


Step 5:
Öffne die Datei 'templates/dein_template/user_logininfo.html' und suche
      » <a href="{url_lightbox}">{lang_lightbox}</a><br />

Füge darunter
	
      
» <a href="toplist.php">{lang_toplist}</a><br />

ein.

Step 6:
Öffne die Datei 'templates/dein_template/user_loginform.html' und suche
	
  
» <a href="{url_register}">{lang_register}</a><br>


Füge darunter
<br />
	
  
» <a href="toplist.php">{lang_toplist}</a><br />

ein.

OPTIONAL
Möchte man z.b. nur die ersten 10 TOP-Uploader anzeigen dann Editiere die Datei 'toplist.php' aus der ZIP-Datei wie folgt:

Suche nach
ORDER BY user_t_images DESC";

und ersetze es durch
ORDER BY user_t_images DESC LIMIT 10";

Mit der Zahl hinter Limit kann man die Anzahl der angezeigten User einstellen.


//---------------------------- english ------------------------------
I have here a little MOD for showing a toplist incl. category overview of the uploader for you.
It shows only users that have uploaded images.

Example (in german): http://www.mps-fotos.de/4images/toplist.php

Step 1:
Download the ZIP-File attatched to this thread an unzip it to the 4images-root-directory.
It contains the PHP- and template-file for the Toplist.

Step 2:
Open the file 'includes/page_header.php' and search for
$site_template->register_vars(array(
  
"lang_site_stats" => $lang['site_stats'],
  
"lang_registered_user" => $lang['registered_user'],
  
"lang_random_image" => $lang['random_image'],
  
"lang_categories" => $lang['categories'],
  
"lang_sub_categories" => $lang['sub_categories'],
  
"lang_new_images" => $lang['new_images'],
  
"lang_top_images" => $lang['top_images'],
  
"lang_search" => $lang['search'],
  
"lang_advanced_search" => $lang['advanced_search'],
  
"lang_lightbox" => $lang['lightbox'],
  
"lang_register" => $lang['register'],
  
"lang_control_panel" => $lang['control_panel'],
  
"lang_login" => $lang['login'],
  
"lang_auto_login" => $lang['lang_auto_login'],
  
"lang_logout" => $lang['logout'],
  
"lang_lost_password" => $lang['lost_password'],
  
"lang_user_name" => $lang['user_name'],
  
"lang_password" => $lang['password'],
  
"lang_go" => $lang['go'],
  
"lang_images_per_page" => $lang['images_per_page'],
  
"charset" => $lang['charset'],
  
"direction" => $lang['direction']
));


and replace with
$site_template->register_vars(array(
  
"lang_site_stats" => $lang['site_stats'],
  
"lang_registered_user" => $lang['registered_user'],
  
"lang_random_image" => $lang['random_image'],
  
"lang_categories" => $lang['categories'],
  
"lang_sub_categories" => $lang['sub_categories'],
  
"lang_new_images" => $lang['new_images'],
  
"lang_top_images" => $lang['top_images'],
  
"lang_search" => $lang['search'],
  
"lang_advanced_search" => $lang['advanced_search'],
  
"lang_lightbox" => $lang['lightbox'],
  
"lang_register" => $lang['register'],
  
"lang_control_panel" => $lang['control_panel'],
  
"lang_login" => $lang['login'],
  
"lang_auto_login" => $lang['lang_auto_login'],
  
"lang_logout" => $lang['logout'],
  
"lang_lost_password" => $lang['lost_password'],
  
"lang_user_name" => $lang['user_name'],
  
"lang_password" => $lang['password'],
  
"lang_go" => $lang['go'],
  
"lang_images_per_page" => $lang['images_per_page'],
  
"charset" => $lang['charset'],
  
"direction" => $lang['direction'],
  
"lang_toplist" => $lang['toplist']
));


Step 4:
Open the file 'lang/english/main.php', scroll down to bottom an insert before
?>

this code
//-----------------------------------------------------
//--- Toplist -----------------------------------------
//-----------------------------------------------------
$lang['toplist'] = "Our Photographer";
$lang['toplist_head1'] = "Overview of all categories where ";
$lang['toplist_head2'] = " uploaded images.";
$lang['toplist_head3'] = "Our Photographer";
$lang['toplist_user'] = "Username";
$lang['toplist_date'] = "Joindate";
$lang['toplist_pictures'] = "Pictures";
$lang['toplist_cat'] = "Categories";
$lang['toplist_topcat'] = "Parent category";
$lang['toplist_user_link1'] = "Show profile of ";
$lang['toplist_user_link2'] = "";
$lang['toplist_cat_link1'] = "Show all Images from ";
$lang['toplist_show'] = "Show all pictures from this user in this category.";
$lang['toplist_back'] = "Back to overwiew";


Step 5:
Open the file 'templates/your_template/user_logininfo.html' and search for
      » <a href="{url_lightbox}">{lang_lightbox}</a><br />

insert below
	
      
» <a href="toplist.php">{lang_toplist}</a><br />


Step 6:
Open the file 'templates/your_template/user_loginform.html' and search for
	
  
» <a href="{url_register}">{lang_register}</a><br>


insert below
<br />
	
  
» <a href="toplist.php">{lang_toplist}</a><br />


OPTIONAL
If you only want to show the first 10 TOP-uploader then you need to edit the 'toplist.php' from the ZIP like this:

Search for
ORDER BY user_t_images DESC";

and replace with
ORDER BY user_t_images DESC LIMIT 10";

With the number behind LIMIT you can edit the number of shown Users in the list.