vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Member Archives (https://vborg.vbsupport.ru/forumdisplay.php?f=202)
-   -   [Release] Attached Image will be small.. (https://vborg.vbsupport.ru/showthread.php?t=52685)

flup 05-07-2003 07:41 AM

[Release] Attached Image will be small..
 
This modication to the postbit_attachment template will make your image attachment smaller, so it doesn't mess op the forumlook, after clicking it will apear bigger.

__________________________________________________ _
Open your adminCP and scroll down to Templates > Edit > Expand > Postbit Templates > Postbit_attachmentimage

Replace the whole code with:
Code:

<!--<p>--><smallfont>$post[username] has attached this image:<br>
<a href="attachment.php?=$session[sessionhash]&postid=$post[postid]" target="_blank"><img src="attachment.php?s=$session[sessionhash]&postid=$post[postid]" border="0" alt="" width="200" vspace="8" hspace="4"></a>
</smallfont><!--</p>-->

__________________________________________________ __

In this example the width of an attached image is 200, edit it the way you would like to have it ;x

flup 05-07-2003 07:51 AM

For this modification, in your adminCP goto:
Options > Attachments:
Preview images in thread; this MUST be on!!

flup 05-07-2003 07:54 AM

1 Attachment(s)
Here's a screenshot, enjoy ;p

Dean C 05-07-2003 03:54 PM

flup this was released [url=https://vborg.vbsupport.ru/showthread.php?s=&threadid=52344] here and you even posted in the thread :S?

- miSt

flup 05-07-2003 04:50 PM

This is a VBcode
Mine is a template mod ;x

gmarik 05-18-2003 03:17 PM

This is not serious.

wyzzor 05-18-2003 08:43 PM

thx

Boofo 05-18-2003 08:49 PM

flup, go ahead and attach a smilie and see what it does. ;)

filburt1 05-18-2003 08:53 PM

Precisely; it will fail for small images.

Boofo 05-18-2003 08:57 PM

Is there a way to have the image stay the same size on up until a set size and it will automatically go into a link instead of being viewed?

flup 05-19-2003 12:27 PM

bit of a stupid mod indeed, forgot to look @ small images :)

chrisvonc 07-13-2003 01:36 PM

Installed all good on my test forum. Works nice! Does exactly what I want since most of my users with be using the "attach" option for their pictures rather than the vbcode.

Thanks!

Chris

flup 07-13-2003 01:47 PM

np

chrisvonc 07-13-2003 10:08 PM

I just tried the smaller image test and now I also would be interested if there is a way to get it to ignore the pictures up to the size you set. I really know nothing about coding so I can only sit here and wish I could contribute. LOL

Thanks,

Chris

flup 07-14-2003 09:21 AM

There's a way with php functions, i'll try to make another version soon :)

The code wud become:
PHP Code:

<?php
$size 
getimagesize("attachment.php?s=$session[sessionhash]&postid=$post[postid]");

if (
$size[1]>200) {
<
a href="attachment.php?s=$session[sessionhash]&postid=$post[postid]target="_blank"><img src="attachment.php?s=$session[sessionhash]&postid=$post[postid]width="200" border="0" alt="" vspace="8" hspace="4"></a>
}
elseif (
$size[1]=200) {
<
img src="attachment.php?s=$session[sessionhash]&postid=$post[postid]border="0" alt="" vspace="8" hspace="4">
}
else {
<
img src="attachment.php?s=$session[sessionhash]&postid=$post[postid]border="0" alt="" vspace="8" hspace="4">
}
?>

Such thing should work, but i dunno were to put it...

chrisvonc 10-22-2003 12:03 AM

Dont know if you are still checking in with this thread but I have installed the vB Attachments - Including Multiple Attachements hack (https://vborg.vbsupport.ru/showthrea...ght=vb3+images).

The problem is that with that hack I have to modify the postbit_attachment template with that hacks code and the 2 dont play well. Not knowing too much at what I am looking at to figure out what is wrong, I can get it to a point where it still thumbnails the pictures, and lets me do the multiple attachments, but all the links to the larger picture all point back to the 1st picture in the post.

Any ideas?

Here is the code I have mashed together so far:
*******
<p><smallfont>$post[username] has attached this image:<br>
<a href="attachment.php?=$session[sessionhash]&postid=$post[postid]" target="_blank">
<img src="attachment.php?s=$session[sessionhash]&attachmentid=$value[attachmentid]" border="0" alt="" width="150" vspace="8" hspace="4">
</smallfont></p>
*******

Thanks in advance. I will also post in the vB3 Attachment thread to see if I get any input from that author.


All times are GMT. The time now is 04:47 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01205 seconds
  • Memory Usage 1,756KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (1)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (16)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete