ezPortal und album mod
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.
ezPortal und album mod
hab das ezPortal und den Album mod installiert, jetzt hab ich das Fenster für das letzte Pic installiert, wobei ich einige Variablen anpassen musste id wurde pic_id,... funtzt auch alles, bis auf das Datum und Uhrzeit, die Steht auf Unix startZeit und dann eben 2 Stunden wegen GMT Plus.
www.bc-Portal.de zumansehen
Neo
www.bc-Portal.de zumansehen
Neo
schau einfach mal auf die Seite www.BC-Portal.de
es wird die Unix Startzeit angezeigt, aso 1.1.1970 ect.
der liest das falsch aus der DAtenbank aus, bzw garnet ?
es wird die Unix Startzeit angezeigt, aso 1.1.1970 ect.
der liest das falsch aus der DAtenbank aus, bzw garnet ?
Steht das hier in Deiner portal.php?
Code: Alles auswählen
//
// Get Newest Pic
//
$sql = "SELECT id, title, username, timestamp FROM phpbb_album ORDER BY timestamp DESC LIMIT 0,1";
if (!$result = $db->sql_query($sql))
{
message_die(GENERAL_ERROR, 'Could not query album information', '', __LINE__, __FILE__, $sql);
}
$picrow = $db->sql_fetchrow($result);
//
// END - Get Newest Pic
//
Das datum ist ok, denn im normalen Album script zeigt es das Datum richtig an
so musste ich es umwandeln, da es id,... so in der Tebelle nimmer gibt.
Code: Alles auswählen
//
// Get Newest Pic
//
$sql = "SELECT pic_id, pic_title, pic_username, pic_time FROM phpbb_album ORDER BY pic_time DESC LIMIT 0,1";
if (!$result = $db->sql_query($sql))
{
message_die(GENERAL_ERROR, 'Could not query album information', '', __LINE__, __FILE__, $sql);
}
$picrow = $db->sql_fetchrow($result);
//
// END - Get Newest Pic
//
hallo Neo007,
du hast noch ein Problem (ich genau so).
Wenn das neuests Bild ein Privates Pics ist, wird es im Portal nur als X angezeigt, wenn keine Berechtigung vorliegt.
Das sollte man noch mal ändern.
Also nur die Bilder anzeigen, auf welche man berechtig ist.
Bei der Albumübersicht werden auch nur die angezeigt, auf welche man zugriff hat.
du hast noch ein Problem (ich genau so).
Wenn das neuests Bild ein Privates Pics ist, wird es im Portal nur als X angezeigt, wenn keine Berechtigung vorliegt.
Das sollte man noch mal ändern.

Also nur die Bilder anzeigen, auf welche man berechtig ist.
Bei der Albumübersicht werden auch nur die angezeigt, auf welche man zugriff hat.
- joerg98765
- Mitglied
- Beiträge: 25
- Registriert: 04.06.2002 08:21
- Wohnort: Alt Garge
Sollte hiermit gehen. Also nur Berechtigte Cats werden angezeigt.
Also im Portal.php den Bereich austauschen:
Also im Portal.php den Bereich austauschen:
Code: Alles auswählen
//
// Get general album information
//
$album_root_path = $phpbb_root_path . 'album_mod/';
include($album_root_path . 'album_common.'.$phpEx);
/*
+----------------------------------------------------------
| Build Categories Index
+----------------------------------------------------------
*/
$sql = "SELECT c.*, COUNT(p.pic_id) AS count
FROM ". ALBUM_CAT_TABLE ." AS c
LEFT JOIN ". ALBUM_TABLE ." AS p ON c.cat_id = p.pic_cat_id
WHERE cat_id <> 0
GROUP BY cat_id
ORDER BY cat_order ASC";
if( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not query categories list', '', __LINE__, __FILE__, $sql);
}
while( $row = $db->sql_fetchrow($result) )
{
$album_user_access = album_user_access($row['cat_id'], $row, 1, 0, 0, 0, 0, 0); // VIEW
if ($album_user_access['view'] == 1)
{
if (!isset($cats))
{
$cats = 'pic_cat_id = ' . $row['cat_id'];
}
else
{
$cats = $cats . ' OR pic_cat_id = '. $row['cat_id'];
}
}
}
//
// Get Newest Pic
//
$Display = 'Recent'; // Replace 'Recent' with 'Random'
$CategoryID = 0; // Replace 0 with a category ID. Otherwise, keep it as it is
// Example: http://www.yourdomain.com/phpBB2/album_cat.php?cat_id=3
// Category ID is 3
if ($Display == 'Random')
{
if ($CategoryID != 0)
{
$sql = "SELECT p.pic_id, p.pic_title, p.pic_username, p.pic_user_id, p.pic_time, p.pic_desc, p.pic_approval, u.username
FROM ". ALBUM_TABLE ." AS p
LEFT JOIN ". USERS_TABLE ." AS u ON p.pic_user_id = u.user_id
WHERE pic_approval = 1 AND pic_lock = 0 AND pic_cat_id = $CategoryID
ORDER BY RAND()
LIMIT 0,1";
}
else {
$sql = "SELECT p.pic_id, p.pic_title, p.pic_username, p.pic_user_id, p.pic_time, p.pic_desc, p.pic_lock, p.pic_approval, u.username
FROM ". ALBUM_TABLE ." AS p
LEFT JOIN ". USERS_TABLE ." AS u ON p.pic_user_id = u.user_id
WHERE pic_approval = 1 AND pic_lock = 0 AND (" . $cats . ")
ORDER BY RAND()
LIMIT 0,1";
}
}
else if ($Display == 'Recent')
{
if ($CategoryID != 0)
{
$sql = "SELECT p.pic_id, p.pic_title, p.pic_username, p.pic_user_id, p.pic_time, p.pic_desc, p.pic_approval, u.username
FROM ". ALBUM_TABLE ." AS p
LEFT JOIN ". USERS_TABLE ." AS u ON p.pic_user_id = u.user_id
WHERE pic_approval = 1 AND pic_lock = 0 AND pic_cat_id = $CategoryID
ORDER BY pic_time DESC
LIMIT 0,1";
}
else
{
$sql = "SELECT p.pic_id, p.pic_title, p.pic_username, p.pic_user_id, p.pic_time, p.pic_desc, p.pic_lock, p.pic_approval, u.username
FROM ". ALBUM_TABLE ." AS p
LEFT JOIN ". USERS_TABLE ." AS u ON p.pic_user_id = u.user_id
WHERE pic_approval = 1 AND pic_lock = 0 AND (" . $cats . ")
ORDER BY pic_time DESC
LIMIT 0,1";
}
}
if (!$result = $db->sql_query($sql))
{
message_die(GENERAL_ERROR, 'Could not query album information', '',
__LINE__, __FILE__, $sql);
}
$picrow = $db->sql_fetchrow($result);
$pic_poster = '<a href="'. append_sid("profile.$phpEx?mode=viewprofile&".
POST_USERS_URL .'='. $picrow['pic_user_id']) .'">'. $picrow['pic_username']
.'</a>';
//
// END: Get Newest Pic
//
Gruß Jörg