vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Beta Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=34)
-   -   Attachmentstyle, choose where to place your Attachments (https://vborg.vbsupport.ru/showthread.php?t=70142)

MrNase 10-02-2004 10:00 PM

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 :)

Natch 10-03-2004 08:15 PM

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

Nice job!

Bryan Ex 10-03-2004 09:31 PM

I was anoyed by that exact issue just last night. Right on!

nexialys 10-03-2004 09:33 PM

@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]

FleaBag 10-03-2004 09:39 PM

This is awesome - when I finally upgrade I'll install!

MrNase 10-04-2004 03:47 AM

Thank you nexialys, I updated the instructions. :)

jugo 10-05-2004 04:25 PM

Beautiful!!!

/me Installs and does a backflip.

NuclioN 10-11-2004 03:48 PM

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

MrNase 10-12-2004 12:41 PM

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.

NuclioN 10-12-2004 12:43 PM

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
  • Page Generation 0.01118 seconds
  • Memory Usage 1,733KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete