|
| slydog wrote:
|
Hi I am really new to phpnuke and installing i want to put some mods on it but in the readme it say edit files all i am getting stuck with is what does ADD, AFTER mean where do i put the script. Sorry for goin right back to basics.
slydog
|
OK lets have an example:
| Code:
|
#-----[ OPEN ]------------------------------------------
#
modules/forums/viewtopic.php
#
#-----[ FIND ]------------------------------------------
#
$sql = "SELECT u.username, u.user_id,
#
#-----[ IN-LINE FIND ]------------------------------------------
#
, u.user_msnm
#
#-----[ IN-LINE AFTER, ADD ]------------------------------------------
#
, u.user_bf2142
|
This is what you will see in the file:
| Code:
|
//
// Go ahead and pull all data for this topic
//
$sql = "SELECT u.username, u.user_color_gc, u.user_id, u.user_posts, u.user_from, u.user_website, u.user_email, u.user_icq, u.user_aim, u.user_yim, u.user_regdate, u.user_msnm, [YOU PUT THE REQUESTED LINE OF CODE HERE]u.user_bf2142[IT ENDS HERE], u.user_viewemail, u.user_rank, u.user_sig, u.user_sig_bbcode_uid, u.user_avatar, u.user_avatar_type, u.user_allowavatar, u.user_allowsmile, u.points, p.*, u.user_gender, pt.post_text, pt.post_subject, pt.bbcode_uid
FROM " . POSTS_TABLE . " p, " . USERS_TABLE . " u, " . POSTS_TEXT_TABLE . " pt
WHERE p.topic_id = '$topic_id'
$limit_posts_time
AND pt.post_id = p.post_id
AND u.user_id = p.poster_id
ORDER BY p.post_time $post_time_order
LIMIT $start, ".$board_config['posts_per_page'];
if ( !($result = $db->sql_query($sql)) )
{
|
See where I had to put "u.user_bf2142" I have tried to show you in the code itself where you are meant to put it, just so you could get an easier idea of what you have to do
Lets look at another example:
| Code:
|
#-----[ FIND ]------------------------------------------
#
$yim = ( $postrow[$i]['user_yim'] ) ? '<a href="http://edit.yahoo.com/config/send_webmesg?.target=' . $postrow[$i]['user_yim'] . '&.src=pg">' . $lang['YIM'] . '</a>' : '';
#
#-----[ AFTER, ADD ]------------------------------------------
#
$bf2142_img = ( $postrow[$i]['user_bf2142'] ) ? '<a target="_blank" href="' . bf2142_profile_url ($postrow[$i]['user_bf2142']) . '"><img src="' . $images['icon_bf2142'] . '" alt="' . $lang['Profile_bf2142'] . '" title="' . $lang['Profile_bf2142'] . '" border="0" /></a>' : '';
#
|
This is how it should look in your .php file:
| Code:
|
$yim_img = ( $postrow[$i]['user_yim'] ) ? '<a href="http://edit.yahoo.com/config/send_webmesg?.target=' . $postrow[$i]['user_yim'] . '&.src=pg"><img src="' . $images['icon_yim'] . '" alt="' . $lang['YIM'] . '" title="' . $lang['YIM'] . '" border="0" /></a>' : '';
$yim = ( $postrow[$i]['user_yim'] ) ? '<a href="http://edit.yahoo.com/config/send_webmesg?.target=' . $postrow[$i]['user_yim'] . '&.src=pg">' . $lang['YIM'] . '</a>' : '';
[THIS IS WHERE YOU ADD THE LINE OF CODE]$bf2142_img = ( $postrow[$i]['user_bf2142'] ) ? '<a target="_blank" href="' . bf2142_profile_url ($postrow[$i]['user_bf2142']) . '"><img src="' . $images['icon_bf2142'] . '" alt="' . $lang['Profile_bf2142'] . '" title="' . $lang['Profile_bf2142'] . '" border="0" /></a>' : '';[THIS IS THE END OF THE MODIFICATION]
|
The best way to do this type of modification is to use the find feature in Dreamweaver.
I hope this clarifies this for you buddy. If you need any more help by all means post a reply ;)
DoC
|
|
Play EVE Online?
Go To: www.go-pdi.com & Join The Best Corp In The Universe!
|