The forum of the forums
Welcome to the Official Support Forum of Forumotion!

To take full advantage of everything offered by our forum, please log in if you are already a member, or join our community if you've not yet.



Create a free forum like this one.

"Image Uploader" in Messages Posting

View previous topic View next topic Go down

Solved "Image Uploader" in Messages Posting

Post by reinforcez on December 10th 2011, 5:25 am

My Forum use Phpbb2 , the link is http://lostsagaforum.indonesianforum.net/ and have 450+ member, and this forum is a Market forum of a game , where we can sell/buy an item in game.

So,some member who want to post an image doesnt understand an image free hosting like imageshack.com or tinypic etc.

i have already searched and here's my question.

1.Is it Possible to Add Image Uploader Button Like "attachment" but it's not the attachment , it's a direct button to image hosting via pop out , like this :

Spoiler:

not a text but an image/button to pop-up image uploader
and what's the code or where i should put it

2.and if we want to add java-code like
Code:
<script language="javascript" type="text/javascript">
<!--

// MOD Title: Simple Image Upload
// MOD Author: Sium < admin@postimage.org > (N/A) [url]http://www.postimage.org/[/url]
// MOD Version: 1.3.0

var postimage_lang="english";
var postimage_add_text="Add image to post";
var postimage_textarea_ignore_name=/username_list|search/i;

function postimage_query_string(postimage_search_name)
{
    postimage_query=window.location.search.substring(1).split("&");
    for(postimage_i=0;postimage_i<postimage_query.length;postimage_i++)
    {
        postimage_string_data=postimage_query[postimage_i].split("=");
        if(postimage_string_data[0]==postimage_search_name)
        {
            return unescape(postimage_string_data[1]);
        }
    }
}
function postimage_add_code()
{
    if(opener)
    {
        var postimage_text=postimage_query_string("postimage_text");
        if(postimage_text)
        {
            var postimage_id=postimage_query_string("postimage_id");
            var postimage_area=opener.document.getElementsByTagName("TEXTAREA");
            for(var postimage_i=0;postimage_i<postimage_area.length;postimage_i++)
            {
                if(postimage_i==postimage_id)
                {
                    break;
                }
            }
            if(opener.editorHandlemessage && opener.editorHandlemessage.bRichTextEnabled)
            {
                opener.editorHandlemessage.insertText(postimage_text+"<br /><br />",false);
            }
            else
            {
                postimage_area[postimage_i].value=postimage_area[postimage_i].value+postimage_text;
            }
            opener.focus();
            window.close();
        }
    }
}
function postimage_insert()
{
    var postimage_area=document.getElementsByTagName("TEXTAREA");
    for(var postimage_i=0;postimage_i<postimage_area.length;postimage_i++)
    {
        if(!postimage_area[postimage_i].name.match(postimage_textarea_ignore_name))
        {
            var postimage_new_div=document.createElement("div");
            postimage_new_div.innerHTML="<a href=\"javascript:void(0);\" onclick=\"window.open(\'http://www.postimage.org/index.php?mode=proboards&lang="+postimage_lang+"&areaid="+postimage_i+" &forumurl=\' + escape(document.location.href), \'postimage\', \'resizable=yes,width=500,height=400\');return false;\">"+postimage_add_text+"</a><br />";
            postimage_area[postimage_i].parentNode.insertBefore(postimage_new_div,postimage_area[postimage_i]);
        }
    }
}
postimage_add_code();
window.onload=postimage_insert;
//-->
</script>
where should i put it in ? and can i change the text into a mutiple button instead.like button to imageshack,photobucket,tinypic etc.

3.So...The Point is i want to my message post box like this :
Spoiler:
the button is when the user press it , it will linked to image hosting web or a pop-out box like when we upload an image to change image on forum. (please give me some free image hosting link so my user doesnt have to register or maybe register with forum id)

im so sorry if i have a lot of question, im newbie about coding and my english is bad too.
so please answer it if you know something.

(if phpbb2 is not supporting this kind of image uploader, is it possible to phpbb3 / punbb ?)

reinforcez
Forumember

Female Posts : 31
Reputation : 1
Language : Indonesian
Location : At Home

http://lostsagaforum.indonesianforum.net/

Back to top Go down

Solved Re: "Image Uploader" in Messages Posting

Post by SLGray on December 10th 2011, 9:41 am

I do not know if this would work or not, but here is where you can add Java Script:

Administration Panel>>Modules>>JavaScript/HTML>>JavaScript Management


When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.


SLGray
Administrator
Administrator

Male Posts : 36657
Reputation : 2443
Language : English
Location : United States

http://ztwds.forumotion.com/

Back to top Go down

Solved Re: "Image Uploader" in Messages Posting

Post by LGforum on December 10th 2011, 3:21 pm

All forums have the servimg image uploader.

And that JavaScript would go somewhere which accepts HTML. Or. In JavaScript file and remove the comments and script tag.

LGforum
Hyperactive

Male Posts : 2260
Reputation : 258
Language : English
Location : UK

http://www.avacweb.com/

Back to top Go down

Solved Re: "Image Uploader" in Messages Posting

Post by reinforcez on December 10th 2011, 4:37 pm

yeah sorry, my bad. the button is somehow replaced with image button.

@moderator u can lock this now since this my own mistake.
sorry my bad Very Happy

reinforcez
Forumember

Female Posts : 31
Reputation : 1
Language : Indonesian
Location : At Home

http://lostsagaforum.indonesianforum.net/

Back to top Go down

Solved Re: "Image Uploader" in Messages Posting

Post by Sanket on December 10th 2011, 6:34 pm

Topic Solved & Locked

Sanket
ForumGuru

Male Posts : 48766
Reputation : 2819
Language : English
Location : Mumbai

http://webartzforum.com

Back to top Go down

View previous topic View next topic Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum