Nick Very Senior Member
    
![[Avatar]](http://uploads.vforums.co.uk/forums/support/f_5e7b1402b305d883af97446b2fedc6c2_1-eog.jpeg) Posts: 3,013 Status: Offline Gender: Male Location: vForums Age: 36 Joined:
pmwww | | [F] Pop up box code help (28th Dec 07 at 6:02am UTC) | |  Code: - <script language="JavaScript">
-
- if(location.href.match(/action=post$/gi))
- {
- var a = window.prompt("What is your board URL?","http://");
-
- if (a != 'http://') {
- if (a.indexOf('http://http://') != -1){
- a = 'ht'+ a.split('//ht')[1];
- }
- document.postForm.message.value+="Board URL: "+a+"nnProblem:nn";
- }
- }
-
- </script>
-
I made this code (Though I do not know how I did it, just followed a few steps.), it kinda works though it will not put the link into the post, and I want to put .virtualforums.co.uk in the non-url area, so you can only put your forums link, instead of putting http://Forums_link.virtualforums.co.uk.
Thanks, Darkmage | |
|
Michael Moderator
    
![[Avatar]](http://av.wservices.co.uk/av.png) Recoding the future Posts: 4,043 Status: Offline Gender: Male Location: UK Joined:
Additional Groups: Coding Team
  
pmvForum | | Re: Pop up box code help (29th Dec 07 at 11:35pm UTC) | | to do that I would suggest some form of post request form... instead of a prompt...
What you could do I guess is check if it contains .virtualforums.co.uk
and if it doesn't add it... and if it does then don't add it.
(should be in code support! ) | |
|
Nick Very Senior Member
    
![[Avatar]](http://uploads.vforums.co.uk/forums/support/f_5e7b1402b305d883af97446b2fedc6c2_1-eog.jpeg) Posts: 3,013 Status: Offline Gender: Male Location: vForums Age: 36 Joined:
pmwww | | Re: Pop up box code help (30th Dec 07 at 12:57am UTC) | | | I guess I can fix up Ross' Posting form, but I was thinking of having it, just like PBS form. | |
|
Michael Moderator
    
![[Avatar]](http://av.wservices.co.uk/av.png) Recoding the future Posts: 4,043 Status: Offline Gender: Male Location: UK Joined:
Additional Groups: Coding Team
  
pmvForum | | Re: Pop up box code help (30th Dec 07 at 1:00am UTC) | | PBS' is a form isn't it? It isn't a prompt box..
You can use a prompt box no problem...it's just the code to do it would be stupidly long when you could just code a post modification box...
I'm happy to help ya! | |
|
Nick Very Senior Member
    
![[Avatar]](http://uploads.vforums.co.uk/forums/support/f_5e7b1402b305d883af97446b2fedc6c2_1-eog.jpeg) Posts: 3,013 Status: Offline Gender: Male Location: vForums Age: 36 Joined:
pmwww | | Re: Pop up box code help (30th Dec 07 at 1:06am UTC) | | | I know PBS has a form, Awhile ago it used to be Prompt box, but all well. I guess no Biggie, thanks. | |
|
Michael Moderator
    
![[Avatar]](http://av.wservices.co.uk/av.png) Recoding the future Posts: 4,043 Status: Offline Gender: Male Location: UK Joined:
Additional Groups: Coding Team
  
pmvForum | | Re: Pop up box code help (30th Dec 07 at 1:10am UTC) | | Gimme 10 mins and I'll make you a prompt box one that automatically checks if it has virtual forums in it! | |
|
Michael Moderator
    
![[Avatar]](http://av.wservices.co.uk/av.png) Recoding the future Posts: 4,043 Status: Offline Gender: Male Location: UK Joined:
Additional Groups: Coding Team
  
pmvForum | | Re: Pop up box code help (30th Dec 07 at 1:20am UTC) | |  Code: - <script>
- //Darkmage's Request
- //Created By Wrighty
-
- function prompt_do(){
- var a = window.prompt("What is your board URL?","http://");
- url = '';
- if(a=="http://"||a==''){
- url='[i]Not Entered[/i]';
- }else if(!a.match(/.virtualforums.co.uk/i) && !a.match(/http:\/\//i)){
- url='http://'+a+'.viritualforums.co.uk';
- }else if(!a.match(/.virtualforums.co.uk/i)){
- url=a+'.viritualforums.co.uk';
- }
- document.post_form.message.value="Board URL: "+url+"\n\nProblem:\n\n";
- }
-
- if(location.href.match(/\/post\//i) && !location.href.match(/\/topic\//i)){
- prompt_do();
- check_message_length();
- }
- </script>
-
should do it!
Even threw in a lil' special something for ya! | |
|
Nick Very Senior Member
    
![[Avatar]](http://uploads.vforums.co.uk/forums/support/f_5e7b1402b305d883af97446b2fedc6c2_1-eog.jpeg) Posts: 3,013 Status: Offline Gender: Male Location: vForums Age: 36 Joined:
pmwww | | Re: Pop up box code help (30th Dec 07 at 1:36am UTC) | | ok thanks ^_^
| |
|
Michael Moderator
    
![[Avatar]](http://av.wservices.co.uk/av.png) Recoding the future Posts: 4,043 Status: Offline Gender: Male Location: UK Joined:
Additional Groups: Coding Team
  
pmvForum | | Re: Pop up box code help (30th Dec 07 at 1:37am UTC) | | No worries!
(it updates the characters left automatically! ) | |
|
Nick Very Senior Member
    
![[Avatar]](http://uploads.vforums.co.uk/forums/support/f_5e7b1402b305d883af97446b2fedc6c2_1-eog.jpeg) Posts: 3,013 Status: Offline Gender: Male Location: vForums Age: 36 Joined:
pmwww | | Re: Pop up box code help (30th Dec 07 at 1:42am UTC) | | it dont work: Just click on new thread http://magedesigns.virtualforums.co.uk/board/Support/
The box comes up I put in ffnation, then I click ok, and the link does not get added to the posting field.
Edit: on your forum why do you have "DarkMage's requests?" and BTW I don't capitalize my M on mage, So I keep it Darkmage. | |
|
Michael Moderator
    
![[Avatar]](http://av.wservices.co.uk/av.png) Recoding the future Posts: 4,043 Status: Offline Gender: Male Location: UK Joined:
Additional Groups: Coding Team
  
pmvForum | | Re: Pop up box code help (30th Dec 07 at 1:44am UTC) | | guest can't make a post..
put it in the footer... as I'm guessing you put it in the header? | |
|
Nick Very Senior Member
    
![[Avatar]](http://uploads.vforums.co.uk/forums/support/f_5e7b1402b305d883af97446b2fedc6c2_1-eog.jpeg) Posts: 3,013 Status: Offline Gender: Male Location: vForums Age: 36 Joined:
pmwww | | Re: Pop up box code help (30th Dec 07 at 1:46am UTC) | | ^_^ yes I did put it in the header. and guests should be able to post. it works now, and I made guests enabled. | |
|
Michael Moderator
    
![[Avatar]](http://av.wservices.co.uk/av.png) Recoding the future Posts: 4,043 Status: Offline Gender: Male Location: UK Joined:
Additional Groups: Coding Team
  
pmvForum | | Re: Pop up box code help (30th Dec 07 at 1:48am UTC) | | so they can! | |
|