Jump to content
xisto Community
BOAW

The Downloads On My Site php

Recommended Posts

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?

Share this post


Link to post
Share on other sites

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!

Share this post


Link to post
Share on other sites

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...

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.