Nov 21, 2009

Creating Link In Html - Help Me With This!

free web hosting
Open Discussion > MODERATED AREA > Computers > Programming Languages > HTML, XML etc..

Creating Link In Html - Help Me With This!

qwertyiscool
edit: Neeeaavverrrminddd.....

I was a total noob at php when i posted this and I needed help doing something with bbcode in php and didn't really know what I was saying.. blush.gif



Anyway topic resolved...

Comment/Reply (w/o sign-up)

Paul
Frankly, I don't understand what you are asking for! Are you trying to replace the hyperlink format of links: <a href=http://www.example.com>http://www.example.com</a>

with you own format:
_http://www.example.com_

If you use PHP, this is possilble... but using plain HTML, it is not possible to create hyperlinks in the format:
_http://www.Link.abc_

Comment/Reply (w/o sign-up)

qwertyiscool
QUOTE(Paul @ Jun 24 2006, 04:33 PM) *

Frankly, I don't understand what you are asking for! Are you trying to replace the hyperlink format of links: <a href=http://www.example.com>http://www.example.com</a>

with you own format:
_http://www.example.com_

If you use PHP, this is possilble... but using plain HTML, it is not possible to create hyperlinks in the format:
_http://www.Link.abc_


Ive got a page called bb.php with 2 arrays of strings i want to replace in the profiles of the people on my site... For example I replace < with &amp;lt; and i relpace > with &amp;gt; and i replace a new line with <br> and i replace {img} with <img src= and {/img} with >. I want to figure out what i can replace {url} and {/url} with so when people put a url between, it will link to it

Like this:
{url}http://www.example.com
<a href=http://www.example.com>http://www.example.com</a>

Unfortunatly to do this, i had to put in the link twice, If i have to, I know how to do it, but it would be much more complex of a php code, I was wondering if there is a simple HTML explanation that i could add code in front and in back of a url to make it link.


Note:
all {'s and all }'s are really ['s and ]'s, but i didn't want trap 17 to replace them....

 

 

 


Comment/Reply (w/o sign-up)

mama_soap
QUOTE(qwertyiscool @ Jun 25 2006, 05:56 AM) *

I want to figure out what i can replace {url} and {/url} with so when people put a url between, it will link to it

Like this:
{url}http://www.example.com
<a href=http://www.example.com>http://www.example.com</a>



Unless I'm badly mistaken, that is not the bbcode syntax for posting a url. A url would look like this:

[url = www.google.com ] Google! [/url ]

to render the following link:

Google!

I think a preg_replace in php should do the trick quite easily. Replace all [/ url] with </a> and all [url= with <a href=" and finally, all ] with ">. Or &gt; and &lt; instead of > and <, respectively. Only the last replace is a little tricky, and should be used with care. I cannot comment very much without further details, but I hope you get the general idea.

Having said that I hope I did not misunderstand what you were trying to say... sorry if that is the case!

Ping back with your further concerns smile.gif

Comment/Reply (w/o sign-up)

qwertyiscool
QUOTE(mama_soap @ Jul 3 2006, 11:10 AM) *

Unless I'm badly mistaken, that is not the bbcode syntax for posting a url. A url would look like this:

[url = www.google.com ] Google! [/url ]

to render the following link:

Google!

I think a preg_replace in php should do the trick quite easily. Replace all [/ url] with </a> and all [url= with <a href=" and finally, all ] with ">. Or &gt; and &lt; instead of > and <, respectively. Only the last replace is a little tricky, and should be used with care. I cannot comment very much without further details, but I hope you get the general idea.

Having said that I hope I did not misunderstand what you were trying to say... sorry if that is the case!

Ping back with your further concerns smile.gif


I know that
CODE
[url=http://address]name[/url]
is proper syntax, and i know how to replace in php, but i was going to do it both ways, so if sombody dosnt care if the link text is the same as the url, all they would have to do is
CODE
[url=address]address[/url]
and convert it to
CODE
[url=http://address]address[/url]
, but if not then i could easly create somthing else.

edit: putting code in code tages

Comment/Reply (w/o sign-up)

kuberan_swe
No clue what you are asking for. But i guess you are asking for how to display the <a href ...... tag also in your page.
There are lots of special chars in HTML which has to be represented with special codes like &nbsp for space.
refer w3schools.com for the corresponding codes for the special characters in your content to be displayed

Comment/Reply (w/o sign-up)



Got an Opinion! Express your Views! (no registration):-
Add your Reply/ Opinion/ Views/ Comments/ Suggestion/ Questions/ Queries etc.
Posts with decent grammar & English will be accepted and please refrain from profanities.
For asking a Question, We recommend you to sign-up (for free) so that you can track the topic easily.

Nature of your Post*: Opinion/ Reply/ Comments
Question/Query
Feedback to us.
       
Name   Email
Title/Question*

This textarea will convert to Rich-Text automatically (IE, Firefox, Chrome)

Similar Topics

Keywords : creating, link, html

  1. W3schools.com Is Down
    Ask your CSS/HTML/PHP questions here... (8)
  2. Html Code Question
    (2)
    Hi all, I was wondering is there a way I could make a field in a form that will take you to the
    address you enter in it? (in other words) Site: trap17.com (go) and clicking go takes you to
    trap17. I will explain why. What I have done is set up a page with frames, I've got all my
    most visited sites on the left, and I browse in the right, I want to make a frame up the top of the
    browsing window that will be like the address bar, Just to retain this framed setup. (I will put a
    google box in it too). Alot of you are probably wondering why, its for purely aesthetic....
  3. Some Questions On Html
    (10)
    I was just curious on how people here learned HTML or XML (assuming you did, which, judging by the
    fact you are actually here on this board). How long did it take for you to learn the basics of HTML?
    How proficient are you right now in HTML? Which resources did you use when you were learning HTML
    (or are currently learning HTML?). How did you find learning HTML? Thanks.....
  4. Help Making A Web Adress Bar Using Html/js
    (9)
    Hey I need to make an adress bar basically you imput into the field press enter and your away but it
    cant use php or any code that needs to be installed, its all part of a workaround for my school
    interenet!....
  5. Html Ascii Codes - A Complete List
    downloadable php file (3)
    I was often frustrated at how, despite there being thousands of ASCII "special characters" such as
    &8659; , websites that claimed to list them all only listed the first 256. To combat this issue, I
    have created a table which lists the first 10,001 - from � to &10000; I am sure there are many
    more but it is simply not feasible to create a table with many more rows as viewing it would put
    terrific strain on the browser.! You can download the file in two forms. One uses PHP to
    dynamically create the table (1KB), the other has it ready-made in pure HTML format (437KB....
  6. Html Div Help [resolved]
    help with the divs in ipb (1)
    hey guys, as you may know, i have ipb 2.3.4 set up on my site. i am currently using the centura
    skin and like it a lot. i have customised the header bar in terms of the logo, however also want a
    slab of text linking to the forums home at the top of the banner. i have so far managed to achieve
    this to work in firefox (see attached screenshot), however it just screws up in ie, opera and safari
    (i think). the link is here here is the code, both html and css, of the ipb header, and i have
    placed between stars the parts i have edited: CODE the css (only the edited....
  7. Best Way To Protect Html Form Fields
    Looking for suggestions on how to protect form fields during user inpu (3)
    My working example is here http://sonesay.trap17.com/application.php The form submits to itself
    and stores what ever the user inputs into session variables. Thats all fine and I have validation
    checks for it, I wanted to add more and I remember comming across a site where they would lock from
    fields to prevent any changes if the information was already supplied and validated. I'm looking
    to build something similar but cant seem to figure out how to get that same effect at this time.
    Heres my program logic so far application.php includes('application_content.....
  8. Html Application Form
    (6)
    does anyone know how to make a form/application that when you submit the form with the submit but it
    sends it in a email to you email address if anyone on here knows please please let me know thanks, i
    want this so i can have members apply for a team on my football site and there information will come
    back to me and i can accept or reject them for that job....
  9. Login In Using Html
    (12)
    I have looked around and I can't find any code to help me out. I want to make it so you can log
    in to my site to get member featues. Could some one please help me....
  10. Wanna Learn Html From Scratch
    downloade an online tutorial,formatted my c: lost it forever,and FORGO (5)
    id prefer something i can download .....coz my internet connection is highly intermittant Moved
    from the Java section to the HTML section. ....
  11. Help With Css/html Layout
    Horizontal List Problems (5)
    I can't figure out why this horizontal list isnt working. Underneath my banner is supposed to
    be a green gradient bar with a list of links in the center of the page. The links are all the way
    to the left and are really small. The banner is also overlapping the list for some reason. This is
    my current layout(don't worry, I'm not trying to advertise).
    http://www.stormgaming.net/stormcreations/ This is my CSS file
    http://www.stormgaming.net/stormcreations/storm.css Thanks in advance for any help.....
  12. Ok Background Help Please
    html (4)
    OK so i've given up on the paint for background now how would i get it to look like this
    http://img.photobucket.com/albums/v614/Dj1.../background.jpg without using paint and without it
    coming out to look like this... http://img.photobucket.com/albums/v614/Dj169211/Damn.jpg like,
    with just html code, not trying to use paint and do the BS any ideas?....
  13. Having Html Troubles......
    Please help! (1)
    I'm having troubles with the background colours on the HTML pages on my site
    keri-j.trap17.com Basically, the colors are hex codes and i'm no HTML n00b, god no! But, I just
    can't figure this one out! I have the background colour in the body tag (duh) " " on all my
    pages but on some of them the background is white. This might be to do with some javascript i have
    recently edited in each page or certain errors but whatever it is i can't figure it out! This
    is my homepage with the correct background color This is my poetry page with the faulty colour c....
  14. Wanting To Touch Up/learn My Html Again
    (27)
    Ok, well recently i realized that i am not as skilled in HTML (such as building website layouts) as
    i want to be, with tables etc... and so i was thinking about going through many many many many many
    many sites and just touching up on my HTML and see if i can code my own website template before
    starting to learn PHP because that is what i want to do. so, i am asking all of you experianced
    people on trap17 what websites did you use to learn your HTML skills, yees i know i could go to
    google and type in learn html or somthing along the lines of that, but i want to know wh....
  15. Creating Rss Feeds For Wapsites
    How to display rss feeds in a php enabled site (5)
    Anyone who wants to help me? I want my site to have this feature but I don't know how.
    /sad.gif" style="vertical-align:middle" emoid=":(" border="0" alt="sad.gif" /> Hope you could me
    with embedding these xml files in my wml pages.. Moved to the HTML, XML ect.. forum ....
  16. Html Question Concerning Pre Tag And Code Tag
    (8)
    My question is, why would anyone use the CODE tag when you can use the PRE tag? 1. The PRE tag
    recognises white space, the CODE tag does not. 2. The CODE tag requires that you escape some
    chars, the PRE tag does not. I cannot see anything that the CODE tag achieves that is special apart
    from sounding as though it is perfect for displaying code which IMO it is not. Thanks. ....
  17. Do You Know Html?
    Just Wondering, most of you would know. (65)
    Well I was just wondering, i know this polol might sound stupid, as this is a hosting site forum and
    the chances are you do know HTML, but the other day i met 2 people who didt have a clue what HTML
    was, and was just at the forum because they found this forum active. And also do you know any other
    programming languages, just wondering. I myself know HTML, C++ kinda, and learing PHP. Talking about
    Languages I know Tamil, English, Lote /tongue.gif' border='0' style='vertical-align:middle'
    alt='tongue.gif' /> .....
  18. Integrating One Html File Into Another
    without embedding (31)
    Hey guys I'm overhauling my website and have decided instead of using frames I want to just
    have a logo and buttons integrated into each HTML file, so you can just scroll down past it. I want
    the logo at the very top, before any content. I was wondering if there is any way of doing it with
    an HTML tag (i.e. not PHP or any other scripts) so the header just gets inserted right after the
    opening tag. I'm thinking that possibly it uses the tag, but really I don't have much of
    an idea. Thanks in advance for your suggestions. Peace out /smile.gif' border=....
  19. Making A Refresh Link On Your Website.
    refresh local webpage (17)
    /smile.gif' border='0' style='vertical-align:middle' alt='smile.gif' /> post it on ur website
    CODE refresh It can refresh local webpage. U can add it at ur forum so that each topic u
    are reading can be refresh easily. If ur website return to homepage after pressing I.E. refresh
    button, then u must need this coding. /cool.gif' border='0' style='vertical-align:middle'
    alt='cool.gif' /> Beacus visitors only want to refresh local webpage but not go back to homepage.
    /ohmy.gif' border='0' style='vertical-align:middle' alt='ohmy.gif' /> * same co....
  20. Html Templates
    HTML Templates for website (4)
    Where do i get free HTML Templates to use in look and feel of website? Any link will be
    helpfull....I know there are some free templates available but it is hard to find even by
    gooooogling it. Please, share if you have any. Thank You.....
  21. Link To Create Desktop Shortcut?
    (7)
    Is there a way to make a link that actually creates a desktop shortcut? I have a page that gives
    links to files on our intranet but I know of people who try and make shortcuts for these files. It
    would be nice if I could put a link next to the link for the file that would make a shortcut. Use
    a more descriptive topic title next time. ....
  22. Html Editor
    non WYSIWYG (22)
    What editor can I download and use that isn't a WYSIWYG(what-you-see-is-what-you-get) and is
    free. Currently I use NotePad but I want something better.....
  23. Html Cool Codes?
    (7)
    hey guys..whats up..well i ws just wondering if you guys have any cool codes for myspace or
    something..you know to design a page using html/css codes...see i tried googling around but all the
    sites had the same thing..they dont have a unique one...i want like games in my page...like my
    friend he had like tetris in his page..and i want a game// or anything like that to make my page
    cool /smile.gif' border='0' style='vertical-align:middle' alt='smile.gif' />
    anybody????plz...PEAcE!....
  24. Table/cell Link?
    (11)
    Well, I actually don't know what it is. But I need a code where you can click everywhere on the
    table, not only on the text/image.....
  25. Disable Scrollbars, Menubars Etc....
    Javascript / Html code to disable them (7)
    hi, i would like to know how the scrollbars, menubars etc.. can be disabled. I hope someone can help
    me with this. /biggrin.gif" style="vertical-align:middle" emoid=":D" border="0" alt="biggrin.gif"
    /> Btw: can you tell me where the code should be inserted to? thanks! /cool.gif"
    style="vertical-align:middle" emoid="B)" border="0" alt="cool.gif" />....
  26. Css Or Html Tags
    Which is better to use???? (24)
    Dear friends, I am new to web site designing. I am using NVU for creating my web
    pages. It has a option in which we can select that the editor will use CSS or it will use html tags
    for coding of the page. For example - If I want to make the text bold then if tag is used the code
    will be QUOTE Your text and if the CSS is used the text will be QUOTE Your text .
    Please suggest me which option I should choose to make my web page standard to modern HTML
    standards. Thanks in advance.....
  27. Colors in Html
    everything about colors (9)
    Hey...I've had a few problems with choosin the color in html language. I found a good page wich
    describes all you need to know.. http://bignosebird.com/colors.shtml Next thing you need and it
    really is useful is a program that shows you the color code..you have it online here:
    http://www.pagetutor.com/pagetutor/makapage/picker/ hope it helps ya....byeeeeee....
  28. Tips on creating a good website!
    (21)
    1) Navigation: Keep it simple (KISS), and make sure it's consistent from page to page. No matter
    where you place your menu bar -- either at the top or down the side -- always include a small text
    menu at the bottom of every page. If you're one of those people easily impressed with Flash,
    don't design your navigation with it. There are still some people who don't have or want the
    plug-in, so they won't be able to navigate your site. Besides, search engine spiders can't
    read it, so won't be able to spider the individual pages of your site if the....
  29. where did you learn html from?
    (132)
    HI, i am intresting in knowing where you began learning html of what inspired you to start learning
    html. which programs did you use or which progs dyu use?....
  30. How To make Cool Inverted Table
    neat little HTML trick Very Easy (7)
    This is a Very neat way to add a cool effect to your webpage! Its great for Holding Links......or
    anything else you can find a use for it. CODE HtmlGoodies W3C Schools    
        Heres The same Code on a Page Take a Look:
    http://www.geocities.com/xsilverboarderx/test.html Also here is My page that i am currently workin
    on i used the same thing just switched colors and used CSS: Silver Design Of Course with this
    code u can change things around for ex. like background, border width or color, and cellpadding
    cellspacing for diffe....

    1. Looking for creating, link, html

Searching Video's for creating, link, html
See Also,
advertisement


Creating Link In Html - Help Me With This!

Affordable Web Hosting, Low cost Web Hosting - ComputingHost.com