[Snippet] Add a box (in popup) to add URL image

Mods, snippets and styles postet and supported by the users
Forum rules
As the forum title says this is for User Contributions
Post a support request in this forum and you will be banned!
User avatar
FTH
BBCoder III
BBCoder III
Posts: 124
Joined: 25 Nov 2011, 23:28
BBCodes: 10
Contact:

[Snippet] Add a box (in popup) to add URL image

Post by FTH »

Author : FTH
Description : Insert an image via a popup

Open file styles/prosilver/template/posting_buttons.html

Find :

Code: Select all

var imageTag = false;
After add :

Code: Select all

function BBCimg()
        {
           var FoundErrors = '';
           var enterURL   = prompt('{L_ENTER_URL}');
           if (!enterURL)    {
              FoundErrors += "{L_ENTER_URL_EXPLAIN}";
           }
           if (FoundErrors)
           {
              alert("{L_ERROR_URL} : "+FoundErrors);
              return;
           }
           var bbtags = "[img]"+enterURL+"[/img]";
           document.forms[form_name].elements[text_name].value+=bbtags;
           document.forms[form_name].elements[text_name].focus();
        }
Find :

Code: Select all

<input type="button" class="button2" accesskey="p" name="addbbcode14" value="Img" style="width: 40px" onclick="bbstyle(14)" title="{L_BBCODE_P_HELP}" />
Replace with :

Code: Select all

<input type="button" class="button2" accesskey="p" name="addbbcode14" value="Img" style="width: 40px" onclick="BBCimg()" title="{L_BBCODE_P_HELP}" />
Open file language/en/posting.php

Find :

Code: Select all

'EMPTY_REMOTE_DATA'			=> 'File could not be uploaded, please try uploading the file manually.',
After add :

Code: Select all

'ENTER_URL'                 => 'Enter URL of your image',
	'ENTER_URL_EXPLAIN'         => 'You must enter the link to your image',
	'ERROR_URL'                 => 'Error',
Screenshot :
s1.jpg
s1.jpg (24.94 KiB) Viewed 5879 times
Last edited by FTH on 21 Dec 2011, 22:14, edited 1 time in total.
User avatar
Terr0r
BBCoder V
BBCoder V
Posts: 339
Joined: 04 May 2011, 00:47
BBCodes: 100
Location: The Netherlands
Contact:

[Snippet] Add a box (in popup) to add URL image

Post by Terr0r »

Have you a screenshot and/or live demo off this ?

Greets Terr0r
If you can't fix it with ducktape you ain't using enough
For my MODS and BBCodes or other things that I have made take a look here
User avatar
FTH
BBCoder III
BBCoder III
Posts: 124
Joined: 25 Nov 2011, 23:28
BBCodes: 10
Contact:

[Snippet] Add a box (in popup) to add URL image

Post by FTH »

1rst post edited with screenshot ;)
User avatar
slash
BBCoder II
BBCoder II
Posts: 57
Joined: 27 Oct 2011, 18:53
BBCodes: 31
Contact:

[Snippet] Add a box (in popup) to add URL image

Post by slash »

demo?
User avatar
FTH
BBCoder III
BBCoder III
Posts: 124
Joined: 25 Nov 2011, 23:28
BBCodes: 10
Contact:

[Snippet] Add a box (in popup) to add URL image

Post by FTH »

http://graphogames.fr/demo/index.php

Login : testuser
Password : testuser123456

;)
User avatar
slash
BBCoder II
BBCoder II
Posts: 57
Joined: 27 Oct 2011, 18:53
BBCodes: 31
Contact:

[Snippet] Add a box (in popup) to add URL image

Post by slash »

Code: Select all

General Error
template->_tpl_load_file(): File ./styles/prosilver/template/mods/presentation_form/presentation_form_body.html does not exist or is empty
User avatar
FTH
BBCoder III
BBCoder III
Posts: 124
Joined: 25 Nov 2011, 23:28
BBCodes: 10
Contact:

[Snippet] Add a box (in popup) to add URL image

Post by FTH »

arrrrrf it's an old mod, i'm going to delete that pffffffffffff
User avatar
FTH
BBCoder III
BBCoder III
Posts: 124
Joined: 25 Nov 2011, 23:28
BBCodes: 10
Contact:

[Snippet] Add a box (in popup) to add URL image

Post by FTH »

http://graphogames.fr/demo/viewtopic.ph ... 3&p=77#p77

test here, i'm login with the user account, and it's working perfectly
User avatar
Arnevb
BBCoder III
BBCoder III
Posts: 98
Joined: 08 Oct 2011, 18:23
BBCodes: 8
Location: Belgium
Contact:

[Snippet] Add a box (in popup) to add URL image

Post by Arnevb »

Works fine, only the error message for the invalid URL doesn't work here in chrome.
User avatar
slash
BBCoder II
BBCoder II
Posts: 57
Joined: 27 Oct 2011, 18:53
BBCodes: 31
Contact:

[Snippet] Add a box (in popup) to add URL image

Post by slash »

sorry but I don't understand where im going to vlik for testing this mod ! XD
Locked