Seite 1 von 1

alternative shoutbox mit cat-hierarchy? wie?

Verfasst: 25.09.2004 22:13
von rabbit
hi,

ich hab' schon seit einer weile die alternative shoutbox von stefan aug meinem board laufen, zu finden hier: http://www.phpbb2.de/dload.php?action=file&file_id=140

nun hab' ich den cat-hierarchy-hack installiert und in der index.php ist genau der teil, der die shoutbox betrifft, ausgeklammert worden. ebenso der teil aus der index_body.tpl...

ich hoffe, es kann mir jemand helfen, die shoutbox trotz cat-hierarchy wieder zum laufen zu bringen?

hier mal die install.txt: (sie ist recht kurz, hoffe, das ist ok?)

Code: Alles auswählen

######################################################## 
## Mod Title:   Shoutbox for phpBB (Alternative) 
## Mod Version: 1.0.1 
## Rev Date:    Apr 16, 2003 
## Author:      stefan@phpbb2 < sp at phpbb2.de >
##		ciaran < salmanrushdie at email.com > 
## Description: Shoutbox 2.31 integrated with phpBB2 
## 
## Installation Level: Beginner 
## Installation Time:  5 Minutes 
## Files To Edit:      2 phpBB + 2 config
##         (1) index.php 
##         (2) templates\subSilver\index_body.tpl 
##         (3) $shoutbox_dir\shoutbox_auth.php (for config purposes) 
##         (3) $shoutbox_dir\shoutboxconf.php (for config purposes) 
## 
## Included Files:     16 
##         in zip file: shoutbox_phpbb2.zip 
## History: 04/16/03 - Updated to work with phpBB 2.0.4
######################################################## 
## Credits: 
## * Based onl Shoutbox (c) 2001 Brett Taylor 
##   [ http://www.addict.net.nz/~glutnix ] [ glutnix at addict.net.nz ] 
## * Inspired by postexitus' original SB Mod 
## * Ciaran who first released this Mod for phpBB2
######################################################## 
## EDIT PHPBB2 FILES
##
=================== [ EDIT: index.php ] ===================
=================== [    LOOK FOR     ] =================== 
						if ( $is_auth_ary[$forum_id]['auth_view'] )
						{

=================== [    ADD AFTER    ] =================== 
							if($forum_data[$j]['forum_name'] == "Shoutbox")
							{
							$folder_image = "<img src=\"mods/shoutbox/shoutbox.gif\" alt=\"Shoutbox\" />";

							$template->assign_block_vars("catrow.shoutrow",	array(
								"FOLDER" => $folder_image)
							);
							}
							else
							{

=================== [    LOOK FOR     ] =================== 
								'U_VIEWFORUM' => append_sid("viewforum.$phpEx?" . POST_FORUM_URL . "=$forum_id"))
							);

=================== [    REPLACE      ] =================== 
								'U_VIEWFORUM' => append_sid("viewforum.$phpEx?" . POST_FORUM_URL . "=$forum_id"))
							);
							}

======= [ EDIT: templates\subSilver\index_body.tpl ] ======
=================== [    LOOK FOR     ] =================== 
  <!-- END forumrow -->
  <!-- END catrow -->

=================== [    REPLACE      ] =================== 
  <!-- END forumrow -->
  <!-- BEGIN shoutrow -->
  <tr> 
	<td class="row1" align="center" valign="middle" height="75">{catrow.shoutrow.FOLDER}</td>
	<td class="row1" width="100%" height="75" colspan="4" align="center"><iframe bgcolor="{T_BODY_BGCOLOR}" src="mods/shoutbox/viewshoutbox.php" width="100%" height="100%" frameborder="0"></iframe></td>
  </tr>
  <!-- END shoutrow -->
  <!-- END catrow -->
=================== [    REPLACE      ] =================== 
=================== [      DONE       ] =================== 
##
######################################################## 
## SET UP SHOUTBOX FORUM
##
## * Create a forum called "Shoutbox." Feel free to stick it under any category. I personally have made a "Shoutbox" category.
## * Change the permissions... View, Read, Post, Delete (to whichever user/group you want... all of these can be different users/groups), and Moderators. The rest should be stuck at "Admin." 
## * Lock the Shoutbox forum
## * Create a folder in your phpbb2 root dir /mods/shoutbox and copy the content of the Zip Archive into it. 
## * Now edit your two configuration files in your shoutbox directory: 
##   (1) shoutboxconf.php
##   (2) shoutbox_auth.php 
## * If you want to use another Template then subSilver you have to create your own *.css file and copy it into the Shoutbox folder
## *** NOTE!!! DELETE THE TWO FILES:
##   (1) SHOUTBOX_CREATE_TABLES.SQL
##   (2) SHOUTBOX_INSTALL.TXT
##
## ... you're done! 
## 
######################################################## 
btw, es handelt sich um den cat-hierarchy 2.0.5RC2!

Verfasst: 26.09.2004 11:46
von Acid
index_box.tpl

Code: Alles auswählen

#
#------[ FINDE ]---------------
#
<!-- END tablefoot -->
<!-- END catrow -->

#
#------[ MIT FOLGENDEM ERSETZEN ]---------------
#
<!-- END tablefoot -->
<!-- BEGIN shoutrow -->
<tr>
   <td class="row1" align="center" valign="middle" height="75">{catrow.shoutrow.FOLDER}</td>
   <td class="row1" width="100%" height="75" colspan="4" align="center"><iframe bgcolor="{T_BODY_BGCOLOR}" src="mods/shoutbox/viewshoutbox.php" width="100%" height="100%" frameborder="0"></iframe></td>
</tr>
<!-- END shoutrow -->
<!-- END catrow -->
...funktioniert das?

Verfasst: 26.09.2004 12:28
von rabbit
hi acid,

das kann ja nur funktionieren, wenn ich auch den teil, der eigentlich in die index.php gehört, irgendwohin packe, oder? und ich hab' absolut keinen schimmer, wohin damit... :roll:

mit der index_box.tpl hab' ich schon experimentiert, bin mir aber nicht sicher, ob ich deine version auch schon ausprobiert hatte...

Verfasst: 26.09.2004 13:10
von Acid
Die Änderung an der index.php ist eigentlich nur kosmetischer Natur (das bei der Shoutbox kein letzter Beitrag, keine Anzahl der Themen/Antworten und ein bestimmtes Forenimage usw. angezeigt werden).
Das kann man später immer noch versuchen einzustellen.. Hauptsache das die Shoutbox überhaupt angezeigt wird.

Verfasst: 26.09.2004 13:32
von rabbit
hi,

nix. es wird einfach nicht angezeigt. das forum ist da, es lief ja auch vor dem cat-hierarchy schon, aber auf dem index soll ja eben statt der forum-beschreibung, topics, post, last post die shoutbox angezeigt werden...
hab' auch nochmal geprüft, ob nicht mods/shoutbox/ versehentlich abhanden gekommen ist, ist aber alles da...

ich hab' den code schon zwischen diese zeilen gepackt:

Code: Alles auswählen

<!-- END forumrow -->

<!-- BEGIN catfoot -->

Code: Alles auswählen

<!-- BEGIN tablefoot -->
</table>

<!-- END tablefoot -->
und auch ganz ans ende, nach catrow...

so sieht die datei momentan aus: index_box.tpl

Verfasst: 27.09.2004 21:32
von Acid
Funktioniert die Shoutbox auch ohne das ein Forum dafür erstellt wird ?
Also das einfach die viewshoutbox.php in einem iFrame eingebunden wird!?

Wenn nicht muss man, um´s in den Foren einzugliedern, die functions_category_hierarchy noch anpassen (hab ich oben vergessen zu erwähnen).
Aber k/A wo genau.. :wink:
Auf jeden Fall müsste dann im Array von "catrow"* in etwa ein Code wie folgender eingefügt werden..
if($title == "Shoutbox")
{
$folder_image = "<img src=\"mods/shoutbox/shoutbox.gif\" alt=\"Shoutbox\" />";
$template->assign_block_vars("catrow.shoutrow", array("FOLDER" => $folder_image));
}
* ca. im Bereich von $template->assign_block_vars('catrow.forumrow', array(
* eventuell noch mit den anderen Switches verbinden (wenn was geändert wird, diesen Part auch im tpl-Teil anpassen)

Verfasst: 27.09.2004 23:56
von rabbit
danke, ich werd's morgen mal ausprobieren, heute würde ich eh nur fehler einbauen um diese zeit... :roll: