vForums Support Banner



 

Welcome Guest! Please Login or Register
vForums Support :: Programming & Coding :: Code Requests & Support :: [F] Prompting For Hyperlinks Please - View Topic
Topic Rating: *****
Printable View
This topic was locked 26th Mar 08 at 10:29am by Michael
CåñåÐå™
Full Member
***

[Avatar]

Posts: 427
Status: Offline
Gender: Male
Location: Toronto Ontario
Joined:  
Reputation: 7%  


pmwww
[F] Prompting For Hyperlinks Please (25th Mar 08 at 4:27pm UTC)
Requests
I'll like a code for when you click on the url button (in the ubbc) that it will have an prompt box pop-up . It will have "Enter Link" and then you will enter the link, and click ok once you click ok it would then have "Enter Text" which you would enter an word to show in post , and not the link .
when you click on the word you will go to where its linked to.

(Like what InvisionFree has for its url hyperlink)

Thanks {Grin} .

http://tropolis.virtualforums.co.uk/

Image
click here We have 15 Different Skins/Templates for your vForum
Marc
vChat Developer
*****
I <3 Rossy

Posts: 3,388
Status: Offline
Gender: Male
Location: Ontario, Canada
Age: 33
Joined:  

Additional Groups:
Coding Team
***


Reputation: 40%  


pmwww
Re: Prompting For Hyperlinks Please (25th Mar 08 at 9:02pm UTC)
Give me a minute. {Smile}

rroll.to— Shorten a link, rickroll your friends.
CåñåÐå™
Full Member
***

[Avatar]

Posts: 427
Status: Offline
Gender: Male
Location: Toronto Ontario
Joined:  
Reputation: 7%  


pmwww
Re: Prompting For Hyperlinks Please (26th Mar 08 at 2:22am UTC)
Ok thanks Marc {Smile} .

Image
click here We have 15 Different Skins/Templates for your vForum
Marc
vChat Developer
*****
I <3 Rossy

Posts: 3,388
Status: Offline
Gender: Male
Location: Ontario, Canada
Age: 33
Joined:  

Additional Groups:
Coding Team
***


Reputation: 40%  


pmwww
Re: Prompting For Hyperlinks Please (26th Mar 08 at 3:13am UTC)
Code:
 
  1. <script type="text/javascript">
  2. <!--
  3. /*
  4. URL Popup by Cr0w
  5. Copyright 2008
  6. Do not repost
  7. */
  8.  
  9. function urlPrompt(){
  10.     var url = prompt("What is the location you would like to link to?","http://");
  11.     if(url != "" && url != null){
  12.         var urlName = prompt("What would you like to name the link?","");
  13.         if(urlName != "" && urlName != null){
  14.             if(document.post_form){
  15.                 document.post_form.message.value += "[url=" + url + "]" + urlName + "[/url]";
  16.             }
  17.             else if(document.quick_reply_form){
  18.                 document.quick_reply_form.message.value += "[url=" + url + "]" + urlName + "[/url]";
  19.             }
  20.         }
  21.     }
  22. }
  23.  
  24. if(get('ubbc_buttons','id')){
  25.     get('ubbc_buttons','id').getElementsByTagName("a")[8].setAttribute("onclick","urlPrompt()");
  26. }
  27. else if(get('quick_reply_ubbc','id')){
  28.     get('quick_reply_ubbc','id').getElementsByTagName("a")[8].setAttribute("onclick","urlPrompt()");
  29. }
  30. //-->
  31. </script>
 


Enjoy. {Smile}

rroll.to— Shorten a link, rickroll your friends.
CåñåÐå™
Full Member
***

[Avatar]

Posts: 427
Status: Offline
Gender: Male
Location: Toronto Ontario
Joined:  
Reputation: 7%  


pmwww
Re: Prompting For Hyperlinks Please (26th Mar 08 at 5:21am UTC)
Thank you very much Marc , it works fine {Grin} .

Image
click here We have 15 Different Skins/Templates for your vForum
Marc
vChat Developer
*****
I <3 Rossy

Posts: 3,388
Status: Offline
Gender: Male
Location: Ontario, Canada
Age: 33
Joined:  

Additional Groups:
Coding Team
***


Reputation: 40%  


pmwww
Re: Prompting For Hyperlinks Please (26th Mar 08 at 7:25am UTC)
No worries. {Smile}

rroll.to— Shorten a link, rickroll your friends.
Michael
Moderator
*****

[Avatar]
Recoding the future

Posts: 4,043
Status: Offline
Gender: Male
Location: UK
Joined:  

Additional Groups:
Coding Team
***


Reputation: 58%  


pmtwittervForum
Re: Prompting For Hyperlinks Please (26th Mar 08 at 10:28am UTC)
I would have just used the ubbc_add() function! {Tongue Out}
 Printable View

All times are GMT+0 :: The current time is 9:04am
Page generated in 0.2057 seconds
This Forum is Powered By vForums (v2.4)
Create a Forum for Free | Find Forums