|
|
phpBB2 by Przemo
Support forów phpBB2 modified by Przemo
|
|
Przesunięty przez: joli 22-01-2009, 19:30 |
[Problem] Forum Icon with ACP Control |
Autor |
Wiadomość |
witek1
Posty: 23
|
Wysłany: 11-02-2007, 08:26 [Problem] Forum Icon with ACP Control
|
|
|
Mam problem z tą modyfikacją: http://www.phpbb2.pl/download.php?d=514
Szukałem odpowiedzi, ale nie znalazłem !
Chodzi o to, że prawie cała instrukcja jest dobra, ale w pewnym momencie zaczynają się schody w: index.php, index_body.tpl, viewforum_body.tpl
Nie ma nawet fragmentów wpisu, po których można znaleźć odpowiednie miejsca. Przemo musiał zastąpić nazwy innymi. Jeżeli ktoś wie jak zmodyfikować moda do forum przema pls o info.
Mod daje możliwość wstawiania obrazków obok forum.
instrukcja:
Kod: | ########################################################
## MOD Title: Forum Icon with ACP Control (Default)
## MOD Version: 1.0.6
## MOD Author: Mac (Y.C. LIN) < ycl6@users.sourceforge.net > http://macphpbbmod.sourceforge.net/
##
## MOD Description: This mod allow admin to give each forum a icon in the ACP
## Icons will show on index & viewforum
##
## Installation Level: Easy
## Installation Time: 5 Minutes
##
## Files To Edit: 8
## index.php
## viewforum.php
## admin/admin_forums.php
## language/lang_english/lang_admin.php
## templates/subSilver/admin/forum_admin_body.tpl
## templates/subSilver/admin/forum_edit_body.tpl
## templates/subSilver/index_body.tpl
## templates/subSilver/viewforum_body.tpl
##
## Included Files: n/a
##
#################################################################
## 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:
## Set your forum icon image paths as those rank images
##
## If you wish to using the LIST BOX option,
## you have to follow the instruction in EXTRA folder. Please DO NOT using the below code!
## Both options CANNOT be used together.
##
##############################################################
## MOD History:
##
## 2003-11-04 - Version 1.0.0
## - Initial Release
##
## 2003-11-08 - Version 1.0.1
## - Checked for 2.0.6 competibility, no change in coding
##
## 2003-11-15 - Version 1.0.2
## - Corrections were made for phpBB MOD Database submission
##
## 2003-12-01 - Version 1.0.3
## - Forum icon selectable using list box (Option 2)
## - Add forum icon image to Forum Administration main panel
## - Add forum icon image to corresponding the viewforum.php
##
## 2004-02-11 - Version 1.0.4
## - Fix ListBox no-picture problem when icon is slected for the first time
## People using the default option DOES NOT need to upgrade
##
## 2004-03-13 - Version 1.0.5
## - Fix ListBox no-picture problem when create new forum
## People using the default option DOES NOT need to upgrade
##
## 2004-05-29 - Version 1.0.6
## - Corrections in MOD template were made for phpBB MOD Database submission
##
##############################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
##############################################################
#
#-----[ SQL ]------------------------------------------
#
# Remember to change the table prefix used on your database
ALTER TABLE `phpbb2_forums` ADD `forum_icon` VARCHAR( 255 ) default NULL;
#
#-----[ OPEN ]------------------------------------------
#
language/lang_english/lang_admin.php
#
#-----[ FIND ]------------------------------------------
#
$lang['Forum_status'] = 'Forum status';
#
#-----[ AFTER, ADD ]------------------------------------------
#
$lang['Forum_icon'] = 'Forum icon'; // Forum Icon MOD
#
#-----[ OPEN ]------------------------------------------
#
admin/admin_forums.php
#
#-----[ FIND ]------------------------------------------
#
$forumstatus = $row['forum_status'];
#
#-----[ AFTER, ADD ]------------------------------------------
#
$forumicon = $row['forum_icon']; // Forum Icon MOD
#
#-----[ FIND ]------------------------------------------
#
$forumstatus = FORUM_UNLOCKED;
#
#-----[ AFTER, ADD ]------------------------------------------
#
$forumicon = ''; // Forum Icon MOD
#
#-----[ FIND ]------------------------------------------
#
'L_FORUM_STATUS' => $lang['Forum_status'],
#
#-----[ AFTER, ADD ]------------------------------------------
#
'L_FORUM_ICON' => $lang['Forum_icon'], // Forum Icon MOD
#
#-----[ FIND ]------------------------------------------
#
'DESCRIPTION' => $forumdesc)
#
#-----[ REPLACE WITH ]------------------------------------------
#
'DESCRIPTION' => $forumdesc,
'ICON' => ( $forumicon ) ? $forumicon : '', // Forum Icon MOD
'ICON_DISPLAY' => ( $forumicon ) ? '<img src="' . $phpbb_root_path . $forumicon . '" />' : '' // Forum Icon MOD
)
#
#-----[ FIND ]------------------------------------------
#
// There is no problem having duplicate forum names so we won't check for it.
$sql = "INSERT INTO " . FORUMS_TABLE . " (forum_id, forum_name, cat_id, forum_desc, forum_order, forum_status, prune_enable" . $field_sql . ")
#
#-----[ IN-LINE FIND ]------------------------------------------
#
forum_status
#
#-----[ IN-LINE AFTER, ADD ]------------------------------------------
#
, forum_icon
#
#-----[ FIND ]------------------------------------------
#
VALUES ('" . $next_id . "', '" . str_replace("\'", "''", $HTTP_POST_VARS['forumname']) . "', " . intval($HTTP_POST_VARS[POST_CAT_URL]) . ", '" . str_replace("\'", "''", $HTTP_POST_VARS['forumdesc']) . "', $next_order, " . intval($HTTP_POST_VARS['forumstatus']) . ", " . intval($HTTP_POST_VARS['prune_enable']) . $value_sql . ")";
#
#-----[ IN-LINE FIND ]------------------------------------------
#
, " . intval($HTTP_POST_VARS['forumstatus']) . "
#
#-----[ IN-LINE AFTER, ADD ]------------------------------------------
#
, '" . str_replace("\'", "''", $HTTP_POST_VARS['forumicon']) . "'
#
#-----[ FIND ]------------------------------------------
#
$sql = "UPDATE " . FORUMS_TABLE . "
SET forum_name = '" . str_replace("\'", "''", $HTTP_POST_VARS['forumname']) . "', cat_id = " . intval($HTTP_POST_VARS[POST_CAT_URL]) . ", forum_desc = '" . str_replace("\'", "''", $HTTP_POST_VARS['forumdesc']) . "', forum_status = " . intval($HTTP_POST_VARS['forumstatus']) . ", prune_enable = " . intval($HTTP_POST_VARS['prune_enable']) . "
WHERE forum_id = " . intval($HTTP_POST_VARS[POST_FORUM_URL]);
#
#-----[ IN-LINE FIND ]------------------------------------------
#
, forum_status = " . intval($HTTP_POST_VARS['forumstatus']) . "
#
#-----[ IN-LINE AFTER, ADD ]------------------------------------------
#
, forum_icon = '" . str_replace("\'", "''", $HTTP_POST_VARS['forumicon']) . "'
#
#-----[ FIND ]------------------------------------------
#
'FORUM_DESC' => $forum_rows[$j]['forum_desc'],
#
#-----[ AFTER, ADD ]------------------------------------------
#
'FORUM_ICON_IMG' => ( $forum_rows[$j]['forum_icon'] ) ? '<img src="' . $phpbb_root_path . $forum_rows[$j]['forum_icon'] . '" alt="'.$forum_data[$j]['forum_name'].'" title="'.$forum_data[$j]['forum_name'].'" />' : '', // Forum Icon Mod
#
#-----[ OPEN ]------------------------------------------
#
index.php
#
#-----[ FIND ]------------------------------------------
#
$posts = $forum_data[$j]['forum_posts'];
$topics = $forum_data[$j]['forum_topics'];
#
#-----[ AFTER, ADD ]------------------------------------------
#
$icon = $forum_data[$j]['forum_icon']; // Forum Icon Mod
#
#-----[ FIND ]------------------------------------------
#
'FORUM_FOLDER_IMG' => $folder_image,
#
#-----[ AFTER, ADD ]------------------------------------------
#
'FORUM_ICON_IMG' => ($icon) ? '<img src="' . $phpbb_root_path . $icon . '" alt="'.$forum_data[$j]['forum_name'].'" title="'.$forum_data[$j]['forum_name'].'" />' : '', // Forum Icon Mod
#
#-----[ OPEN ]------------------------------------------
#
viewforum.php
#
#-----[ FIND ]------------------------------------------
#
'FORUM_NAME' => $forum_row['forum_name'],
#
#-----[ AFTER, ADD ]------------------------------------------
#
'FORUM_ICON_IMG' => ($forum_row['forum_icon']) ? '<img src="' . $phpbb_root_path . $forum_row['forum_icon'] . '" alt="'.$forum_row['forum_name'].'" title="'.$forum_row['forum_name'].'" /> ' : '', // Forum Icon Mod Icon Mod
#
#-----[ OPEN ]------------------------------------------
#
templates/subSilver/admin/forum_edit_body.tpl
#
#-----[ FIND ]------------------------------------------
#
<tr>
<td class="row1">{L_FORUM_NAME}</td>
<td class="row2"><input type="text" size="25" name="forumname" value="{FORUM_NAME}" class="post" /></td>
</tr>
#
#-----[ AFTER, ADD ]------------------------------------------
#
<tr>
<td class="row1">{L_FORUM_ICON}</td>
<td class="row2"><input type="text" size="35" name="forumicon" value="{ICON}" class="post" /> {ICON_DISPLAY}</td>
</tr>
#
#-----[ OPEN ]------------------------------------------
#
templates/subSilver/admin/forum_admin_body.tpl
#
#-----[ FIND ]------------------------------------------
#
<td class="row2"><span class="gen"><a href="{catrow.forumrow.U_VIEWFORUM}" target="_new">{catrow.forumrow.FORUM_NAME}</a></span><br /><span class="gensmall">{catrow.forumrow.FORUM_DESC}</span></td>
#
#-----[ IN-LINE FIND ]------------------------------------------
#
<td class="row2"><span class="gen">
#
#-----[ IN-LINE AFTER, ADD ]------------------------------------------
#
{catrow.forumrow.FORUM_ICON_IMG}
#
#-----[ OPEN ]------------------------------------------
#
templates/subSilver/index_body.tpl
#
#-----[ FIND ]------------------------------------------
#
<th colspan="2" class="thCornerL" height="25" nowrap="nowrap"> {L_FORUM} </th>
#
#-----[ IN-LINE FIND ]------------------------------------------
#
colspan="2"
#
#-----[ IN-LINE REPLACE WITH ]------------------------------------------
#
colspan="3"
#
#-----[ FIND ]------------------------------------------
#
<td class="catLeft" colspan="2" height="28"><span class="cattitle"><a href="{catrow.U_VIEWCAT}" class="cattitle">{catrow.CAT_DESC}</a></span></td>
#
#-----[ IN-LINE FIND ]------------------------------------------
#
colspan="2"
#
#-----[ IN-LINE REPLACE WITH ]------------------------------------------
#
colspan="3"
#
#-----[ FIND ]------------------------------------------
#
<td class="row1" align="center" valign="middle" height="50"><img src="{catrow.forumrow.FORUM_FOLDER_IMG}" width="46" height="25" alt="{catrow.forumrow.L_FORUM_FOLDER_ALT}" title="{catrow.forumrow.L_FORUM_FOLDER_ALT}" /></td>
#
#-----[ AFTER, ADD ]------------------------------------------
#
<td class="row1" align="center" valign="middle" height="50">{catrow.forumrow.FORUM_ICON_IMG}</td>
#
#-----[ OPEN ]------------------------------------------
#
templates/subSilver/viewforum_body.tpl
#
#-----[ FIND ]------------------------------------------
#
<td align="left" valign="bottom" colspan="2"><a class="maintitle" href="{U_VIEW_FORUM}">{FORUM_NAME}</a>
#
#-----[ IN-LINE FIND ]------------------------------------------
#
<td align="left" valign="bottom" colspan="2">
#
#-----[ IN-LINE AFTER, ADD ]------------------------------------------
#
{FORUM_ICON_IMG}
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM |
[ Dodano: 11-02-2007, 08:29 ]
Aha i w zapytaniu SQL: Kod: | ALTER TABLE `phpbb2_forums` ADD `forum_icon` VARCHAR( 255 ) default NULL; | trzeba zmienić phpbb2_forums na phpbb_forums. Tak mi się wydawało bo wywalało błąd, że nie istnieje zrobiłem tak i wpis się dodał. Choć się nie znam
[ Dodano: 12-02-2007, 14:37 ]
Mam problem z tą modyfikacją: http://www.phpbb2.pl/download.php?d=514
Szukałem odpowiedzi, ale nie znalazłem !
Chodzi o to, że prawie cała instrukcja jest dobra, ale w pewnym momencie zaczynają się schody w: index.php, index_body.tpl, viewforum_body.tpl
Nie ma nawet fragmentów wpisu, po których można znaleźć odpowiednie miejsca. Przemo musiał zastąpić nazwy innymi. Jeżeli ktoś wie jak zmodyfikować moda do forum przema pls o info.
Mod daje możliwość wstawiania obrazków obok forum.
[EDIT]
Zmieniłem parę rzeczy w kodzie i jest widoczny postęp.
Oto one:
to: Kod: | ALTER TABLE `phpbb2_forums` ADD `forum_icon` VARCHAR( 255 ) default NULL; |
na to: Kod: | ALTER TABLE `phpbb_forums` ADD `forum_icon` VARCHAR( 255 ) default NULL; |
to: Kod: | #-----[ OPEN ]------------------------------------------
#
language/lang_polish/lang_admin.php
#
#-----[ FIND ]------------------------------------------
#
$lang['Forum_status'] =
#
#-----[ AFTER, ADD ]------------------------------------------
#
$lang['Forum_icon'] = 'Obraz forum'; // Forum Icon MOD
|
na to: Kod: | #-----[ OPEN ]------------------------------------------
#
language/lang_english/lang_admin.php
#
#-----[ FIND ]------------------------------------------
#
$lang['Forum_status'] = 'Forum status';
#
#-----[ AFTER, ADD ]------------------------------------------
#
$lang['Forum_icon'] = 'Forum icon'; // Forum Icon MOD |
to: Kod: | #
#-----[ OPEN ]------------------------------------------
#
templates/subSilver/index_body.tpl
#
#-----[ FIND ]------------------------------------------
#
<th colspan="2" class="thCornerL" height="25" nowrap="nowrap"> {L_FORUM} </th>
#
#-----[ IN-LINE FIND ]------------------------------------------
#
colspan="2"
#
#-----[ IN-LINE REPLACE WITH ]------------------------------------------
#
colspan="3"
#
#-----[ FIND ]------------------------------------------
#
<td class="catLeft" colspan="2" height="28"><span class="cattitle"><a href="{catrow.U_VIEWCAT}" class="cattitle">{catrow.CAT_DESC}</a></span></td>
#
#-----[ IN-LINE FIND ]------------------------------------------
#
colspan="2"
#
#-----[ IN-LINE REPLACE WITH ]------------------------------------------
#
colspan="3"
#
#-----[ FIND ]------------------------------------------
#
<td class="row1" align="center" valign="middle" height="50"><img src="{catrow.forumrow.FORUM_FOLDER_IMG}" width="46" height="25" alt="{catrow.forumrow.L_FORUM_FOLDER_ALT}" title="{catrow.forumrow.L_FORUM_FOLDER_ALT}" /></td>
#
#-----[ AFTER, ADD ]------------------------------------------
#
<td class="row1" align="center" valign="middle" height="50">{catrow.forumrow.FORUM_ICON_IMG}</td>
|
Na to: (zaznaczam, że mam styl bahamut) Kod: | #
#-----[ OPEN ]------------------------------------------
#
templates/{twój_styl}/index_box.tpl
#
#-----[ FIND ]------------------------------------------
#
<th colspan="{catrow.tablehead.INC_SPAN}" width="100%" nowrap="nowrap"<!-- BEGIN br --> onclick="javascript:ShowHide('hc_{catrow.tablehead.CAT_ID}','hc2_{catrow.tablehead.CAT_ID}','hc3_{catrow.tablehead.CAT_ID}');" style="cursor: pointer" title="{L_VHIDE}"<!-- END br -->> {catrow.tablehead.L_FORUM} </th>
#
#-----[ AFTER ADD ]------------------------------------------
#
<th width="50" nowrap="nowrap"> Obraz: </th>
#
#-----[ FIND]------------------------------------------
#
<td class="{catrow.cathead.CLASS_CAT}" width="100%" colspan="{catrow.cathead.INC_SPAN}"><span class="cattitle"><a href="{catrow.cathead.U_VIEWCAT}" class="cattitle">{catrow.cathead.CAT_TITLE}</a></span></td>
#
#-----[ AFTER ADD ]------------------------------------------
#
<td class="{catrow.cathead.CLASS_CAT}" width="100%" colspan="{catrow.cathead.INC_SPAN}"><span class="cattitle"></span></td>
#
#-----[ FIND ]------------------------------------------
#
<!-- END links -->
</span></td>
#
#-----[ AFTER ADD ]------------------------------------------
#
<td class="row1" align="center" valign="middle" height="50">{catrow.forumrow.FORUM_ICON_IMG}</td>
|
OD RAZU ZAZNACZAM, ŻE ZNAM SIĘ SŁABO I MOŻE BYĆ COŚ NIE TAK !
Nie udało mi się zmodyfikować: index.php , viewforum_body.tpl
I nie wyświetla mi się obrazek choć jest tabelka. I w adminie i na forum. Jest taka ikonka jak by nie mogł przeczytać IMG albo był zły format, albo w cale nie było.
Proszę o pomoc !! Długo się z tym bawię i nie moge znaleźć rozwiązania.
Adres: www.forumdlaciebie.xx.pl |
|
|
|
|
Gadatliwa Kasia
|
|
|
|
danielv13
Posty: 3
|
Wysłany: 15-04-2007, 20:16
|
|
|
Może to ktoś przerobić pod modyfikacje Przema |
|
|
|
|
|
Nie możesz pisać nowych tematów Nie możesz odpowiadać w tematach Nie możesz zmieniać swoich postów Nie możesz usuwać swoich postów Nie możesz głosować w ankietach Nie możesz załączać plików na tym forum Możesz ściągać załączniki na tym forum
|
Dodaj temat do Ulubionych Wersja do druku
|
Kopiowanie wszelkich treści zawartych na forum, modyfikacji oraz instrukcji bez zgody administracji i autorów tematów/postów zabronione!
Powered by phpBB modified by Przemo © 2003 phpBB
| Strona wygenerowana w 0,11 sekundy. Zapytań do SQL: 13 | |
|
|