User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the Growing an Online Community section within the Site Management category of DaniWeb, a massive community of 392,328 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,751 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Growing an Online Community advertiser: Affiliate Marketing
Views: 6240 | Replies: 0
Reply
Join Date: Oct 2005
Posts: 18
Reputation: ben_ is an unknown quantity at this point 
Rep Power: 3
Solved Threads: 0
ben_ ben_ is offline Offline
Newbie Poster

Solution Add image uploading to post options

  #1  
Oct 31st, 2005
Hi guys,

I run an image hosting site and have prepared a special integration module that lets forum owners add it to their site as an 'UPLOAD IMAGE' button in the regular post options.

It's fast, free, registration free and very simple to use.

The images are optimized for forums, thumbnails are generated, the images themselves are resized to a user-specified width etc.

Other features include a multiple file uploader, so users can upload up to 5 images at once.

All of this is done simply through a tidy little pop-up that launches if they click the 'UPLOAD IMAGE' button.

Screenshots
http://quick.imgfree.net/images/675_thumb.jpg http://quick.imgfree.net/images/676_thumb.jpg http://quick.imgfree.net/images/677_thumb.jpg http://quick.imgfree.net/images/678_thumb.jpg

If you're interested in adding it to your forum there's a few ways you can do so:

Invision Power Board
Add this to your "Footer".  The rest is entirely automatic!  If you're using a free IPB host, you may need the instructions below this.
<script language="javascript" src="http://forum.imgfree.net/uploadpop.js"></script>
<noscript><a href="http://www.imgfree.net">Image Hosting</a></noscript>
<script type="text/javascript">
var b = document.getElementsByTagName("input");
var numb = b.length;
for(i=0;i<numb; i++)
{
if(b[i].name == "img")
{
// get the parent element
var c = b[i].parentNode;

br = ((c.innerHTML.indexOf("<BR>") > 0) ? "<BR>" : ((c.innerHTML.indexOf("<br>") > 0) ? "<br>" : "<BR/>"));

// internet explorer
var ctextarr = c.innerHTML.split(br);

  // put the inner text back together with the new button
  c.innerHTML = ctextarr[0] + br + ctextarr[1];
  c.innerHTML += "<input type=\"button\" class=\"codebuttons\" value=\"UPLOAD IMAGE\" onclick=\"LaunchImgFree();\" title=\"Upload Image\" />";
  c.innerHTML += br + ctextarr[2];
  break;
}
}
</script>

OR

Navigate to your template html editing section in your admin control panel, find the post options, then within that html locate:
<input type='button' accesskey='g' value=' IMG ' onclick='tag_image()' class='codebuttons' name='img' onmouseover="hstat('img')" />

and just after it add:
<input type='button' value='UPLOAD IMG' onclick='LaunchImgFree();' class='codebuttons' />
<script language="javascript" src="http://forum.imgfree.net/uploadpop.js"></script>
<noscript><a href="http://www.imgfree.net">Image Hosting</a></noscript>

phpBB
There's an official phpBB mod for it:
############################################################## 
## MOD Title:          phpBB2 imgfree.net integration 
## MOD Author:         3Di < 3d@you3d.za.net > (marco) http://phpbb2italia.za.net/phpbb2/index.php 
## MOD Description:    Embeds imgfree.net into your phpBB2 
## MOD Version:        0.1.0 
## 
## Installation Level: (Easy) 
## Installation Time:  3 Minutes 
## Files To Edit: 
##      templates/subSilver/overall_header.tpl 
##      templates/subSilver/posting_body.tp 
## 
## Included Files: 
##      N/A 
##      
##      
## License: http://opensource.org/licenses/gpl-license.php GNU General Public License v2 
############################################################## 
## For security purposes, please check: http://www.phpbb.com/mods/ 
## for the latest version of this MOD. Although MODs are checked 
## before being allowed in the MODs Database there is no guarantee 
## that there are no security problems within the MOD. No support 
## will be given for MODs not found within the MODs Database which 
## can be found at http://www.phpbb.com/mods/ 
############################################################## 
## Author Notes: 
## 
############################################################## 
## MOD History: 
## 
##   2005-10-28 - Version 0.1.0 
##      - first public release BETA 
## 
##   2005-10-28 - Version 0.0.1 
##      - alpha on localhost 
## 
############################################################## 
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD 
############################################################## 
# 
#-----[ OPEN ]------------------------------------------------ 
# 
templates/subSilver/overall_header.tpl 
# 
#-----[ FIND ]------------------------------------------------ 
# 
@import url("templates/subSilver/formIE.css"); 
--> 
</style> 
# 
#-----[ AFTER, ADD ]------------------------------------------ 
# 
<script language="javascript" src="http://forum.imgfree.net/uploadpop.js"></script> 
<noscript><a href="http://www.imgfree.net">Image Hosting</a></noscript> 
# 
#-----[ FIND ]------------------------------------------------ 
# 
/* Copyright and bottom info */ 
# 
#-----[ BEFORE, ADD ]----------------------------------------- 
# 
.uploadbutton { 
   background-color: transparent; 
   font-family: Verdana, Arial, Helvetica, sans-serif; 
   font-size: 11px; 
   color: Blue; 
   padding: 1px 1px 1px 1px; 
   margin: 1px; 
   border-style: ridge; 
} 
# 
#-----[ OPEN ]------------------------------------------------ 
# 
templates/subSilver/posting_body.tpl 
# 
#-----[ FIND ]------------------------------------------------ 
# 
     <td class="row2"> 
# 
#-----[ IN-LINE FIND ]---------------------------------------- 
# 
<td class="row2"> 
# 
#-----[ IN-LINE AFTER, ADD ]---------------------------------- 
# 
<input type="button" value="imgfree uploader" class="uploadbutton" onclick="LaunchImgFree();" /> 
# 
#-----[ SAVE/CLOSE ALL FILES ]-------------------------------- 
# 
# EoM

vBulletin
I haven't seen or heard of anyone integrating it on vBulletin before, so I'm really not sure of what that involves.

Basically you need to include a JS file located on my server, and then add a button.

If someone would like to have a go, the codes are:
JS
<script language="javascript" src="http://forum.imgfree.net/uploadpop.js"></script>
<noscript><a href="http://www.imgfree.net">Image Hosting</a></noscript>

Button
<input type="button" value="UPLOAD IMAGE" class="codebuttons" onclick="LaunchImgFree();" />
AddThis Social Bookmark Button
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

DaniWeb Growing an Online Community Marketplace
Thread Tools Display Modes

Similar Threads
Other Threads in the Growing an Online Community Forum

All times are GMT -4. The time now is 11:08 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC