LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 07-14-2007, 12:50 PM   #1
pcriley
LQ Newbie
 
Registered: May 2006
Posts: 5

Rep: Reputation: 0
PHP How am I supposed to edit this? Read on...


This is PHP code from the default page of an osCommerce website, the welcome page,specifically, www.traderoombeads.com/cart/. Now, I have programmed in assembly, Paradox, Delphi, etc. for 18 years but I can't see how to fix this mess. I just need to replace this with a "Welcome to Trade Room Beads" or some such verbatim. Can anyone help me out? Thanks, Phil

PHP Code:

define
('TEXT_MAIN''This is a default setup of the osCommerce project, products shown are for demonstrational purposes, <b>any products purchased will not be delivered nor will the customer be billed</b>. Any information seen on these products is to be treated as fictional.<br><br><table border="0" width="100%" cellspacing="5" cellpadding="2"><tr><td class="main" valign="top">' tep_image(DIR_WS_IMAGES 'default/1.gif') . '</td><td class="main" valign="top"><b>Error Messages</b><br><br>If there are any error or warning messages shown above, please correct them first before proceeding.<br><br>Error messages are displayed at the very top of the page with a complete <span class="messageStackError">background</span> color.<br><br>Several checks are performed to ensure a healthy setup of your online store - these checks can be disabled by editing the appropriate parameters at the bottom of the includes/application_top.php file.</td></tr><td class="main" valign="top">' tep_image(DIR_WS_IMAGES 'default/2.gif') . '</td><td class="main" valign="top"><b>Editing Page Texts</b><br><br>The text shown here can be modified in the following file, on each language basis:<br><br><nobr class="messageStackSuccess">[path to catalog]/includes/languages/' $language '/' FILENAME_DEFAULT '</nobr><br><br>That file can be edited manually, or via the Administration Tool with the <nobr class="messageStackSuccess">Languages->' ucfirst($language) . '->Define</nobr> or <nobr class="messageStackSuccess">Tools->File Manager</nobr> modules.<br><br>The text is set in the following manner:<br><br><nobr>define(\'TEXT_MAIN\', \'<span class="messageStackSuccess">This is a default setup of the osCommerce project...</span>\');</nobr><br><br>The text highlighted in green may be modified - it is important to keep the define() of the TEXT_MAIN keyword. To remove the text for TEXT_MAIN completely, the following example is used where only two single quote characters exist:<br><br><nobr>define(\'TEXT_MAIN\', \'\');</nobr><br><br>More information concerning the PHP define() function can be read <a href="http://www.php.net/define" target="_blank"><u>here</u></a>.</td></tr><tr><td class="main" valign="top">' tep_image(DIR_WS_IMAGES 'default/3.gif') . '</td><td class="main" valign="top"><b>Securing The Administration Tool</b><br><br>It is important to secure the Administration Tool as there is currently no security implementation available.</td></tr><tr><td class="main" valign="top">' tep_image(DIR_WS_IMAGES 'default/4.gif') . '</td><td class="main" valign="top"><b>Online Documentation</b><br><br>Online documentation can be read at the <a href="http://www.oscommerce.info" target="_blank"><u>osCommerce Knowledge Base</u></a> site.<br><br>Community support is available at the <a href="http://forums.oscommerce.com" target="_blank"><u>osCommerce Community Support Forums</u></a> site.</td></tr></table><br>If you wish to download the solution powering this shop, or if you wish to contribute to the osCommerce project, please visit the <a href="http://www.oscommerce.com" target="_blank"><u>support site of osCommerce</u></a>. This shop is running on osCommerce version <font color="#f0000"><b>' PROJECT_VERSION '</b></font>.'); 
 
Old 07-14-2007, 03:19 PM   #2
nc3b
Member
 
Registered: Aug 2005
Posts: 330

Rep: Reputation: 32
Hello. I just love the way you make it all so readable by writing it all on one line .

Anyways, what part of that text are you trying to replace?

Maybe you are looking for the ubicuos echo? Or for str_replace?

http://www.php.net/manual/en/ref.strings.php

Edit:
Ah, sorry, now I get it. Silly me. It's easy to replace the text, what is the problem you're encountering? you just have to edit the file..

Cheers

Last edited by nc3b; 07-14-2007 at 03:49 PM.
 
Old 07-14-2007, 06:20 PM   #3
pcriley
LQ Newbie
 
Registered: May 2006
Posts: 5

Original Poster
Rep: Reputation: 0
To answer my own problem, RTFM. My apologies nc3b, about that being all on one string. The original code was a brick and it looks worse. That code is in .../cart/include/languages/english/index.php. As you can see on the site I did manage to alter the text by altering the DEFINE (TEXT MAIN,''). Progress

Thanks for the help,

Phil
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Cannot edit fstab in recovery mode. Filesystem is read only james7775 Linux - General 34 08-14-2018 11:53 PM
Am i supposed to edit xinitrc to run a command at startup? Tyir Linux - General 36 12-05-2007 12:57 PM
wish to edit but fstab is read only obay Linux - Newbie 3 07-29-2006 03:25 PM
php5 apache2 mysql4 don't work, php does not seem to read php.ini atom Linux - Software 5 03-24-2005 11:05 AM
Edit cramfs? Read-only? How to make R/W? oswald21 Linux - Software 1 04-24-2003 03:31 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 08:47 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration