PDA

View Full Version : 321 Cheese Webcam Photo Hack



hau_ooo
09-10-2009, 01:34 PM
This hack gives your forum users the ability to add a webcam snapshot to their posts through integration with the 321 Cheese online service.

It installs an extra webcam button above the post message text area. When a user clicks on the button, a lightbox window with the webcam snapshot tool will appear.

After the user has taken a webcam snapshot, it's automatically inserted in the message post text area through the use of BBCode.



################################################## ############
## MOD Title: Webcam snapshots
## MOD Version: 1
## TESTED and installed on phpBB 3
## MOD Author: Kris Van Roosbroeck
##
##
## MOD Description: Adds a button above the message input box that allows users to make webcam snapshots.
## After taking a webcam snapshot, the image is automatically inserted into the message input box with [img]-bbCode.
##
## Installation Level: Very Easy
## Installation Time: 3 Minutes
##
## (prosilver) Files To Edit: 2
## styles/prosilver/template/posting_buttons.html
## styles/prosilver/theme/stylesheet.css
## Included files: Nil
##
################################################## ############
## For Security Purposes, Please Check: http://www.phpbbhacks.com/
## for the latest version of this MOD. Downloading this MOD from other sites could
## cause malicious code to enter into your phpBB Forum.
################################################## ############
## MOD History:
## 2009-08-15 - version 1
## - Initial Release
##
################################################## ############
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
################################################## ############
#
##################################- PHPBB3 PROSILVER -#########################################
#
#-----[ OPEN ]------------------------------------------
#
styles/prosilver/template/posting_buttons.html

#
#-----[ FIND ]------------------------------------------
#
<script type="text/javascript">


#
#-----[ REPLACE WITH ]------------------------------------------
#
<div id="light" class="webcam_content"><a href="javascript:void(0)" onclick ="closeWebcam();">Close</a>
<object width="489" height="364">
<param name="movie" value="http://www.321cheese.com/main_cam_plugin.swf?plugin=true" />
<param name="allowScriptAccess" value="always" />
<embed src="http://www.321cheese.com/main_cam_plugin.swf?plugin=true" width="489" height="364" allowscriptaccess="always">
</embed>
</object>
</div>
<div id="fade" class="webcam_overlay"></div>
<script type="text/javascript">
function openWebcam(){
document.getElementById('light').style.display='bl ock';
document.getElementById('fade').style.display='blo ck';
}

function insertImg(file){
insert_text('[img]http://www.321cheese.com/'+file+'', false, false);
closeWebcam();
}

function closeWebcam(){
document.getElementById('light').style.display='no ne';
document.getElementById('fade').style.display='non e'
}


#
#-----[ FIND ]------------------------------------------
#
<!-- IF S_BBCODE_IMG -->

#
#-----[ ADD BEFORE ]------------------------------------------
#
<input type="button" value="Webcam" class="button2" onclick="openWebcam();" />

#
#-----[ OPEN ]------------------------------------------
#
styles/prosilver/theme/stylesheet.css

#
#-----[ FIND ]------------------------------------------
#
@import url("colours.css");

#
#-----[ AFTER ADD ]------------------------------------------
#
@import url(http://www.321cheese.com/plugin.css);

#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
------ [ OPEN ADMINISTRATION CONTROL PANEL ]----------------------------
#
Select Styles tab ----> Style Components ----> Templates ----> Refresh ----> Yes

#
# EoM