Seite 1 von 1

Prob: Cash Mod in Verbindung mit CH Mod

Verfasst: 06.03.2005 22:32
von Bunny
Also folgendes Problem:
Ich habe/wollte den Cash-Mod sowie den CH-Mod auf meinem Forum einsetzen nun Folgendes Problem:

Cash Mod verlangt:
#
#-----[ FIND ]------------------------------------------
#
'U_POST_ID' => $postrow[$i]['post_id'])

#
#-----[ AFTER, ADD ]------------------------------------------
#
);

$cm_viewtopic->post_vars($postrow[$i],$userdata,$forum_id
alles schön und gut, wenn dieser Absatz nich bereits von dem CH-mod wie folgt bearbeitet worden wäre:
#
#-----[ FIND ]------------------------------------------------
#
'U_POST_ID' => $postrow[$i]['post_id'])
);
}
#
#-----[ REPLACE WITH ]----------------------------------------
#
//-- mod : categories hierarchy ------------------------------------------------
//-- delete
// 'U_POST_ID' => $postrow[$i]['post_id'])
// );
// }
//-- add
'U_POST_ID' => $postrow[$i]['post_id'],
'U_UNREAD_POST' => $config->url('viewtopic', array(POST_POST_URL => $postrow[$i]['post_id'], 'unmark' => 'post'), true),
));
$template->set_switch('postrow.unmark_read', $cookie_setup['keep_unreads']);

// message icon
$icons->topic_title('postrow', $postrow[$i]['post_icon'], ($forum_topic_data['topic_first_post_id'] == $postrow[$i]['post_id']) ? (($forum_topic_data['topic_type'] > POST_NORMAL) ? $forum_topic_data['topic_type'] : ($forum_topic_data['topic_calendar_time'] ? POST_CALENDAR : '')) : '');

// sub title
$front_sub_title = new front_sub_title();
$front_sub_title->topic_title('postrow', $postrow[$i]['post_sub_title'], intval($config->data['sub_title_length']), $highlight_match);
unset($front_sub_title);

// first post of the topic, get additional information for the subject
if ( $forum_topic_data['topic_first_post_id'] == $postrow[$i]['post_id'] )
{
// announce
$front_announce = new front_announce();
$front_announce->topic_title('postrow', $forum_topic_data['topic_time'], $forum_topic_data['topic_duration']);
unset($front_announce);

// calendar
$front_calendar = new front_calendar();
$front_calendar->topic_title('postrow', $forum_topic_data['topic_calendar_time'], $forum_topic_data['topic_calendar_duration']);
unset($front_calendar);
}
}

$forums->display_nav($forum_id);

$moderators = new moderators();
$moderators->read();
$moderators->display('moderators', $forum_id);

$pagination = new pagination('viewtopic', array(POST_TOPIC_URL => $topic_id, 'postdays' => $post_days, 'postorder' => $post_order, 'highlight' => $highlight));
$pagination->display('pagination', $total_replies, $config->data['posts_per_page'], $start, true, 'Posts_count');

$watch_mode = $is_watching_topic ? 'unwatch' : 'watch';
$l_watch_mode = $is_watching_topic ? 'Stop_watching_topic' : 'Start_watching_topic';
$watch_img = $is_watching_topic ? 'topic_un_watch' : 'topic_watch';
$template->assign_vars(array(
'U_WATCH_TOPIC' => $config->url('viewtopic', array(POST_TOPIC_URL => $topic_id, $watch_mode => 'topic', 'start' => $start, 'postdays' => $post_days, 'postorder' => $post_order, 'highlight' => $highlight), true),
'L_WATCH_TOPIC' => $user->lang($l_watch_mode),
'I_WATCH_TOPIC' => $user->img($watch_img),
)
);
$template->set_switch('watch', $can_watch_topic);
if ( $can_watch_topic )
{
$template->set_switch('watch.image', !empty($images[$watch_img]));
}
//-- fin mod : categories hierarchy --------------------------------------------
Nun habe ich natürlich keinen Plan mehr wo ich den Code vom Cash mod einbauen soll habe es schon den ganzen Tag versucht bin kurz vorm Verzweifeln!!!

Bitte helft mir!!!


mfg
Bunny

Verfasst: 07.03.2005 05:43
von rabbit
die lösung findet sich, wie in den meisten fällen, auf dem support-board von ptirhiik... :)

Verfasst: 07.03.2005 07:03
von Bunny
oupsss, sorry, hatte ich schon nachgeguckt aber nix gefunden *schäm***

so habs eingefügt wie's da steht aber irgendwie funzt es trotzdem net, irgendwas muss ich falsch gemacht haben?!?

hier mein code:
'U_MINI_POST' => $mini_post_url,

'U_POST_ID' => $postrow[$i]['post_id'],
// CASH MOD FIX

'U_UNREAD_POST' => $config->url('viewtopic', array(POST_POST_URL => $postrow[$i]['post_id'], 'unmark' => 'post'), true),

));
$template->set_switch('postrow.unmark_read', $cookie_setup['keep_unreads']);

// message icon
$icons->topic_title('postrow', $postrow[$i]['post_icon'], ($forum_topic_data['topic_first_post_id'] == $postrow[$i]['post_id']) ? (($forum_topic_data['topic_type'] > POST_NORMAL) ? $forum_topic_data['topic_type'] : ($forum_topic_data['topic_calendar_time'] ? POST_CALENDAR : '')) : '');

// sub title
$front_sub_title = new front_sub_title();
$front_sub_title->topic_title('postrow', $postrow[$i]['post_sub_title'], intval($config->data['sub_title_length']), $highlight_match);
unset($front_sub_title);

// first post of the topic, get additional information for the subject
if ( $forum_topic_data['topic_first_post_id'] == $postrow[$i]['post_id'] )
{
// announce
$front_announce = new front_announce();
$front_announce->topic_title('postrow', $forum_topic_data['topic_time'], $forum_topic_data['topic_duration']);
unset($front_announce);

// calendar
$front_calendar = new front_calendar();
$front_calendar->topic_title('postrow', $forum_topic_data['topic_calendar_time'], $forum_topic_data['topic_calendar_duration']);
unset($front_calendar);
}
}

$forums->display_nav($forum_id);

$moderators = new moderators();
$moderators->read();
$moderators->display('moderators', $forum_id);

$pagination = new pagination('viewtopic', array(POST_TOPIC_URL => $topic_id, 'postdays' => $post_days, 'postorder' => $post_order, 'highlight' => $highlight));
$pagination->display('pagination', $total_replies, $config->data['posts_per_page'], $start, true, 'Posts_count');

$watch_mode = $is_watching_topic ? 'unwatch' : 'watch';
$l_watch_mode = $is_watching_topic ? 'Stop_watching_topic' : 'Start_watching_topic';
$watch_img = $is_watching_topic ? 'topic_un_watch' : 'topic_watch';
$template->assign_vars(array(
'U_WATCH_TOPIC' => $config->url('viewtopic', array(POST_TOPIC_URL => $topic_id, $watch_mode => 'topic', 'start' => $start, 'postdays' => $post_days, 'postorder' => $post_order, 'highlight' => $highlight), true),
'L_WATCH_TOPIC' => $user->lang($l_watch_mode),
'I_WATCH_TOPIC' => $user->img($watch_img),
)
);
$template->set_switch('watch', $can_watch_topic);
if ( $can_watch_topic )
{
$template->set_switch('watch.image', !empty($images[$watch_img]));
}
//-- fin mod : categories hierarchy --------------------------------------------
$cm_viewtopic->post_vars($postrow[$i],$userdata,$forum_id
);



$template->pparse('body');

mfg
Bunny

Verfasst: 07.03.2005 18:30
von rabbit
verlinke mal bitte die ganze datei hier. :)
KB:datei

Verfasst: 07.03.2005 18:50
von Bunny
so hier wie erwünscht die komplette viewtopic.php in .txt

--->

hier


mfg
Bunny

Verfasst: 07.03.2005 20:33
von rabbit
finde und lösche:

Code: Alles auswählen

$cm_viewtopic->post_vars($postrow[$i],$userdata,$forum_id 
);
finde:

Code: Alles auswählen

		// calendar
		$front_calendar = new front_calendar();
		$front_calendar->topic_title('postrow', $forum_topic_data['topic_calendar_time'], $forum_topic_data['topic_calendar_duration']);
		unset($front_calendar);
	}
füge danach ein:

Code: Alles auswählen

	$cm_viewtopic->post_vars($postrow[$i],$userdata,$forum_id
	);

Verfasst: 07.03.2005 20:37
von easygo
oder so... (End of Part $template->assign_block_vars)

Code: Alles auswählen

		'U_POST_ID' => $postrow[$i]['post_id'],
		'U_UNREAD_POST' => $config->url('viewtopic', array(POST_POST_URL => $postrow[$i]['post_id'], 'unmark' => 'post'), true)
	));

// start add - cm
$cm_viewtopic->post_vars($postrow[$i],$userdata,$forum_id);
// end add - cm
... und entferne das:

Code: Alles auswählen

$cm_viewtopic->post_vars($postrow[$i],$userdata,$forum_id 
);