PDA

View Full Version : vB Quick Attachments Host


07-06-2005, 10:00 PM
Hack Title: vB Quick Attachments Host a.k.a QAH
Compatibility: 3.0.x
Tested On: 3.0.7

What does the hack do?

This simple hack uses Image Shack (http://imageshack.us) ( A free image hosting website ) built in uploading tool as a quick way to host your members attachments on Image Shack, which is a huge bandwith saver!

Features:
-Permission to be able to use it
-Works on both New Post and New Thread

Install Process:

There are two versions of this hack. One is with Permissions, which takes longer to install since it has more file edits and a query that needs to be executed. And the other doesn't have permissions, and has less file edits. The complete process of both versions are below:

With Permissions

Files to edit(4)
Templates to edit(2)
New Template (2)
New Phrase (1)
Queries (1)


Without Permissions
Files to edit(2)
Templates to edit(2)
New Template (2)
New Phrase (1)

Install Time: Quick, ~5-10 minutes

Please note, Image Shack only provides hosting for images.
Supported Image Types: jpeg jpg png gif bmp tif tiff swf

Sister-Hack:vB Quick Sig Host (https://vborg.vbsupport.ru/showthread.php?s=&threadid=76740)

Please click https://vborg.vbsupport.ru/ (https://vborg.vbsupport.ru/vborg_miscactions.php?do=installhack&threadid=91777);)

Screen Shots Can Be Seen Below


UPDATES:
Error in both versions of the hack, please click here for a fix. Zips have been fixed and uploaded. (https://vborg.vbsupport.ru/showpost.php?p=731974&postcount=21)

Stifler
07-07-2005, 05:56 AM
very nice!
/installed

bigcurt
07-07-2005, 06:46 AM
umm..this is already a mod for vB 3 I believe Danny, exact same one....maybe you made it lol I dont know, I just know that there is.

bigcurt
07-07-2005, 06:47 AM
EDIT: I am sorry, I just looked at screenshots and everything, sorry about that danny..good work...really good work.

/me installs

Guest190829
07-07-2005, 06:50 AM
lol. That's okay, they're very similiar with almost the exact same name.

Guest190829
07-07-2005, 07:04 AM
I've attached two versions of the hack. One version has permissions, so you can let certain usergroups have the feature, and not let others. This versions has 2 more file edits, and a required query to be run.

The other version doesn't have permissions and has two less file edits, and no queries.

I attached both versions because I don't see a high demand for permissions on such a simple hack. The choice is yours. :)

Selene
07-07-2005, 09:49 AM
can someone test this code, cuz i did install it correctly but got some error when i was making new thread and same with new post.

Guest190829
07-07-2005, 09:52 AM
What error are you getting? And do you have the mod with permissions or without?

Selene
07-07-2005, 10:05 AM
ahhh i uninstalled itnow...shall i install again and post error? and it was the mod without perm.

Guest190829
07-07-2005, 10:13 AM
ahhh i uninstalled itnow...shall i install again and post error? and it was the mod without perm.

Yes, if you would like too. I have tested both versions numerous times, and they both work for me. Posting the error will help me find out if something is wrong with the qah_install.txt file for the version without the permissions.

Selene
07-07-2005, 10:22 AM
ok let me install again and paste error msg.

Selene
07-07-2005, 10:25 AM
Parse error: parse error, unexpected T_EVAL in /home2/forums/newthread.php on line 226

line 225 and 226 in newthread.php are:

eval('$quickattachmenthost_bits = "' . fetch_template('quickattachmenthost_bits') . '";')
eval('$quick_attachment_host = "' . fetch_template('quick_attachment_host') . '";');
// get attachment options

Selene
07-07-2005, 10:26 AM
and i did also make the templates for hots and bits

Guest190829
07-07-2005, 10:33 AM
Change


eval('$quickattachmenthost_bits = "' fetch_template('quickattachmenthost_bits') . '";')
eval('$quick_attachment_host = "' . fetch_template('quick_attachment_host') . '";');


to


eval('$quickattachmenthost_bits = "' . fetch_template('quickattachmenthost_bits') . '";');
eval('$quick_attachment_host = "' . fetch_template('quick_attachment_host') . '";');


On both newreply.php and newthread.php. I left out an ; by accident. Thank you for finding this. :)

I will edit the install and upload it right now.

Selene
07-07-2005, 10:36 AM
gr8 Danny , :) i will try it out now.

thx for a good hack

Selene
07-07-2005, 10:40 AM
Now i got this error:

Parse error: parse error, unexpected ';', expecting ')' in /home2/forums/newreply.php on line 44

and line 44 is $actiontemplates = array();

lemi re-installagainto be sure

Selene
07-07-2005, 10:43 AM
ok i re-tested same error but only in newreply.php

newthread is working fine!

Guest190829
07-07-2005, 10:47 AM
Make sure your global templates look like this


$globaltemplates = array(
'newreply',
'newpost_attachment',
'newreply_reviewbit',
'newreply_reviewbit_ignore',
'newreply_reviewbit_ignore_global',
'newpost_attachmentbit',
'quick_attachment_host',
'quickattachmenthost_bits',
);


If it does look like that, post lines 30-40 of your newreply.php file.

Selene
07-07-2005, 10:52 AM
yeps forgot to add );
(it was in ur guide, just a mistake from myside)

all working fine now.

thx

Guest190829
07-07-2005, 10:53 AM
No Problem, I'm glad you found my error in the install script. Thank you for you time in testing the hack! :)

Guest190829
07-07-2005, 10:56 AM
UPDATE:

Both the NO PERMISSIONS and WITH PERMISSIONS versions have an error in the install file to fix please refer to this POST HERE (https://vborg.vbsupport.ru/showpost.php?p=731962&postcount=14)

I have uploaded fixed zip files, so everything should be working fine now.

Selene
07-07-2005, 11:07 AM
just a request:

lets say in post new thread or post reply template...where u see "Logged in as X" like this picture below:
http://img275.imageshack.us/img275/7320/logged6fv.gif

possible to add an imageshack browse/upload thing under that word.

Guest190829
07-07-2005, 11:09 AM
Yeah, I'm sure it is. I'll look into that today. :)

Selene
07-07-2005, 11:21 AM
gr8 thax

hollyboy
07-07-2005, 02:37 PM
can I see this hack in action on some forum please?

Adrian Schneider
07-07-2005, 03:17 PM
There isn't much to see that the screenshot doesn't show. You click submit and a new window opens with the imageshack hosting page (the one in the 2nd screenie). Copy paste that into [img ]..[/img ]

Works great, thanks.

hollyboy
07-07-2005, 03:21 PM
I thought the link was automatically attached into the post
Nevermind :)
I am gonna install the hack later since I have lot of pictures that are allready attached trough Image hack

akanevsky
07-10-2005, 10:48 PM
Nice hack, dude. I installed.

... Let us hope that imageshack will not close off access from remote sites in the nearest future ... Amen ... ;)

CSS59
08-22-2005, 02:44 AM
do you guys get a ton of pop-ups form that site?

yoyoyoyo
08-22-2005, 09:47 PM
nice hack, but I had to change <iframe src="http://www.imageshack.us/iframe.php?txtcolor=111111" scrolling="no" allowtransparency="true" frameborder="0" width="280" height="70"> to <iframe src="http://imageshack.us/iframe.php?txtcolor=111111" scrolling="no" allowtransparency="true" frameborder="0" width="280" height="80">so the submit info would display properly. Thanks again!

yoyoyoyo
08-23-2005, 04:27 PM
I found these instructions on the image shack site for integration with vbulletin:

These instructions will help you to install 'ImageShack on your Site' into the reply and post-new-thread sections of your vBulletin message board, thus giving your visitors the ability to upload images directly. After upload, they may paste the images directly into their post box.

1) Log into your admin cp, and click on Styles and Templates, then Style Manager.

2) For the theme (or themes) that you would like to add the iframe to, select in the drop down box "Edit Templates". You should see a whole list of template groups now.

3) Click the "[? ?]" on the "New Posting Templates".

4) To add the box to the reply page, click edit on the bullet point that says
"newreply".

5) Search for this code: <fieldset class="fieldset"><legend>$vbphrase[miscellaneous_options]</legend>
<div style="padding:$stylevar[formspacer]px"><if condition="$bbuserinfo['signature'] != ''"><div>
<label for="cb_signature"><input type="checkbox" name="signature" value="1" id="cb_signature"
tabindex="1" $checked[signature] />$vbphrase[show_your_signature]</label></div></if><div>
<label for="cb_parseurl"><input type="checkbox" name="parseurl" value="1" id="cb_parseurl"
tabindex="1" $checked[parseurl] />
$vbphrase[automatically_parse_links_in_text]</label></div>
disablesmiliesoption</div></fieldset>

6) Paste the iframe code DIRECTLY AFTER the instance mentioned above.
<fieldset class="fieldset"><legend>Upload your images to ImageShack</legend>
<div style="padding:$stylevar[formspacer]px">
<iframe src="http://imageshack.us/iframe.php?txtcolor=111111" scrolling="no" allowtransparency="true" frameborder="0" width="280" height="70"> You must
have an iframe-compatable browser to view the ImageShack.us upload form.</iframe></div></fieldset>

7) Click Save.

8) To add the iframe in the new thread page, click edit on "newthread".

9) Repeat steps 5, 6, and 7.

10) Login to your message board as a regular user. Either click "Post New Thread" or reply to an existing thread in order to test out your new Image Hosting Service!

stan111
10-17-2005, 09:48 PM
nice hack, but I had to change <iframe src="http://www.imageshack.us/iframe.php?txtcolor=111111" scrolling="no" allowtransparency="true" frameborder="0" width="280" height="70"> to <iframe src="http://imageshack.us/iframe.php?txtcolor=111111" scrolling="no" allowtransparency="true" frameborder="0" width="280" height="80">so the submit info would display properly. Thanks again!


damn, you rock
u have saved me a bunch of time on this one
i got the error with the display
now it work perfect

btw: is there anyway we could have this under the Quick Reply ?