Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > General > Member Archives
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
[Release] Attached Image will be small.. Details »»
[Release] Attached Image will be small..
Version: , by flup flup is offline
Developer Last Online: Nov 2021 Show Printable Version Email this Page

Version: Unknown Rating:
Released: 05-07-2003 Last Update: Never Installs: 0
 
No support by the author.

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

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #12  
Old 05-19-2003, 12:27 PM
flup's Avatar
flup flup is offline
 
Join Date: Jan 2002
Location: Maastricht, NL
Posts: 872
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

bit of a stupid mod indeed, forgot to look @ small images
Reply With Quote
  #13  
Old 07-13-2003, 01:36 PM
chrisvonc's Avatar
chrisvonc chrisvonc is offline
 
Join Date: Apr 2002
Location: Austin, TX
Posts: 161
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #14  
Old 07-13-2003, 01:47 PM
flup's Avatar
flup flup is offline
 
Join Date: Jan 2002
Location: Maastricht, NL
Posts: 872
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

np
Reply With Quote
  #15  
Old 07-13-2003, 10:08 PM
chrisvonc's Avatar
chrisvonc chrisvonc is offline
 
Join Date: Apr 2002
Location: Austin, TX
Posts: 161
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #16  
Old 07-14-2003, 09:21 AM
flup's Avatar
flup flup is offline
 
Join Date: Jan 2002
Location: Maastricht, NL
Posts: 872
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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...
Reply With Quote
  #17  
Old 10-22-2003, 12:03 AM
chrisvonc's Avatar
chrisvonc chrisvonc is offline
 
Join Date: Apr 2002
Location: Austin, TX
Posts: 161
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 07:51 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04428 seconds
  • Memory Usage 2,293KB
  • Queries Executed 24 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)bbcode_code
  • (1)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (7)post_thanks_box
  • (7)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (7)post_thanks_postbit_info
  • (6)postbit
  • (7)postbit_onlinestatus
  • (7)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete