Gossamer Forum
Home : Products : Links 2.0 : Discussions :

Insert %20 instad of spaces

Quote Reply
Insert %20 instad of spaces
I have a few web pages that have pages like "click here.html". Every time I have to insert that kind of web page, I have to put %20 sign (percentage 20) instead of a space, and I am really getting tired of it. Can you tell me the mod so the script inserts the %20 sign instead of a space. It's probably in the jump.cgi script, but I am not sure.
Keep in mind I suck at perl, so if you tell me what to instert or change, can you also please tell me WHERE to insert it?
Thanks!!


Milos
Quote Reply
Re: Insert %20 instad of spaces In reply to
Delete the spaces in your file names.


========================================
Buh Bye!

Cheers,
Me
Quote Reply
Re: Insert %20 instad of spaces In reply to
Delete space in file names?
This is a link we are talking about. I can't tell someone to change the address of a web page.
Please, let me know how to modify the script so it inserts the %20 instead of a space.

Thanks,
Milos
Quote Reply
Re: Insert %20 instad of spaces In reply to
Okay...what PAGE are you referring to???? Because out-of-the-box, Links 2.0 inserts underscore characters for categories and other pages built.

Sounds like you are offering custom links with spaces in them!


========================================
Buh Bye!

Cheers,
Me
Quote Reply
Re: Insert %20 instad of spaces In reply to
No, I am talking about this example:
http://www.yourdomain.com/page/click here.html
When I insert a web page like this, the script prints it out exactly as it is, so Netscape says "web page not found". IE doesn't have a problem with it, though.
I do wanna fix it for Netscape.

Thanks,
Milos
Quote Reply
Re: Insert %20 instad of spaces In reply to
Again...learn some basics of web development...since you are linking to external pages outside of the Links 2.0 system, learn how to name you file names WITHOUT SPACES!

Like:

Code:

click_here.html


OR

Code:

clickhere.html


Simply EDIT your TEMPLATE files to point to a more approriate file name after re-naming the blasted file!


========================================
Buh Bye!

Cheers,
Me
Quote Reply
Re: Insert %20 instad of spaces In reply to
Too bad that's not going to take me to an appropriate page.
You don't understand. Imagine I want to insert a web page with this address into my database.
http://www.somedomain.com/script/click here.html
Someone names their pages like that and I can't change that.
The sign %20 solves that problem, which is to say I can insert this: http://www.somedomain.com/scripts/click%20here.html, and that would solve the problem.
But, I want the script to insert this for me.
I am looking for someone who is going to tell me what to insert in one of the scripts (most probably jumg.cgi) ...
Any solutions? If not, please don't reply with some other ideas.

Thanks
Milos
Quote Reply
Re: Insert %20 instad of spaces In reply to
OH...are you talking about EXTERNAL LINKS added in the URL field in the links.db file??? If so, then you can add the %20 character when you validate the links.

Other than that...I think you are alkuding that the links are in your web site and you need to rename the file name as I already mentioned.

Goodbye...and best of luck finding a solution...


========================================
Buh Bye!

Cheers,
Me
Quote Reply
Re: Insert %20 instad of spaces In reply to
OK, Anyone else?

Thanks,
Milos
Quote Reply
Re: Insert %20 instad of spaces In reply to
New threads are for new subjects, MilosD. I'm removing your duplicate thread.



--Philip
Links 2.0 moderator
Quote Reply
Re: Insert %20 instad of spaces In reply to
I expect it only happend cos of the ability to repeatdy press submit and post duplicate threads Wink But yes Junko, you were right to remove it Smile

Andy

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: Insert %20 instad of spaces In reply to
In jump.cgi just below:

# Now let's send the user to the url..

Add

$goto =~ s, ,%20,g;

That should work fine. If not try:

$goto =~ s,\s,%20,g;


Quote Reply
Re: Insert %20 instad of spaces In reply to
Awesome!
That worked!
The script should finally look like this!
# Now let's send the user to the url..
$goto =~ s, ,%20,g;
$goto ?
print "Location: $goto\n\n" :
&error ("Record not found ($in{$db_key})");
}

Thanks, man!
Milos