Yearstar-MOD

Allgemeiner Support zum phpBB 2 Board und phpBB 2 Modifikationen
Forumsregeln
Auch wenn hier der Support für phpBB 2 weiterhin aufrecht erhalten bleibt, weisen wir darauf hin, dass das phpBB 2 nicht mehr offiziell unterstützt und weiterentwickelt wird!
Antworten
Benutzeravatar
Rabi
Beiträge: 233
Registriert: Fr 16.Sep, 2005 15:00
Wohnort: Kiel

Yearstar-MOD

Beitrag von Rabi »

Teste gerade den "Yearstar-MOD" aus. Wollte den anstelle der Ränge nach Beitragszahlen einbauen.

Klappt auch ganz gut, nur hätte ich dort gerne wenn man mit der Maus über den Stern fährt folgende Info stehen:

"Anzahl der Sterne = Mitgliedsjahre"

Wo setze ich da an?

Hier mal der MOD:

Code: Alles auswählen

######################################################## 
## MOD Title: Year Stars
## MOD Author: Cheakamus <jay@cheakamus.com> (Jay MacDonald) http://www.cheakamus.com
## MOD Description: Add stars under name based upon years as a member and post count
## MOD Version: 1.0.1
## 
## Installation Level:  easy
## Installation Time:   15 Minutes 
## Files To Edit:       3
##			viewtopic.php
##			templates/subSilver/viewtopic_body.tpl
##			templates/subSilver/subSilver.cfg
##			
## Included Files:      year_star.gif
################################################################# 
## For Security Purposes, Please Check: http://www.phpbb.com/mods/downloads/ for the
## latest version of this MOD. Downloading this MOD from other sites could cause malicious code
## to enter into your phpBB Forum. As such, phpBB will not offer support for MOD's not offered
## in our MOD-Database, located at: http://www.phpbb.com/mods/downloads/
################################################################# 
## 
## Author Notes: 
## 
################################################################# 
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD 
################################################################# 

#
#-----[ COPY ]------------------------------------------
#

copy year_star.gif to templates/subSilver/images/

#
#-----[ OPEN ]------------------------------------------
#

viewtopic.php

#
#-----[ FIND ]------------------------------------------
#

	//
	// Generate ranks, set them to empty string initially.
	//

#
#-----[ BEFORE, ADD ]-------------------------------------
#

	//
	// Generate the yearstars code
	//
	// Change $minposts to reflect the minimum number of posts before the stars
	// will show up.
	$minposts = 250;
	$yearstars = '';
	$years = floor((time() - $postrow[$i]['user_regdate']) / (365.25*24*60*60));
	if ( $years && $postrow[$i]['user_posts'] >= $minposts )
	{
		for ( $y=0 ; $y<$years ; $y++ )
		{
			$yearstars .= '<img src="' . $images['year_star'] . '">';
		}
		$yearstars .= '<br />';
	}

#
#-----[ FIND ]------------------------------------------
#

		'RANK_IMAGE' => $rank_image,

#
#-----[ AFTER, ADD ]------------------------------------------
#

		'YEARSTARS' => $yearstars,

#
#-----[ OPEN ]------------------------------------------
#

templates/subSilver/viewtopic_body.tpl

#
#-----[ IN-LINE FIND ]----------------------------
#

{postrow.RANK_IMAGE}{postrow.POSTER_AVATAR}

#
#-----[ IN-LINE BEFORE, ADD ]-------------------------------------
#

{postrow.YEARSTARS}

#
#-----[ OPEN ]------------------------------------------
#

templates/subSilver/subSilver.cfg

#
#-----[ FIND ]------------------------------------------
#

$board_config['privmsg_graphic_length'] = 175;

#
#-----[ AFTER, ADD ]------------------------------------------
#

//
// Graphic for the Year Stars MOD
//
$images['year_star'] = "$current_template_images/year_star.gif";

# 
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------ 
# 
# EoM
Benutzeravatar
oxpus
Administrator
Beiträge: 28735
Registriert: Mo 27.Jan, 2003 22:13
Wohnort: Bad Wildungen
Kontaktdaten:

Beitrag von oxpus »

Code: Alles auswählen

$yearstars .= '<img src="' . $images['year_star'] . '">';
definiert das Bild.
Dort MUSS nach HTML/XML Vorgabe eh ein alt=... und title=... enthalten sein.
Und genau das wäre dann mit dem gewünschten Text zu füllen...
Karsten Ude
-={ Das Mädchen für alles }=-
Kein Support per Messenger, Email oder PN! Unaufgeforderte Nachrichten werden ignoriert!
No support per Messenger, Email or PM. Each unasked message will be ignored!
Antworten