![]() |
Attachmentstyle, choose where to place your Attachments
Hello,
Some of you have used eBay before. On every auction you can select where the pictures you have uploaded should be displayed. Since many of us use the vB attachment function to publish pictures there should be the possibility of doing exactly the same thing with your attachments. :) This hack allows you (and your users) to select wether the attachments should be displayed: * At the end of your posting (vB3 default setting) * Above your posting * At the left hand side of your posting This hack is using phrases so it's very easy to translate. The setting can be changed for every post so you can decide which one is the best for your attachments. Why is this hack 'beta'? Well, it works.. But is has only been tested by me ;) It has no installer yet and the markup could be a bit better but I hope you'll help me with that. Is there an Online Demo? No I don't think so but I'll provide you with screenshots :) Have fun with it and please help me fixing errors so that this hack can be moved to 'Full Releases' as soon as possible :) THIS HACK IS BETA..! PLEASE BACKUP YOUR DATABASE :devious: https://vborg.vbsupport.ru/ Changes: * Instructions are updated to v.02 and nexialys' Fix is in. Thank you :) * Instructions are updated again and the current version is V0.3 :) |
This is a very good idea: well structured...
Nice job! |
I was anoyed by that exact issue just last night. Right on!
|
@Mr Nase.. the default language id is not 0, but -1...
so it is [sql]INSERT INTO `phrase` VALUES ('', -1, 'attachstyle', 'Attachment Style:', 1);[/sql] |
This is awesome - when I finally upgrade I'll install!
|
Thank you nexialys, I updated the instructions. :)
|
Beautiful!!!
/me Installs and does a backflip. |
This error after a new post:
Invalid SQL: INSERT INTO thread(title, lastpost, forumid, open, replycount, postusername, postuserid, lastposter, dateline, iconid, visible, attach, attachstyle, similar) VALUES ('test334', 1097513223, 22, 1, 0, 'name', 1, 'name', 1097513223, 0, 1, 1, '') mysql error: Column count doesn't match value count at row 1 |
Are you sure you made the database modification?
You need to do that by using the following query: Code:
ALTER TABLE `post` ADD `attachstyle2` TINYINT( 2 ) DEFAULT '1' NOT NULL; You may have to replace post with vb3_post or something like that according to the database prefix you have chosen during the installation. |
Yes, the db modifications are correct. Also i've no prefix for the tables. :(
In editpost.php there are 2 lines of this code: attach = attach + $newattachments The first one is for 'UPDATE " . TABLE_PREFIX . "thread SET..' The second one is in here: UPDATE " . TABLE_PREFIX . "post SET title = '" . addslashes(htmlspecialchars_uni($edit['title'])) . "', pagetext = '" . addslashes($edit['message']) . "', allowsmilie = $edit[allowsmilie], showsignature = $edit[signature], iconid = $edit[iconid], attach = attach + $newattachments WHERE postid = $postid "); |
All times are GMT. The time now is 09:58 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 | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|