Results 1 to 1 of 1
Hello,
I'm new here and to ssh in general. I'm sorry for my lack of experience here.
I'm trying to replace 2 lines in a specific php file across many ...
- 02-23-2010 #1Just Joined!
- Join Date
- Feb 2010
- Posts
- 1
Using Sed to replace php code
Hello,
I'm new here and to ssh in general. I'm sorry for my lack of experience here.
I'm trying to replace 2 lines in a specific php file across many different websites on my server. I'm changing the wysiwyg editor from an old version of fckeditor that keeps getting hacked on the server to ckeditor. I'm simply replacing the other files that need changes, but with this particular file, many people have extra things on this particular page.
The file I need to make changes to is: categories.php
The first area I need to change is from:
to:HTML Code:<script language="javascript" src="includes/general.js"></script> </head>
The second area I need to change is from:HTML Code:<script language="javascript" src="includes/general.js"></script> <script type="text/javascript" src="./ckeditor/ckeditor.js"></script> </head>
to:PHP Code:<?php echo tep_draw_fckeditor('products_description[' . $languages[$i]['id'] . ']','800','600',(isset($products_description[$languages[$i]['id']]) ? stripslashes($products_description[$languages[$i]['id']]) : tep_get_products_description($pInfo->products_id, $languages[$i]['id']))); ?>
I know this is a lot to ask, but could anyone help me? I've been searching online for hours.PHP Code:<?php echo tep_draw_textarea_field('products_description[' . $languages[$i]['id'] . ']', 'soft', '70', '10',
(isset($products_description[$languages[$i]['id']]) ? stripslashes($products_description[$languages[$i]['id']]) :
tep_get_products_description($pInfo->products_id, $languages[$i]['id'])),'id = products_description[' .
$languages[$i]['id'] . '] class="ckeditor"'); ?>
Thank you.


Reply With Quote