Welcome Guest ( Log In | Register)



 
Reply to this topicStart new topic
> The Downloads On My Site, php
BOAW
post Jun 16 2006, 12:39 PM
Post #1


Super Member
*********

Group: Members
Posts: 294
Joined: 28-January 06
Member No.: 17,798



Ok i have a site with these downloads, when you click on them they do not open up to a new window. Instead it uses the same window and goes to the link that it was linked to go to. All of my downloads are made from being linked to some other site. Now my site is php, so i was wondering how i can make all links open up a new window to their download page without having to type out target="_blank" for all of them. Which would take awhile for me. I was wondering if there is a way to do that with the php download module where i can insert the target="_blank" in there so it would automatically put that in with every file link that i create?
Go to the top of the page
 
+Quote Post
Hadi
post Jun 16 2006, 12:54 PM
Post #2


Super Member
*********

Group: Members
Posts: 277
Joined: 13-May 06
From: The end of the World
Member No.: 23,599



I don't think there is another way even though I never used php. But why don't want to type each time target="_blank"? You could use ctrl+c to copy and ctrl+v to paste!
Go to the top of the page
 
+Quote Post
BOAW
post Jun 16 2006, 12:59 PM
Post #3


Super Member
*********

Group: Members
Posts: 294
Joined: 28-January 06
Member No.: 17,798



i know but its still time consuming becuase id have to constantly click on pages to get to each download to edit and put that code in. i have around 35 downloads right now and doing that would be a pain in the neck. too much clicking and goin onto pages to get to each one. so if anyone cant find a solution for me, i guess thats what ima have to do...
Go to the top of the page
 
+Quote Post
rldowling03
post Jun 16 2006, 01:25 PM
Post #4


Super Member
*********

Group: Members
Posts: 260
Joined: 17-April 06
From: Adelaide, Australia
Member No.: 21,994



Well for mass editing I use TSW Webcoder and it can edit a specific text in any amounts of web pages including PHP from 2 to 100 pages it can add that code you want to add so that is the only way i can think of doing that now
Go to the top of the page
 
+Quote Post
fffanatics
post Jun 16 2006, 03:38 PM
Post #5


Privileged Member
*********

Group: [HOSTED]
Posts: 936
Joined: 14-April 05
From: West Chester, PA
Member No.: 5,636



Yeah using the tatget="_blank" is the only way i know of doing it and i use php. Just open up the file/files in a good text editor (like emacs) and just do a query replace and add the target tag to them.
Go to the top of the page
 
+Quote Post
ahsan
post Jun 16 2006, 05:17 PM
Post #6


Newbie
*

Group: Members
Posts: 7
Joined: 16-June 06
Member No.: 25,246



well it is a great site its graphics are classic
tell me on which software u made it?
Go to the top of the page
 
+Quote Post
Tetraca
post Jun 16 2006, 11:02 PM
Post #7


Privileged Member
*********

Group: Members
Posts: 628
Joined: 20-May 06
Member No.: 23,968



Okay do this:
For each of the links, copy and paste a nonesense word(not anything like a single letter or a word in the code). Go into your editor, and in the edit menu, click find & replace. Type in your nonsense word in the find box, the target="_blank" in the other. If you don't want to deal with this consider using MySQL.
Go to the top of the page
 
+Quote Post
odomike
post Jun 17 2006, 02:46 AM
Post #8


Core2Q-QX6800
***********

Group: [HOSTED]
Posts: 1,093
Joined: 3-August 04
From: Nigeria
Member No.: 569



QUOTE(rldowling03 @ Jun 16 2006, 02:25 PM) *

Well for mass editing I use TSW Webcoder and it can edit a specific text in any amounts of web pages including PHP from 2 to 100 pages it can add that code you want to add so that is the only way i can think of doing that now



You got a point there rldowling03. why dont you use the TWS webcoder. Simply type in the code you want to be editted and it will locate that very code everywhere in the web page and fix in the correct one for it.

That sould help solve your problem.
Go to the top of the page
 
+Quote Post
FirefoxRocks
post Jun 17 2006, 03:53 AM
Post #9


Super Member
*********

Group: Members
Posts: 273
Joined: 14-April 06
From: Ontario, Canada, North America, Planet Earth
Member No.: 21,845



Try this method:

1. Open Notepad/Wordpad or another TEXT editor (not word processing software). Open up your HTML page in the text editor.
2. Go to Edit. Click on Find and Replace. Or Find and then Replace. There are different menus/buttons but they all work in the same way.
3. Type in <a href=" in the Find box.
4. Type in <a target="_blank" href=" in the Replace box.
5. Click on Replace All or something similar to that.
6. Ensure you have XHTML 1.0 Transitional or HTML 4.01 Transitional as the !DOCTYPE because target="_blank" is not compatible with Strict DOCTYPE's or XHTML 1.1.

Also, consider using AceHTML 6 Freeware, it works great.

Let me know if this was helpful.
Go to the top of the page
 
+Quote Post