random pic für das full album pack
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.
vieleicht kann wer mithelfen den code fertig zu stellen, dann kann man das ganze ja veröffentlichen. sicherlich auch für andere user nützlich.
also in der indexanzeige wirds schon richtig dargestellt: www.paenzmithaetz.de/forum
allerdings wirds kein bild angezeigt wenn ich beiträge schreibe oder veröffentliche. ist das die viewtopic.php datei die hierfür zuständig ist, nehme ich mal an. gleich ausprobieren.
also in der indexanzeige wirds schon richtig dargestellt: www.paenzmithaetz.de/forum
allerdings wirds kein bild angezeigt wenn ich beiträge schreibe oder veröffentliche. ist das die viewtopic.php datei die hierfür zuständig ist, nehme ich mal an. gleich ausprobieren.
dies ist der orginal code aus dem mod:
##############################################################
## MOD Title: Full Album Pack Portal Block
## MOD Author: Mighty Gorgon < mightygorgon@mightygorgon.com > (Luca Libralato) http://www.mightygorgon.com/
## MOD Description: This MOD adds a block to ez Portal for showing last and random pic in Album
##
## MOD Version: 1.0.1
##
## Installation Level: Easy
## Installation Time: 5 minutes
## Files To Edit: (3)
## portal.php
## language/lang_english/lang_main.php
## templates/subSilver/portal_body.tpl
##
##############################################################
## For Security Purposes, Please Check: http://www.phpbb.com/mods/ 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/
##############################################################
## Author Notes:
##
## N/A
##
##############################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
##############################################################
#
#-----[ OPEN ]------------------------------------------------
#
portal.php
#
#-----[ FIND ]------------------------------------------------
#
$page_title = $lang['Home'];
#
#-----[ AFTER, ADD ]------------------------------------------
#
// Mighty Gorgon - Full Album Pack - BEGIN
// Newest Pic
$sql = "SELECT *
FROM " . ALBUM_TABLE . " AS a, " . ALBUM_CAT_TABLE . " AS c
WHERE c.cat_id = a.pic_cat_id
AND c.cat_view_level = -1
ORDER BY pic_time DESC LIMIT 1";
if (!$result = $db->sql_query($sql))
{
message_die(GENERAL_ERROR, 'Could not query album information', '', __LINE__, __FILE__, $sql);
}
$newpicrow = $db->sql_fetchrow($result);
// Random Pic
$sql = "SELECT *
FROM " . ALBUM_TABLE . " AS a, " . ALBUM_CAT_TABLE . " AS c
WHERE c.cat_id = a.pic_cat_id
AND c.cat_view_level = -1
ORDER BY RAND() LIMIT 1";
if (!$result = $db->sql_query($sql))
{
message_die(GENERAL_ERROR, 'Could not query album information', '', __LINE__, __FILE__, $sql);
}
$randpicrow = $db->sql_fetchrow($result);
// Mighty Gorgon - Full Album Pack - END
#
#-----[ FIND ]------------------------------------------------
#
'L_VOTE_BUTTON' => $lang['Vote'],
#
#-----[ AFTER, ADD ]------------------------------------------
#
// Mighty Gorgon - Full Album Pack - BEGIN
'L_NEWEST_PIC' => $lang['Newest_pic'],
'NEW_PIC_IMAGE' => append_sid('album_thumbnail.'. $phpEx . '?pic_id=' . $newpicrow['pic_id']),
'NEW_PIC_TITLE' => $newpicrow['pic_title'],
'NEW_PIC_POSTER' => $newpicrow['pic_username'],
'U_NEW_PIC_LINK' => append_sid('album_showpage.' . $phpEx . '?pic_id=' . $newpicrow['pic_id']),
'NEW_PIC_TIME' => create_date($board_config['default_dateformat'], $newpicrow['pic_time'], $board_config['board_timezone']),
'L_RANDOM_PIC' => $lang['Random_pic'],
'RANDOM_PIC_IMAGE' => append_sid('album_thumbnail.'. $phpEx . '?pic_id=' . $randpicrow['pic_id']),
'RANDOM_PIC_TITLE' => $randpicrow['pic_title'],
'RANDOM_PIC_POSTER' => $randpicrow['pic_username'],
'U_RANDOM_PIC_LINK' => append_sid('album_showpage.' . $phpEx . '?pic_id=' . $randpicrow['pic_id']),
'RANDOM_PIC_TIME' => create_date($board_config['default_dateformat'], $randpicrow['pic_time'], $board_config['board_timezone']),
// Mighty Gorgon - Full Album Pack - END
#
#-----[ OPEN ]------------------------------------------------
#
#
#-----[ OPEN ]------------------------------------------------
#
language/lang_english/lang_main.php
#
#-----[ FIND ]------------------------------------------------
#
?>
#
#-----[ BEFORE, ADD ]-----------------------------------------
#
// Mighty Gorgon - Full Album Pack - BEGIN
$lang['Newest_pic'] = 'Last Pic'; // Album Addon
$lang['Random_pic'] = 'Random Pic'; // Album Addon
// Mighty Gorgon - Full Album Pack - END
#
#-----[ OPEN ]------------------------------------------------
#
templates/subSilver/portal_body.tpl
#
#-----[ FIND ]------------------------------------------------
#
<tr>
<td class="row1" align="left"><span class="gensmall">{TOTAL_USERS}<br />{NEWEST_USER}<br /><br/>{TOTAL_POSTS} {TOTAL_TOPICS}<br /> </span></td>
</tr>
#
#-----[ AFTER, ADD ]------------------------------------------
#
<!-- Mighty Gorgon - Full Album Pack - BEGIN -->
<tr><td height="15"></td></tr>
<tr><td><span class="cattitle">{L_NEWEST_PIC}</span></td></tr>
<tr>
<td class="row6b" align="center">
<span class="gensmall" style="line-height:150%">
<br />
<b>{NEW_PIC_TITLE}</b>
<br />
<a href="{U_NEW_PIC_LINK}" target="_pic"><img src="{NEW_PIC_IMAGE}" border="0"></a>
<br />
<b>{NEW_PIC_POSTER}</b>
<br />
{NEW_PIC_TIME}
<br />
</span>
</td>
</tr>
<tr><td height="15"></td></tr>
<tr><td><span class="cattitle">{L_RANDOM_PIC}</span></td></tr>
<tr>
<td class="row6b" align="center">
<span class="gensmall" style="line-height:150%">
<br />
<b>{RANDOM_PIC_TITLE}</b>
<br />
<a href="{U_RANDOM_PIC_LINK}" target="_pic"><img src="{RANDOM_PIC_IMAGE}" border="0"></a>
<br />
<b>{RANDOM_PIC_POSTER}</b>
<br />
{RANDOM_PIC_TIME}
<br />
</span>
</td>
</tr>
<!-- Mighty Gorgon - Full Album Pack - END -->
#
#-----[ SAVE/CLOSE ALL FILES ]--------------------------------
#
# EoM
in meine index.php habe ich es an 2 stellen folgendermassen eingefügt:
und:
Code: Alles auswählen
'L_FORUM' => $lang['Forum'],
'L_TOPICS' => $lang['Topics'],
'L_REPLIES' => $lang['Replies'],
'L_VIEWS' => $lang['Views'],
'L_POSTS' => $lang['Posts'],
'L_LASTPOST' => $lang['Last_Post'],
'L_NO_NEW_POSTS' => $lang['No_new_posts'],
'L_NEW_POSTS' => $lang['New_posts'],
'L_NO_NEW_POSTS_LOCKED' => $lang['No_new_posts_locked'],
'L_NEW_POSTS_LOCKED' => $lang['New_posts_locked'],
'L_ONLINE_EXPLAIN' => $lang['Online_explain'],
'L_MODERATOR' => $lang['Moderators'],
'L_FORUM_LOCKED' => $lang['Forum_is_locked'],
'L_MARK_FORUMS_READ' => $lang['Mark_all_forums'],
// Mighty Gorgon - Full Album Pack - BEGIN
'L_NEWEST_PIC' => $lang['Newest_pic'],
'NEW_PIC_IMAGE' => append_sid('album_thumbnail.'. $phpEx . '?pic_id=' . $newpicrow['pic_id']),
'NEW_PIC_TITLE' => $newpicrow['pic_title'],
'NEW_PIC_POSTER' => $newpicrow['pic_username'],
'U_NEW_PIC_LINK' => append_sid('album_showpage.' . $phpEx . '?pic_id=' . $newpicrow['pic_id']),
'NEW_PIC_TIME' => create_date($board_config['default_dateformat'], $newpicrow['pic_time'], $board_config['board_timezone']),
'L_RANDOM_PIC' => $lang['Random_pic'],
'RANDOM_PIC_IMAGE' => append_sid('album_thumbnail.'. $phpEx . '?pic_id=' . $randpicrow['pic_id']),
'RANDOM_PIC_TITLE' => $randpicrow['pic_title'],
'RANDOM_PIC_POSTER' => $randpicrow['pic_username'],
'U_RANDOM_PIC_LINK' => append_sid('album_showpage.' . $phpEx . '?pic_id=' . $randpicrow['pic_id']),
'RANDOM_PIC_TIME' => create_date($board_config['default_dateformat'], $randpicrow['pic_time'], $board_config['board_timezone']),
// Mighty Gorgon - Full Album Pack - END
'U_MARK_READ' => append_sid("index.$phpEx?mark=forums"))
);
und:
Code: Alles auswählen
$page_title = $lang['Index'];
// Mighty Gorgon - Full Album Pack - BEGIN
// Newest Pic
$sql = "SELECT *
FROM " . ALBUM_TABLE . " AS a, " . ALBUM_CAT_TABLE . " AS c
WHERE c.cat_id = a.pic_cat_id
AND c.cat_view_level = -1
ORDER BY pic_time DESC LIMIT 1";
if (!$result = $db->sql_query($sql))
{
message_die(GENERAL_ERROR, 'Could not query album information', '', __LINE__, __FILE__, $sql);
}
$newpicrow = $db->sql_fetchrow($result);
// Random Pic
$sql = "SELECT *
FROM " . ALBUM_TABLE . " AS a, " . ALBUM_CAT_TABLE . " AS c
WHERE c.cat_id = a.pic_cat_id
AND c.cat_view_level = -1
ORDER BY RAND() LIMIT 1";
if (!$result = $db->sql_query($sql))
{
message_die(GENERAL_ERROR, 'Could not query album information', '', __LINE__, __FILE__, $sql);
}
$randpicrow = $db->sql_fetchrow($result);
// Mighty Gorgon - Full Album Pack - END
include($phpbb_root_path . 'includes/page_header.'.$phpEx);
die "language" veränderungen so wie sie in der anleitung vorgesehen sind.
meine overall_footer.tpl datei sieht jetzt so aus:
meine overall_footer.tpl datei sieht jetzt so aus:
Code: Alles auswählen
<td valign="top" width="15%">
<!-- BEGIN switch_user_logged_in -->
<table width="100%" cellpadding="3" cellspacing="1" border="0" class="forumline">
<tr>
<td class="catHead" align="center" height="28"><span class="cattitle"><a href="http://www.epresso.com/shops/frame.php?shopId=9585&epresso=24bc2b9a6e5edcbdfe823e80a6804eba">Shop</span></a></td>
</tr>
<tr>
<td class="row2"align="center">
<br>
<!-- Anfang Werbung -->
<a href="http://www.epresso.com/shops/frameDetail.php?shopId=9585&artId=0000198933&s=0" target="_blank">Spicy T<p><img src="http://www.epresso.com/images/products/user/2291130783215.jpg" width="134" height="134" border="0"><br><br>Nur 13,90 €</a><br><p><a href="http://www.epresso.com/shops/frameDetail.php?shopId=9585&artId=0000198928&s=0" target="_blank">Kapuzen Sweatshirt<p><img src="http://www.epresso.com/images/products/user/2291130781673.jpg" width="134" height="134" border="0"><p><p>Nur 31,90€</a>
<!-- Schluss Werbung -->
<br />
</td>
</tr>
</table>
<!-- END switch_user_logged_out -->
<!-- BEGIN switch_user_logged_out -->
<table width="100%" cellpadding="3" cellspacing="1" border="0" class="forumline">
<tr>
<td class="catHead" align="center" height="28"><span class="cattitle">Werbung</span></td>
</tr>
<tr>
<td class="row1"align="center">
<br />
<!-- Anfang Werbung -->
<a href="http://www.epresso.com/shops/frameDetail.php?shopId=9585&artId=0000198933&s=0" target="_blank">Spicy T<p><img src="http://www.epresso.com/images/products/user/2291130783215.jpg" width="134" height="134" border="0"><br><br>Nur 13,90 €</a><br><p><a href="http://www.epresso.com/shops/frameDetail.php?shopId=9585&artId=0000198928&s=0" target="_blank">Kapuzen Sweatshirt<p><img src="http://www.epresso.com/images/products/user/2291130781673.jpg" width="134" height="134" border="0"><p><p>Nur 31,90€</a>
<!-- Schluss Werbung -->
<br>
</td>
</tr>
</table>
<br />
<!-- END switch_user_logged_out -->
<!-- BEGIN switch_user_logged_in -->
<table width="100%" cellpadding="3" cellspacing="1" border="0" class="forumline">
<tr>
<td class="catHead" align="center" height="28"><span class="cattitle">Foto Album</span></td>
</tr>
<tr>
<td class="row2"align="center">
<br>
<!-- Anfang Werbung -->
<!-- Mighty Gorgon - Full Album Pack - BEGIN -->
<tr><td height="15"></td></tr>
<tr><td><span class="cattitle">{L_NEWEST_PIC}</span></td></tr>
<tr>
<td class="row6b" align="center">
<span class="gensmall" style="line-height:150%">
<br />
<b>{NEW_PIC_TITLE}</b>
<br />
<a href="{U_NEW_PIC_LINK}" target="_pic"><img src="{NEW_PIC_IMAGE}" border="0"></a>
<br />
<b>{NEW_PIC_POSTER}</b>
<br />
{NEW_PIC_TIME}
<br />
</span>
</td>
</tr>
<tr><td height="15"></td></tr>
<tr><td><span class="cattitle">{L_RANDOM_PIC}</span></td></tr>
<tr>
<td class="row6b" align="center">
<span class="gensmall" style="line-height:150%">
<br />
<b>{RANDOM_PIC_TITLE}</b>
<br />
<a href="{U_RANDOM_PIC_LINK}" target="_pic"><img src="{RANDOM_PIC_IMAGE}" border="0"></a>
<br />
<b>{RANDOM_PIC_POSTER}</b>
<br />
{RANDOM_PIC_TIME}
<br />
</span>
</td>
</tr>
<!-- Mighty Gorgon - Full Album Pack - END -->
<!-- Schluss Werbung -->
<br />
</td>
</tr>
</table>
<!-- END switch_user_logged_out -->
<!-- BEGIN switch_user_logged_out -->
<table width="100%" cellpadding="3" cellspacing="1" border="0" class="forumline">
<tr>
<td class="catHead" align="center" height="28"><span class="cattitle">Foto Album</span></td>
</tr>
<tr>
<td class="row3"align="center">
<br />
<!-- Anfang Werbung -->
<!-- Mighty Gorgon - Full Album Pack - BEGIN -->
<tr><td height="15"></td></tr>
<tr><td><span class="cattitle">{L_NEWEST_PIC}</span></td></tr>
<tr>
<td class="row6b" align="center">
<span class="gensmall" style="line-height:150%">
<br />
<b>{NEW_PIC_TITLE}</b>
<br />
<a href="{U_NEW_PIC_LINK}" target="_pic"><img src="{NEW_PIC_IMAGE}" border="0"></a>
<br />
<b>{NEW_PIC_POSTER}</b>
<br />
{NEW_PIC_TIME}
<br />
</span>
</td>
</tr>
<tr><td height="15"></td></tr>
<tr><td><span class="cattitle">{L_RANDOM_PIC}</span></td></tr>
<tr>
<td class="row6b" align="center">
<span class="gensmall" style="line-height:150%">
<br />
<b>{RANDOM_PIC_TITLE}</b>
<br />
<a href="{U_RANDOM_PIC_LINK}" target="_pic"><img src="{RANDOM_PIC_IMAGE}" border="0"></a>
<br />
<b>{RANDOM_PIC_POSTER}</b>
<br />
{RANDOM_PIC_TIME}
<br />
</span>
</td>
</tr>
<!-- Mighty Gorgon - Full Album Pack - END -->
<!-- Schluss Werbung -->
<br>
</td>
</tr>
</table>
<br />
<!-- END switch_user_logged_out -->
<td valign="top" width="15%"></td>
<!-- BEGIN switch_user_logged_out -->
<table width="100%" cellpadding="3" cellspacing="1" border="0" class="forumline">
<tr>
<td class="catHead" align="center" height="28"><span class="cattitle">Werbung</span></td>
</tr>
<tr>
<td class="row1"align="center">
<br />
<!-- Anfang Werbung -->
<div align="center"><span class="copyright"><br/>
<script type="text/javascript"><!--
google_ad_client = "pub-5422472879344413";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_type = "text";
google_ad_channel ="";
google_color_border = "336699";
google_color_bg = "FFFFFF";
google_color_link = "0000FF";
google_color_url = "008000";
google_color_text = "000000";
//--></script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
<!-- Schluss Werbung -->
<br>
</td>
</tr>
</table>
<br />
<!-- END switch_user_logged_out -->
<!-- BEGIN switch_user_logged_in -->
<table width="100%" cellpadding="3" cellspacing="1" border="0" class="forumline">
<tr>
<td class="catHead" align="center" height="28"><span class="cattitle">Werbung</span></td>
</tr>
<tr>
<td class="row2"align="center">
<br>
<!-- Anfang Werbung -->
<div align="center"><span class="copyright"><br/>
<script type="text/javascript"><!--
google_ad_client = "pub-5422472879344413";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_type = "text";
google_ad_channel ="";
google_color_border = "336699";
google_color_bg = "FFFFFF";
google_color_link = "0000FF";
google_color_url = "008000";
google_color_text = "000000";
//--></script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
<!-- Schluss Werbung -->
<br />
</td>
</tr>
</table>
<!-- END switch_user_logged_out -->
</td>
</tr>
</table>
<div align="center"><span class="copyright"><br />{ADMIN_LINK}<br /> <a href="{U_ImpressumMOD1}" class="gensmall">{L_ImpressumMOD1}</a> <br>
<!--
We request you retain the full copyright notice below including the link to www.phpbb.com.
This not only gives respect to the large amount of time given freely by the developers
but also helps build interest, traffic and use of phpBB 2.0. If you cannot (for good
reason) retain the full copyright we request you at least leave in place the
Powered by phpBB line, with phpBB linked to www.phpbb.com. If you refuse
to include even this then support on our forums may be affected.
The phpBB Group : 2002
// -->
Powered by <a href="http://www.phpbb.com/" target="_phpbb" class="copyright">phpBB</a> © 2001, 2005 phpBB Group<br />{TRANSLATION_INFO}</span></div>
Was klar ist, weil die Variablen nur in über die index.php geparsed werden.bobnunne hat geschrieben:wie bereits geschrieben sieht auf der forumsstartseite (index) alles hervorragend aus. in der ansicht wenn man beiträge verfasst und liest, sowie in den einzelnen forumsansichten werden lediglich "falsche links" im block wiedergegeben und die fotos fehlen gänzlich.
Untergebracht in der page_header.php könnte es mit meinem leihenhaften Verständnis funktionieren, damit im Footer immer alles angezeigt wird.
Im Footer würde ich es eh nicht plazieren wollen, weil es die Board Performance bei jedem Seitenaufruf ausbremst, da die Zufallsbilder ständig geladen werden müssen.
Den Mod Ansich kannte ich bereits, allerdings hätte ich gerne nur Zufallsbilder und dabei nicht nur eins, sondern nebeneinander 3-5 angezeigt werden.
guck dir mal meine seite an ( www.paenzmithaetz.de/forum ). dort wird es nicht im footer angezeigt sondern auf der rechten seite. dazu ist aber die änderung im footer von nöten. vieleicht sollte ich erwähnen, dass ich die veränderung "subsilver permanente werbe fläche rechts" mit eingebaut habe, was die overall_footer.tpl und die overall_header.tpl dateien mit einschliesst. aus diesem grund habe ich ja die entsprechenden dateien mit gepostet
vieleicht ist es möglich, das die bilder ausschliesslich auf der index seite angezeigt werden und wenn man in die forenansicht geht oder beiträge schreibt, oder was auch immer tut, ausser den forenindex anzusehen, sich die "permanente werbefläche rechts" ausblendet. dann sollte es auch keine performance probleme geben.
hier ist dies zum beispiel so gelöst: www.bbszene.de/board
hier ist dies zum beispiel so gelöst: www.bbszene.de/board