Clan Adverts

www.afgserv.com

www.clan-themes.co.uk :: View topic - Editing scripts for installing mods

 Welcome To Clan Themes 

As the board grows please remember the Search Option and we hope you find our community useful.

We also monitor Private Messages to stop members from abusing our sites system.
If you are asking for assistance please provide your site link and nuke version, Thanks.

Editing scripts for installing mods

10 Replies / 888 Views


Post new topic   Reply to topic  

   www.clan-themes.co.uk Forum Index » How To's

View previous topic :: View next topic


slydog
Reputation: 0.7
Local time: 6:50 PM


Status: Offline
0.02 posts per day
Medals: 0

Joined: Dec 27, 2007
Last Visit: 14 Aug 2008
Posts: 6
Points: 250 

Post Editing scripts for installing mods Posted: Tue Jan 01, 2008 9:55 pm   

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
 

 
View user's profileSend private message Reply with quote

DoC
Reputation: 168.1
votes: 4
Local time: 7:50 PM
Location: Wiltshire, UK
uk.gif

Status: Offline
0.56 posts per day
Medals: 1 (View more...)
Dedication (Amount: 1)
Very Important Person
Very Important Person
Joined: Feb 07, 2007
Last Visit: 29 Nov 2008
Posts: 373
Points: 400 

Post Re: Editing scripts for installing mods Posted: Tue Jan 01, 2008 10:22 pm   

Shop Purchases:
Clan Roster v1.7 Php Nuke Module · Clan Roster 2.0

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'] . '&amp;.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'] . '&amp;.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'] . '&amp;.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!  
View user's profileSend private messageSend e-mailVisit poster's websiteMSN Messenger Reply with quote

StevieH
Reputation: 522.8
votes: 2
Local time: 6:50 PM

uk.gif

Status: Offline
0.21 posts per day
Medals: 2 (View more...)
Site Supporter (Amount: 1)
Site Helper
Site Helper
Joined: Mar 19, 2007
Last Visit: 29 Nov 2008
Posts: 131
Points: 734 

Post Editing scripts for installing mods Posted: Tue Jan 01, 2008 10:26 pm   

Shop Purchases:
Battlefield 2 Theme (Aviator V2) · Battlefield 2142 (Aviator v2) · Arnhem Multi Gaming Theme · Call of Duty 4 Ultimate Theme · Multi Gaming (Warrior) Theme · Topsites Manager V1 PhpNuke Module · Clan Roster v1.7 Php Nuke Module · Frontlines Fuel Of War Theme · Anzio Multi Gaming Theme · Anzio Multi Gaming Theme

First off you need a decent editor like dreamweaver or something simaler, even some advance notepads are fine although sometimes they change the format of the file your editing. Next always when installing new mods always i mean always make a back up of the files your editing, you can even create folders on your desktop keeping the same structure of how they are on your website, once youve backed up all files then you can start editing them. Mods can be very trikky sometimes so i suggest you start with a small one just to get used to the basics. The mod will come with instructions on how to do it so read them carefully, for example if you was to install the image resize mod, then the instuctions will tell you to edit some of your files. Were it says open for example includes/bbcode.php then open the file in dreamweaver or simaler and follow further instructions ie find
Quote:
$patterns[] = "#\[img:$uid\]([^?].*?)\[/img:$uid\]#i";
and before/after add
Quote:
// mod img size replace with call to image parsing function $text = image_parse ( $text, $uid );
(this is for example only) the best was to find that line would be to use the editors find now button, you just paste the line you want to find there and it will find it :)

I think that mod installation is not for the novice as there can sometimes be some sql changes you have to do aswell manually, but if you are a quick learner then you will pick it up.........

Alternitivley ask Ped or Floppy to install for you, if there not too busy im sure they will do it for you............for a small charge of course. :)


good luck
 

 
View user's profileSend private messageVisit poster's websiteMSN Messenger Reply with quote




slydog
Reputation: 0.7
Local time: 6:50 PM


Status: Offline
0.02 posts per day
Medals: 0

Joined: Dec 27, 2007
Last Visit: 14 Aug 2008
Posts: 6
Points: 250 

View user's profileSend private message Reply with quote

DoC
Reputation: 168.1
votes: 4
Local time: 7:50 PM
Location: Wiltshire, UK
uk.gif

Status: Offline
0.56 posts per day
Medals: 1 (View more...)
Dedication (Amount: 1)
Very Important Person
Very Important Person
Joined: Feb 07, 2007
Last Visit: 29 Nov 2008
Posts: 373
Points: 400 

View user's profileSend private messageSend e-mailVisit poster's websiteMSN Messenger Reply with quote

Ped
Reputation: 336.9
votes: 17
Local time: 7:50 PM
Location: Great British Empire
uk.gif

Status: Offline
2.35 posts per day
Medals: 2 (View more...)
Forums MoD (Amount: 1)
Clan Themes Theme Guru
Clan Themes Theme Guru
Joined: Nov 13, 2006
Last Visit: 01 Dec 2008
Posts: 1765
Points: 15739 

Post Editing scripts for installing mods Posted: Tue Jan 01, 2008 11:06 pm   

thats an easy one !

When coders write code for modifying they use certain terminology

After, Add = Places the following code on a new line after the code in the preceding Find action. It always follows a Find action.

for example:

#-----[ FIND ]----------------------------------------------------

Hello,

#-----[ AFTER, ADD ]------------------------------------------

Welcome to Clan Themes



So you would hit CTRL+F and find "Hello," in the document, and cut and paste Welcome to Clan Themes after the Hello,

So it would look like

Hello, Welcome to Clan Themes

Here is a list of all the Modifications and Meanings http://www.clan-themes.co.uk/tutorials-view-142-forum-modification-commands.html
 

 
View user's profileSend private messageSend e-mailVisit poster's website Reply with quote




Ped
Reputation: 336.9
votes: 17
Local time: 7:50 PM
Location: Great British Empire
uk.gif

Status: Offline
2.35 posts per day
Medals: 2 (View more...)
Dedicated User (Amount: 1)
Clan Themes Theme Guru
Clan Themes Theme Guru
Joined: Nov 13, 2006
Last Visit: 01 Dec 2008
Posts: 1765
Points: 15739 

View user's profileSend private messageSend e-mailVisit poster's website Reply with quote

slydog
Reputation: 0.7
Local time: 6:50 PM


Status: Offline
0.02 posts per day
Medals: 0

Joined: Dec 27, 2007
Last Visit: 14 Aug 2008
Posts: 6
Points: 250 

View user's profileSend private message Reply with quote

StevieH
Reputation: 522.8
votes: 2
Local time: 6:50 PM

uk.gif

Status: Offline
0.21 posts per day
Medals: 2 (View more...)
Dedication (Amount: 1)
Site Helper
Site Helper
Joined: Mar 19, 2007
Last Visit: 29 Nov 2008
Posts: 131
Points: 734 

View user's profileSend private messageVisit poster's websiteMSN Messenger Reply with quote




slydog
Reputation: 0.7
Local time: 6:50 PM


Status: Offline
0.02 posts per day
Medals: 0

Joined: Dec 27, 2007
Last Visit: 14 Aug 2008
Posts: 6
Points: 250 

View user's profileSend private message Reply with quote

DoC
Reputation: 168.1
votes: 4
Local time: 7:50 PM
Location: Wiltshire, UK
uk.gif

Status: Offline
0.56 posts per day
Medals: 1 (View more...)
Dedication (Amount: 1)
Very Important Person
Very Important Person
Joined: Feb 07, 2007
Last Visit: 29 Nov 2008
Posts: 373
Points: 400