Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Full Releases

Reply
 
Thread Tools
Attached images elsewhere within the post Details »»
Attached images elsewhere within the post
Version: 1.00, by Admin (Coder) Admin is offline
Developer Last Online: Nov 2024 Show Printable Version Email this Page

Version: 2.2.x Rating:
Released: 07-09-2002 Last Update: Never Installs: 14
 
No support by the author.

This is a very basic hack but pretty cool I think...
Anyway, it lets you place your attachments elsewhere in the post, i.e not at the bottom.
All you need to do is place [attachment] where you want it to show up, and voila.

Of course this mainly makes sense if you have view images turned on for attachments, so attached images show up inline.
It will also look best if you edit the "postbit_attachmentimage" template and remove the whole "$post[username] has attached this image:" part.

Anyway, installation is really easy, just one file edit. In functions.php, add this code:
Code:
	$attachpos = strpos($post['message'], '[attachment]');
	if ($attachpos !== false) {
		$post['message'] = substr($post['message'], 0, $attachpos) . $post['attachment'] . substr($post['message'], $attachpos + strlen('[attachment]'));
		$post['attachment'] = '';
	}
Right before this:
Code:
	//highlight words for search engine
	if (isset($highlight) && $highlight != '') {
A screen shot is attached...

Show Your Support

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

Comments
  #12  
Old 07-11-2002, 07:27 AM
Velocd's Avatar
Velocd Velocd is offline
 
Join Date: Mar 2002
Location: CA University
Posts: 1,696
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

short, simple, but sweet.
Thnx Double F
Reply With Quote
  #13  
Old 07-11-2002, 12:06 PM
tractor-beam tractor-beam is offline
 
Join Date: May 2002
Location: Maine
Posts: 22
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This is a GREAT hack, thanks! How would this work for multiple attachments?

Thanks!
Reply With Quote
  #14  
Old 07-11-2002, 05:06 PM
Dean C's Avatar
Dean C Dean C is offline
 
Join Date: Jan 2002
Location: England
Posts: 9,071
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

this is so cool....
Reply With Quote
  #15  
Old 07-12-2002, 01:58 AM
plcguru plcguru is offline
 
Join Date: Mar 2002
Posts: 21
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by FireFly
plcguru: You might be running a very old version of PHP.
<snip>
I tried replacing the code as you suggested. No luck. Any other ideas?
Maybe some other hack I have installed might bother this one... like ---New vbcode.js - vBcode and smilie user interface improvement --- ?
Thx,
Phil
Reply With Quote
  #16  
Old 07-12-2002, 05:51 AM
Admin's Avatar
Admin Admin is offline
Coder
 
Join Date: Oct 2023
Location: Server
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Send me your functions.php by email, I'll take a lookie look.
Reply With Quote
  #17  
Old 07-13-2002, 02:05 AM
Stealthy Stealthy is offline
 
Join Date: May 2002
Posts: 26
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Not working for me either on 2.2.5

I installed the vbcode.js hack as well.
Reply With Quote
  #18  
Old 07-13-2002, 07:11 AM
Admin's Avatar
Admin Admin is offline
Coder
 
Join Date: Oct 2023
Location: Server
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Apply it again, my post said AFTER and not BEFORE. Sorry.
Reply With Quote
  #19  
Old 09-17-2002, 04:16 PM
stryka stryka is offline
 
Join Date: Aug 2002
Posts: 201
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by tractor-beam
This is a GREAT hack, thanks! How would this work for multiple attachments?

Thanks!
Thanx to LOGICIAN for this link... BUT.... did anyone modify this hack for MULTIPLE ATTACHMENTS
Reply With Quote
  #20  
Old 10-26-2002, 04:37 PM
Tim Wheatley's Avatar
Tim Wheatley Tim Wheatley is offline
 
Join Date: Nov 2001
Location: England
Posts: 489
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

If someone doesn't insert the text, does it go to the default place??
Reply With Quote
  #21  
Old 01-22-2003, 12:43 AM
Bison's Avatar
Bison Bison is offline
 
Join Date: Jun 2002
Location: Virginia Beach, Virginia
Posts: 522
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

^^
Good one mates!
Reply With Quote
Reply

Thread Tools

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 02:47 PM.


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.04874 seconds
  • Memory Usage 2,294KB
  • Queries Executed 25 (?)
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
  • (2)bbcode_code
  • (2)bbcode_quote
  • (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
  • (2)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)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_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