Seite 1 von 1

Neue Bilder (xy) bzw Neue Kommentare (xy)

Verfasst: 29.10.2005 15:42
von MaracujaJoe
Warum funktioniert die ganze Sache bei mir nicht?
Die Seiten funktionieren, jedoch klappt das einbinden des Links nicht bei mir im Portal, also dieses "Neue Bilder (5)"

Code: Alles auswählen

########################################################
## MOD TITLE: New Pics & Comments Since Last Visit
## MOD DESC:  This is just an install re-write, other than the addition of the animated icon
##       that lets the user know there are new photos
##
## INSTALL RE-WRITE AUTHOR: Ricky_Racer <ricky_racer77[@]hotmail.com>(http://rickster.clawz.com/)
##
##
##
## Files to edit: (4 or 5)*    * = Depending on the number of Themes & Languages you have installed of course ;)
##   
## Included Files: SEE BELOW
##   
########################################################
##                  AUTHOR NOTES:                     ##
########################################################
## 
## MOD Title: New Pic 
## MOD Author: vgan < transflux@msn.com > (Steve Cvar) http://sonicforum.com 
## MOD Description: Add-on for EZportal
##	Note: Requires Album Mod v.2051 by Smartor http://smartor.is-root.com
## MOD Version: 1.1 
## 
## Installation Level: (Easy) 
## Installation Time: 10 Minutes 
## Files To Edit: portal.php, portal_body.tpl, lang_main.php
## Included Files: (album_new_pics.php,album_new_pics.tpl) 
## 
## MOD Title: New Pic Comments 
## MOD Author: vgan < transflux@msn.com > (Steve Cvar) http://sonicforum.com 
## MOD Description: Add-on for EZportal
##	Note: Requires Album Mod v.2051 by Smartor http://smartor.is-root.com
## MOD Version: 1.1 
## 
## Installation Level: (Easy) 
## Installation Time: 10 Minutes 
## Files To Edit: portal.php, portal_body.tpl, lang_main.php
## Included Files: (album_new_comments.php,album_new_comments.tpl) 
## 
########################################################
##                   DISCLAIMER:                      ##
########################################################
## 
## This program is free software; you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
## the Free Software Foundation; either version 2 of the License, or 
## (at your option) any later version.
## 
## NO WARRANTY IS EXPRESSED OR IMPLIED REMEMBER THIS IS FREE SOFTWARE
## (You get what you paid NOTHING !!!)
## Support will be minimal too, and handled only in the thread where originally posted
## or a thread in the proper support section at my forum (http://rickster.clawz.com/forum/)
## 
########################################################
##      REMEMBER TO ALWAYS BACK UP YOUR FILES !!!     ##
########################################################

#
#------[UPLOAD:]----------------------------------------
#
album_new_pics.php      ----->  to your forum_root folder
album_new_comments.php  ----->  to your forum_root folder
album_new_pics.tpl      ----->  to your forum_root folder/templates/subSilver/
album_new_comments.tpl  ----->  to your forum_root folder/templates/subSilver/
icon_ani_album.gif      ----->  to your forum_root folder/templates/subSilver/images/
#
#------[OPEN:]------------------------------------------
#
/portal.php (and/or index.php)
#
#------[FIND:]------------------------------------------
#
// Start output of page
#
#------[BEFORE, ADD:]-----------------------------------
#
// START: - ADD - MOD: New Pics & Comments Since Last Visit
// By: Todd (t.fox), vgan (Steve Carr), & Ricky_Racer
// START: New Pics Since Last Visit
if( $userdata['session_logged_in'] )
{
	$sql = "SELECT COUNT(pic_id) as total_pics
		FROM ". ALBUM_TABLE ."
		WHERE pic_time >= " . $userdata['user_lastvisit'];
	$result = $db->sql_query($sql);
	if( $result )
	{
		$picrow = $db->sql_fetchrow($result);
		if( $picrow['total_pics'] == 0 )
		{
			$new_pics = ($lang['No_new_pics'] . '&nbsp;[0]');
		}
		else if( $picrow['total_pics'] == 1 )
		{
			$new_pics = ($lang['New_pic'] . '&nbsp;[1]&nbsp;<img src="'. $images['photo_new'] .'" border="0">');
		}
		else
		{
			$new_pics = ($lang['New_pics'] . '&nbsp;' . '[' . $picrow['total_pics'] . ']&nbsp;<img src="'. $images['photo_new'] .'" border="0">');
		}
	}
}
// END: New Pics Since Last Visit
// START: New Pic Comments Since Last Visit
if( $userdata['session_logged_in'] )
{
	$sql = "SELECT COUNT(DISTINCT comment_pic_id) as total_comments
		FROM ". ALBUM_COMMENT_TABLE ."
		WHERE comment_time >= " . $userdata['user_lastvisit']."
		AND comment_pic_id != " . $userdata['user_id'];
	$result = $db->sql_query($sql);
	if( $result )
	{
		$commentrow = $db->sql_fetchrow($result);
		if( $commentrow['total_comments'] == 0 )
		{
			$new_comments = ($lang['No_new_pic_comments'] . '&nbsp;[0]');
		}
		else if( $commentrow['total_comments'] == 1 )
		{
			$new_comments = ($lang['New_Comment_Last'] . '&nbsp;[1]');
		}
		else
		{
			$new_comments = ($lang['New_Comments_Last'] . '&nbsp;' . '[' . $commentrow['total_comments'] . ']');
		}
	}
}
// END: New Pic Comments Since Last Visit
// END: - ADD - MOD: New Pics & Comments Since Last Visit
#
#------[OPEN:]------------------------------------------
#
/includes/page_header.php
#
#------[FIND:]------------------------------------------
#
	'L_SEARCH_SELF' => $lang['Search_your_posts'],
#
#------[AFTER, ADD:]------------------------------------
#
	'L_POSTED_BY' => $lang['Posted_by'],
	'L_SEARCH_ALBUM_NEW' => $new_pics,
	'L_SEARCH_ALBUM_COMMENTS_NEW' => $new_comments,
#
#------[FIND:]------------------------------------------
#
	'U_SEARCH_NEW' => append_sid('search.'.$phpEx.'?search_id=newposts'),
#
#------[AFTER, ADD:]------------------------------------
#
	'U_SEARCH_ALBUM_NEW' => append_sid("album_new_pics.$phpEx"),
	'U_SEARCH_ALBUM_COMMENTS_NEW' => append_sid("album_new_comments.$phpEx"),
#
#------[OPEN:]------------------------------------------
#
/language/lang_english/lang_main.php
#
#------[FIND:]------------------------------------------
#
$lang['Posted'] = 'Posted';
#
#------[AFTER, ADD:]------------------------------------
#
$lang['Posted_by'] = 'Posted by';
#
#------[FIND:]------------------------------------------
#
$lang['Personal_Gallery_Of_User'] = 'Personal Gallery of %s';
#
#------[AFTER, ADD:]------------------------------------
#
// New Album Pictures & Comments
$lang['Search_album_new'] = 'View Pics Since Your Last Visit';
$lang['New_Pics_Last'] = 'New Pics Since Your Last Visit';
$lang['Search_album_comments_new'] = 'View Comments since last visit';
$lang['New_Comment_Last'] = 'New Comment Since Your Last Visit';
$lang['New_Comments_Last'] = 'New Comments Since Your Last Visit';
$lang['No_new_pics'] = 'No New Photos Since Your Last Visit';
$lang['No_new_pic_comments'] = 'No New Comments Since Your Last Visit';
$lang['New_pics'] = 'New Photos Since Last Visit';
$lang['New_pic'] = 'New Photo Since Last Visit';
$lang['Pics'] = 'Pics';
#
#------[OPEN:]------------------------------------------
#
/templates/subSilver/portal_body.tpl (and/or templates/subSilver/index_body.tpl)
#
#------[FIND:]------------------------------------------
#
      <!-- BEGIN switch_user_logged_in -->
      <a href="{U_SEARCH_SELF}" class="gensmall">{L_SEARCH_SELF}</a><br />
#
#------[AFTER, ADD:]------------------------------------
#
      <a href="{U_SEARCH_ALBUM_NEW}" class="gensmall">{L_SEARCH_ALBUM_NEW}</a><br />
      <a href="{U_SEARCH_ALBUM_COMMENTS_NEW}" class="gensmall">{L_SEARCH_ALBUM_COMMENTS_NEW}</a><br />
#
#------[OPEN:]------------------------------------------
#
templates/subSilver/subSilver.cfg
#
#------[FIND:]------------------------------------------
#
$images['pm_new_msg'] = "";
$images['pm_no_new_msg'] = "";
#
#------[AFTER, ADD:]------------------------------------
#
$images['photo_new'] = "$current_template_images/icon_ani_album.gif";

#
#-----[SAVE/CLOSE/UPLOAD/ENJOY!!!]------------------------------------------
#

Ich benutze den IntroPortal Mod!

Verfasst: 29.10.2005 15:44
von MaracujaJoe
Irgendwie gibt es glaube ich hiermit Probleme:

Code: Alles auswählen

#------[OPEN:]------------------------------------------
#
/includes/page_header.php
#
#------[FIND:]------------------------------------------
#
   'L_SEARCH_SELF' => $lang['Search_your_posts'],
#
#------[AFTER, ADD:]------------------------------------
#
   'L_POSTED_BY' => $lang['Posted_by'],
   'L_SEARCH_ALBUM_NEW' => $new_pics,
   'L_SEARCH_ALBUM_COMMENTS_NEW' => $new_comments, 
Die Übergabe der Variable $new_pics aus der portla.php in die page_header.php geht anscheinend irgendwie nicht ...
Hat jmd eine Lösung?