vForums Support > Programming & Coding :: Database of Codes/Hacks/Mods :: > Forum URL Prompt

Forum URL Prompt - Posted By Michael (wrighty) on 30th Dec 07 at 1:55am
This will prompt you for your forum's URL when you're posting in a certain board (or all boards)

Place in footer

Code:
 
  1. <script>
  2. /*Darkmage's Request
  3. Created By Wrighty
  4. Don't Repost, or Rip
  5. Support.virtualforums.co.uk*/
  6.  
  7. function prompt_do(){
  8. var a = window.prompt("What is your board URL?","http://");
  9. url = '';
  10. if(a=="http://"||a==''){
  11. url='[i]Not Entered[/i]';
  12. }else if(!a.match(/.virtualforums.co.uk/i) && !a.match(/http:\/\//i)){
  13. url='http://'+a+'.viritualforums.co.uk';
  14. }else if(!a.match(/.virtualforums.co.uk/i)){
  15. url=a+'.viritualforums.co.uk';
  16. }
  17. document.post_form.message.value="Board URL: "+url+"\n\nProblem:\n\n";
  18. }
  19.  
  20. if(location.href.match(/\/post\//i) && !location.href.match(/\/topic\//i)){
  21. prompt_do();
  22. check_message_length();
  23. }
  24. </script>
  25.