images beside your categories foutje

Hulp nodig bij een modificaties of op zoek naar een MOD? Bekijk ons archief. Support wordt helaas niet meer verleend.
Forumregels

Sinds 1 januari 2009 wordt phpBB2 niet meer ondersteund.
Onderstaande informatie is verouderd en dient uitsluitend als archief.
phpBB2.0.x
Gesloten
doffer
Berichten: 8
Lid geworden op: 25 okt 2007, 22:11

images beside your categories foutje

Bericht door doffer » 19 nov 2007, 09:34

  • Modificatie & Versie:
    Directe link naar de modificatie:
    Adres van je forum: http://
    2.22:
    ja veel met succes?

    er ontbreekt iets?
http://megauploads-myfile.com/uploads/b ... -forum.JPG

help maar ajb

Code: Selecteer alles

###############################################
## 
## MOD Title:   Categories & Forum Icon 
## MOD Version: 1.0.0
## Author: Anh Le Minh < netanh@zapo.net > 
## Website: http://www.netanh.com
## Forum: http://forum.netanh.com
## Description: This Mod gives 1 images beside your categories name, forum name on
## index page
##
## Files To Edit: 7
##                language/lang_xxx/lang_main.php 
##                language/lang_xxx/lang_admin.php 
##                admin/admin_forums.php
##                templates/YOUR_TEMPLATE/admin/forum_edit_body.tpl
##                templates/YOUR_TEMPLATE/admin/category_edit_body.tpl
##                templates/YOUR_TEMPLATE/index_body.tpl
##                index.php 
## Installation Time:   10-15 Minutes 
## Included Files:      none 
## 
################################################################################### 
## 
## Installation/Author Notes: 
## First always make a back-up from the files that 
## you're going to edit.
## 
## This add-on MOD adds a few field to your 'forums' & 'categories' table. 
################################################################################### 

# 
#-----[ ACTION: EXECUTE]----------------------------------- 
# 
# 
SQL QUERY: 
ALTER TABLE prefix_forums ADD forum_icon VARCHAR(100); 
ALTER TABLE prefix_categories ADD cat_icon VARCHAR(100);

# 
#-----[ ACTION: ]------------------------------------------ 
# OPEN: language/lang_xxx/lang_main.php 

[FIND]: 
// 
// That's all Folks! 

[ADD AFTER]: 

// Categories & Forum icon MOD
$lang['Icon'] = "Icon"; 

####### SAVE & CLOSE: language/lang_xxx/lang_main.php ####### 
#############################################################


# 
#-----[ ACTION: ]------------------------------------------ 
# OPEN: language/lang_xxx/lang_admin.php 

[FIND]: 
// 
// That's all Folks! 

[ADD AFTER]: 

// Categories & Forum icon MOD
$lang['Icon'] = "Icon"; 

####### SAVE & CLOSE: language/lang_xxx/lang_admin.php ####### 
#############################################################


# 
#-----[ ACTION: ]------------------------------------------ 
# OPEN: admin\admin_forums.php

[FIND]: 
case 'editforum':
			//
			// Show form to create/modify a forum
			//
			if ($mode == 'editforum')
			{
				// $newmode determines if we are going to INSERT or UPDATE after posting?

				$l_title = $lang['Edit_forum'];
				$newmode = 'modforum';
				$buttonvalue = $lang['Update'];

				$forum_id = intval($HTTP_GET_VARS[POST_FORUM_URL]);

				$row = get_info('forum', $forum_id);

				$cat_id = $row['cat_id'];
				$forumname = $row['forum_name'];
				$forumdesc = $row['forum_desc'];
				$forumstatus = $row['forum_status'];
[ADD AFTER]: 
$forumicon = $row['forum_icon'];

------------------------------
[FIND]: 
$forumdesc = '';

[ADD AFTER]: 
$forumicon = '';

------------------------------
[FIND]: 
'L_FORUM_DESCRIPTION' => $lang['Forum_desc'],

[ADD AFTER]: 
'L_ICON' => $lang['Icon'],

------------------------------
[FIND]: 
'DESCRIPTION' => $forumdesc)

[REPLACE WITH]:
'DESCRIPTION' => $forumdesc,
'F_ICON' => $forumicon)

------------------------------
[FIND]:
$sql = "INSERT INTO " . FORUMS_TABLE . " (forum_id, forum_name, cat_id, forum_desc, forum_order, forum_status, prune_enable" . $field_sql . ")
				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 . ")";

[REPLACE]:
$sql = "INSERT INTO " . FORUMS_TABLE . " (forum_id, forum_name, forum_icon, cat_id, forum_desc, forum_order, forum_status, prune_enable" . $field_sql . ")
				VALUES ('" . $next_id . "', '" . str_replace("\'", "''", $HTTP_POST_VARS['forumname']) . "', '" . str_replace("\'", "''", $HTTP_POST_VARS['forumicon']) . "', " . 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 . ")";


------------------------------
[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]);


[REPLACE]:
$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_icon = '" . str_replace("\'", "''", $HTTP_POST_VARS['forumicon']) . "', 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]);


------------------------------
[FIND]:
$sql = "INSERT INTO " . CATEGORIES_TABLE . " (cat_title, cat_order)
				VALUES ('" . $HTTP_POST_VARS['categoryname'] . "', $next_order)";


[REPLACE]:
$sql = "INSERT INTO " . CATEGORIES_TABLE . " (cat_title, cat_order, cat_icon) 
            VALUES ('" . $HTTP_POST_VARS['categoryname'] . "', $next_order, $caticon)";

------------------------------
[FIND]:
$cat_title = $row['cat_title'];

[ADD AFTER]:
$caticon = $row['cat_icon'];


------------------------------
[FIND]:
'CAT_TITLE' => $cat_title,

[ADD AFTER]:
'CAT_ICON' => $caticon,
'L_ICON' => $lang['Icon'],


------------------------------
[FIND]:
// Modify a category in the DB
$sql = "UPDATE " . CATEGORIES_TABLE . "
	SET cat_title = '" . str_replace("\'", "''", $HTTP_POST_VARS['cat_title']) . "' 
	WHERE cat_id = " . intval($HTTP_POST_VARS[POST_CAT_URL]);

[REPLACE]:
$sql = "UPDATE " . CATEGORIES_TABLE . "
	SET cat_title = '" . str_replace("\'", "''", $HTTP_POST_VARS['cat_title']) . "', cat_icon = '" . str_replace("\'", "''", $HTTP_POST_VARS['cat_icon']) . "' 
	WHERE cat_id = " . intval($HTTP_POST_VARS[POST_CAT_URL]);


------------------------------
[FIND]:
$name = $catinfo['cat_title'];

[ADD AFTER]:
$caticon = $catinfo['cat_icon'];

####### SAVE & CLOSE: admin\admin_forums.php ####### 
#############################################################

# 
#-----[ ACTION: ]------------------------------------------ 
# OPEN: index.php

[FIND]: 
//
// Start page proper
//
$sql = "SELECT c.cat_id, c.cat_title, c.cat_order
	FROM " . CATEGORIES_TABLE . " c 

[REPLACE]: 
//
// Start page proper
//
$sql = "SELECT c.cat_id, c.cat_title, c.cat_order, c.cat_icon
	FROM " . CATEGORIES_TABLE . " c 

------------------------------
[FIND]: 
if ( $display_forums )
		{
			$template->assign_block_vars('catrow', array(
				'CAT_ID' => $cat_id,
				'CAT_DESC' => $category_rows[$i]['cat_title'],
				'U_VIEWCAT' => append_sid("index.$phpEx?" . POST_CAT_URL . "=$cat_id"))
			);

[REPLACE]: 
if ( $display_forums )
		{
				if ($category_rows[$i]['cat_icon'] != '')
				{$c_icon = '&nbsp;<img src="'.$category_rows[$i]['cat_icon'].'"/>&nbsp;';}
                                else {$c_icon = '';}
			$template->assign_block_vars('catrow', array(
				'CAT_ID' => $cat_id,
				'CAT_DESC' => $category_rows[$i]['cat_title'],
				'CAT_ICON' => $c_icon,
				'U_VIEWCAT' => append_sid("index.$phpEx?" . POST_CAT_URL . "=$cat_id"))
			);


------------------------------
[FIND]: 
$row_color = ( !($i % 2) ) ? $theme['td_color1'] : $theme['td_color2'];
$row_class = ( !($i % 2) ) ? $theme['td_class1'] : $theme['td_class2'];
							
$template->assign_block_vars('catrow.forumrow',	array(
'ROW_COLOR' => '#' . $row_color,
'ROW_CLASS' => $row_class,
'FORUM_FOLDER_IMG' => $folder_image, 
'FORUM_ID' => $forum_data[$j]['forum_id'], 
'FORUM_NAME' => $forum_data[$j]['forum_name'],
'FORUM_DESC' => $forum_data[$j]['forum_desc'],
'POSTS' => $forum_data[$j]['forum_posts'],
'TOPICS' => $forum_data[$j]['forum_topics'],


[REPLACE]: 
$row_color = ( !($i % 2) ) ? $theme['td_color1'] : $theme['td_color2'];
$row_class = ( !($i % 2) ) ? $theme['td_class1'] : $theme['td_class2'];
if ($forum_data[$j]['forum_icon'] != '')
{$f_icon = '&nbsp;<img src="'.$forum_data[$j]['forum_icon'].'">&nbsp;';}
else {$f_icon = '';}

$template->assign_block_vars('catrow.forumrow',	array(
'ROW_COLOR' => '#' . $row_color,
'ROW_CLASS' => $row_class,
'FORUM_FOLDER_IMG' => $folder_image, 
'FORUM_ID' => $forum_data[$j]['forum_id'], 
'FORUM_NAME' => $forum_data[$j]['forum_name'],
'FORUM_DESC' => $forum_data[$j]['forum_desc'],
'FORUM_ICON' => $f_icon,
'POSTS' => $forum_data[$j]['forum_posts'],
'TOPICS' => $forum_data[$j]['forum_topics'],

####### SAVE & CLOSE: index.php ####### 
#############################################################


# 
#-----[ ACTION: ]------------------------------------------ 
# OPEN: templates\subSilver\admin\forum_edit_body.tpl

[FIND]: 
	<tr> 
	  <td class="row1">{L_FORUM_DESCRIPTION}</td>
	  <td class="row2"><textarea rows="5" cols="45" wrap="virtual" name="forumdesc" class="post">{DESCRIPTION}</textarea></td>
	</tr>

[ADD AFTER]: 
<tr> 
   <td class="row1">{L_ICON}</td>
   <td class="row2"><input type="text" size="25" name="forumicon" value="{F_ICON}" class="post" /></td>
</tr>

####### SAVE & CLOSE: templates\subSilver\admin\forum_edit_body.tpl ####### 
###########################################################################


# 
#-----[ ACTION: ]------------------------------------------ 
# OPEN: templates\subSilver\admin\category_edit_body.tpl

[FIND]: 
	<tr> 
	  <td class="row1">{L_CATEGORY}</td>
	  <td class="row2"><input type="text" size="25" name="cat_title" value="{CAT_TITLE}" /></td>
	</tr>

[ADD AFTER]: 
<tr> 
   <td class="row1">{L_ICON}</td>
   <td class="row2"><input type="text" size="25" name="cat_icon" value="{CAT_ICON}" class="post" /></td>
</tr>


####### SAVE & CLOSE: templates\subSilver\admin\category_edit_body.tpl ####### 
##############################################################################


# 
#-----[ ACTION: ]------------------------------------------ 
# OPEN: templates\subSilver\index_body.tpl

[FIND]: 
<span class="cattitle"><a href="{catrow.U_VIEWCAT}" class="cattitle">{catrow.CAT_DESC}</a></span>

[ADD BEFORE]: 
{catrow.CAT_ICON}


------------------------------
[FIND]: 
<span class="forumlink"> <a href="{catrow.forumrow.U_VIEWFORUM}" class="forumlink">{catrow.forumrow.FORUM_NAME}</a>

[ADD BEFORE]: 
{catrow.forumrow.FORUM_ICON}


####### SAVE & CLOSE: templates\subSilver\index_body.tpl ####### 
################################################################





Gebruikersavatar
Derky
Berichten: 4466
Lid geworden op: 07 apr 2005, 16:24
Locatie: Nederland
Contacteer:

Re: images beside your categories foutje

Bericht door Derky » 19 nov 2007, 11:46

doffer schreef: ja veel met succes?

er ontbreekt iets?

http://megauploads-myfile.com/uploads/b ... -forum.JPG

help maar ajb
Kan je wat duidelijker zijn (wat er niet lukt) en de support template correct invullen? :?

doffer
Berichten: 8
Lid geworden op: 25 okt 2007, 22:11

Re: images beside your categories foutje

Bericht door doffer » 19 nov 2007, 16:28

klik maar op de link dan zie het gelijk denk ik
Ik gebruik standaard themplate (subsilver)

rechtsboven wordt iets niet getoond! maar ik weet zelf niet wat het is

ik zie een kruisje...

dat bedoelde ik

doffer
Berichten: 8
Lid geworden op: 25 okt 2007, 22:11

Re: images beside your categories foutje

Bericht door doffer » 20 nov 2007, 20:34

geen reactie?

zeg het me ajb als mijn probleem nog niet duidelijk is, ik heb weinig ervaring met forums vandaar misschien kan ik mijn probleem nog niet duideliujk beschrijven

ik hoor het graag

Gebruikersavatar
marian0810
Berichten: 1974
Lid geworden op: 09 apr 2007, 10:24
Locatie: Hoofddorp
Contacteer:

Re: images beside your categories foutje

Bericht door marian0810 » 20 nov 2007, 20:38

Een link zou wel handig zijn, de template is er niet voor niets.

Wat staat er bij eigenschappen als je er met rechts op klikt?

doffer
Berichten: 8
Lid geworden op: 25 okt 2007, 22:11

Re: images beside your categories foutje

Bericht door doffer » 22 nov 2007, 08:19

hey thanx voor je reactie

http://xxxxxxxx.nl/forum/ dit zie ik man

BetaDevil
Berichten: 2810
Lid geworden op: 28 mei 2006, 15:27

Re: images beside your categories foutje

Bericht door BetaDevil » 22 nov 2007, 09:21

Je bent totaal niet duidelijk, kijk of je plaatje goed staat en lees een readme als die erbij zit

Gesloten