PDA

View Full Version : Show image attachments as images instead of links


Slynderdale
02-07-2003, 10:00 PM
I know theres a setting that allows you to show attached images instead of showing them as a link, but that will show every attached image, with this hack, when you post a new reply, a new thread or even edit a post, theres a option under attachments that allows you to choose if you want to show the image as a link or show the actual image, this also has support for swf flash movie attachments as well.

Theres two settings for this, one allows you to enable and disable this hack and another allows you to have it so only admin's can use this.

This hack is pretty self-explanatory but ill show screen shots.

https://vborg.vbsupport.ru/attachment.php?s=&postid=326782

(Screen shots are from a multiple attachment hack I'm working on)

As you can see, the images are actually shown instead of being shown as links.

Also this also prevents attachments from caching, some of you might of experienced this by downloading a new version of a hack but got an old version, I added a fix for that in this hack as well.

This goes for all my hacks, the only thing I ask of in return for using this hack on your forum is to click Install (https://vborg.vbsupport.ru/misc.php?s=&action=install&threadid=48702).

corsacrazy
02-08-2003, 08:21 PM
i love the multiple attahment hack ! i have a request 4 it already ! thre shood b one box like there is on vb as standard ! then a link saying upload multiple ! u click that and u get a prompt askin how many u wont ot upload etc maybe that cood work or am i soundin stupid ! i like this other hack !

Neo
02-09-2003, 01:13 AM
This is a default vb option fuwl.

Sebastian
02-09-2003, 01:30 AM
Originally posted by Neo
This is a default vb option fuwl.

i guess you did not read very well fuwl .. the hack allows the user to specify if the image is shown or linked when posting an attachment.

Slynderdale
02-09-2003, 05:44 AM
Originally posted by Neo
This is a default vb option fuwl.

Yes I know, I explained it above, what makes this different is that you can choose if you want to show each attachment as an image or link, you have a choice when you post, but with the defsault vb option, it shows all the links no matter what.

Slynderdale
02-09-2003, 05:48 AM
This also works for swf flash files as well, the built in vb option didnt have that.

Dean C
02-09-2003, 10:13 AM
I also wanna thank Mist for testing this hack for me.


So you finaly got it working :)? What was the problem :D?

- miSt

Slynderdale
02-09-2003, 10:40 AM
Originally posted by Mist


So you finaly got it working :)? What was the problem :D?

- miSt

I forgot to add the globals that were needed it in the install file lol

partang2
02-09-2003, 12:11 PM
Originally posted by Neo
This is a default vb option fuwl.

And you think you are.....? :tired:

Nice hack m8! Thanks!

geezzaa
02-09-2003, 01:05 PM
Hey.
From the picture link, This hack is just what i needed.
so i opened the text document and...........wtf
Im only a beginer, how do you do all this.
Could you please add some instructions for us less programming people.
Thanks

Slynderdale
02-09-2003, 01:11 PM
Originally posted by geezzaa
Hey.
From the picture link, This hack is just what i needed.
so i opened the text document and...........wtf
Im only a beginer, how do you do all this.
Could you please add some instructions for us less programming people.
Thanks

Its not hard to do, I know theres alot of file edits but most of it is just copy and paste, if you havnt istalled alot of hacks it should be a breeze, first open in your text editor and then do what it says, if it says find something, just go to your text editor's search function and search for the bit of code it tells you to find and replace it, if you installed other hacks that edit those pieces of code, find the code thats different and add it, for example:

$DB_site->query("UPDATE post SET title='".addslashes(htmlspecialchars($title))."',pagetext='".addslashes($message)."',allowsmilie='$allowsmilie',showsignature='$signa ture',iconid='$iconid'$editedbysql$attachmentsql WHERE postid='$postid'");

*************
replace it with:
*************

$DB_site->query("UPDATE post SET title='".addslashes(htmlspecialchars($title))."',pagetext='".addslashes($message)."',allowsmilie='$allowsmilie',showsignature='$signa ture',showimage='$showimage',iconid='$iconid'$edit edbysql$attachmentsql WHERE postid='$postid'");


Thr code thats different is:
showimage='$showimage',

so copy and paste that into the code in your file, but if the line is exactly the same as it says in the text, just copy and paste over it. The average install time for this hack is 10-20 minutes

Slynderdale
02-09-2003, 01:13 PM
If you need more help, try here:
https://vborg.vbsupport.ru/showthread.php?s=&threadid=39142

feldon23
02-09-2003, 05:02 PM
Not sure why a hack is needed.

If someone wants you to see the image immediately, they {img}{/img}. If they don't, they {url=blahblah.jpg}click here for image{/url}

Slynderdale
02-09-2003, 07:04 PM
Originally posted by feldon23
Not sure why a hack is needed.

If someone wants you to see the image immediately, they {img}{/img}. If they don't, they {url=blahblah.jpg}click here for image{/url}

This hack is for the attachments, In case the user atatches the image, they can select if they want the attachment to show or not, also it prevents attachments from being called from the brwsers cache as well. And it also has the ability to play swf flash attachments too.

Courage
06-04-2003, 11:32 AM
I've disabled

View Images
Do you wish to display attached images in the threads? Select no to just generate a link to download the image.
on admin vb options, but I want an option in user CP to change that option for each user.

Can you help?