BarrySmith Posted December 13, 2009 Posted December 13, 2009 Hi all, This is really driving me bonkers! I am trying to find out an easy way to duplicate an already exisiting webpage on my website. What I would like to do is create another page exactly like http://comfyearplugs.com/privacy.html , with the only differance being that the website will not be called privacy.html. If at all possible can anyone please advise on how I go about doing this or alternatively point me to some online help where I can maybe try to get this info? Thanks and kind regards. Barry. I have built an online store solely with the help of this forum.
rescuestat Posted December 13, 2009 Posted December 13, 2009 You should be able to just copy that privacy.php webpage. You will need to change change a couple of constants in the file. If you look at the php page, the easiest way to recognize the constants is they are CAPITALIZED and DO NOT have a '$' infront of them. The absolute easiest way to change it is copy your catalog/privacy.php to newpage.php(or whatever you want to call it) and then copy catalog/includes/languages/english/privacy.php to the same newpage.php in the same language folder. You need to do this with each language you are using on your website. It's then a simple process of editing this file with your new text and presto you have a new page. Any questions feel free to email and I can help you, Frank
BarrySmith Posted December 13, 2009 Author Posted December 13, 2009 You should be able to just copy that privacy.php webpage. You will need to change change a couple of constants in the file. If you look at the php page, the easiest way to recognize the constants is they are CAPITALIZED and DO NOT have a '$' infront of them. The absolute easiest way to change it is copy your catalog/privacy.php to newpage.php(or whatever you want to call it) and then copy catalog/includes/languages/english/privacy.php to the same newpage.php in the same language folder. You need to do this with each language you are using on your website. It's then a simple process of editing this file with your new text and presto you have a new page. Any questions feel free to email and I can help you, Frank thanks for that Frank, One final question and I am sure I will be able to do this. Can you please confirm where the new page should reside? Is it in public_html? Thanks and kind regards. Peter. I have built an online store solely with the help of this forum.
BarrySmith Posted December 13, 2009 Author Posted December 13, 2009 Hi, What I did was copy privacy.php to hearingprotection.php and also then copy the corresponding file in the languages folder and renamed that to hearingprotection.php. But now I get the following error message: Warning: require(includes/languages/english/FILENAME_HEARINGPROTECTION) [function.require]: failed to open stream: No such file or directory in /home/comfy/public_html/hearingprotection.php on line 15 Fatal error: require() [function.require]: Failed opening required 'includes/languages/english/FILENAME_HEARINGPROTECTION' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/comfy/public_html/hearingprotection.php on line 15 You can view the message on line at the following location : http://www.comfyearplugs.com/hearingprotection.php Does anyone have any ideas? Regards. Peter. I have built an online store solely with the help of this forum.
♥FWR Media Posted December 13, 2009 Posted December 13, 2009 Hi, What I did was copy privacy.php to hearingprotection.php and also then copy the corresponding file in the languages folder and renamed that to hearingprotection.php. But now I get the following error message: Warning: require(includes/languages/english/FILENAME_HEARINGPROTECTION) [function.require]: failed to open stream: No such file or directory in /home/comfy/public_html/hearingprotection.php on line 15 Fatal error: require() [function.require]: Failed opening required 'includes/languages/english/FILENAME_HEARINGPROTECTION' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/comfy/public_html/hearingprotection.php on line 15 You can view the message on line at the following location : http://www.comfyearplugs.com/hearingprotection.php Does anyone have any ideas? Regards. Peter. you have to add that file in includes/filenames.php like .. define('FILENAME_HEARINGPROTECTION', 'hearingprotection.php'); Ultimate SEO Urls 5 PRO - Multi Language Modern, Powerful SEO Urls KissMT Dynamic SEO Meta & Canonical Header Tags KissER Error Handling and Debugging KissIT Image Thumbnailer Security Pro - Querystring protection against hackers ( a KISS contribution ) If you found my post useful please click the "Like This" button to the right. Please only PM me for paid work.
BarrySmith Posted December 13, 2009 Author Posted December 13, 2009 Thank you all for your help. I have finally managed to get a new page added. Not that difficult when you have friends to help out like the oscommerce forum! Thanks again. Peter. I have built an online store solely with the help of this forum.
jigga1234 Posted December 14, 2009 Posted December 14, 2009 say for example you want to create a new page called newinformation.php the easiest way would be to adapt a file you already have say conditions.php If you open up conditions.php the one in your root address you will find. require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_CONDITIONS); $breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_CONDITIONS)); You will need to change this to require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_NEW_INFORMATION); $breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_NEW_INFORMATION)); Save conditions.php as your new file newinformation.php If you look at the format of the new file you will see that like conditions it has an area which will echo the content of the language file in this case includes/languages/english/newinformtion.php under the heading TEXT_INFORMATION. STEP 2. you will need to go to includes/filenames.php and add the following line before the last ?> define('FILENAME_NEW_INFORMATION', 'newinformation.php'); STEP 3. open up includes/languages/english/conditions.php and you will see something like. define('NAVBAR_TITLE', 'Terms and Conditions'); define('HEADING_TITLE', 'Terms and Conditions'); define('TEXT_INFORMATION', ' your terms and conditions information will be in here '); ?> Change the navbar title and Heading title to whatever you want to be shown eg 'new information' You can delete everything between the 'quotes' of TEXT_INFORMATION Place whatever you want to have as the information for your new page in between the quotes and save as newinformation.php STEP 4. Upload your new files. the root file to /newinformation.php the filenames to /includes/filenames.php and the lang file to /includes/languages/english/newinformation.php This will now mean if you go to www.yoursite.com/newinformation.php you will have the new page within your old structure. You can do this for as many new pages as you like once you get the hang of the structure it will be easy every time. I know its been answered but thought I would put all the info needed down in one post for others who might be looking.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.