Seite 1 von 1
Ausgabe der Pic-Anzahl des SmartorAlbums auf Forumindex=>
Verfasst: 07.05.2005 17:31
von MAX-Driver
Gibt es einen Mod damit die komplette Anzahl der Bilder im smartor Album auf dem Forum Index ausgegeben werden?
Wäre ziemlich wichtig! Danke!
Und noch was weniger wichtiges: Gibs nen Mod damit man im Album Unterkategorien hat? Ist aber weniger wichtig.
MfG,
Floh
Verfasst: 07.05.2005 18:38
von Markus67
Verfasst: 07.05.2005 18:49
von MAX-Driver
Echt nen großes Dankeschön!
Verfasst: 07.05.2005 19:08
von MAX-Driver
ich hab jetzt folgenden Code gefunden weiß jetzt aber nicht WO ich diesen einbauen muß.
Code: Alles auswählen
Little Album Stats for Smartor Album 2.x
CODE place in index.php/portal.php
/*
+----------------------------------------------------------
| Get/Create Albumstats
+----------------------------------------------------------
*/
// Total Pics
$sql = "SELECT count(*) AS count FROM " . ALBUM_TABLE;
if( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not obtain image count ', '', __LINE__, __FILE__, $sql);
}
$row = $db->sql_fetchrow($result);
$TotalImages = $row['count'];
// Total Views
$sql = "SELECT SUM(pic_view_count) AS count FROM " . ALBUM_TABLE;
if( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not obtain image view count ', '', __LINE__, __FILE__, $sql);
}
$pic_view_count = $db->sql_fetchrow($result);
$pic_view_count = $pic_view_count['count'];
// Total Ratings
$sql = "SELECT SUM(rate_point) AS count FROM " . ALBUM_RATE_TABLE;
if( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not obtain image rating count ', '', __LINE__, __FILE__, $sql);
}
$rate_point = $db->sql_fetchrow($result);
$rate_point = $rate_point['count'];
$template->assign_vars(array(
'TOTAL_IMAGES' => $TotalImages,
'TOTAL_PICVIEW' => $pic_view_count,
'TOTAL_RATEPOINT' => $rate_point,)
);
/*
+----------------------------------------------------------
| Get/Create Albumstats End
+----------------------------------------------------------
*/
Language variables to insert in index.php/portal.php
//Album Stats
'L_TOTAL_IMAGES' => $lang['Total_Images'],
'L_TOTAL_PICVIEW' => $lang['Total_PicViews'],
'L_TOTAL_RATEPOINT' => $lang['Total_RatePoints'],
Language definition insert into lang_dutch/lang_main_album.php
// Stats
$lang['Total_Images']= 'plaatjes in ons ';
$lang['Total_PicViews']= 'keer bekeken en';
$lang['Total_RatePoints']= 'waarderingspunten.';
Language definition insert into lang_english/lang_main_album.php
// Stats
$lang['Total_Images']= 'pictures are in our ';
$lang['Total_PicViews']= 'views and';
$lang['Total_RatePoints']= 'ratingpoints.';
Language definition insert into lang_german/lang_main_album.php
//Stats
$lang['Total_Images']= 'Bilder in unserem ';
$lang['Total_PicViews']= 'mal angeschaut und';
$lang['Total_RatePoints']= 'Bewertungen.';
Last but not least the template vars below. Place them where you like...
{TOTAL_IMAGES} {L_TOTAL_IMAGES}
{TOTAL_PICVIEW} {L_TOTAL_PICVIEW}
{TOTAL_RATEPOINT} {L_TOTAL_RATEPOINT}
Verfasst: 14.05.2005 11:29
von MAX-Driver
kann mir jemand helfen???