Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.0 > vBulletin 3.0 Beta Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Attachmentstyle, choose where to place your Attachments Details »»
Attachmentstyle, choose where to place your Attachments
Version: 1.00, by MrNase MrNase is offline
Developer Last Online: Sep 2010 Show Printable Version Email this Page

Version: 3.0.3 Rating:
Released: 10-02-2004 Last Update: Never Installs: 13
Is in Beta Stage  
No support by the author.

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:



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

Show Your Support

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

Comments
  #2  
Old 10-03-2004, 08:15 PM
Natch's Avatar
Natch Natch is offline
 
Join Date: Nov 2002
Location: Australia
Posts: 851
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This is a very good idea: well structured...

Nice job!
Reply With Quote
  #3  
Old 10-03-2004, 09:31 PM
Bryan Ex's Avatar
Bryan Ex Bryan Ex is offline
 
Join Date: Feb 2004
Location: Canada
Posts: 233
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I was anoyed by that exact issue just last night. Right on!
Reply With Quote
  #4  
Old 10-03-2004, 09:33 PM
nexialys
Guest
 
Posts: n/a
Default

@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]
Reply With Quote
  #5  
Old 10-03-2004, 09:39 PM
FleaBag's Avatar
FleaBag FleaBag is offline
 
Join Date: Dec 2001
Posts: 1,674
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This is awesome - when I finally upgrade I'll install!
Reply With Quote
  #6  
Old 10-04-2004, 03:47 AM
MrNase MrNase is offline
 
Join Date: May 2003
Location: Germany
Posts: 670
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thank you nexialys, I updated the instructions.
Reply With Quote
  #7  
Old 10-05-2004, 04:25 PM
jugo jugo is offline
 
Join Date: Feb 2004
Location: Reading your emails.
Posts: 573
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Beautiful!!!

/me Installs and does a backflip.
Reply With Quote
  #8  
Old 10-11-2004, 03:48 PM
NuclioN's Avatar
NuclioN NuclioN is offline
 
Join Date: Aug 2002
Posts: 955
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #9  
Old 10-12-2004, 12:41 PM
MrNase MrNase is offline
 
Join Date: May 2003
Location: Germany
Posts: 670
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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;
And (important!!):
You may have to replace post with vb3_post or something like that according to the database prefix you have chosen during the installation.
Reply With Quote
  #10  
Old 10-12-2004, 12:43 PM
NuclioN's Avatar
NuclioN NuclioN is offline
 
Join Date: Aug 2002
Posts: 955
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
");
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 01:46 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.04559 seconds
  • Memory Usage 2,288KB
  • Queries Executed 23 (?)
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)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
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (9)postbit_onlinestatus
  • (10)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