![]() |
Attached images elsewhere within the post
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]'); Code:
//highlight words for search engine |
perfect, thanks alot Chen = ]
|
Squirrel Mall
Webmall for nuts :p |
gangsta hack man.
|
great hack, and so easy!
|
so Chen, are your test posts always full of "assdas"? ;)
|
Hi,
Didn't seem to work for me :disappointed: I have 2.23 and found the code in fuctions.php Added the recommended code after it. posted a test post like: some text here. [attachment] some text below attached a gif. The post looked like: some text here. [attachment] some text below image down here as usual Does it work with 2.2.3 and I've done something wrong? (of course, images are turned on as I see the image in the normal place below the text) I really want to install this as it's a great feature to have. Thanks! Phil |
Nice Chen.
|
what if you use the muti attach hack? one of my boards i run uses it - friend made it though..
|
plcguru: You might be running a very old version of PHP.
Try replacing this: Code:
if ($attachpos !== false) { Code:
if (is_integer($attachpos)) { |
All times are GMT. The time now is 01:41 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|