• Welcome to Simple Machines Community Forum. Please login or sign up.
December 04, 2021, 12:45:09 AM

News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord


How do I modify files?

Started by [Unknown], January 12, 2005, 06:55:29 AM

Previous topic - Next topic

[Unknown]

January 12, 2005, 06:55:29 AM Last Edit: January 22, 2005, 02:04:50 PM by [Unknown]
If you've been linked to this topic, you've probably asked if something can be changed, found a bug, or are being presented with a small tweak.

What follows should be a list of files to open, what to look for, and what to add or replace to what you find.  To do this, you'll need a text editor of some sort.  Notepad will work, but won't give you line numbers and a few other things - other editors include ConTEXT, Crimson Editor, and EditPad.

Once you have a text editor, you'll need to get to the files.  This means using FTP to download the file in question, opening it with whatever text editor you wish to use, making the changes, and then uploading it again.

Sometimes, we may leave off common paths to files.  Here's a list of some of them:
  - Admin.php, QueryString.php, etc. (files ending in .php) are usually in Sources/.
  - Something.template.php or similar is usually found in your theme's directory - for example, Themes/converted or Themes/yourtheme.  However, it's usually a bad idea to modify the default theme... instead, you should make a copy of the file and then upload the modified file to that folder.
  - Something.english.php (or any other language) should be in Themes/default/languages.

As to the changes themselves, usually they will be either "find" and "replace" (meaning, find a block of code and replace it with another block..) or "find" and add above/below/after/before.  In the latter case, you should just add the code block to said position relative to the code to find, on a separate line.  For example, if someone said you should find:

Line 1

And add after that line:

Line 2

The result should be two separate lines, like so:

Line 1
Line 2


If you're not comfortable with modifying files directly, you may wish to ask someone to do it for you, or request a package be made for use with the package manager.  Often such things take much more time, however.

Importantly, whenever modifying files, always - and I do mean always - make backups.  You don't know what could cause problems with your forum and, as much as you might want a change, your forum at least working would probably be better than no forum at all.

-[Unknown]

loudog

Thanks Unknown :). What I've been doing, is saving them as HTML, then opening them in FP. Then when I'm done, I save it via php. I'll look at these other programs as an alternative.

binary

thanks unknown, you have helped out a lot


Not even in /Dev/Null/ no one can hear u scream.Join Net-force For all your Security Needs, click here to enter

David_Q

Ok, but will this action solve my problem upgrading to PHP 4.4.0 or what? I have followed above mentioned tips and the forum seems to run fine but i cant upgrade to PHP 4.4.0... :(

xenovanis

Quote from: David_Q on September 25, 2005, 04:10:57 AM
Ok, but will this action solve my problem upgrading to PHP 4.4.0 or what? I have followed above mentioned tips and the forum seems to run fine but i cant upgrade to PHP 4.4.0... :(

David Q,

This is just a link to give you some advise on how to modify files. What you need to do is:

http://www.simplemachines.org/community/index.php?topic=50478.0

So your forum will run with PHP 4.4.0.
"Insanity: doing the same thing over and over again and expecting different results."

morningwood

Also I use Putty to log into my server and then use 'vi' (linux) to edit files..

Works great for me.

That70sHeidi

sorry, wrong place. but thanks anyway, this WAS helpful ;)

Leipe Po

QuoteImportantly, whenever modifying files, always - and I do mean always - make backups.  You don't know what could cause problems with your forum and, as much as you might want a change, your forum at least working would probably be better than no forum at all.

*does that also apply to me?*  :P

http://www.phpscripters.net  :o
There is only one thing more importend to me then coding:
My Girlfriend

Microsoft - "You've got questions.  We've got dancing paperclips."

NarrativeKnight

I have never had a board at all before in my life.  Where are the files at that I want to modify for doing the upgrade that makes my board compatible with 4.4.0 and if I am directly modifying them then why do I need to upload changes?  Do I need to upload changes and if so how?

Timothy

Syrinx

Quote from: [Unknown] on January 12, 2005, 06:55:29 AM
What follows should be a list of files to open, what to look for, and what to add or replace to what you find.  To do this, you'll need a text editor of some sort.  Notepad will work, but won't give you line numbers and a few other things - other editors include hxxp:www.context.cx/ [nonactive], hxxp:www.crimsoneditor.com/ [nonactive], and hxxp:www.editpadpro.com/index.html [nonactive].

One more to add to the list, is hxxp:notepad-plus.sourceforge.net/uk/site.htm [nonactive].  This is the one that I always use, and it includes line numbers and a tabbed workspace.

Webrunner

I would like to recommend PSPAD. Of all the hundreds of editors i have tried this is by far the best one. It has loads of handy tools and features, is fast and most important, completely free!

Give it a try!

BTW. i am in no way related to this programm.
There is a difference between knowing the path and walking the path.

=========================================
Vrouwen Power! | Sprintweb: No nonsense e-Business consultancy

Mr. Khan




nick09

Notepad++

is the best program i have seen so far

you can test your files on a browser.

many different coding languages including XML.

you should try it. ;)

Antechinus

November 23, 2007, 06:26:38 AM #13 Last Edit: November 24, 2007, 01:33:47 AM by antechinus
Quote from: Webrunner on February 23, 2006, 05:28:17 AM
I would like to recommend PSPAD. Of all the hundreds of editors i have tried this is by far the best one. It has loads of handy tools and features, is fast and most important, completely free!

Give it a try!

BTW. i am in no way related to this programm.
Ok, sounds good but for a beginner would it have so many functions a to be confusing?
Would something simpler be easier to use, or is the operating system easy to get the hang of for basics?

ETA: Ok, I bit the bullet and installed it. Now I just have to learn how to use it.
Should be more fun than a barrel of monkeys. Expect more stoopid questions.  :D

depo23


MF30


seojoe

can this mod be made to prevent posts by a certain user with links? for example, i have rss feeder. i would like to create a user that is strickly used to post the rss feeds but block any posts that have urls in them in order to prevent ads on my forum. basically i am trying to have auto content generation with auto advertising/link posting prevention as well. doesnt seem to be a mod that does this and since i am not a programmer i am trying to find mods that could achieve thisby using the multiple mod functions together. please advise.

ivan91tran

Thanks that was very helpful. I followed your exact instructions, but I couldn't get it right initially. I was using Text editor on my mac (which is far better than notepad in my opinion), but I then realized I had the 'rich text' option enabled :(, so there was a whole load of background code that messed everything up! I could have just gone back to plain text, but I decided to use EditPad as the OP suggested. Worked like a charm, thanks a lot.

impreza

Portal Totemat - artykuły i filmy - treści w postaci artykułów i filmów.

impreza

in sitemap.template.php  code - edit = work
Portal Totemat - artykuły i filmy - treści w postaci artykułów i filmów.

Advertisement: